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
 
513 rajveer 53
    public boolean addAddressForUser(Address address, long userid, long timestamp, boolean setDefault) 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
 
513 rajveer 481
    public boolean addAddressForUser(Address address, long userid, long timestamp, boolean setDefault) throws UserContextException, TException
48 ashish 482
    {
513 rajveer 483
      send_addAddressForUser(address, userid, timestamp, setDefault);
48 ashish 484
      return recv_addAddressForUser();
485
    }
486
 
513 rajveer 487
    public void send_addAddressForUser(Address address, long userid, long timestamp, boolean setDefault) 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;
513 rajveer 494
      args.setDefault = setDefault;
48 ashish 495
      args.write(oprot_);
496
      oprot_.writeMessageEnd();
497
      oprot_.getTransport().flush();
498
    }
499
 
500
    public boolean recv_addAddressForUser() throws UserContextException, TException
501
    {
502
      TMessage msg = iprot_.readMessageBegin();
503
      if (msg.type == TMessageType.EXCEPTION) {
504
        TApplicationException x = TApplicationException.read(iprot_);
505
        iprot_.readMessageEnd();
506
        throw x;
507
      }
508
      addAddressForUser_result result = new addAddressForUser_result();
509
      result.read(iprot_);
510
      iprot_.readMessageEnd();
511
      if (result.isSetSuccess()) {
512
        return result.success;
513
      }
514
      if (result.ucx != null) {
515
        throw result.ucx;
516
      }
517
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
518
    }
519
 
520
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
521
    {
522
      send_removeAddressForUser(userid, addressId);
523
      return recv_removeAddressForUser();
524
    }
525
 
526
    public void send_removeAddressForUser(long userid, long addressId) throws TException
527
    {
528
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
529
      removeAddressForUser_args args = new removeAddressForUser_args();
530
      args.userid = userid;
531
      args.addressId = addressId;
532
      args.write(oprot_);
533
      oprot_.writeMessageEnd();
534
      oprot_.getTransport().flush();
535
    }
536
 
537
    public boolean recv_removeAddressForUser() throws UserContextException, TException
538
    {
539
      TMessage msg = iprot_.readMessageBegin();
540
      if (msg.type == TMessageType.EXCEPTION) {
541
        TApplicationException x = TApplicationException.read(iprot_);
542
        iprot_.readMessageEnd();
543
        throw x;
544
      }
545
      removeAddressForUser_result result = new removeAddressForUser_result();
546
      result.read(iprot_);
547
      iprot_.readMessageEnd();
548
      if (result.isSetSuccess()) {
549
        return result.success;
550
      }
551
      if (result.ucx != null) {
552
        throw result.ucx;
553
      }
554
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
555
    }
556
 
557
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
558
    {
559
      send_setUserAsLoggedIn(userId, timestamp);
560
      return recv_setUserAsLoggedIn();
561
    }
562
 
563
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
564
    {
565
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
566
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
567
      args.userId = userId;
568
      args.timestamp = timestamp;
569
      args.write(oprot_);
570
      oprot_.writeMessageEnd();
571
      oprot_.getTransport().flush();
572
    }
573
 
574
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
575
    {
576
      TMessage msg = iprot_.readMessageBegin();
577
      if (msg.type == TMessageType.EXCEPTION) {
578
        TApplicationException x = TApplicationException.read(iprot_);
579
        iprot_.readMessageEnd();
580
        throw x;
581
      }
582
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
583
      result.read(iprot_);
584
      iprot_.readMessageEnd();
585
      if (result.isSetSuccess()) {
586
        return result.success;
587
      }
588
      if (result.ucx != null) {
589
        throw result.ucx;
590
      }
591
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
592
    }
593
 
594
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
595
    {
596
      send_setUserAsLoggedOut(userid, timestamp);
597
      return recv_setUserAsLoggedOut();
598
    }
599
 
600
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
601
    {
602
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
603
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
604
      args.userid = userid;
605
      args.timestamp = timestamp;
606
      args.write(oprot_);
607
      oprot_.writeMessageEnd();
608
      oprot_.getTransport().flush();
609
    }
610
 
611
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
612
    {
613
      TMessage msg = iprot_.readMessageBegin();
614
      if (msg.type == TMessageType.EXCEPTION) {
615
        TApplicationException x = TApplicationException.read(iprot_);
616
        iprot_.readMessageEnd();
617
        throw x;
618
      }
619
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
620
      result.read(iprot_);
621
      iprot_.readMessageEnd();
622
      if (result.isSetSuccess()) {
623
        return result.success;
624
      }
625
      if (result.ucx != null) {
626
        throw result.ucx;
627
      }
628
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
629
    }
630
 
506 rajveer 631
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
632
    {
633
      send_setDefaultAddress(userid, addressId);
634
      return recv_setDefaultAddress();
635
    }
636
 
637
    public void send_setDefaultAddress(long userid, long addressId) throws TException
638
    {
639
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
640
      setDefaultAddress_args args = new setDefaultAddress_args();
641
      args.userid = userid;
642
      args.addressId = addressId;
643
      args.write(oprot_);
644
      oprot_.writeMessageEnd();
645
      oprot_.getTransport().flush();
646
    }
647
 
648
    public boolean recv_setDefaultAddress() throws UserContextException, TException
649
    {
650
      TMessage msg = iprot_.readMessageBegin();
651
      if (msg.type == TMessageType.EXCEPTION) {
652
        TApplicationException x = TApplicationException.read(iprot_);
653
        iprot_.readMessageEnd();
654
        throw x;
655
      }
656
      setDefaultAddress_result result = new setDefaultAddress_result();
657
      result.read(iprot_);
658
      iprot_.readMessageEnd();
659
      if (result.isSetSuccess()) {
660
        return result.success;
661
      }
662
      if (result.ucx != null) {
663
        throw result.ucx;
664
      }
665
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
666
    }
667
 
48 ashish 668
    public boolean updatePassword(long userid, String password) throws UserContextException, TException
669
    {
670
      send_updatePassword(userid, password);
671
      return recv_updatePassword();
672
    }
673
 
674
    public void send_updatePassword(long userid, String password) throws TException
675
    {
676
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
677
      updatePassword_args args = new updatePassword_args();
678
      args.userid = userid;
679
      args.password = password;
680
      args.write(oprot_);
681
      oprot_.writeMessageEnd();
682
      oprot_.getTransport().flush();
683
    }
684
 
685
    public boolean recv_updatePassword() throws UserContextException, TException
686
    {
687
      TMessage msg = iprot_.readMessageBegin();
688
      if (msg.type == TMessageType.EXCEPTION) {
689
        TApplicationException x = TApplicationException.read(iprot_);
690
        iprot_.readMessageEnd();
691
        throw x;
692
      }
693
      updatePassword_result result = new updatePassword_result();
694
      result.read(iprot_);
695
      iprot_.readMessageEnd();
696
      if (result.isSetSuccess()) {
697
        return result.success;
698
      }
699
      if (result.ucx != null) {
700
        throw result.ucx;
701
      }
702
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
703
    }
704
 
123 ashish 705
    public boolean deleteUser(long userid, boolean isSessionId) throws UserContextException, TException
48 ashish 706
    {
123 ashish 707
      send_deleteUser(userid, isSessionId);
48 ashish 708
      return recv_deleteUser();
709
    }
710
 
123 ashish 711
    public void send_deleteUser(long userid, boolean isSessionId) throws TException
48 ashish 712
    {
713
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
714
      deleteUser_args args = new deleteUser_args();
715
      args.userid = userid;
123 ashish 716
      args.isSessionId = isSessionId;
48 ashish 717
      args.write(oprot_);
718
      oprot_.writeMessageEnd();
719
      oprot_.getTransport().flush();
720
    }
721
 
722
    public boolean recv_deleteUser() throws UserContextException, TException
723
    {
724
      TMessage msg = iprot_.readMessageBegin();
725
      if (msg.type == TMessageType.EXCEPTION) {
726
        TApplicationException x = TApplicationException.read(iprot_);
727
        iprot_.readMessageEnd();
728
        throw x;
729
      }
730
      deleteUser_result result = new deleteUser_result();
731
      result.read(iprot_);
732
      iprot_.readMessageEnd();
733
      if (result.isSetSuccess()) {
734
        return result.success;
735
      }
736
      if (result.ucx != null) {
737
        throw result.ucx;
738
      }
739
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
740
    }
741
 
742
    public boolean sendEmailVerification(long userid) throws UserContextException, TException
743
    {
744
      send_sendEmailVerification(userid);
745
      return recv_sendEmailVerification();
746
    }
747
 
748
    public void send_sendEmailVerification(long userid) throws TException
749
    {
750
      oprot_.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.CALL, seqid_));
751
      sendEmailVerification_args args = new sendEmailVerification_args();
752
      args.userid = userid;
753
      args.write(oprot_);
754
      oprot_.writeMessageEnd();
755
      oprot_.getTransport().flush();
756
    }
757
 
758
    public boolean recv_sendEmailVerification() throws UserContextException, TException
759
    {
760
      TMessage msg = iprot_.readMessageBegin();
761
      if (msg.type == TMessageType.EXCEPTION) {
762
        TApplicationException x = TApplicationException.read(iprot_);
763
        iprot_.readMessageEnd();
764
        throw x;
765
      }
766
      sendEmailVerification_result result = new sendEmailVerification_result();
767
      result.read(iprot_);
768
      iprot_.readMessageEnd();
769
      if (result.isSetSuccess()) {
770
        return result.success;
771
      }
772
      if (result.ucx != null) {
773
        throw result.ucx;
774
      }
775
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendEmailVerification failed: unknown result");
776
    }
777
 
778
    public boolean sendSMSVerification(long userid) throws UserContextException, TException
779
    {
780
      send_sendSMSVerification(userid);
781
      return recv_sendSMSVerification();
782
    }
783
 
784
    public void send_sendSMSVerification(long userid) throws TException
785
    {
786
      oprot_.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.CALL, seqid_));
787
      sendSMSVerification_args args = new sendSMSVerification_args();
788
      args.userid = userid;
789
      args.write(oprot_);
790
      oprot_.writeMessageEnd();
791
      oprot_.getTransport().flush();
792
    }
793
 
794
    public boolean recv_sendSMSVerification() throws UserContextException, TException
795
    {
796
      TMessage msg = iprot_.readMessageBegin();
797
      if (msg.type == TMessageType.EXCEPTION) {
798
        TApplicationException x = TApplicationException.read(iprot_);
799
        iprot_.readMessageEnd();
800
        throw x;
801
      }
802
      sendSMSVerification_result result = new sendSMSVerification_result();
803
      result.read(iprot_);
804
      iprot_.readMessageEnd();
805
      if (result.isSetSuccess()) {
806
        return result.success;
807
      }
808
      if (result.ucx != null) {
809
        throw result.ucx;
810
      }
811
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendSMSVerification failed: unknown result");
812
    }
813
 
814
    public boolean confirmEmailVerification(long userid) throws UserContextException, TException
815
    {
816
      send_confirmEmailVerification(userid);
817
      return recv_confirmEmailVerification();
818
    }
819
 
820
    public void send_confirmEmailVerification(long userid) throws TException
821
    {
822
      oprot_.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.CALL, seqid_));
823
      confirmEmailVerification_args args = new confirmEmailVerification_args();
824
      args.userid = userid;
825
      args.write(oprot_);
826
      oprot_.writeMessageEnd();
827
      oprot_.getTransport().flush();
828
    }
829
 
830
    public boolean recv_confirmEmailVerification() throws UserContextException, TException
831
    {
832
      TMessage msg = iprot_.readMessageBegin();
833
      if (msg.type == TMessageType.EXCEPTION) {
834
        TApplicationException x = TApplicationException.read(iprot_);
835
        iprot_.readMessageEnd();
836
        throw x;
837
      }
838
      confirmEmailVerification_result result = new confirmEmailVerification_result();
839
      result.read(iprot_);
840
      iprot_.readMessageEnd();
841
      if (result.isSetSuccess()) {
842
        return result.success;
843
      }
844
      if (result.ucx != null) {
845
        throw result.ucx;
846
      }
847
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "confirmEmailVerification failed: unknown result");
848
    }
849
 
850
    public boolean confirmSMSVerification(long userid) throws UserContextException, TException
851
    {
852
      send_confirmSMSVerification(userid);
853
      return recv_confirmSMSVerification();
854
    }
855
 
856
    public void send_confirmSMSVerification(long userid) throws TException
857
    {
858
      oprot_.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.CALL, seqid_));
859
      confirmSMSVerification_args args = new confirmSMSVerification_args();
860
      args.userid = userid;
861
      args.write(oprot_);
862
      oprot_.writeMessageEnd();
863
      oprot_.getTransport().flush();
864
    }
865
 
866
    public boolean recv_confirmSMSVerification() throws UserContextException, TException
867
    {
868
      TMessage msg = iprot_.readMessageBegin();
869
      if (msg.type == TMessageType.EXCEPTION) {
870
        TApplicationException x = TApplicationException.read(iprot_);
871
        iprot_.readMessageEnd();
872
        throw x;
873
      }
874
      confirmSMSVerification_result result = new confirmSMSVerification_result();
875
      result.read(iprot_);
876
      iprot_.readMessageEnd();
877
      if (result.isSetSuccess()) {
878
        return result.success;
879
      }
880
      if (result.ucx != null) {
881
        throw result.ucx;
882
      }
883
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "confirmSMSVerification failed: unknown result");
884
    }
885
 
886
    public boolean addSocialhandle(long userid, String socialService, String handle) throws UserContextException, TException
887
    {
888
      send_addSocialhandle(userid, socialService, handle);
889
      return recv_addSocialhandle();
890
    }
891
 
892
    public void send_addSocialhandle(long userid, String socialService, String handle) throws TException
893
    {
894
      oprot_.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.CALL, seqid_));
895
      addSocialhandle_args args = new addSocialhandle_args();
896
      args.userid = userid;
897
      args.socialService = socialService;
898
      args.handle = handle;
899
      args.write(oprot_);
900
      oprot_.writeMessageEnd();
901
      oprot_.getTransport().flush();
902
    }
903
 
904
    public boolean recv_addSocialhandle() throws UserContextException, TException
905
    {
906
      TMessage msg = iprot_.readMessageBegin();
907
      if (msg.type == TMessageType.EXCEPTION) {
908
        TApplicationException x = TApplicationException.read(iprot_);
909
        iprot_.readMessageEnd();
910
        throw x;
911
      }
912
      addSocialhandle_result result = new addSocialhandle_result();
913
      result.read(iprot_);
914
      iprot_.readMessageEnd();
915
      if (result.isSetSuccess()) {
916
        return result.success;
917
      }
918
      if (result.ucx != null) {
919
        throw result.ucx;
920
      }
921
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addSocialhandle failed: unknown result");
922
    }
923
 
130 ashish 924
    public boolean sendNewPasswordById(long userid) throws UserContextException, TException
925
    {
926
      send_sendNewPasswordById(userid);
927
      return recv_sendNewPasswordById();
928
    }
929
 
930
    public void send_sendNewPasswordById(long userid) throws TException
931
    {
932
      oprot_.writeMessageBegin(new TMessage("sendNewPasswordById", TMessageType.CALL, seqid_));
933
      sendNewPasswordById_args args = new sendNewPasswordById_args();
934
      args.userid = userid;
935
      args.write(oprot_);
936
      oprot_.writeMessageEnd();
937
      oprot_.getTransport().flush();
938
    }
939
 
940
    public boolean recv_sendNewPasswordById() throws UserContextException, TException
941
    {
942
      TMessage msg = iprot_.readMessageBegin();
943
      if (msg.type == TMessageType.EXCEPTION) {
944
        TApplicationException x = TApplicationException.read(iprot_);
945
        iprot_.readMessageEnd();
946
        throw x;
947
      }
948
      sendNewPasswordById_result result = new sendNewPasswordById_result();
949
      result.read(iprot_);
950
      iprot_.readMessageEnd();
951
      if (result.isSetSuccess()) {
952
        return result.success;
953
      }
954
      if (result.ucx != null) {
955
        throw result.ucx;
956
      }
957
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendNewPasswordById failed: unknown result");
958
    }
959
 
960
    public boolean sendNewPasswordByHandle(String emailOrHandle, boolean isEmail) throws UserContextException, TException
961
    {
962
      send_sendNewPasswordByHandle(emailOrHandle, isEmail);
963
      return recv_sendNewPasswordByHandle();
964
    }
965
 
966
    public void send_sendNewPasswordByHandle(String emailOrHandle, boolean isEmail) throws TException
967
    {
968
      oprot_.writeMessageBegin(new TMessage("sendNewPasswordByHandle", TMessageType.CALL, seqid_));
969
      sendNewPasswordByHandle_args args = new sendNewPasswordByHandle_args();
970
      args.emailOrHandle = emailOrHandle;
971
      args.isEmail = isEmail;
972
      args.write(oprot_);
973
      oprot_.writeMessageEnd();
974
      oprot_.getTransport().flush();
975
    }
976
 
977
    public boolean recv_sendNewPasswordByHandle() throws UserContextException, TException
978
    {
979
      TMessage msg = iprot_.readMessageBegin();
980
      if (msg.type == TMessageType.EXCEPTION) {
981
        TApplicationException x = TApplicationException.read(iprot_);
982
        iprot_.readMessageEnd();
983
        throw x;
984
      }
985
      sendNewPasswordByHandle_result result = new sendNewPasswordByHandle_result();
986
      result.read(iprot_);
987
      iprot_.readMessageEnd();
988
      if (result.isSetSuccess()) {
989
        return result.success;
990
      }
991
      if (result.ucx != null) {
992
        throw result.ucx;
993
      }
994
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendNewPasswordByHandle failed: unknown result");
995
    }
996
 
48 ashish 997
  }
998
  public static class Processor implements TProcessor {
999
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1000
    public Processor(Iface iface)
1001
    {
1002
      iface_ = iface;
1003
      processMap_.put("createContext", new createContext());
1004
      processMap_.put("getContextFromId", new getContextFromId());
1005
      processMap_.put("getContextFromEmailOrHandle", new getContextFromEmailOrHandle());
1006
      processMap_.put("getState", new getState());
1007
      processMap_.put("getPrimaryInfo", new getPrimaryInfo());
1008
      processMap_.put("getInternalInfo", new getInternalInfo());
1009
      processMap_.put("getContext", new getContext());
123 ashish 1010
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1011
      processMap_.put("userExists", new userExists());
1012
      processMap_.put("addIpAdressForUser", new addIpAdressForUser());
1013
      processMap_.put("addAddressForUser", new addAddressForUser());
1014
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1015
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1016
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1017
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1018
      processMap_.put("updatePassword", new updatePassword());
1019
      processMap_.put("deleteUser", new deleteUser());
1020
      processMap_.put("sendEmailVerification", new sendEmailVerification());
1021
      processMap_.put("sendSMSVerification", new sendSMSVerification());
1022
      processMap_.put("confirmEmailVerification", new confirmEmailVerification());
1023
      processMap_.put("confirmSMSVerification", new confirmSMSVerification());
1024
      processMap_.put("addSocialhandle", new addSocialhandle());
130 ashish 1025
      processMap_.put("sendNewPasswordById", new sendNewPasswordById());
1026
      processMap_.put("sendNewPasswordByHandle", new sendNewPasswordByHandle());
48 ashish 1027
    }
1028
 
1029
    protected static interface ProcessFunction {
1030
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1031
    }
1032
 
1033
    private Iface iface_;
1034
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1035
 
1036
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1037
    {
1038
      TMessage msg = iprot.readMessageBegin();
1039
      ProcessFunction fn = processMap_.get(msg.name);
1040
      if (fn == null) {
1041
        TProtocolUtil.skip(iprot, TType.STRUCT);
1042
        iprot.readMessageEnd();
1043
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1044
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1045
        x.write(oprot);
1046
        oprot.writeMessageEnd();
1047
        oprot.getTransport().flush();
1048
        return true;
1049
      }
1050
      fn.process(msg.seqid, iprot, oprot);
1051
      return true;
1052
    }
1053
 
1054
    private class createContext implements ProcessFunction {
1055
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1056
      {
1057
        createContext_args args = new createContext_args();
1058
        args.read(iprot);
1059
        iprot.readMessageEnd();
1060
        createContext_result result = new createContext_result();
1061
        try {
1062
          result.success = iface_.createContext(args.context, args.updateExisting);
1063
        } catch (UserContextException cex) {
1064
          result.cex = cex;
1065
        } catch (Throwable th) {
1066
          LOGGER.error("Internal error processing createContext", th);
1067
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createContext");
1068
          oprot.writeMessageBegin(new TMessage("createContext", TMessageType.EXCEPTION, seqid));
1069
          x.write(oprot);
1070
          oprot.writeMessageEnd();
1071
          oprot.getTransport().flush();
1072
          return;
1073
        }
1074
        oprot.writeMessageBegin(new TMessage("createContext", TMessageType.REPLY, seqid));
1075
        result.write(oprot);
1076
        oprot.writeMessageEnd();
1077
        oprot.getTransport().flush();
1078
      }
1079
 
1080
    }
1081
 
1082
    private class getContextFromId implements ProcessFunction {
1083
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1084
      {
1085
        getContextFromId_args args = new getContextFromId_args();
1086
        args.read(iprot);
1087
        iprot.readMessageEnd();
1088
        getContextFromId_result result = new getContextFromId_result();
1089
        try {
123 ashish 1090
          result.success = iface_.getContextFromId(args.userId, args.isSessionId);
48 ashish 1091
        } catch (UserContextException ucx) {
1092
          result.ucx = ucx;
1093
        } catch (Throwable th) {
1094
          LOGGER.error("Internal error processing getContextFromId", th);
1095
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContextFromId");
1096
          oprot.writeMessageBegin(new TMessage("getContextFromId", TMessageType.EXCEPTION, seqid));
1097
          x.write(oprot);
1098
          oprot.writeMessageEnd();
1099
          oprot.getTransport().flush();
1100
          return;
1101
        }
1102
        oprot.writeMessageBegin(new TMessage("getContextFromId", TMessageType.REPLY, seqid));
1103
        result.write(oprot);
1104
        oprot.writeMessageEnd();
1105
        oprot.getTransport().flush();
1106
      }
1107
 
1108
    }
1109
 
1110
    private class getContextFromEmailOrHandle implements ProcessFunction {
1111
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1112
      {
1113
        getContextFromEmailOrHandle_args args = new getContextFromEmailOrHandle_args();
1114
        args.read(iprot);
1115
        iprot.readMessageEnd();
1116
        getContextFromEmailOrHandle_result result = new getContextFromEmailOrHandle_result();
1117
        try {
1118
          result.success = iface_.getContextFromEmailOrHandle(args.emailorhandle, args.isEmail);
1119
        } catch (UserContextException ucx) {
1120
          result.ucx = ucx;
1121
        } catch (Throwable th) {
1122
          LOGGER.error("Internal error processing getContextFromEmailOrHandle", th);
1123
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContextFromEmailOrHandle");
1124
          oprot.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.EXCEPTION, seqid));
1125
          x.write(oprot);
1126
          oprot.writeMessageEnd();
1127
          oprot.getTransport().flush();
1128
          return;
1129
        }
1130
        oprot.writeMessageBegin(new TMessage("getContextFromEmailOrHandle", TMessageType.REPLY, seqid));
1131
        result.write(oprot);
1132
        oprot.writeMessageEnd();
1133
        oprot.getTransport().flush();
1134
      }
1135
 
1136
    }
1137
 
1138
    private class getState implements ProcessFunction {
1139
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1140
      {
1141
        getState_args args = new getState_args();
1142
        args.read(iprot);
1143
        iprot.readMessageEnd();
1144
        getState_result result = new getState_result();
1145
        try {
123 ashish 1146
          result.success = iface_.getState(args.userId, args.isSessionId);
48 ashish 1147
        } catch (UserContextException ucx) {
1148
          result.ucx = ucx;
1149
        } catch (Throwable th) {
1150
          LOGGER.error("Internal error processing getState", th);
1151
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getState");
1152
          oprot.writeMessageBegin(new TMessage("getState", TMessageType.EXCEPTION, seqid));
1153
          x.write(oprot);
1154
          oprot.writeMessageEnd();
1155
          oprot.getTransport().flush();
1156
          return;
1157
        }
1158
        oprot.writeMessageBegin(new TMessage("getState", TMessageType.REPLY, seqid));
1159
        result.write(oprot);
1160
        oprot.writeMessageEnd();
1161
        oprot.getTransport().flush();
1162
      }
1163
 
1164
    }
1165
 
1166
    private class getPrimaryInfo implements ProcessFunction {
1167
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1168
      {
1169
        getPrimaryInfo_args args = new getPrimaryInfo_args();
1170
        args.read(iprot);
1171
        iprot.readMessageEnd();
1172
        getPrimaryInfo_result result = new getPrimaryInfo_result();
1173
        try {
123 ashish 1174
          result.success = iface_.getPrimaryInfo(args.userId, args.isSessionId);
48 ashish 1175
        } catch (UserContextException ucx) {
1176
          result.ucx = ucx;
1177
        } catch (Throwable th) {
1178
          LOGGER.error("Internal error processing getPrimaryInfo", th);
1179
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPrimaryInfo");
1180
          oprot.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.EXCEPTION, seqid));
1181
          x.write(oprot);
1182
          oprot.writeMessageEnd();
1183
          oprot.getTransport().flush();
1184
          return;
1185
        }
1186
        oprot.writeMessageBegin(new TMessage("getPrimaryInfo", TMessageType.REPLY, seqid));
1187
        result.write(oprot);
1188
        oprot.writeMessageEnd();
1189
        oprot.getTransport().flush();
1190
      }
1191
 
1192
    }
1193
 
1194
    private class getInternalInfo implements ProcessFunction {
1195
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1196
      {
1197
        getInternalInfo_args args = new getInternalInfo_args();
1198
        args.read(iprot);
1199
        iprot.readMessageEnd();
1200
        getInternalInfo_result result = new getInternalInfo_result();
1201
        try {
123 ashish 1202
          result.success = iface_.getInternalInfo(args.userId, args.isSessionId);
48 ashish 1203
        } catch (UserContextException ucx) {
1204
          result.ucx = ucx;
1205
        } catch (Throwable th) {
1206
          LOGGER.error("Internal error processing getInternalInfo", th);
1207
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getInternalInfo");
1208
          oprot.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.EXCEPTION, seqid));
1209
          x.write(oprot);
1210
          oprot.writeMessageEnd();
1211
          oprot.getTransport().flush();
1212
          return;
1213
        }
1214
        oprot.writeMessageBegin(new TMessage("getInternalInfo", TMessageType.REPLY, seqid));
1215
        result.write(oprot);
1216
        oprot.writeMessageEnd();
1217
        oprot.getTransport().flush();
1218
      }
1219
 
1220
    }
1221
 
1222
    private class getContext implements ProcessFunction {
1223
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1224
      {
1225
        getContext_args args = new getContext_args();
1226
        args.read(iprot);
1227
        iprot.readMessageEnd();
1228
        getContext_result result = new getContext_result();
1229
        try {
1230
          result.success = iface_.getContext(args.email, args.password);
1231
        } catch (AuthenticationException ax) {
1232
          result.ax = ax;
1233
        } catch (Throwable th) {
1234
          LOGGER.error("Internal error processing getContext", th);
1235
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getContext");
1236
          oprot.writeMessageBegin(new TMessage("getContext", TMessageType.EXCEPTION, seqid));
1237
          x.write(oprot);
1238
          oprot.writeMessageEnd();
1239
          oprot.getTransport().flush();
1240
          return;
1241
        }
1242
        oprot.writeMessageBegin(new TMessage("getContext", TMessageType.REPLY, seqid));
1243
        result.write(oprot);
1244
        oprot.writeMessageEnd();
1245
        oprot.getTransport().flush();
1246
      }
1247
 
1248
    }
1249
 
123 ashish 1250
    private class authenticateUser implements ProcessFunction {
1251
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1252
      {
1253
        authenticateUser_args args = new authenticateUser_args();
1254
        args.read(iprot);
1255
        iprot.readMessageEnd();
1256
        authenticateUser_result result = new authenticateUser_result();
1257
        try {
1258
          result.success = iface_.authenticateUser(args.handle, args.password, args.isEmail);
1259
          result.setSuccessIsSet(true);
1260
        } catch (AuthenticationException ax) {
1261
          result.ax = ax;
1262
        } catch (Throwable th) {
1263
          LOGGER.error("Internal error processing authenticateUser", th);
1264
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1265
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1266
          x.write(oprot);
1267
          oprot.writeMessageEnd();
1268
          oprot.getTransport().flush();
1269
          return;
1270
        }
1271
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1272
        result.write(oprot);
1273
        oprot.writeMessageEnd();
1274
        oprot.getTransport().flush();
1275
      }
1276
 
1277
    }
1278
 
48 ashish 1279
    private class userExists implements ProcessFunction {
1280
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1281
      {
1282
        userExists_args args = new userExists_args();
1283
        args.read(iprot);
1284
        iprot.readMessageEnd();
1285
        userExists_result result = new userExists_result();
1286
        try {
1287
          result.success = iface_.userExists(args.email);
1288
          result.setSuccessIsSet(true);
1289
        } catch (UserContextException ucx) {
1290
          result.ucx = ucx;
1291
        } catch (Throwable th) {
1292
          LOGGER.error("Internal error processing userExists", th);
1293
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
1294
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
1295
          x.write(oprot);
1296
          oprot.writeMessageEnd();
1297
          oprot.getTransport().flush();
1298
          return;
1299
        }
1300
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
1301
        result.write(oprot);
1302
        oprot.writeMessageEnd();
1303
        oprot.getTransport().flush();
1304
      }
1305
 
1306
    }
1307
 
1308
    private class addIpAdressForUser implements ProcessFunction {
1309
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1310
      {
1311
        addIpAdressForUser_args args = new addIpAdressForUser_args();
1312
        args.read(iprot);
1313
        iprot.readMessageEnd();
1314
        addIpAdressForUser_result result = new addIpAdressForUser_result();
1315
        try {
1316
          result.success = iface_.addIpAdressForUser(args.ip, args.timestamp, args.userId);
1317
          result.setSuccessIsSet(true);
1318
        } catch (UserContextException ucx) {
1319
          result.ucx = ucx;
1320
        } catch (Throwable th) {
1321
          LOGGER.error("Internal error processing addIpAdressForUser", th);
1322
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addIpAdressForUser");
1323
          oprot.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.EXCEPTION, seqid));
1324
          x.write(oprot);
1325
          oprot.writeMessageEnd();
1326
          oprot.getTransport().flush();
1327
          return;
1328
        }
1329
        oprot.writeMessageBegin(new TMessage("addIpAdressForUser", TMessageType.REPLY, seqid));
1330
        result.write(oprot);
1331
        oprot.writeMessageEnd();
1332
        oprot.getTransport().flush();
1333
      }
1334
 
1335
    }
1336
 
1337
    private class addAddressForUser implements ProcessFunction {
1338
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1339
      {
1340
        addAddressForUser_args args = new addAddressForUser_args();
1341
        args.read(iprot);
1342
        iprot.readMessageEnd();
1343
        addAddressForUser_result result = new addAddressForUser_result();
1344
        try {
513 rajveer 1345
          result.success = iface_.addAddressForUser(args.address, args.userid, args.timestamp, args.setDefault);
48 ashish 1346
          result.setSuccessIsSet(true);
1347
        } catch (UserContextException ucx) {
1348
          result.ucx = ucx;
1349
        } catch (Throwable th) {
1350
          LOGGER.error("Internal error processing addAddressForUser", th);
1351
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
1352
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
1353
          x.write(oprot);
1354
          oprot.writeMessageEnd();
1355
          oprot.getTransport().flush();
1356
          return;
1357
        }
1358
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
1359
        result.write(oprot);
1360
        oprot.writeMessageEnd();
1361
        oprot.getTransport().flush();
1362
      }
1363
 
1364
    }
1365
 
1366
    private class removeAddressForUser implements ProcessFunction {
1367
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1368
      {
1369
        removeAddressForUser_args args = new removeAddressForUser_args();
1370
        args.read(iprot);
1371
        iprot.readMessageEnd();
1372
        removeAddressForUser_result result = new removeAddressForUser_result();
1373
        try {
1374
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
1375
          result.setSuccessIsSet(true);
1376
        } catch (UserContextException ucx) {
1377
          result.ucx = ucx;
1378
        } catch (Throwable th) {
1379
          LOGGER.error("Internal error processing removeAddressForUser", th);
1380
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
1381
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
1382
          x.write(oprot);
1383
          oprot.writeMessageEnd();
1384
          oprot.getTransport().flush();
1385
          return;
1386
        }
1387
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
1388
        result.write(oprot);
1389
        oprot.writeMessageEnd();
1390
        oprot.getTransport().flush();
1391
      }
1392
 
1393
    }
1394
 
1395
    private class setUserAsLoggedIn implements ProcessFunction {
1396
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1397
      {
1398
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
1399
        args.read(iprot);
1400
        iprot.readMessageEnd();
1401
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
1402
        try {
1403
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
1404
          result.setSuccessIsSet(true);
1405
        } catch (UserContextException ucx) {
1406
          result.ucx = ucx;
1407
        } catch (Throwable th) {
1408
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
1409
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
1410
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
1411
          x.write(oprot);
1412
          oprot.writeMessageEnd();
1413
          oprot.getTransport().flush();
1414
          return;
1415
        }
1416
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
1417
        result.write(oprot);
1418
        oprot.writeMessageEnd();
1419
        oprot.getTransport().flush();
1420
      }
1421
 
1422
    }
1423
 
1424
    private class setUserAsLoggedOut implements ProcessFunction {
1425
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1426
      {
1427
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
1428
        args.read(iprot);
1429
        iprot.readMessageEnd();
1430
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
1431
        try {
1432
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
1433
          result.setSuccessIsSet(true);
1434
        } catch (UserContextException ucx) {
1435
          result.ucx = ucx;
1436
        } catch (Throwable th) {
1437
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
1438
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
1439
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
1440
          x.write(oprot);
1441
          oprot.writeMessageEnd();
1442
          oprot.getTransport().flush();
1443
          return;
1444
        }
1445
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
1446
        result.write(oprot);
1447
        oprot.writeMessageEnd();
1448
        oprot.getTransport().flush();
1449
      }
1450
 
1451
    }
1452
 
506 rajveer 1453
    private class setDefaultAddress implements ProcessFunction {
1454
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1455
      {
1456
        setDefaultAddress_args args = new setDefaultAddress_args();
1457
        args.read(iprot);
1458
        iprot.readMessageEnd();
1459
        setDefaultAddress_result result = new setDefaultAddress_result();
1460
        try {
1461
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
1462
          result.setSuccessIsSet(true);
1463
        } catch (UserContextException ucx) {
1464
          result.ucx = ucx;
1465
        } catch (Throwable th) {
1466
          LOGGER.error("Internal error processing setDefaultAddress", th);
1467
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
1468
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
1469
          x.write(oprot);
1470
          oprot.writeMessageEnd();
1471
          oprot.getTransport().flush();
1472
          return;
1473
        }
1474
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
1475
        result.write(oprot);
1476
        oprot.writeMessageEnd();
1477
        oprot.getTransport().flush();
1478
      }
1479
 
1480
    }
1481
 
48 ashish 1482
    private class updatePassword implements ProcessFunction {
1483
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1484
      {
1485
        updatePassword_args args = new updatePassword_args();
1486
        args.read(iprot);
1487
        iprot.readMessageEnd();
1488
        updatePassword_result result = new updatePassword_result();
1489
        try {
1490
          result.success = iface_.updatePassword(args.userid, args.password);
1491
          result.setSuccessIsSet(true);
1492
        } catch (UserContextException ucx) {
1493
          result.ucx = ucx;
1494
        } catch (Throwable th) {
1495
          LOGGER.error("Internal error processing updatePassword", th);
1496
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
1497
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
1498
          x.write(oprot);
1499
          oprot.writeMessageEnd();
1500
          oprot.getTransport().flush();
1501
          return;
1502
        }
1503
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
1504
        result.write(oprot);
1505
        oprot.writeMessageEnd();
1506
        oprot.getTransport().flush();
1507
      }
1508
 
1509
    }
1510
 
1511
    private class deleteUser implements ProcessFunction {
1512
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1513
      {
1514
        deleteUser_args args = new deleteUser_args();
1515
        args.read(iprot);
1516
        iprot.readMessageEnd();
1517
        deleteUser_result result = new deleteUser_result();
1518
        try {
123 ashish 1519
          result.success = iface_.deleteUser(args.userid, args.isSessionId);
48 ashish 1520
          result.setSuccessIsSet(true);
1521
        } catch (UserContextException ucx) {
1522
          result.ucx = ucx;
1523
        } catch (Throwable th) {
1524
          LOGGER.error("Internal error processing deleteUser", th);
1525
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1526
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
1527
          x.write(oprot);
1528
          oprot.writeMessageEnd();
1529
          oprot.getTransport().flush();
1530
          return;
1531
        }
1532
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
1533
        result.write(oprot);
1534
        oprot.writeMessageEnd();
1535
        oprot.getTransport().flush();
1536
      }
1537
 
1538
    }
1539
 
1540
    private class sendEmailVerification implements ProcessFunction {
1541
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1542
      {
1543
        sendEmailVerification_args args = new sendEmailVerification_args();
1544
        args.read(iprot);
1545
        iprot.readMessageEnd();
1546
        sendEmailVerification_result result = new sendEmailVerification_result();
1547
        try {
1548
          result.success = iface_.sendEmailVerification(args.userid);
1549
          result.setSuccessIsSet(true);
1550
        } catch (UserContextException ucx) {
1551
          result.ucx = ucx;
1552
        } catch (Throwable th) {
1553
          LOGGER.error("Internal error processing sendEmailVerification", th);
1554
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendEmailVerification");
1555
          oprot.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.EXCEPTION, seqid));
1556
          x.write(oprot);
1557
          oprot.writeMessageEnd();
1558
          oprot.getTransport().flush();
1559
          return;
1560
        }
1561
        oprot.writeMessageBegin(new TMessage("sendEmailVerification", TMessageType.REPLY, seqid));
1562
        result.write(oprot);
1563
        oprot.writeMessageEnd();
1564
        oprot.getTransport().flush();
1565
      }
1566
 
1567
    }
1568
 
1569
    private class sendSMSVerification implements ProcessFunction {
1570
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1571
      {
1572
        sendSMSVerification_args args = new sendSMSVerification_args();
1573
        args.read(iprot);
1574
        iprot.readMessageEnd();
1575
        sendSMSVerification_result result = new sendSMSVerification_result();
1576
        try {
1577
          result.success = iface_.sendSMSVerification(args.userid);
1578
          result.setSuccessIsSet(true);
1579
        } catch (UserContextException ucx) {
1580
          result.ucx = ucx;
1581
        } catch (Throwable th) {
1582
          LOGGER.error("Internal error processing sendSMSVerification", th);
1583
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendSMSVerification");
1584
          oprot.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.EXCEPTION, seqid));
1585
          x.write(oprot);
1586
          oprot.writeMessageEnd();
1587
          oprot.getTransport().flush();
1588
          return;
1589
        }
1590
        oprot.writeMessageBegin(new TMessage("sendSMSVerification", TMessageType.REPLY, seqid));
1591
        result.write(oprot);
1592
        oprot.writeMessageEnd();
1593
        oprot.getTransport().flush();
1594
      }
1595
 
1596
    }
1597
 
1598
    private class confirmEmailVerification implements ProcessFunction {
1599
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1600
      {
1601
        confirmEmailVerification_args args = new confirmEmailVerification_args();
1602
        args.read(iprot);
1603
        iprot.readMessageEnd();
1604
        confirmEmailVerification_result result = new confirmEmailVerification_result();
1605
        try {
1606
          result.success = iface_.confirmEmailVerification(args.userid);
1607
          result.setSuccessIsSet(true);
1608
        } catch (UserContextException ucx) {
1609
          result.ucx = ucx;
1610
        } catch (Throwable th) {
1611
          LOGGER.error("Internal error processing confirmEmailVerification", th);
1612
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing confirmEmailVerification");
1613
          oprot.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.EXCEPTION, seqid));
1614
          x.write(oprot);
1615
          oprot.writeMessageEnd();
1616
          oprot.getTransport().flush();
1617
          return;
1618
        }
1619
        oprot.writeMessageBegin(new TMessage("confirmEmailVerification", TMessageType.REPLY, seqid));
1620
        result.write(oprot);
1621
        oprot.writeMessageEnd();
1622
        oprot.getTransport().flush();
1623
      }
1624
 
1625
    }
1626
 
1627
    private class confirmSMSVerification implements ProcessFunction {
1628
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1629
      {
1630
        confirmSMSVerification_args args = new confirmSMSVerification_args();
1631
        args.read(iprot);
1632
        iprot.readMessageEnd();
1633
        confirmSMSVerification_result result = new confirmSMSVerification_result();
1634
        try {
1635
          result.success = iface_.confirmSMSVerification(args.userid);
1636
          result.setSuccessIsSet(true);
1637
        } catch (UserContextException ucx) {
1638
          result.ucx = ucx;
1639
        } catch (Throwable th) {
1640
          LOGGER.error("Internal error processing confirmSMSVerification", th);
1641
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing confirmSMSVerification");
1642
          oprot.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.EXCEPTION, seqid));
1643
          x.write(oprot);
1644
          oprot.writeMessageEnd();
1645
          oprot.getTransport().flush();
1646
          return;
1647
        }
1648
        oprot.writeMessageBegin(new TMessage("confirmSMSVerification", TMessageType.REPLY, seqid));
1649
        result.write(oprot);
1650
        oprot.writeMessageEnd();
1651
        oprot.getTransport().flush();
1652
      }
1653
 
1654
    }
1655
 
1656
    private class addSocialhandle implements ProcessFunction {
1657
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1658
      {
1659
        addSocialhandle_args args = new addSocialhandle_args();
1660
        args.read(iprot);
1661
        iprot.readMessageEnd();
1662
        addSocialhandle_result result = new addSocialhandle_result();
1663
        try {
1664
          result.success = iface_.addSocialhandle(args.userid, args.socialService, args.handle);
1665
          result.setSuccessIsSet(true);
1666
        } catch (UserContextException ucx) {
1667
          result.ucx = ucx;
1668
        } catch (Throwable th) {
1669
          LOGGER.error("Internal error processing addSocialhandle", th);
1670
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addSocialhandle");
1671
          oprot.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.EXCEPTION, seqid));
1672
          x.write(oprot);
1673
          oprot.writeMessageEnd();
1674
          oprot.getTransport().flush();
1675
          return;
1676
        }
1677
        oprot.writeMessageBegin(new TMessage("addSocialhandle", TMessageType.REPLY, seqid));
1678
        result.write(oprot);
1679
        oprot.writeMessageEnd();
1680
        oprot.getTransport().flush();
1681
      }
1682
 
1683
    }
1684
 
130 ashish 1685
    private class sendNewPasswordById implements ProcessFunction {
1686
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1687
      {
1688
        sendNewPasswordById_args args = new sendNewPasswordById_args();
1689
        args.read(iprot);
1690
        iprot.readMessageEnd();
1691
        sendNewPasswordById_result result = new sendNewPasswordById_result();
1692
        try {
1693
          result.success = iface_.sendNewPasswordById(args.userid);
1694
          result.setSuccessIsSet(true);
1695
        } catch (UserContextException ucx) {
1696
          result.ucx = ucx;
1697
        } catch (Throwable th) {
1698
          LOGGER.error("Internal error processing sendNewPasswordById", th);
1699
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendNewPasswordById");
1700
          oprot.writeMessageBegin(new TMessage("sendNewPasswordById", TMessageType.EXCEPTION, seqid));
1701
          x.write(oprot);
1702
          oprot.writeMessageEnd();
1703
          oprot.getTransport().flush();
1704
          return;
1705
        }
1706
        oprot.writeMessageBegin(new TMessage("sendNewPasswordById", TMessageType.REPLY, seqid));
1707
        result.write(oprot);
1708
        oprot.writeMessageEnd();
1709
        oprot.getTransport().flush();
1710
      }
1711
 
1712
    }
1713
 
1714
    private class sendNewPasswordByHandle implements ProcessFunction {
1715
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1716
      {
1717
        sendNewPasswordByHandle_args args = new sendNewPasswordByHandle_args();
1718
        args.read(iprot);
1719
        iprot.readMessageEnd();
1720
        sendNewPasswordByHandle_result result = new sendNewPasswordByHandle_result();
1721
        try {
1722
          result.success = iface_.sendNewPasswordByHandle(args.emailOrHandle, args.isEmail);
1723
          result.setSuccessIsSet(true);
1724
        } catch (UserContextException ucx) {
1725
          result.ucx = ucx;
1726
        } catch (Throwable th) {
1727
          LOGGER.error("Internal error processing sendNewPasswordByHandle", th);
1728
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendNewPasswordByHandle");
1729
          oprot.writeMessageBegin(new TMessage("sendNewPasswordByHandle", TMessageType.EXCEPTION, seqid));
1730
          x.write(oprot);
1731
          oprot.writeMessageEnd();
1732
          oprot.getTransport().flush();
1733
          return;
1734
        }
1735
        oprot.writeMessageBegin(new TMessage("sendNewPasswordByHandle", TMessageType.REPLY, seqid));
1736
        result.write(oprot);
1737
        oprot.writeMessageEnd();
1738
        oprot.getTransport().flush();
1739
      }
1740
 
1741
    }
1742
 
48 ashish 1743
  }
1744
 
1745
  public static class createContext_args implements TBase<createContext_args._Fields>, java.io.Serializable, Cloneable   {
1746
    private static final TStruct STRUCT_DESC = new TStruct("createContext_args");
1747
 
1748
    private static final TField CONTEXT_FIELD_DESC = new TField("context", TType.STRUCT, (short)1);
1749
    private static final TField UPDATE_EXISTING_FIELD_DESC = new TField("updateExisting", TType.BOOL, (short)2);
1750
 
123 ashish 1751
    private UserContext context;
48 ashish 1752
    private boolean updateExisting;
1753
 
1754
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1755
    public enum _Fields implements TFieldIdEnum {
1756
      CONTEXT((short)1, "context"),
1757
      UPDATE_EXISTING((short)2, "updateExisting");
1758
 
1759
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1760
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1761
 
1762
      static {
1763
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1764
          byId.put((int)field._thriftId, field);
1765
          byName.put(field.getFieldName(), field);
1766
        }
1767
      }
1768
 
1769
      /**
1770
       * Find the _Fields constant that matches fieldId, or null if its not found.
1771
       */
1772
      public static _Fields findByThriftId(int fieldId) {
1773
        return byId.get(fieldId);
1774
      }
1775
 
1776
      /**
1777
       * Find the _Fields constant that matches fieldId, throwing an exception
1778
       * if it is not found.
1779
       */
1780
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1781
        _Fields fields = findByThriftId(fieldId);
1782
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1783
        return fields;
1784
      }
1785
 
1786
      /**
1787
       * Find the _Fields constant that matches name, or null if its not found.
1788
       */
1789
      public static _Fields findByName(String name) {
1790
        return byName.get(name);
1791
      }
1792
 
1793
      private final short _thriftId;
1794
      private final String _fieldName;
1795
 
1796
      _Fields(short thriftId, String fieldName) {
1797
        _thriftId = thriftId;
1798
        _fieldName = fieldName;
1799
      }
1800
 
1801
      public short getThriftFieldId() {
1802
        return _thriftId;
1803
      }
1804
 
1805
      public String getFieldName() {
1806
        return _fieldName;
1807
      }
1808
    }
1809
 
1810
    // isset id assignments
1811
    private static final int __UPDATEEXISTING_ISSET_ID = 0;
1812
    private BitSet __isset_bit_vector = new BitSet(1);
1813
 
1814
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1815
      put(_Fields.CONTEXT, new FieldMetaData("context", TFieldRequirementType.DEFAULT, 
123 ashish 1816
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 1817
      put(_Fields.UPDATE_EXISTING, new FieldMetaData("updateExisting", TFieldRequirementType.DEFAULT, 
1818
          new FieldValueMetaData(TType.BOOL)));
1819
    }});
1820
 
1821
    static {
1822
      FieldMetaData.addStructMetaDataMap(createContext_args.class, metaDataMap);
1823
    }
1824
 
1825
    public createContext_args() {
1826
    }
1827
 
1828
    public createContext_args(
123 ashish 1829
      UserContext context,
48 ashish 1830
      boolean updateExisting)
1831
    {
1832
      this();
1833
      this.context = context;
1834
      this.updateExisting = updateExisting;
1835
      setUpdateExistingIsSet(true);
1836
    }
1837
 
1838
    /**
1839
     * Performs a deep copy on <i>other</i>.
1840
     */
1841
    public createContext_args(createContext_args other) {
1842
      __isset_bit_vector.clear();
1843
      __isset_bit_vector.or(other.__isset_bit_vector);
1844
      if (other.isSetContext()) {
123 ashish 1845
        this.context = new UserContext(other.context);
48 ashish 1846
      }
1847
      this.updateExisting = other.updateExisting;
1848
    }
1849
 
1850
    public createContext_args deepCopy() {
1851
      return new createContext_args(this);
1852
    }
1853
 
1854
    @Deprecated
1855
    public createContext_args clone() {
1856
      return new createContext_args(this);
1857
    }
1858
 
123 ashish 1859
    public UserContext getContext() {
48 ashish 1860
      return this.context;
1861
    }
1862
 
123 ashish 1863
    public createContext_args setContext(UserContext context) {
48 ashish 1864
      this.context = context;
1865
      return this;
1866
    }
1867
 
1868
    public void unsetContext() {
1869
      this.context = null;
1870
    }
1871
 
1872
    /** Returns true if field context is set (has been asigned a value) and false otherwise */
1873
    public boolean isSetContext() {
1874
      return this.context != null;
1875
    }
1876
 
1877
    public void setContextIsSet(boolean value) {
1878
      if (!value) {
1879
        this.context = null;
1880
      }
1881
    }
1882
 
1883
    public boolean isUpdateExisting() {
1884
      return this.updateExisting;
1885
    }
1886
 
1887
    public createContext_args setUpdateExisting(boolean updateExisting) {
1888
      this.updateExisting = updateExisting;
1889
      setUpdateExistingIsSet(true);
1890
      return this;
1891
    }
1892
 
1893
    public void unsetUpdateExisting() {
1894
      __isset_bit_vector.clear(__UPDATEEXISTING_ISSET_ID);
1895
    }
1896
 
1897
    /** Returns true if field updateExisting is set (has been asigned a value) and false otherwise */
1898
    public boolean isSetUpdateExisting() {
1899
      return __isset_bit_vector.get(__UPDATEEXISTING_ISSET_ID);
1900
    }
1901
 
1902
    public void setUpdateExistingIsSet(boolean value) {
1903
      __isset_bit_vector.set(__UPDATEEXISTING_ISSET_ID, value);
1904
    }
1905
 
1906
    public void setFieldValue(_Fields field, Object value) {
1907
      switch (field) {
1908
      case CONTEXT:
1909
        if (value == null) {
1910
          unsetContext();
1911
        } else {
123 ashish 1912
          setContext((UserContext)value);
48 ashish 1913
        }
1914
        break;
1915
 
1916
      case UPDATE_EXISTING:
1917
        if (value == null) {
1918
          unsetUpdateExisting();
1919
        } else {
1920
          setUpdateExisting((Boolean)value);
1921
        }
1922
        break;
1923
 
1924
      }
1925
    }
1926
 
1927
    public void setFieldValue(int fieldID, Object value) {
1928
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1929
    }
1930
 
1931
    public Object getFieldValue(_Fields field) {
1932
      switch (field) {
1933
      case CONTEXT:
1934
        return getContext();
1935
 
1936
      case UPDATE_EXISTING:
1937
        return new Boolean(isUpdateExisting());
1938
 
1939
      }
1940
      throw new IllegalStateException();
1941
    }
1942
 
1943
    public Object getFieldValue(int fieldId) {
1944
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1945
    }
1946
 
1947
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1948
    public boolean isSet(_Fields field) {
1949
      switch (field) {
1950
      case CONTEXT:
1951
        return isSetContext();
1952
      case UPDATE_EXISTING:
1953
        return isSetUpdateExisting();
1954
      }
1955
      throw new IllegalStateException();
1956
    }
1957
 
1958
    public boolean isSet(int fieldID) {
1959
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1960
    }
1961
 
1962
    @Override
1963
    public boolean equals(Object that) {
1964
      if (that == null)
1965
        return false;
1966
      if (that instanceof createContext_args)
1967
        return this.equals((createContext_args)that);
1968
      return false;
1969
    }
1970
 
1971
    public boolean equals(createContext_args that) {
1972
      if (that == null)
1973
        return false;
1974
 
1975
      boolean this_present_context = true && this.isSetContext();
1976
      boolean that_present_context = true && that.isSetContext();
1977
      if (this_present_context || that_present_context) {
1978
        if (!(this_present_context && that_present_context))
1979
          return false;
1980
        if (!this.context.equals(that.context))
1981
          return false;
1982
      }
1983
 
1984
      boolean this_present_updateExisting = true;
1985
      boolean that_present_updateExisting = true;
1986
      if (this_present_updateExisting || that_present_updateExisting) {
1987
        if (!(this_present_updateExisting && that_present_updateExisting))
1988
          return false;
1989
        if (this.updateExisting != that.updateExisting)
1990
          return false;
1991
      }
1992
 
1993
      return true;
1994
    }
1995
 
1996
    @Override
1997
    public int hashCode() {
1998
      return 0;
1999
    }
2000
 
2001
    public void read(TProtocol iprot) throws TException {
2002
      TField field;
2003
      iprot.readStructBegin();
2004
      while (true)
2005
      {
2006
        field = iprot.readFieldBegin();
2007
        if (field.type == TType.STOP) { 
2008
          break;
2009
        }
2010
        _Fields fieldId = _Fields.findByThriftId(field.id);
2011
        if (fieldId == null) {
2012
          TProtocolUtil.skip(iprot, field.type);
2013
        } else {
2014
          switch (fieldId) {
2015
            case CONTEXT:
2016
              if (field.type == TType.STRUCT) {
123 ashish 2017
                this.context = new UserContext();
48 ashish 2018
                this.context.read(iprot);
2019
              } else { 
2020
                TProtocolUtil.skip(iprot, field.type);
2021
              }
2022
              break;
2023
            case UPDATE_EXISTING:
2024
              if (field.type == TType.BOOL) {
2025
                this.updateExisting = iprot.readBool();
2026
                setUpdateExistingIsSet(true);
2027
              } else { 
2028
                TProtocolUtil.skip(iprot, field.type);
2029
              }
2030
              break;
2031
          }
2032
          iprot.readFieldEnd();
2033
        }
2034
      }
2035
      iprot.readStructEnd();
2036
      validate();
2037
    }
2038
 
2039
    public void write(TProtocol oprot) throws TException {
2040
      validate();
2041
 
2042
      oprot.writeStructBegin(STRUCT_DESC);
2043
      if (this.context != null) {
2044
        oprot.writeFieldBegin(CONTEXT_FIELD_DESC);
2045
        this.context.write(oprot);
2046
        oprot.writeFieldEnd();
2047
      }
2048
      oprot.writeFieldBegin(UPDATE_EXISTING_FIELD_DESC);
2049
      oprot.writeBool(this.updateExisting);
2050
      oprot.writeFieldEnd();
2051
      oprot.writeFieldStop();
2052
      oprot.writeStructEnd();
2053
    }
2054
 
2055
    @Override
2056
    public String toString() {
2057
      StringBuilder sb = new StringBuilder("createContext_args(");
2058
      boolean first = true;
2059
 
2060
      sb.append("context:");
2061
      if (this.context == null) {
2062
        sb.append("null");
2063
      } else {
2064
        sb.append(this.context);
2065
      }
2066
      first = false;
2067
      if (!first) sb.append(", ");
2068
      sb.append("updateExisting:");
2069
      sb.append(this.updateExisting);
2070
      first = false;
2071
      sb.append(")");
2072
      return sb.toString();
2073
    }
2074
 
2075
    public void validate() throws TException {
2076
      // check for required fields
2077
    }
2078
 
2079
  }
2080
 
2081
  public static class createContext_result implements TBase<createContext_result._Fields>, java.io.Serializable, Cloneable   {
2082
    private static final TStruct STRUCT_DESC = new TStruct("createContext_result");
2083
 
2084
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2085
    private static final TField CEX_FIELD_DESC = new TField("cex", TType.STRUCT, (short)1);
2086
 
123 ashish 2087
    private UserContext success;
48 ashish 2088
    private UserContextException cex;
2089
 
2090
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2091
    public enum _Fields implements TFieldIdEnum {
2092
      SUCCESS((short)0, "success"),
2093
      CEX((short)1, "cex");
2094
 
2095
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2096
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2097
 
2098
      static {
2099
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2100
          byId.put((int)field._thriftId, field);
2101
          byName.put(field.getFieldName(), field);
2102
        }
2103
      }
2104
 
2105
      /**
2106
       * Find the _Fields constant that matches fieldId, or null if its not found.
2107
       */
2108
      public static _Fields findByThriftId(int fieldId) {
2109
        return byId.get(fieldId);
2110
      }
2111
 
2112
      /**
2113
       * Find the _Fields constant that matches fieldId, throwing an exception
2114
       * if it is not found.
2115
       */
2116
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2117
        _Fields fields = findByThriftId(fieldId);
2118
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2119
        return fields;
2120
      }
2121
 
2122
      /**
2123
       * Find the _Fields constant that matches name, or null if its not found.
2124
       */
2125
      public static _Fields findByName(String name) {
2126
        return byName.get(name);
2127
      }
2128
 
2129
      private final short _thriftId;
2130
      private final String _fieldName;
2131
 
2132
      _Fields(short thriftId, String fieldName) {
2133
        _thriftId = thriftId;
2134
        _fieldName = fieldName;
2135
      }
2136
 
2137
      public short getThriftFieldId() {
2138
        return _thriftId;
2139
      }
2140
 
2141
      public String getFieldName() {
2142
        return _fieldName;
2143
      }
2144
    }
2145
 
2146
    // isset id assignments
2147
 
2148
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2149
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 2150
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 2151
      put(_Fields.CEX, new FieldMetaData("cex", TFieldRequirementType.DEFAULT, 
2152
          new FieldValueMetaData(TType.STRUCT)));
2153
    }});
2154
 
2155
    static {
2156
      FieldMetaData.addStructMetaDataMap(createContext_result.class, metaDataMap);
2157
    }
2158
 
2159
    public createContext_result() {
2160
    }
2161
 
2162
    public createContext_result(
123 ashish 2163
      UserContext success,
48 ashish 2164
      UserContextException cex)
2165
    {
2166
      this();
2167
      this.success = success;
2168
      this.cex = cex;
2169
    }
2170
 
2171
    /**
2172
     * Performs a deep copy on <i>other</i>.
2173
     */
2174
    public createContext_result(createContext_result other) {
2175
      if (other.isSetSuccess()) {
123 ashish 2176
        this.success = new UserContext(other.success);
48 ashish 2177
      }
2178
      if (other.isSetCex()) {
2179
        this.cex = new UserContextException(other.cex);
2180
      }
2181
    }
2182
 
2183
    public createContext_result deepCopy() {
2184
      return new createContext_result(this);
2185
    }
2186
 
2187
    @Deprecated
2188
    public createContext_result clone() {
2189
      return new createContext_result(this);
2190
    }
2191
 
123 ashish 2192
    public UserContext getSuccess() {
48 ashish 2193
      return this.success;
2194
    }
2195
 
123 ashish 2196
    public createContext_result setSuccess(UserContext success) {
48 ashish 2197
      this.success = success;
2198
      return this;
2199
    }
2200
 
2201
    public void unsetSuccess() {
2202
      this.success = null;
2203
    }
2204
 
2205
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2206
    public boolean isSetSuccess() {
2207
      return this.success != null;
2208
    }
2209
 
2210
    public void setSuccessIsSet(boolean value) {
2211
      if (!value) {
2212
        this.success = null;
2213
      }
2214
    }
2215
 
2216
    public UserContextException getCex() {
2217
      return this.cex;
2218
    }
2219
 
2220
    public createContext_result setCex(UserContextException cex) {
2221
      this.cex = cex;
2222
      return this;
2223
    }
2224
 
2225
    public void unsetCex() {
2226
      this.cex = null;
2227
    }
2228
 
2229
    /** Returns true if field cex is set (has been asigned a value) and false otherwise */
2230
    public boolean isSetCex() {
2231
      return this.cex != null;
2232
    }
2233
 
2234
    public void setCexIsSet(boolean value) {
2235
      if (!value) {
2236
        this.cex = null;
2237
      }
2238
    }
2239
 
2240
    public void setFieldValue(_Fields field, Object value) {
2241
      switch (field) {
2242
      case SUCCESS:
2243
        if (value == null) {
2244
          unsetSuccess();
2245
        } else {
123 ashish 2246
          setSuccess((UserContext)value);
48 ashish 2247
        }
2248
        break;
2249
 
2250
      case CEX:
2251
        if (value == null) {
2252
          unsetCex();
2253
        } else {
2254
          setCex((UserContextException)value);
2255
        }
2256
        break;
2257
 
2258
      }
2259
    }
2260
 
2261
    public void setFieldValue(int fieldID, Object value) {
2262
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2263
    }
2264
 
2265
    public Object getFieldValue(_Fields field) {
2266
      switch (field) {
2267
      case SUCCESS:
2268
        return getSuccess();
2269
 
2270
      case CEX:
2271
        return getCex();
2272
 
2273
      }
2274
      throw new IllegalStateException();
2275
    }
2276
 
2277
    public Object getFieldValue(int fieldId) {
2278
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2279
    }
2280
 
2281
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2282
    public boolean isSet(_Fields field) {
2283
      switch (field) {
2284
      case SUCCESS:
2285
        return isSetSuccess();
2286
      case CEX:
2287
        return isSetCex();
2288
      }
2289
      throw new IllegalStateException();
2290
    }
2291
 
2292
    public boolean isSet(int fieldID) {
2293
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2294
    }
2295
 
2296
    @Override
2297
    public boolean equals(Object that) {
2298
      if (that == null)
2299
        return false;
2300
      if (that instanceof createContext_result)
2301
        return this.equals((createContext_result)that);
2302
      return false;
2303
    }
2304
 
2305
    public boolean equals(createContext_result that) {
2306
      if (that == null)
2307
        return false;
2308
 
2309
      boolean this_present_success = true && this.isSetSuccess();
2310
      boolean that_present_success = true && that.isSetSuccess();
2311
      if (this_present_success || that_present_success) {
2312
        if (!(this_present_success && that_present_success))
2313
          return false;
2314
        if (!this.success.equals(that.success))
2315
          return false;
2316
      }
2317
 
2318
      boolean this_present_cex = true && this.isSetCex();
2319
      boolean that_present_cex = true && that.isSetCex();
2320
      if (this_present_cex || that_present_cex) {
2321
        if (!(this_present_cex && that_present_cex))
2322
          return false;
2323
        if (!this.cex.equals(that.cex))
2324
          return false;
2325
      }
2326
 
2327
      return true;
2328
    }
2329
 
2330
    @Override
2331
    public int hashCode() {
2332
      return 0;
2333
    }
2334
 
2335
    public void read(TProtocol iprot) throws TException {
2336
      TField field;
2337
      iprot.readStructBegin();
2338
      while (true)
2339
      {
2340
        field = iprot.readFieldBegin();
2341
        if (field.type == TType.STOP) { 
2342
          break;
2343
        }
2344
        _Fields fieldId = _Fields.findByThriftId(field.id);
2345
        if (fieldId == null) {
2346
          TProtocolUtil.skip(iprot, field.type);
2347
        } else {
2348
          switch (fieldId) {
2349
            case SUCCESS:
2350
              if (field.type == TType.STRUCT) {
123 ashish 2351
                this.success = new UserContext();
48 ashish 2352
                this.success.read(iprot);
2353
              } else { 
2354
                TProtocolUtil.skip(iprot, field.type);
2355
              }
2356
              break;
2357
            case CEX:
2358
              if (field.type == TType.STRUCT) {
2359
                this.cex = new UserContextException();
2360
                this.cex.read(iprot);
2361
              } else { 
2362
                TProtocolUtil.skip(iprot, field.type);
2363
              }
2364
              break;
2365
          }
2366
          iprot.readFieldEnd();
2367
        }
2368
      }
2369
      iprot.readStructEnd();
2370
      validate();
2371
    }
2372
 
2373
    public void write(TProtocol oprot) throws TException {
2374
      oprot.writeStructBegin(STRUCT_DESC);
2375
 
2376
      if (this.isSetSuccess()) {
2377
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2378
        this.success.write(oprot);
2379
        oprot.writeFieldEnd();
2380
      } else if (this.isSetCex()) {
2381
        oprot.writeFieldBegin(CEX_FIELD_DESC);
2382
        this.cex.write(oprot);
2383
        oprot.writeFieldEnd();
2384
      }
2385
      oprot.writeFieldStop();
2386
      oprot.writeStructEnd();
2387
    }
2388
 
2389
    @Override
2390
    public String toString() {
2391
      StringBuilder sb = new StringBuilder("createContext_result(");
2392
      boolean first = true;
2393
 
2394
      sb.append("success:");
2395
      if (this.success == null) {
2396
        sb.append("null");
2397
      } else {
2398
        sb.append(this.success);
2399
      }
2400
      first = false;
2401
      if (!first) sb.append(", ");
2402
      sb.append("cex:");
2403
      if (this.cex == null) {
2404
        sb.append("null");
2405
      } else {
2406
        sb.append(this.cex);
2407
      }
2408
      first = false;
2409
      sb.append(")");
2410
      return sb.toString();
2411
    }
2412
 
2413
    public void validate() throws TException {
2414
      // check for required fields
2415
    }
2416
 
2417
  }
2418
 
2419
  public static class getContextFromId_args implements TBase<getContextFromId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContextFromId_args>   {
2420
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromId_args");
2421
 
2422
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 2423
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 2424
 
2425
    private long userId;
123 ashish 2426
    private boolean isSessionId;
48 ashish 2427
 
2428
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2429
    public enum _Fields implements TFieldIdEnum {
123 ashish 2430
      USER_ID((short)1, "userId"),
2431
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 2432
 
2433
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2435
 
2436
      static {
2437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2438
          byId.put((int)field._thriftId, field);
2439
          byName.put(field.getFieldName(), field);
2440
        }
2441
      }
2442
 
2443
      /**
2444
       * Find the _Fields constant that matches fieldId, or null if its not found.
2445
       */
2446
      public static _Fields findByThriftId(int fieldId) {
2447
        return byId.get(fieldId);
2448
      }
2449
 
2450
      /**
2451
       * Find the _Fields constant that matches fieldId, throwing an exception
2452
       * if it is not found.
2453
       */
2454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2455
        _Fields fields = findByThriftId(fieldId);
2456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2457
        return fields;
2458
      }
2459
 
2460
      /**
2461
       * Find the _Fields constant that matches name, or null if its not found.
2462
       */
2463
      public static _Fields findByName(String name) {
2464
        return byName.get(name);
2465
      }
2466
 
2467
      private final short _thriftId;
2468
      private final String _fieldName;
2469
 
2470
      _Fields(short thriftId, String fieldName) {
2471
        _thriftId = thriftId;
2472
        _fieldName = fieldName;
2473
      }
2474
 
2475
      public short getThriftFieldId() {
2476
        return _thriftId;
2477
      }
2478
 
2479
      public String getFieldName() {
2480
        return _fieldName;
2481
      }
2482
    }
2483
 
2484
    // isset id assignments
2485
    private static final int __USERID_ISSET_ID = 0;
123 ashish 2486
    private static final int __ISSESSIONID_ISSET_ID = 1;
2487
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 2488
 
2489
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2490
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
2491
          new FieldValueMetaData(TType.I64)));
123 ashish 2492
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
2493
          new FieldValueMetaData(TType.BOOL)));
48 ashish 2494
    }});
2495
 
2496
    static {
2497
      FieldMetaData.addStructMetaDataMap(getContextFromId_args.class, metaDataMap);
2498
    }
2499
 
2500
    public getContextFromId_args() {
2501
    }
2502
 
2503
    public getContextFromId_args(
123 ashish 2504
      long userId,
2505
      boolean isSessionId)
48 ashish 2506
    {
2507
      this();
2508
      this.userId = userId;
2509
      setUserIdIsSet(true);
123 ashish 2510
      this.isSessionId = isSessionId;
2511
      setIsSessionIdIsSet(true);
48 ashish 2512
    }
2513
 
2514
    /**
2515
     * Performs a deep copy on <i>other</i>.
2516
     */
2517
    public getContextFromId_args(getContextFromId_args other) {
2518
      __isset_bit_vector.clear();
2519
      __isset_bit_vector.or(other.__isset_bit_vector);
2520
      this.userId = other.userId;
123 ashish 2521
      this.isSessionId = other.isSessionId;
48 ashish 2522
    }
2523
 
2524
    public getContextFromId_args deepCopy() {
2525
      return new getContextFromId_args(this);
2526
    }
2527
 
2528
    @Deprecated
2529
    public getContextFromId_args clone() {
2530
      return new getContextFromId_args(this);
2531
    }
2532
 
2533
    public long getUserId() {
2534
      return this.userId;
2535
    }
2536
 
2537
    public getContextFromId_args setUserId(long userId) {
2538
      this.userId = userId;
2539
      setUserIdIsSet(true);
2540
      return this;
2541
    }
2542
 
2543
    public void unsetUserId() {
2544
      __isset_bit_vector.clear(__USERID_ISSET_ID);
2545
    }
2546
 
2547
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
2548
    public boolean isSetUserId() {
2549
      return __isset_bit_vector.get(__USERID_ISSET_ID);
2550
    }
2551
 
2552
    public void setUserIdIsSet(boolean value) {
2553
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
2554
    }
2555
 
123 ashish 2556
    public boolean isIsSessionId() {
2557
      return this.isSessionId;
2558
    }
2559
 
2560
    public getContextFromId_args setIsSessionId(boolean isSessionId) {
2561
      this.isSessionId = isSessionId;
2562
      setIsSessionIdIsSet(true);
2563
      return this;
2564
    }
2565
 
2566
    public void unsetIsSessionId() {
2567
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
2568
    }
2569
 
2570
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
2571
    public boolean isSetIsSessionId() {
2572
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
2573
    }
2574
 
2575
    public void setIsSessionIdIsSet(boolean value) {
2576
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
2577
    }
2578
 
48 ashish 2579
    public void setFieldValue(_Fields field, Object value) {
2580
      switch (field) {
2581
      case USER_ID:
2582
        if (value == null) {
2583
          unsetUserId();
2584
        } else {
2585
          setUserId((Long)value);
2586
        }
2587
        break;
2588
 
123 ashish 2589
      case IS_SESSION_ID:
2590
        if (value == null) {
2591
          unsetIsSessionId();
2592
        } else {
2593
          setIsSessionId((Boolean)value);
2594
        }
2595
        break;
2596
 
48 ashish 2597
      }
2598
    }
2599
 
2600
    public void setFieldValue(int fieldID, Object value) {
2601
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2602
    }
2603
 
2604
    public Object getFieldValue(_Fields field) {
2605
      switch (field) {
2606
      case USER_ID:
2607
        return new Long(getUserId());
2608
 
123 ashish 2609
      case IS_SESSION_ID:
2610
        return new Boolean(isIsSessionId());
2611
 
48 ashish 2612
      }
2613
      throw new IllegalStateException();
2614
    }
2615
 
2616
    public Object getFieldValue(int fieldId) {
2617
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2618
    }
2619
 
2620
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2621
    public boolean isSet(_Fields field) {
2622
      switch (field) {
2623
      case USER_ID:
2624
        return isSetUserId();
123 ashish 2625
      case IS_SESSION_ID:
2626
        return isSetIsSessionId();
48 ashish 2627
      }
2628
      throw new IllegalStateException();
2629
    }
2630
 
2631
    public boolean isSet(int fieldID) {
2632
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2633
    }
2634
 
2635
    @Override
2636
    public boolean equals(Object that) {
2637
      if (that == null)
2638
        return false;
2639
      if (that instanceof getContextFromId_args)
2640
        return this.equals((getContextFromId_args)that);
2641
      return false;
2642
    }
2643
 
2644
    public boolean equals(getContextFromId_args that) {
2645
      if (that == null)
2646
        return false;
2647
 
2648
      boolean this_present_userId = true;
2649
      boolean that_present_userId = true;
2650
      if (this_present_userId || that_present_userId) {
2651
        if (!(this_present_userId && that_present_userId))
2652
          return false;
2653
        if (this.userId != that.userId)
2654
          return false;
2655
      }
2656
 
123 ashish 2657
      boolean this_present_isSessionId = true;
2658
      boolean that_present_isSessionId = true;
2659
      if (this_present_isSessionId || that_present_isSessionId) {
2660
        if (!(this_present_isSessionId && that_present_isSessionId))
2661
          return false;
2662
        if (this.isSessionId != that.isSessionId)
2663
          return false;
2664
      }
2665
 
48 ashish 2666
      return true;
2667
    }
2668
 
2669
    @Override
2670
    public int hashCode() {
2671
      return 0;
2672
    }
2673
 
2674
    public int compareTo(getContextFromId_args other) {
2675
      if (!getClass().equals(other.getClass())) {
2676
        return getClass().getName().compareTo(other.getClass().getName());
2677
      }
2678
 
2679
      int lastComparison = 0;
2680
      getContextFromId_args typedOther = (getContextFromId_args)other;
2681
 
2682
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
2683
      if (lastComparison != 0) {
2684
        return lastComparison;
2685
      }
2686
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
2687
      if (lastComparison != 0) {
2688
        return lastComparison;
2689
      }
123 ashish 2690
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
2691
      if (lastComparison != 0) {
2692
        return lastComparison;
2693
      }
2694
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
2695
      if (lastComparison != 0) {
2696
        return lastComparison;
2697
      }
48 ashish 2698
      return 0;
2699
    }
2700
 
2701
    public void read(TProtocol iprot) throws TException {
2702
      TField field;
2703
      iprot.readStructBegin();
2704
      while (true)
2705
      {
2706
        field = iprot.readFieldBegin();
2707
        if (field.type == TType.STOP) { 
2708
          break;
2709
        }
2710
        _Fields fieldId = _Fields.findByThriftId(field.id);
2711
        if (fieldId == null) {
2712
          TProtocolUtil.skip(iprot, field.type);
2713
        } else {
2714
          switch (fieldId) {
2715
            case USER_ID:
2716
              if (field.type == TType.I64) {
2717
                this.userId = iprot.readI64();
2718
                setUserIdIsSet(true);
2719
              } else { 
2720
                TProtocolUtil.skip(iprot, field.type);
2721
              }
2722
              break;
123 ashish 2723
            case IS_SESSION_ID:
2724
              if (field.type == TType.BOOL) {
2725
                this.isSessionId = iprot.readBool();
2726
                setIsSessionIdIsSet(true);
2727
              } else { 
2728
                TProtocolUtil.skip(iprot, field.type);
2729
              }
2730
              break;
48 ashish 2731
          }
2732
          iprot.readFieldEnd();
2733
        }
2734
      }
2735
      iprot.readStructEnd();
2736
      validate();
2737
    }
2738
 
2739
    public void write(TProtocol oprot) throws TException {
2740
      validate();
2741
 
2742
      oprot.writeStructBegin(STRUCT_DESC);
2743
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
2744
      oprot.writeI64(this.userId);
2745
      oprot.writeFieldEnd();
123 ashish 2746
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
2747
      oprot.writeBool(this.isSessionId);
2748
      oprot.writeFieldEnd();
48 ashish 2749
      oprot.writeFieldStop();
2750
      oprot.writeStructEnd();
2751
    }
2752
 
2753
    @Override
2754
    public String toString() {
2755
      StringBuilder sb = new StringBuilder("getContextFromId_args(");
2756
      boolean first = true;
2757
 
2758
      sb.append("userId:");
2759
      sb.append(this.userId);
2760
      first = false;
123 ashish 2761
      if (!first) sb.append(", ");
2762
      sb.append("isSessionId:");
2763
      sb.append(this.isSessionId);
2764
      first = false;
48 ashish 2765
      sb.append(")");
2766
      return sb.toString();
2767
    }
2768
 
2769
    public void validate() throws TException {
2770
      // check for required fields
2771
    }
2772
 
2773
  }
2774
 
2775
  public static class getContextFromId_result implements TBase<getContextFromId_result._Fields>, java.io.Serializable, Cloneable   {
2776
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromId_result");
2777
 
2778
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2779
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
2780
 
123 ashish 2781
    private UserContext success;
48 ashish 2782
    private UserContextException ucx;
2783
 
2784
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2785
    public enum _Fields implements TFieldIdEnum {
2786
      SUCCESS((short)0, "success"),
2787
      UCX((short)1, "ucx");
2788
 
2789
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2790
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2791
 
2792
      static {
2793
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2794
          byId.put((int)field._thriftId, field);
2795
          byName.put(field.getFieldName(), field);
2796
        }
2797
      }
2798
 
2799
      /**
2800
       * Find the _Fields constant that matches fieldId, or null if its not found.
2801
       */
2802
      public static _Fields findByThriftId(int fieldId) {
2803
        return byId.get(fieldId);
2804
      }
2805
 
2806
      /**
2807
       * Find the _Fields constant that matches fieldId, throwing an exception
2808
       * if it is not found.
2809
       */
2810
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2811
        _Fields fields = findByThriftId(fieldId);
2812
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2813
        return fields;
2814
      }
2815
 
2816
      /**
2817
       * Find the _Fields constant that matches name, or null if its not found.
2818
       */
2819
      public static _Fields findByName(String name) {
2820
        return byName.get(name);
2821
      }
2822
 
2823
      private final short _thriftId;
2824
      private final String _fieldName;
2825
 
2826
      _Fields(short thriftId, String fieldName) {
2827
        _thriftId = thriftId;
2828
        _fieldName = fieldName;
2829
      }
2830
 
2831
      public short getThriftFieldId() {
2832
        return _thriftId;
2833
      }
2834
 
2835
      public String getFieldName() {
2836
        return _fieldName;
2837
      }
2838
    }
2839
 
2840
    // isset id assignments
2841
 
2842
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2843
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 2844
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 2845
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
2846
          new FieldValueMetaData(TType.STRUCT)));
2847
    }});
2848
 
2849
    static {
2850
      FieldMetaData.addStructMetaDataMap(getContextFromId_result.class, metaDataMap);
2851
    }
2852
 
2853
    public getContextFromId_result() {
2854
    }
2855
 
2856
    public getContextFromId_result(
123 ashish 2857
      UserContext success,
48 ashish 2858
      UserContextException ucx)
2859
    {
2860
      this();
2861
      this.success = success;
2862
      this.ucx = ucx;
2863
    }
2864
 
2865
    /**
2866
     * Performs a deep copy on <i>other</i>.
2867
     */
2868
    public getContextFromId_result(getContextFromId_result other) {
2869
      if (other.isSetSuccess()) {
123 ashish 2870
        this.success = new UserContext(other.success);
48 ashish 2871
      }
2872
      if (other.isSetUcx()) {
2873
        this.ucx = new UserContextException(other.ucx);
2874
      }
2875
    }
2876
 
2877
    public getContextFromId_result deepCopy() {
2878
      return new getContextFromId_result(this);
2879
    }
2880
 
2881
    @Deprecated
2882
    public getContextFromId_result clone() {
2883
      return new getContextFromId_result(this);
2884
    }
2885
 
123 ashish 2886
    public UserContext getSuccess() {
48 ashish 2887
      return this.success;
2888
    }
2889
 
123 ashish 2890
    public getContextFromId_result setSuccess(UserContext success) {
48 ashish 2891
      this.success = success;
2892
      return this;
2893
    }
2894
 
2895
    public void unsetSuccess() {
2896
      this.success = null;
2897
    }
2898
 
2899
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2900
    public boolean isSetSuccess() {
2901
      return this.success != null;
2902
    }
2903
 
2904
    public void setSuccessIsSet(boolean value) {
2905
      if (!value) {
2906
        this.success = null;
2907
      }
2908
    }
2909
 
2910
    public UserContextException getUcx() {
2911
      return this.ucx;
2912
    }
2913
 
2914
    public getContextFromId_result setUcx(UserContextException ucx) {
2915
      this.ucx = ucx;
2916
      return this;
2917
    }
2918
 
2919
    public void unsetUcx() {
2920
      this.ucx = null;
2921
    }
2922
 
2923
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
2924
    public boolean isSetUcx() {
2925
      return this.ucx != null;
2926
    }
2927
 
2928
    public void setUcxIsSet(boolean value) {
2929
      if (!value) {
2930
        this.ucx = null;
2931
      }
2932
    }
2933
 
2934
    public void setFieldValue(_Fields field, Object value) {
2935
      switch (field) {
2936
      case SUCCESS:
2937
        if (value == null) {
2938
          unsetSuccess();
2939
        } else {
123 ashish 2940
          setSuccess((UserContext)value);
48 ashish 2941
        }
2942
        break;
2943
 
2944
      case UCX:
2945
        if (value == null) {
2946
          unsetUcx();
2947
        } else {
2948
          setUcx((UserContextException)value);
2949
        }
2950
        break;
2951
 
2952
      }
2953
    }
2954
 
2955
    public void setFieldValue(int fieldID, Object value) {
2956
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2957
    }
2958
 
2959
    public Object getFieldValue(_Fields field) {
2960
      switch (field) {
2961
      case SUCCESS:
2962
        return getSuccess();
2963
 
2964
      case UCX:
2965
        return getUcx();
2966
 
2967
      }
2968
      throw new IllegalStateException();
2969
    }
2970
 
2971
    public Object getFieldValue(int fieldId) {
2972
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2973
    }
2974
 
2975
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2976
    public boolean isSet(_Fields field) {
2977
      switch (field) {
2978
      case SUCCESS:
2979
        return isSetSuccess();
2980
      case UCX:
2981
        return isSetUcx();
2982
      }
2983
      throw new IllegalStateException();
2984
    }
2985
 
2986
    public boolean isSet(int fieldID) {
2987
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2988
    }
2989
 
2990
    @Override
2991
    public boolean equals(Object that) {
2992
      if (that == null)
2993
        return false;
2994
      if (that instanceof getContextFromId_result)
2995
        return this.equals((getContextFromId_result)that);
2996
      return false;
2997
    }
2998
 
2999
    public boolean equals(getContextFromId_result that) {
3000
      if (that == null)
3001
        return false;
3002
 
3003
      boolean this_present_success = true && this.isSetSuccess();
3004
      boolean that_present_success = true && that.isSetSuccess();
3005
      if (this_present_success || that_present_success) {
3006
        if (!(this_present_success && that_present_success))
3007
          return false;
3008
        if (!this.success.equals(that.success))
3009
          return false;
3010
      }
3011
 
3012
      boolean this_present_ucx = true && this.isSetUcx();
3013
      boolean that_present_ucx = true && that.isSetUcx();
3014
      if (this_present_ucx || that_present_ucx) {
3015
        if (!(this_present_ucx && that_present_ucx))
3016
          return false;
3017
        if (!this.ucx.equals(that.ucx))
3018
          return false;
3019
      }
3020
 
3021
      return true;
3022
    }
3023
 
3024
    @Override
3025
    public int hashCode() {
3026
      return 0;
3027
    }
3028
 
3029
    public void read(TProtocol iprot) throws TException {
3030
      TField field;
3031
      iprot.readStructBegin();
3032
      while (true)
3033
      {
3034
        field = iprot.readFieldBegin();
3035
        if (field.type == TType.STOP) { 
3036
          break;
3037
        }
3038
        _Fields fieldId = _Fields.findByThriftId(field.id);
3039
        if (fieldId == null) {
3040
          TProtocolUtil.skip(iprot, field.type);
3041
        } else {
3042
          switch (fieldId) {
3043
            case SUCCESS:
3044
              if (field.type == TType.STRUCT) {
123 ashish 3045
                this.success = new UserContext();
48 ashish 3046
                this.success.read(iprot);
3047
              } else { 
3048
                TProtocolUtil.skip(iprot, field.type);
3049
              }
3050
              break;
3051
            case UCX:
3052
              if (field.type == TType.STRUCT) {
3053
                this.ucx = new UserContextException();
3054
                this.ucx.read(iprot);
3055
              } else { 
3056
                TProtocolUtil.skip(iprot, field.type);
3057
              }
3058
              break;
3059
          }
3060
          iprot.readFieldEnd();
3061
        }
3062
      }
3063
      iprot.readStructEnd();
3064
      validate();
3065
    }
3066
 
3067
    public void write(TProtocol oprot) throws TException {
3068
      oprot.writeStructBegin(STRUCT_DESC);
3069
 
3070
      if (this.isSetSuccess()) {
3071
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3072
        this.success.write(oprot);
3073
        oprot.writeFieldEnd();
3074
      } else if (this.isSetUcx()) {
3075
        oprot.writeFieldBegin(UCX_FIELD_DESC);
3076
        this.ucx.write(oprot);
3077
        oprot.writeFieldEnd();
3078
      }
3079
      oprot.writeFieldStop();
3080
      oprot.writeStructEnd();
3081
    }
3082
 
3083
    @Override
3084
    public String toString() {
3085
      StringBuilder sb = new StringBuilder("getContextFromId_result(");
3086
      boolean first = true;
3087
 
3088
      sb.append("success:");
3089
      if (this.success == null) {
3090
        sb.append("null");
3091
      } else {
3092
        sb.append(this.success);
3093
      }
3094
      first = false;
3095
      if (!first) sb.append(", ");
3096
      sb.append("ucx:");
3097
      if (this.ucx == null) {
3098
        sb.append("null");
3099
      } else {
3100
        sb.append(this.ucx);
3101
      }
3102
      first = false;
3103
      sb.append(")");
3104
      return sb.toString();
3105
    }
3106
 
3107
    public void validate() throws TException {
3108
      // check for required fields
3109
    }
3110
 
3111
  }
3112
 
3113
  public static class getContextFromEmailOrHandle_args implements TBase<getContextFromEmailOrHandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContextFromEmailOrHandle_args>   {
3114
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromEmailOrHandle_args");
3115
 
3116
    private static final TField EMAILORHANDLE_FIELD_DESC = new TField("emailorhandle", TType.STRING, (short)1);
3117
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)2);
3118
 
3119
    private String emailorhandle;
3120
    private boolean isEmail;
3121
 
3122
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3123
    public enum _Fields implements TFieldIdEnum {
3124
      EMAILORHANDLE((short)1, "emailorhandle"),
3125
      IS_EMAIL((short)2, "isEmail");
3126
 
3127
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3128
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3129
 
3130
      static {
3131
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3132
          byId.put((int)field._thriftId, field);
3133
          byName.put(field.getFieldName(), field);
3134
        }
3135
      }
3136
 
3137
      /**
3138
       * Find the _Fields constant that matches fieldId, or null if its not found.
3139
       */
3140
      public static _Fields findByThriftId(int fieldId) {
3141
        return byId.get(fieldId);
3142
      }
3143
 
3144
      /**
3145
       * Find the _Fields constant that matches fieldId, throwing an exception
3146
       * if it is not found.
3147
       */
3148
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3149
        _Fields fields = findByThriftId(fieldId);
3150
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3151
        return fields;
3152
      }
3153
 
3154
      /**
3155
       * Find the _Fields constant that matches name, or null if its not found.
3156
       */
3157
      public static _Fields findByName(String name) {
3158
        return byName.get(name);
3159
      }
3160
 
3161
      private final short _thriftId;
3162
      private final String _fieldName;
3163
 
3164
      _Fields(short thriftId, String fieldName) {
3165
        _thriftId = thriftId;
3166
        _fieldName = fieldName;
3167
      }
3168
 
3169
      public short getThriftFieldId() {
3170
        return _thriftId;
3171
      }
3172
 
3173
      public String getFieldName() {
3174
        return _fieldName;
3175
      }
3176
    }
3177
 
3178
    // isset id assignments
3179
    private static final int __ISEMAIL_ISSET_ID = 0;
3180
    private BitSet __isset_bit_vector = new BitSet(1);
3181
 
3182
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3183
      put(_Fields.EMAILORHANDLE, new FieldMetaData("emailorhandle", TFieldRequirementType.DEFAULT, 
3184
          new FieldValueMetaData(TType.STRING)));
3185
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
3186
          new FieldValueMetaData(TType.BOOL)));
3187
    }});
3188
 
3189
    static {
3190
      FieldMetaData.addStructMetaDataMap(getContextFromEmailOrHandle_args.class, metaDataMap);
3191
    }
3192
 
3193
    public getContextFromEmailOrHandle_args() {
3194
    }
3195
 
3196
    public getContextFromEmailOrHandle_args(
3197
      String emailorhandle,
3198
      boolean isEmail)
3199
    {
3200
      this();
3201
      this.emailorhandle = emailorhandle;
3202
      this.isEmail = isEmail;
3203
      setIsEmailIsSet(true);
3204
    }
3205
 
3206
    /**
3207
     * Performs a deep copy on <i>other</i>.
3208
     */
3209
    public getContextFromEmailOrHandle_args(getContextFromEmailOrHandle_args other) {
3210
      __isset_bit_vector.clear();
3211
      __isset_bit_vector.or(other.__isset_bit_vector);
3212
      if (other.isSetEmailorhandle()) {
3213
        this.emailorhandle = other.emailorhandle;
3214
      }
3215
      this.isEmail = other.isEmail;
3216
    }
3217
 
3218
    public getContextFromEmailOrHandle_args deepCopy() {
3219
      return new getContextFromEmailOrHandle_args(this);
3220
    }
3221
 
3222
    @Deprecated
3223
    public getContextFromEmailOrHandle_args clone() {
3224
      return new getContextFromEmailOrHandle_args(this);
3225
    }
3226
 
3227
    public String getEmailorhandle() {
3228
      return this.emailorhandle;
3229
    }
3230
 
3231
    public getContextFromEmailOrHandle_args setEmailorhandle(String emailorhandle) {
3232
      this.emailorhandle = emailorhandle;
3233
      return this;
3234
    }
3235
 
3236
    public void unsetEmailorhandle() {
3237
      this.emailorhandle = null;
3238
    }
3239
 
3240
    /** Returns true if field emailorhandle is set (has been asigned a value) and false otherwise */
3241
    public boolean isSetEmailorhandle() {
3242
      return this.emailorhandle != null;
3243
    }
3244
 
3245
    public void setEmailorhandleIsSet(boolean value) {
3246
      if (!value) {
3247
        this.emailorhandle = null;
3248
      }
3249
    }
3250
 
3251
    public boolean isIsEmail() {
3252
      return this.isEmail;
3253
    }
3254
 
3255
    public getContextFromEmailOrHandle_args setIsEmail(boolean isEmail) {
3256
      this.isEmail = isEmail;
3257
      setIsEmailIsSet(true);
3258
      return this;
3259
    }
3260
 
3261
    public void unsetIsEmail() {
3262
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
3263
    }
3264
 
3265
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
3266
    public boolean isSetIsEmail() {
3267
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
3268
    }
3269
 
3270
    public void setIsEmailIsSet(boolean value) {
3271
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
3272
    }
3273
 
3274
    public void setFieldValue(_Fields field, Object value) {
3275
      switch (field) {
3276
      case EMAILORHANDLE:
3277
        if (value == null) {
3278
          unsetEmailorhandle();
3279
        } else {
3280
          setEmailorhandle((String)value);
3281
        }
3282
        break;
3283
 
3284
      case IS_EMAIL:
3285
        if (value == null) {
3286
          unsetIsEmail();
3287
        } else {
3288
          setIsEmail((Boolean)value);
3289
        }
3290
        break;
3291
 
3292
      }
3293
    }
3294
 
3295
    public void setFieldValue(int fieldID, Object value) {
3296
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3297
    }
3298
 
3299
    public Object getFieldValue(_Fields field) {
3300
      switch (field) {
3301
      case EMAILORHANDLE:
3302
        return getEmailorhandle();
3303
 
3304
      case IS_EMAIL:
3305
        return new Boolean(isIsEmail());
3306
 
3307
      }
3308
      throw new IllegalStateException();
3309
    }
3310
 
3311
    public Object getFieldValue(int fieldId) {
3312
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3313
    }
3314
 
3315
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3316
    public boolean isSet(_Fields field) {
3317
      switch (field) {
3318
      case EMAILORHANDLE:
3319
        return isSetEmailorhandle();
3320
      case IS_EMAIL:
3321
        return isSetIsEmail();
3322
      }
3323
      throw new IllegalStateException();
3324
    }
3325
 
3326
    public boolean isSet(int fieldID) {
3327
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3328
    }
3329
 
3330
    @Override
3331
    public boolean equals(Object that) {
3332
      if (that == null)
3333
        return false;
3334
      if (that instanceof getContextFromEmailOrHandle_args)
3335
        return this.equals((getContextFromEmailOrHandle_args)that);
3336
      return false;
3337
    }
3338
 
3339
    public boolean equals(getContextFromEmailOrHandle_args that) {
3340
      if (that == null)
3341
        return false;
3342
 
3343
      boolean this_present_emailorhandle = true && this.isSetEmailorhandle();
3344
      boolean that_present_emailorhandle = true && that.isSetEmailorhandle();
3345
      if (this_present_emailorhandle || that_present_emailorhandle) {
3346
        if (!(this_present_emailorhandle && that_present_emailorhandle))
3347
          return false;
3348
        if (!this.emailorhandle.equals(that.emailorhandle))
3349
          return false;
3350
      }
3351
 
3352
      boolean this_present_isEmail = true;
3353
      boolean that_present_isEmail = true;
3354
      if (this_present_isEmail || that_present_isEmail) {
3355
        if (!(this_present_isEmail && that_present_isEmail))
3356
          return false;
3357
        if (this.isEmail != that.isEmail)
3358
          return false;
3359
      }
3360
 
3361
      return true;
3362
    }
3363
 
3364
    @Override
3365
    public int hashCode() {
3366
      return 0;
3367
    }
3368
 
3369
    public int compareTo(getContextFromEmailOrHandle_args other) {
3370
      if (!getClass().equals(other.getClass())) {
3371
        return getClass().getName().compareTo(other.getClass().getName());
3372
      }
3373
 
3374
      int lastComparison = 0;
3375
      getContextFromEmailOrHandle_args typedOther = (getContextFromEmailOrHandle_args)other;
3376
 
3377
      lastComparison = Boolean.valueOf(isSetEmailorhandle()).compareTo(isSetEmailorhandle());
3378
      if (lastComparison != 0) {
3379
        return lastComparison;
3380
      }
3381
      lastComparison = TBaseHelper.compareTo(emailorhandle, typedOther.emailorhandle);
3382
      if (lastComparison != 0) {
3383
        return lastComparison;
3384
      }
3385
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
3386
      if (lastComparison != 0) {
3387
        return lastComparison;
3388
      }
3389
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
3390
      if (lastComparison != 0) {
3391
        return lastComparison;
3392
      }
3393
      return 0;
3394
    }
3395
 
3396
    public void read(TProtocol iprot) throws TException {
3397
      TField field;
3398
      iprot.readStructBegin();
3399
      while (true)
3400
      {
3401
        field = iprot.readFieldBegin();
3402
        if (field.type == TType.STOP) { 
3403
          break;
3404
        }
3405
        _Fields fieldId = _Fields.findByThriftId(field.id);
3406
        if (fieldId == null) {
3407
          TProtocolUtil.skip(iprot, field.type);
3408
        } else {
3409
          switch (fieldId) {
3410
            case EMAILORHANDLE:
3411
              if (field.type == TType.STRING) {
3412
                this.emailorhandle = iprot.readString();
3413
              } else { 
3414
                TProtocolUtil.skip(iprot, field.type);
3415
              }
3416
              break;
3417
            case IS_EMAIL:
3418
              if (field.type == TType.BOOL) {
3419
                this.isEmail = iprot.readBool();
3420
                setIsEmailIsSet(true);
3421
              } else { 
3422
                TProtocolUtil.skip(iprot, field.type);
3423
              }
3424
              break;
3425
          }
3426
          iprot.readFieldEnd();
3427
        }
3428
      }
3429
      iprot.readStructEnd();
3430
      validate();
3431
    }
3432
 
3433
    public void write(TProtocol oprot) throws TException {
3434
      validate();
3435
 
3436
      oprot.writeStructBegin(STRUCT_DESC);
3437
      if (this.emailorhandle != null) {
3438
        oprot.writeFieldBegin(EMAILORHANDLE_FIELD_DESC);
3439
        oprot.writeString(this.emailorhandle);
3440
        oprot.writeFieldEnd();
3441
      }
3442
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
3443
      oprot.writeBool(this.isEmail);
3444
      oprot.writeFieldEnd();
3445
      oprot.writeFieldStop();
3446
      oprot.writeStructEnd();
3447
    }
3448
 
3449
    @Override
3450
    public String toString() {
3451
      StringBuilder sb = new StringBuilder("getContextFromEmailOrHandle_args(");
3452
      boolean first = true;
3453
 
3454
      sb.append("emailorhandle:");
3455
      if (this.emailorhandle == null) {
3456
        sb.append("null");
3457
      } else {
3458
        sb.append(this.emailorhandle);
3459
      }
3460
      first = false;
3461
      if (!first) sb.append(", ");
3462
      sb.append("isEmail:");
3463
      sb.append(this.isEmail);
3464
      first = false;
3465
      sb.append(")");
3466
      return sb.toString();
3467
    }
3468
 
3469
    public void validate() throws TException {
3470
      // check for required fields
3471
    }
3472
 
3473
  }
3474
 
3475
  public static class getContextFromEmailOrHandle_result implements TBase<getContextFromEmailOrHandle_result._Fields>, java.io.Serializable, Cloneable   {
3476
    private static final TStruct STRUCT_DESC = new TStruct("getContextFromEmailOrHandle_result");
3477
 
3478
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3479
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
3480
 
123 ashish 3481
    private UserContext success;
48 ashish 3482
    private UserContextException ucx;
3483
 
3484
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3485
    public enum _Fields implements TFieldIdEnum {
3486
      SUCCESS((short)0, "success"),
3487
      UCX((short)1, "ucx");
3488
 
3489
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3490
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3491
 
3492
      static {
3493
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3494
          byId.put((int)field._thriftId, field);
3495
          byName.put(field.getFieldName(), field);
3496
        }
3497
      }
3498
 
3499
      /**
3500
       * Find the _Fields constant that matches fieldId, or null if its not found.
3501
       */
3502
      public static _Fields findByThriftId(int fieldId) {
3503
        return byId.get(fieldId);
3504
      }
3505
 
3506
      /**
3507
       * Find the _Fields constant that matches fieldId, throwing an exception
3508
       * if it is not found.
3509
       */
3510
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3511
        _Fields fields = findByThriftId(fieldId);
3512
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3513
        return fields;
3514
      }
3515
 
3516
      /**
3517
       * Find the _Fields constant that matches name, or null if its not found.
3518
       */
3519
      public static _Fields findByName(String name) {
3520
        return byName.get(name);
3521
      }
3522
 
3523
      private final short _thriftId;
3524
      private final String _fieldName;
3525
 
3526
      _Fields(short thriftId, String fieldName) {
3527
        _thriftId = thriftId;
3528
        _fieldName = fieldName;
3529
      }
3530
 
3531
      public short getThriftFieldId() {
3532
        return _thriftId;
3533
      }
3534
 
3535
      public String getFieldName() {
3536
        return _fieldName;
3537
      }
3538
    }
3539
 
3540
    // isset id assignments
3541
 
3542
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3543
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 3544
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 3545
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
3546
          new FieldValueMetaData(TType.STRUCT)));
3547
    }});
3548
 
3549
    static {
3550
      FieldMetaData.addStructMetaDataMap(getContextFromEmailOrHandle_result.class, metaDataMap);
3551
    }
3552
 
3553
    public getContextFromEmailOrHandle_result() {
3554
    }
3555
 
3556
    public getContextFromEmailOrHandle_result(
123 ashish 3557
      UserContext success,
48 ashish 3558
      UserContextException ucx)
3559
    {
3560
      this();
3561
      this.success = success;
3562
      this.ucx = ucx;
3563
    }
3564
 
3565
    /**
3566
     * Performs a deep copy on <i>other</i>.
3567
     */
3568
    public getContextFromEmailOrHandle_result(getContextFromEmailOrHandle_result other) {
3569
      if (other.isSetSuccess()) {
123 ashish 3570
        this.success = new UserContext(other.success);
48 ashish 3571
      }
3572
      if (other.isSetUcx()) {
3573
        this.ucx = new UserContextException(other.ucx);
3574
      }
3575
    }
3576
 
3577
    public getContextFromEmailOrHandle_result deepCopy() {
3578
      return new getContextFromEmailOrHandle_result(this);
3579
    }
3580
 
3581
    @Deprecated
3582
    public getContextFromEmailOrHandle_result clone() {
3583
      return new getContextFromEmailOrHandle_result(this);
3584
    }
3585
 
123 ashish 3586
    public UserContext getSuccess() {
48 ashish 3587
      return this.success;
3588
    }
3589
 
123 ashish 3590
    public getContextFromEmailOrHandle_result setSuccess(UserContext success) {
48 ashish 3591
      this.success = success;
3592
      return this;
3593
    }
3594
 
3595
    public void unsetSuccess() {
3596
      this.success = null;
3597
    }
3598
 
3599
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3600
    public boolean isSetSuccess() {
3601
      return this.success != null;
3602
    }
3603
 
3604
    public void setSuccessIsSet(boolean value) {
3605
      if (!value) {
3606
        this.success = null;
3607
      }
3608
    }
3609
 
3610
    public UserContextException getUcx() {
3611
      return this.ucx;
3612
    }
3613
 
3614
    public getContextFromEmailOrHandle_result setUcx(UserContextException ucx) {
3615
      this.ucx = ucx;
3616
      return this;
3617
    }
3618
 
3619
    public void unsetUcx() {
3620
      this.ucx = null;
3621
    }
3622
 
3623
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
3624
    public boolean isSetUcx() {
3625
      return this.ucx != null;
3626
    }
3627
 
3628
    public void setUcxIsSet(boolean value) {
3629
      if (!value) {
3630
        this.ucx = null;
3631
      }
3632
    }
3633
 
3634
    public void setFieldValue(_Fields field, Object value) {
3635
      switch (field) {
3636
      case SUCCESS:
3637
        if (value == null) {
3638
          unsetSuccess();
3639
        } else {
123 ashish 3640
          setSuccess((UserContext)value);
48 ashish 3641
        }
3642
        break;
3643
 
3644
      case UCX:
3645
        if (value == null) {
3646
          unsetUcx();
3647
        } else {
3648
          setUcx((UserContextException)value);
3649
        }
3650
        break;
3651
 
3652
      }
3653
    }
3654
 
3655
    public void setFieldValue(int fieldID, Object value) {
3656
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3657
    }
3658
 
3659
    public Object getFieldValue(_Fields field) {
3660
      switch (field) {
3661
      case SUCCESS:
3662
        return getSuccess();
3663
 
3664
      case UCX:
3665
        return getUcx();
3666
 
3667
      }
3668
      throw new IllegalStateException();
3669
    }
3670
 
3671
    public Object getFieldValue(int fieldId) {
3672
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3673
    }
3674
 
3675
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3676
    public boolean isSet(_Fields field) {
3677
      switch (field) {
3678
      case SUCCESS:
3679
        return isSetSuccess();
3680
      case UCX:
3681
        return isSetUcx();
3682
      }
3683
      throw new IllegalStateException();
3684
    }
3685
 
3686
    public boolean isSet(int fieldID) {
3687
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3688
    }
3689
 
3690
    @Override
3691
    public boolean equals(Object that) {
3692
      if (that == null)
3693
        return false;
3694
      if (that instanceof getContextFromEmailOrHandle_result)
3695
        return this.equals((getContextFromEmailOrHandle_result)that);
3696
      return false;
3697
    }
3698
 
3699
    public boolean equals(getContextFromEmailOrHandle_result that) {
3700
      if (that == null)
3701
        return false;
3702
 
3703
      boolean this_present_success = true && this.isSetSuccess();
3704
      boolean that_present_success = true && that.isSetSuccess();
3705
      if (this_present_success || that_present_success) {
3706
        if (!(this_present_success && that_present_success))
3707
          return false;
3708
        if (!this.success.equals(that.success))
3709
          return false;
3710
      }
3711
 
3712
      boolean this_present_ucx = true && this.isSetUcx();
3713
      boolean that_present_ucx = true && that.isSetUcx();
3714
      if (this_present_ucx || that_present_ucx) {
3715
        if (!(this_present_ucx && that_present_ucx))
3716
          return false;
3717
        if (!this.ucx.equals(that.ucx))
3718
          return false;
3719
      }
3720
 
3721
      return true;
3722
    }
3723
 
3724
    @Override
3725
    public int hashCode() {
3726
      return 0;
3727
    }
3728
 
3729
    public void read(TProtocol iprot) throws TException {
3730
      TField field;
3731
      iprot.readStructBegin();
3732
      while (true)
3733
      {
3734
        field = iprot.readFieldBegin();
3735
        if (field.type == TType.STOP) { 
3736
          break;
3737
        }
3738
        _Fields fieldId = _Fields.findByThriftId(field.id);
3739
        if (fieldId == null) {
3740
          TProtocolUtil.skip(iprot, field.type);
3741
        } else {
3742
          switch (fieldId) {
3743
            case SUCCESS:
3744
              if (field.type == TType.STRUCT) {
123 ashish 3745
                this.success = new UserContext();
48 ashish 3746
                this.success.read(iprot);
3747
              } else { 
3748
                TProtocolUtil.skip(iprot, field.type);
3749
              }
3750
              break;
3751
            case UCX:
3752
              if (field.type == TType.STRUCT) {
3753
                this.ucx = new UserContextException();
3754
                this.ucx.read(iprot);
3755
              } else { 
3756
                TProtocolUtil.skip(iprot, field.type);
3757
              }
3758
              break;
3759
          }
3760
          iprot.readFieldEnd();
3761
        }
3762
      }
3763
      iprot.readStructEnd();
3764
      validate();
3765
    }
3766
 
3767
    public void write(TProtocol oprot) throws TException {
3768
      oprot.writeStructBegin(STRUCT_DESC);
3769
 
3770
      if (this.isSetSuccess()) {
3771
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3772
        this.success.write(oprot);
3773
        oprot.writeFieldEnd();
3774
      } else if (this.isSetUcx()) {
3775
        oprot.writeFieldBegin(UCX_FIELD_DESC);
3776
        this.ucx.write(oprot);
3777
        oprot.writeFieldEnd();
3778
      }
3779
      oprot.writeFieldStop();
3780
      oprot.writeStructEnd();
3781
    }
3782
 
3783
    @Override
3784
    public String toString() {
3785
      StringBuilder sb = new StringBuilder("getContextFromEmailOrHandle_result(");
3786
      boolean first = true;
3787
 
3788
      sb.append("success:");
3789
      if (this.success == null) {
3790
        sb.append("null");
3791
      } else {
3792
        sb.append(this.success);
3793
      }
3794
      first = false;
3795
      if (!first) sb.append(", ");
3796
      sb.append("ucx:");
3797
      if (this.ucx == null) {
3798
        sb.append("null");
3799
      } else {
3800
        sb.append(this.ucx);
3801
      }
3802
      first = false;
3803
      sb.append(")");
3804
      return sb.toString();
3805
    }
3806
 
3807
    public void validate() throws TException {
3808
      // check for required fields
3809
    }
3810
 
3811
  }
3812
 
3813
  public static class getState_args implements TBase<getState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getState_args>   {
3814
    private static final TStruct STRUCT_DESC = new TStruct("getState_args");
3815
 
3816
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 3817
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 3818
 
3819
    private long userId;
123 ashish 3820
    private boolean isSessionId;
48 ashish 3821
 
3822
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3823
    public enum _Fields implements TFieldIdEnum {
123 ashish 3824
      USER_ID((short)1, "userId"),
3825
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 3826
 
3827
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3828
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3829
 
3830
      static {
3831
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3832
          byId.put((int)field._thriftId, field);
3833
          byName.put(field.getFieldName(), field);
3834
        }
3835
      }
3836
 
3837
      /**
3838
       * Find the _Fields constant that matches fieldId, or null if its not found.
3839
       */
3840
      public static _Fields findByThriftId(int fieldId) {
3841
        return byId.get(fieldId);
3842
      }
3843
 
3844
      /**
3845
       * Find the _Fields constant that matches fieldId, throwing an exception
3846
       * if it is not found.
3847
       */
3848
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3849
        _Fields fields = findByThriftId(fieldId);
3850
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3851
        return fields;
3852
      }
3853
 
3854
      /**
3855
       * Find the _Fields constant that matches name, or null if its not found.
3856
       */
3857
      public static _Fields findByName(String name) {
3858
        return byName.get(name);
3859
      }
3860
 
3861
      private final short _thriftId;
3862
      private final String _fieldName;
3863
 
3864
      _Fields(short thriftId, String fieldName) {
3865
        _thriftId = thriftId;
3866
        _fieldName = fieldName;
3867
      }
3868
 
3869
      public short getThriftFieldId() {
3870
        return _thriftId;
3871
      }
3872
 
3873
      public String getFieldName() {
3874
        return _fieldName;
3875
      }
3876
    }
3877
 
3878
    // isset id assignments
3879
    private static final int __USERID_ISSET_ID = 0;
123 ashish 3880
    private static final int __ISSESSIONID_ISSET_ID = 1;
3881
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 3882
 
3883
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3884
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3885
          new FieldValueMetaData(TType.I64)));
123 ashish 3886
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
3887
          new FieldValueMetaData(TType.BOOL)));
48 ashish 3888
    }});
3889
 
3890
    static {
3891
      FieldMetaData.addStructMetaDataMap(getState_args.class, metaDataMap);
3892
    }
3893
 
3894
    public getState_args() {
3895
    }
3896
 
3897
    public getState_args(
123 ashish 3898
      long userId,
3899
      boolean isSessionId)
48 ashish 3900
    {
3901
      this();
3902
      this.userId = userId;
3903
      setUserIdIsSet(true);
123 ashish 3904
      this.isSessionId = isSessionId;
3905
      setIsSessionIdIsSet(true);
48 ashish 3906
    }
3907
 
3908
    /**
3909
     * Performs a deep copy on <i>other</i>.
3910
     */
3911
    public getState_args(getState_args other) {
3912
      __isset_bit_vector.clear();
3913
      __isset_bit_vector.or(other.__isset_bit_vector);
3914
      this.userId = other.userId;
123 ashish 3915
      this.isSessionId = other.isSessionId;
48 ashish 3916
    }
3917
 
3918
    public getState_args deepCopy() {
3919
      return new getState_args(this);
3920
    }
3921
 
3922
    @Deprecated
3923
    public getState_args clone() {
3924
      return new getState_args(this);
3925
    }
3926
 
3927
    public long getUserId() {
3928
      return this.userId;
3929
    }
3930
 
3931
    public getState_args setUserId(long userId) {
3932
      this.userId = userId;
3933
      setUserIdIsSet(true);
3934
      return this;
3935
    }
3936
 
3937
    public void unsetUserId() {
3938
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3939
    }
3940
 
3941
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
3942
    public boolean isSetUserId() {
3943
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3944
    }
3945
 
3946
    public void setUserIdIsSet(boolean value) {
3947
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3948
    }
3949
 
123 ashish 3950
    public boolean isIsSessionId() {
3951
      return this.isSessionId;
3952
    }
3953
 
3954
    public getState_args setIsSessionId(boolean isSessionId) {
3955
      this.isSessionId = isSessionId;
3956
      setIsSessionIdIsSet(true);
3957
      return this;
3958
    }
3959
 
3960
    public void unsetIsSessionId() {
3961
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
3962
    }
3963
 
3964
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
3965
    public boolean isSetIsSessionId() {
3966
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
3967
    }
3968
 
3969
    public void setIsSessionIdIsSet(boolean value) {
3970
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
3971
    }
3972
 
48 ashish 3973
    public void setFieldValue(_Fields field, Object value) {
3974
      switch (field) {
3975
      case USER_ID:
3976
        if (value == null) {
3977
          unsetUserId();
3978
        } else {
3979
          setUserId((Long)value);
3980
        }
3981
        break;
3982
 
123 ashish 3983
      case IS_SESSION_ID:
3984
        if (value == null) {
3985
          unsetIsSessionId();
3986
        } else {
3987
          setIsSessionId((Boolean)value);
3988
        }
3989
        break;
3990
 
48 ashish 3991
      }
3992
    }
3993
 
3994
    public void setFieldValue(int fieldID, Object value) {
3995
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3996
    }
3997
 
3998
    public Object getFieldValue(_Fields field) {
3999
      switch (field) {
4000
      case USER_ID:
4001
        return new Long(getUserId());
4002
 
123 ashish 4003
      case IS_SESSION_ID:
4004
        return new Boolean(isIsSessionId());
4005
 
48 ashish 4006
      }
4007
      throw new IllegalStateException();
4008
    }
4009
 
4010
    public Object getFieldValue(int fieldId) {
4011
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4012
    }
4013
 
4014
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4015
    public boolean isSet(_Fields field) {
4016
      switch (field) {
4017
      case USER_ID:
4018
        return isSetUserId();
123 ashish 4019
      case IS_SESSION_ID:
4020
        return isSetIsSessionId();
48 ashish 4021
      }
4022
      throw new IllegalStateException();
4023
    }
4024
 
4025
    public boolean isSet(int fieldID) {
4026
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4027
    }
4028
 
4029
    @Override
4030
    public boolean equals(Object that) {
4031
      if (that == null)
4032
        return false;
4033
      if (that instanceof getState_args)
4034
        return this.equals((getState_args)that);
4035
      return false;
4036
    }
4037
 
4038
    public boolean equals(getState_args that) {
4039
      if (that == null)
4040
        return false;
4041
 
4042
      boolean this_present_userId = true;
4043
      boolean that_present_userId = true;
4044
      if (this_present_userId || that_present_userId) {
4045
        if (!(this_present_userId && that_present_userId))
4046
          return false;
4047
        if (this.userId != that.userId)
4048
          return false;
4049
      }
4050
 
123 ashish 4051
      boolean this_present_isSessionId = true;
4052
      boolean that_present_isSessionId = true;
4053
      if (this_present_isSessionId || that_present_isSessionId) {
4054
        if (!(this_present_isSessionId && that_present_isSessionId))
4055
          return false;
4056
        if (this.isSessionId != that.isSessionId)
4057
          return false;
4058
      }
4059
 
48 ashish 4060
      return true;
4061
    }
4062
 
4063
    @Override
4064
    public int hashCode() {
4065
      return 0;
4066
    }
4067
 
4068
    public int compareTo(getState_args other) {
4069
      if (!getClass().equals(other.getClass())) {
4070
        return getClass().getName().compareTo(other.getClass().getName());
4071
      }
4072
 
4073
      int lastComparison = 0;
4074
      getState_args typedOther = (getState_args)other;
4075
 
4076
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4077
      if (lastComparison != 0) {
4078
        return lastComparison;
4079
      }
4080
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4081
      if (lastComparison != 0) {
4082
        return lastComparison;
4083
      }
123 ashish 4084
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
4085
      if (lastComparison != 0) {
4086
        return lastComparison;
4087
      }
4088
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
4089
      if (lastComparison != 0) {
4090
        return lastComparison;
4091
      }
48 ashish 4092
      return 0;
4093
    }
4094
 
4095
    public void read(TProtocol iprot) throws TException {
4096
      TField field;
4097
      iprot.readStructBegin();
4098
      while (true)
4099
      {
4100
        field = iprot.readFieldBegin();
4101
        if (field.type == TType.STOP) { 
4102
          break;
4103
        }
4104
        _Fields fieldId = _Fields.findByThriftId(field.id);
4105
        if (fieldId == null) {
4106
          TProtocolUtil.skip(iprot, field.type);
4107
        } else {
4108
          switch (fieldId) {
4109
            case USER_ID:
4110
              if (field.type == TType.I64) {
4111
                this.userId = iprot.readI64();
4112
                setUserIdIsSet(true);
4113
              } else { 
4114
                TProtocolUtil.skip(iprot, field.type);
4115
              }
4116
              break;
123 ashish 4117
            case IS_SESSION_ID:
4118
              if (field.type == TType.BOOL) {
4119
                this.isSessionId = iprot.readBool();
4120
                setIsSessionIdIsSet(true);
4121
              } else { 
4122
                TProtocolUtil.skip(iprot, field.type);
4123
              }
4124
              break;
48 ashish 4125
          }
4126
          iprot.readFieldEnd();
4127
        }
4128
      }
4129
      iprot.readStructEnd();
4130
      validate();
4131
    }
4132
 
4133
    public void write(TProtocol oprot) throws TException {
4134
      validate();
4135
 
4136
      oprot.writeStructBegin(STRUCT_DESC);
4137
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4138
      oprot.writeI64(this.userId);
4139
      oprot.writeFieldEnd();
123 ashish 4140
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
4141
      oprot.writeBool(this.isSessionId);
4142
      oprot.writeFieldEnd();
48 ashish 4143
      oprot.writeFieldStop();
4144
      oprot.writeStructEnd();
4145
    }
4146
 
4147
    @Override
4148
    public String toString() {
4149
      StringBuilder sb = new StringBuilder("getState_args(");
4150
      boolean first = true;
4151
 
4152
      sb.append("userId:");
4153
      sb.append(this.userId);
4154
      first = false;
123 ashish 4155
      if (!first) sb.append(", ");
4156
      sb.append("isSessionId:");
4157
      sb.append(this.isSessionId);
4158
      first = false;
48 ashish 4159
      sb.append(")");
4160
      return sb.toString();
4161
    }
4162
 
4163
    public void validate() throws TException {
4164
      // check for required fields
4165
    }
4166
 
4167
  }
4168
 
123 ashish 4169
  public static class getState_result implements TBase<getState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getState_result>   {
48 ashish 4170
    private static final TStruct STRUCT_DESC = new TStruct("getState_result");
4171
 
4172
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4173
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
4174
 
123 ashish 4175
    private UserState success;
48 ashish 4176
    private UserContextException ucx;
4177
 
4178
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4179
    public enum _Fields implements TFieldIdEnum {
4180
      SUCCESS((short)0, "success"),
4181
      UCX((short)1, "ucx");
4182
 
4183
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4184
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4185
 
4186
      static {
4187
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4188
          byId.put((int)field._thriftId, field);
4189
          byName.put(field.getFieldName(), field);
4190
        }
4191
      }
4192
 
4193
      /**
4194
       * Find the _Fields constant that matches fieldId, or null if its not found.
4195
       */
4196
      public static _Fields findByThriftId(int fieldId) {
4197
        return byId.get(fieldId);
4198
      }
4199
 
4200
      /**
4201
       * Find the _Fields constant that matches fieldId, throwing an exception
4202
       * if it is not found.
4203
       */
4204
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4205
        _Fields fields = findByThriftId(fieldId);
4206
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4207
        return fields;
4208
      }
4209
 
4210
      /**
4211
       * Find the _Fields constant that matches name, or null if its not found.
4212
       */
4213
      public static _Fields findByName(String name) {
4214
        return byName.get(name);
4215
      }
4216
 
4217
      private final short _thriftId;
4218
      private final String _fieldName;
4219
 
4220
      _Fields(short thriftId, String fieldName) {
4221
        _thriftId = thriftId;
4222
        _fieldName = fieldName;
4223
      }
4224
 
4225
      public short getThriftFieldId() {
4226
        return _thriftId;
4227
      }
4228
 
4229
      public String getFieldName() {
4230
        return _fieldName;
4231
      }
4232
    }
4233
 
4234
    // isset id assignments
4235
 
4236
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4237
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 4238
          new StructMetaData(TType.STRUCT, UserState.class)));
48 ashish 4239
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
4240
          new FieldValueMetaData(TType.STRUCT)));
4241
    }});
4242
 
4243
    static {
4244
      FieldMetaData.addStructMetaDataMap(getState_result.class, metaDataMap);
4245
    }
4246
 
4247
    public getState_result() {
4248
    }
4249
 
4250
    public getState_result(
123 ashish 4251
      UserState success,
48 ashish 4252
      UserContextException ucx)
4253
    {
4254
      this();
4255
      this.success = success;
4256
      this.ucx = ucx;
4257
    }
4258
 
4259
    /**
4260
     * Performs a deep copy on <i>other</i>.
4261
     */
4262
    public getState_result(getState_result other) {
4263
      if (other.isSetSuccess()) {
123 ashish 4264
        this.success = new UserState(other.success);
48 ashish 4265
      }
4266
      if (other.isSetUcx()) {
4267
        this.ucx = new UserContextException(other.ucx);
4268
      }
4269
    }
4270
 
4271
    public getState_result deepCopy() {
4272
      return new getState_result(this);
4273
    }
4274
 
4275
    @Deprecated
4276
    public getState_result clone() {
4277
      return new getState_result(this);
4278
    }
4279
 
123 ashish 4280
    public UserState getSuccess() {
48 ashish 4281
      return this.success;
4282
    }
4283
 
123 ashish 4284
    public getState_result setSuccess(UserState success) {
48 ashish 4285
      this.success = success;
4286
      return this;
4287
    }
4288
 
4289
    public void unsetSuccess() {
4290
      this.success = null;
4291
    }
4292
 
4293
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4294
    public boolean isSetSuccess() {
4295
      return this.success != null;
4296
    }
4297
 
4298
    public void setSuccessIsSet(boolean value) {
4299
      if (!value) {
4300
        this.success = null;
4301
      }
4302
    }
4303
 
4304
    public UserContextException getUcx() {
4305
      return this.ucx;
4306
    }
4307
 
4308
    public getState_result setUcx(UserContextException ucx) {
4309
      this.ucx = ucx;
4310
      return this;
4311
    }
4312
 
4313
    public void unsetUcx() {
4314
      this.ucx = null;
4315
    }
4316
 
4317
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
4318
    public boolean isSetUcx() {
4319
      return this.ucx != null;
4320
    }
4321
 
4322
    public void setUcxIsSet(boolean value) {
4323
      if (!value) {
4324
        this.ucx = null;
4325
      }
4326
    }
4327
 
4328
    public void setFieldValue(_Fields field, Object value) {
4329
      switch (field) {
4330
      case SUCCESS:
4331
        if (value == null) {
4332
          unsetSuccess();
4333
        } else {
123 ashish 4334
          setSuccess((UserState)value);
48 ashish 4335
        }
4336
        break;
4337
 
4338
      case UCX:
4339
        if (value == null) {
4340
          unsetUcx();
4341
        } else {
4342
          setUcx((UserContextException)value);
4343
        }
4344
        break;
4345
 
4346
      }
4347
    }
4348
 
4349
    public void setFieldValue(int fieldID, Object value) {
4350
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4351
    }
4352
 
4353
    public Object getFieldValue(_Fields field) {
4354
      switch (field) {
4355
      case SUCCESS:
4356
        return getSuccess();
4357
 
4358
      case UCX:
4359
        return getUcx();
4360
 
4361
      }
4362
      throw new IllegalStateException();
4363
    }
4364
 
4365
    public Object getFieldValue(int fieldId) {
4366
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4367
    }
4368
 
4369
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4370
    public boolean isSet(_Fields field) {
4371
      switch (field) {
4372
      case SUCCESS:
4373
        return isSetSuccess();
4374
      case UCX:
4375
        return isSetUcx();
4376
      }
4377
      throw new IllegalStateException();
4378
    }
4379
 
4380
    public boolean isSet(int fieldID) {
4381
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4382
    }
4383
 
4384
    @Override
4385
    public boolean equals(Object that) {
4386
      if (that == null)
4387
        return false;
4388
      if (that instanceof getState_result)
4389
        return this.equals((getState_result)that);
4390
      return false;
4391
    }
4392
 
4393
    public boolean equals(getState_result that) {
4394
      if (that == null)
4395
        return false;
4396
 
4397
      boolean this_present_success = true && this.isSetSuccess();
4398
      boolean that_present_success = true && that.isSetSuccess();
4399
      if (this_present_success || that_present_success) {
4400
        if (!(this_present_success && that_present_success))
4401
          return false;
4402
        if (!this.success.equals(that.success))
4403
          return false;
4404
      }
4405
 
4406
      boolean this_present_ucx = true && this.isSetUcx();
4407
      boolean that_present_ucx = true && that.isSetUcx();
4408
      if (this_present_ucx || that_present_ucx) {
4409
        if (!(this_present_ucx && that_present_ucx))
4410
          return false;
4411
        if (!this.ucx.equals(that.ucx))
4412
          return false;
4413
      }
4414
 
4415
      return true;
4416
    }
4417
 
4418
    @Override
4419
    public int hashCode() {
4420
      return 0;
4421
    }
4422
 
123 ashish 4423
    public int compareTo(getState_result other) {
4424
      if (!getClass().equals(other.getClass())) {
4425
        return getClass().getName().compareTo(other.getClass().getName());
4426
      }
4427
 
4428
      int lastComparison = 0;
4429
      getState_result typedOther = (getState_result)other;
4430
 
4431
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4432
      if (lastComparison != 0) {
4433
        return lastComparison;
4434
      }
4435
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4436
      if (lastComparison != 0) {
4437
        return lastComparison;
4438
      }
4439
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
4440
      if (lastComparison != 0) {
4441
        return lastComparison;
4442
      }
4443
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
4444
      if (lastComparison != 0) {
4445
        return lastComparison;
4446
      }
4447
      return 0;
4448
    }
4449
 
48 ashish 4450
    public void read(TProtocol iprot) throws TException {
4451
      TField field;
4452
      iprot.readStructBegin();
4453
      while (true)
4454
      {
4455
        field = iprot.readFieldBegin();
4456
        if (field.type == TType.STOP) { 
4457
          break;
4458
        }
4459
        _Fields fieldId = _Fields.findByThriftId(field.id);
4460
        if (fieldId == null) {
4461
          TProtocolUtil.skip(iprot, field.type);
4462
        } else {
4463
          switch (fieldId) {
4464
            case SUCCESS:
4465
              if (field.type == TType.STRUCT) {
123 ashish 4466
                this.success = new UserState();
48 ashish 4467
                this.success.read(iprot);
4468
              } else { 
4469
                TProtocolUtil.skip(iprot, field.type);
4470
              }
4471
              break;
4472
            case UCX:
4473
              if (field.type == TType.STRUCT) {
4474
                this.ucx = new UserContextException();
4475
                this.ucx.read(iprot);
4476
              } else { 
4477
                TProtocolUtil.skip(iprot, field.type);
4478
              }
4479
              break;
4480
          }
4481
          iprot.readFieldEnd();
4482
        }
4483
      }
4484
      iprot.readStructEnd();
4485
      validate();
4486
    }
4487
 
4488
    public void write(TProtocol oprot) throws TException {
4489
      oprot.writeStructBegin(STRUCT_DESC);
4490
 
4491
      if (this.isSetSuccess()) {
4492
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4493
        this.success.write(oprot);
4494
        oprot.writeFieldEnd();
4495
      } else if (this.isSetUcx()) {
4496
        oprot.writeFieldBegin(UCX_FIELD_DESC);
4497
        this.ucx.write(oprot);
4498
        oprot.writeFieldEnd();
4499
      }
4500
      oprot.writeFieldStop();
4501
      oprot.writeStructEnd();
4502
    }
4503
 
4504
    @Override
4505
    public String toString() {
4506
      StringBuilder sb = new StringBuilder("getState_result(");
4507
      boolean first = true;
4508
 
4509
      sb.append("success:");
4510
      if (this.success == null) {
4511
        sb.append("null");
4512
      } else {
4513
        sb.append(this.success);
4514
      }
4515
      first = false;
4516
      if (!first) sb.append(", ");
4517
      sb.append("ucx:");
4518
      if (this.ucx == null) {
4519
        sb.append("null");
4520
      } else {
4521
        sb.append(this.ucx);
4522
      }
4523
      first = false;
4524
      sb.append(")");
4525
      return sb.toString();
4526
    }
4527
 
4528
    public void validate() throws TException {
4529
      // check for required fields
4530
    }
4531
 
4532
  }
4533
 
4534
  public static class getPrimaryInfo_args implements TBase<getPrimaryInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPrimaryInfo_args>   {
4535
    private static final TStruct STRUCT_DESC = new TStruct("getPrimaryInfo_args");
4536
 
4537
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 4538
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 4539
 
4540
    private long userId;
123 ashish 4541
    private boolean isSessionId;
48 ashish 4542
 
4543
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4544
    public enum _Fields implements TFieldIdEnum {
123 ashish 4545
      USER_ID((short)1, "userId"),
4546
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 4547
 
4548
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4549
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4550
 
4551
      static {
4552
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4553
          byId.put((int)field._thriftId, field);
4554
          byName.put(field.getFieldName(), field);
4555
        }
4556
      }
4557
 
4558
      /**
4559
       * Find the _Fields constant that matches fieldId, or null if its not found.
4560
       */
4561
      public static _Fields findByThriftId(int fieldId) {
4562
        return byId.get(fieldId);
4563
      }
4564
 
4565
      /**
4566
       * Find the _Fields constant that matches fieldId, throwing an exception
4567
       * if it is not found.
4568
       */
4569
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4570
        _Fields fields = findByThriftId(fieldId);
4571
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4572
        return fields;
4573
      }
4574
 
4575
      /**
4576
       * Find the _Fields constant that matches name, or null if its not found.
4577
       */
4578
      public static _Fields findByName(String name) {
4579
        return byName.get(name);
4580
      }
4581
 
4582
      private final short _thriftId;
4583
      private final String _fieldName;
4584
 
4585
      _Fields(short thriftId, String fieldName) {
4586
        _thriftId = thriftId;
4587
        _fieldName = fieldName;
4588
      }
4589
 
4590
      public short getThriftFieldId() {
4591
        return _thriftId;
4592
      }
4593
 
4594
      public String getFieldName() {
4595
        return _fieldName;
4596
      }
4597
    }
4598
 
4599
    // isset id assignments
4600
    private static final int __USERID_ISSET_ID = 0;
123 ashish 4601
    private static final int __ISSESSIONID_ISSET_ID = 1;
4602
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 4603
 
4604
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4605
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4606
          new FieldValueMetaData(TType.I64)));
123 ashish 4607
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
4608
          new FieldValueMetaData(TType.BOOL)));
48 ashish 4609
    }});
4610
 
4611
    static {
4612
      FieldMetaData.addStructMetaDataMap(getPrimaryInfo_args.class, metaDataMap);
4613
    }
4614
 
4615
    public getPrimaryInfo_args() {
4616
    }
4617
 
4618
    public getPrimaryInfo_args(
123 ashish 4619
      long userId,
4620
      boolean isSessionId)
48 ashish 4621
    {
4622
      this();
4623
      this.userId = userId;
4624
      setUserIdIsSet(true);
123 ashish 4625
      this.isSessionId = isSessionId;
4626
      setIsSessionIdIsSet(true);
48 ashish 4627
    }
4628
 
4629
    /**
4630
     * Performs a deep copy on <i>other</i>.
4631
     */
4632
    public getPrimaryInfo_args(getPrimaryInfo_args other) {
4633
      __isset_bit_vector.clear();
4634
      __isset_bit_vector.or(other.__isset_bit_vector);
4635
      this.userId = other.userId;
123 ashish 4636
      this.isSessionId = other.isSessionId;
48 ashish 4637
    }
4638
 
4639
    public getPrimaryInfo_args deepCopy() {
4640
      return new getPrimaryInfo_args(this);
4641
    }
4642
 
4643
    @Deprecated
4644
    public getPrimaryInfo_args clone() {
4645
      return new getPrimaryInfo_args(this);
4646
    }
4647
 
4648
    public long getUserId() {
4649
      return this.userId;
4650
    }
4651
 
4652
    public getPrimaryInfo_args setUserId(long userId) {
4653
      this.userId = userId;
4654
      setUserIdIsSet(true);
4655
      return this;
4656
    }
4657
 
4658
    public void unsetUserId() {
4659
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4660
    }
4661
 
4662
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4663
    public boolean isSetUserId() {
4664
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4665
    }
4666
 
4667
    public void setUserIdIsSet(boolean value) {
4668
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4669
    }
4670
 
123 ashish 4671
    public boolean isIsSessionId() {
4672
      return this.isSessionId;
4673
    }
4674
 
4675
    public getPrimaryInfo_args setIsSessionId(boolean isSessionId) {
4676
      this.isSessionId = isSessionId;
4677
      setIsSessionIdIsSet(true);
4678
      return this;
4679
    }
4680
 
4681
    public void unsetIsSessionId() {
4682
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
4683
    }
4684
 
4685
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
4686
    public boolean isSetIsSessionId() {
4687
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
4688
    }
4689
 
4690
    public void setIsSessionIdIsSet(boolean value) {
4691
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
4692
    }
4693
 
48 ashish 4694
    public void setFieldValue(_Fields field, Object value) {
4695
      switch (field) {
4696
      case USER_ID:
4697
        if (value == null) {
4698
          unsetUserId();
4699
        } else {
4700
          setUserId((Long)value);
4701
        }
4702
        break;
4703
 
123 ashish 4704
      case IS_SESSION_ID:
4705
        if (value == null) {
4706
          unsetIsSessionId();
4707
        } else {
4708
          setIsSessionId((Boolean)value);
4709
        }
4710
        break;
4711
 
48 ashish 4712
      }
4713
    }
4714
 
4715
    public void setFieldValue(int fieldID, Object value) {
4716
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4717
    }
4718
 
4719
    public Object getFieldValue(_Fields field) {
4720
      switch (field) {
4721
      case USER_ID:
4722
        return new Long(getUserId());
4723
 
123 ashish 4724
      case IS_SESSION_ID:
4725
        return new Boolean(isIsSessionId());
4726
 
48 ashish 4727
      }
4728
      throw new IllegalStateException();
4729
    }
4730
 
4731
    public Object getFieldValue(int fieldId) {
4732
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4733
    }
4734
 
4735
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4736
    public boolean isSet(_Fields field) {
4737
      switch (field) {
4738
      case USER_ID:
4739
        return isSetUserId();
123 ashish 4740
      case IS_SESSION_ID:
4741
        return isSetIsSessionId();
48 ashish 4742
      }
4743
      throw new IllegalStateException();
4744
    }
4745
 
4746
    public boolean isSet(int fieldID) {
4747
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4748
    }
4749
 
4750
    @Override
4751
    public boolean equals(Object that) {
4752
      if (that == null)
4753
        return false;
4754
      if (that instanceof getPrimaryInfo_args)
4755
        return this.equals((getPrimaryInfo_args)that);
4756
      return false;
4757
    }
4758
 
4759
    public boolean equals(getPrimaryInfo_args that) {
4760
      if (that == null)
4761
        return false;
4762
 
4763
      boolean this_present_userId = true;
4764
      boolean that_present_userId = true;
4765
      if (this_present_userId || that_present_userId) {
4766
        if (!(this_present_userId && that_present_userId))
4767
          return false;
4768
        if (this.userId != that.userId)
4769
          return false;
4770
      }
4771
 
123 ashish 4772
      boolean this_present_isSessionId = true;
4773
      boolean that_present_isSessionId = true;
4774
      if (this_present_isSessionId || that_present_isSessionId) {
4775
        if (!(this_present_isSessionId && that_present_isSessionId))
4776
          return false;
4777
        if (this.isSessionId != that.isSessionId)
4778
          return false;
4779
      }
4780
 
48 ashish 4781
      return true;
4782
    }
4783
 
4784
    @Override
4785
    public int hashCode() {
4786
      return 0;
4787
    }
4788
 
4789
    public int compareTo(getPrimaryInfo_args other) {
4790
      if (!getClass().equals(other.getClass())) {
4791
        return getClass().getName().compareTo(other.getClass().getName());
4792
      }
4793
 
4794
      int lastComparison = 0;
4795
      getPrimaryInfo_args typedOther = (getPrimaryInfo_args)other;
4796
 
4797
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4798
      if (lastComparison != 0) {
4799
        return lastComparison;
4800
      }
4801
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4802
      if (lastComparison != 0) {
4803
        return lastComparison;
4804
      }
123 ashish 4805
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
4806
      if (lastComparison != 0) {
4807
        return lastComparison;
4808
      }
4809
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
4810
      if (lastComparison != 0) {
4811
        return lastComparison;
4812
      }
48 ashish 4813
      return 0;
4814
    }
4815
 
4816
    public void read(TProtocol iprot) throws TException {
4817
      TField field;
4818
      iprot.readStructBegin();
4819
      while (true)
4820
      {
4821
        field = iprot.readFieldBegin();
4822
        if (field.type == TType.STOP) { 
4823
          break;
4824
        }
4825
        _Fields fieldId = _Fields.findByThriftId(field.id);
4826
        if (fieldId == null) {
4827
          TProtocolUtil.skip(iprot, field.type);
4828
        } else {
4829
          switch (fieldId) {
4830
            case USER_ID:
4831
              if (field.type == TType.I64) {
4832
                this.userId = iprot.readI64();
4833
                setUserIdIsSet(true);
4834
              } else { 
4835
                TProtocolUtil.skip(iprot, field.type);
4836
              }
4837
              break;
123 ashish 4838
            case IS_SESSION_ID:
4839
              if (field.type == TType.BOOL) {
4840
                this.isSessionId = iprot.readBool();
4841
                setIsSessionIdIsSet(true);
4842
              } else { 
4843
                TProtocolUtil.skip(iprot, field.type);
4844
              }
4845
              break;
48 ashish 4846
          }
4847
          iprot.readFieldEnd();
4848
        }
4849
      }
4850
      iprot.readStructEnd();
4851
      validate();
4852
    }
4853
 
4854
    public void write(TProtocol oprot) throws TException {
4855
      validate();
4856
 
4857
      oprot.writeStructBegin(STRUCT_DESC);
4858
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4859
      oprot.writeI64(this.userId);
4860
      oprot.writeFieldEnd();
123 ashish 4861
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
4862
      oprot.writeBool(this.isSessionId);
4863
      oprot.writeFieldEnd();
48 ashish 4864
      oprot.writeFieldStop();
4865
      oprot.writeStructEnd();
4866
    }
4867
 
4868
    @Override
4869
    public String toString() {
4870
      StringBuilder sb = new StringBuilder("getPrimaryInfo_args(");
4871
      boolean first = true;
4872
 
4873
      sb.append("userId:");
4874
      sb.append(this.userId);
4875
      first = false;
123 ashish 4876
      if (!first) sb.append(", ");
4877
      sb.append("isSessionId:");
4878
      sb.append(this.isSessionId);
4879
      first = false;
48 ashish 4880
      sb.append(")");
4881
      return sb.toString();
4882
    }
4883
 
4884
    public void validate() throws TException {
4885
      // check for required fields
4886
    }
4887
 
4888
  }
4889
 
4890
  public static class getPrimaryInfo_result implements TBase<getPrimaryInfo_result._Fields>, java.io.Serializable, Cloneable   {
4891
    private static final TStruct STRUCT_DESC = new TStruct("getPrimaryInfo_result");
4892
 
4893
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4894
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
4895
 
123 ashish 4896
    private UserPrimaryInfo success;
48 ashish 4897
    private UserContextException ucx;
4898
 
4899
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4900
    public enum _Fields implements TFieldIdEnum {
4901
      SUCCESS((short)0, "success"),
4902
      UCX((short)1, "ucx");
4903
 
4904
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4905
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4906
 
4907
      static {
4908
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4909
          byId.put((int)field._thriftId, field);
4910
          byName.put(field.getFieldName(), field);
4911
        }
4912
      }
4913
 
4914
      /**
4915
       * Find the _Fields constant that matches fieldId, or null if its not found.
4916
       */
4917
      public static _Fields findByThriftId(int fieldId) {
4918
        return byId.get(fieldId);
4919
      }
4920
 
4921
      /**
4922
       * Find the _Fields constant that matches fieldId, throwing an exception
4923
       * if it is not found.
4924
       */
4925
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4926
        _Fields fields = findByThriftId(fieldId);
4927
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4928
        return fields;
4929
      }
4930
 
4931
      /**
4932
       * Find the _Fields constant that matches name, or null if its not found.
4933
       */
4934
      public static _Fields findByName(String name) {
4935
        return byName.get(name);
4936
      }
4937
 
4938
      private final short _thriftId;
4939
      private final String _fieldName;
4940
 
4941
      _Fields(short thriftId, String fieldName) {
4942
        _thriftId = thriftId;
4943
        _fieldName = fieldName;
4944
      }
4945
 
4946
      public short getThriftFieldId() {
4947
        return _thriftId;
4948
      }
4949
 
4950
      public String getFieldName() {
4951
        return _fieldName;
4952
      }
4953
    }
4954
 
4955
    // isset id assignments
4956
 
4957
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4958
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 4959
          new StructMetaData(TType.STRUCT, UserPrimaryInfo.class)));
48 ashish 4960
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
4961
          new FieldValueMetaData(TType.STRUCT)));
4962
    }});
4963
 
4964
    static {
4965
      FieldMetaData.addStructMetaDataMap(getPrimaryInfo_result.class, metaDataMap);
4966
    }
4967
 
4968
    public getPrimaryInfo_result() {
4969
    }
4970
 
4971
    public getPrimaryInfo_result(
123 ashish 4972
      UserPrimaryInfo success,
48 ashish 4973
      UserContextException ucx)
4974
    {
4975
      this();
4976
      this.success = success;
4977
      this.ucx = ucx;
4978
    }
4979
 
4980
    /**
4981
     * Performs a deep copy on <i>other</i>.
4982
     */
4983
    public getPrimaryInfo_result(getPrimaryInfo_result other) {
4984
      if (other.isSetSuccess()) {
123 ashish 4985
        this.success = new UserPrimaryInfo(other.success);
48 ashish 4986
      }
4987
      if (other.isSetUcx()) {
4988
        this.ucx = new UserContextException(other.ucx);
4989
      }
4990
    }
4991
 
4992
    public getPrimaryInfo_result deepCopy() {
4993
      return new getPrimaryInfo_result(this);
4994
    }
4995
 
4996
    @Deprecated
4997
    public getPrimaryInfo_result clone() {
4998
      return new getPrimaryInfo_result(this);
4999
    }
5000
 
123 ashish 5001
    public UserPrimaryInfo getSuccess() {
48 ashish 5002
      return this.success;
5003
    }
5004
 
123 ashish 5005
    public getPrimaryInfo_result setSuccess(UserPrimaryInfo success) {
48 ashish 5006
      this.success = success;
5007
      return this;
5008
    }
5009
 
5010
    public void unsetSuccess() {
5011
      this.success = null;
5012
    }
5013
 
5014
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5015
    public boolean isSetSuccess() {
5016
      return this.success != null;
5017
    }
5018
 
5019
    public void setSuccessIsSet(boolean value) {
5020
      if (!value) {
5021
        this.success = null;
5022
      }
5023
    }
5024
 
5025
    public UserContextException getUcx() {
5026
      return this.ucx;
5027
    }
5028
 
5029
    public getPrimaryInfo_result setUcx(UserContextException ucx) {
5030
      this.ucx = ucx;
5031
      return this;
5032
    }
5033
 
5034
    public void unsetUcx() {
5035
      this.ucx = null;
5036
    }
5037
 
5038
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
5039
    public boolean isSetUcx() {
5040
      return this.ucx != null;
5041
    }
5042
 
5043
    public void setUcxIsSet(boolean value) {
5044
      if (!value) {
5045
        this.ucx = null;
5046
      }
5047
    }
5048
 
5049
    public void setFieldValue(_Fields field, Object value) {
5050
      switch (field) {
5051
      case SUCCESS:
5052
        if (value == null) {
5053
          unsetSuccess();
5054
        } else {
123 ashish 5055
          setSuccess((UserPrimaryInfo)value);
48 ashish 5056
        }
5057
        break;
5058
 
5059
      case UCX:
5060
        if (value == null) {
5061
          unsetUcx();
5062
        } else {
5063
          setUcx((UserContextException)value);
5064
        }
5065
        break;
5066
 
5067
      }
5068
    }
5069
 
5070
    public void setFieldValue(int fieldID, Object value) {
5071
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5072
    }
5073
 
5074
    public Object getFieldValue(_Fields field) {
5075
      switch (field) {
5076
      case SUCCESS:
5077
        return getSuccess();
5078
 
5079
      case UCX:
5080
        return getUcx();
5081
 
5082
      }
5083
      throw new IllegalStateException();
5084
    }
5085
 
5086
    public Object getFieldValue(int fieldId) {
5087
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5088
    }
5089
 
5090
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5091
    public boolean isSet(_Fields field) {
5092
      switch (field) {
5093
      case SUCCESS:
5094
        return isSetSuccess();
5095
      case UCX:
5096
        return isSetUcx();
5097
      }
5098
      throw new IllegalStateException();
5099
    }
5100
 
5101
    public boolean isSet(int fieldID) {
5102
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5103
    }
5104
 
5105
    @Override
5106
    public boolean equals(Object that) {
5107
      if (that == null)
5108
        return false;
5109
      if (that instanceof getPrimaryInfo_result)
5110
        return this.equals((getPrimaryInfo_result)that);
5111
      return false;
5112
    }
5113
 
5114
    public boolean equals(getPrimaryInfo_result that) {
5115
      if (that == null)
5116
        return false;
5117
 
5118
      boolean this_present_success = true && this.isSetSuccess();
5119
      boolean that_present_success = true && that.isSetSuccess();
5120
      if (this_present_success || that_present_success) {
5121
        if (!(this_present_success && that_present_success))
5122
          return false;
5123
        if (!this.success.equals(that.success))
5124
          return false;
5125
      }
5126
 
5127
      boolean this_present_ucx = true && this.isSetUcx();
5128
      boolean that_present_ucx = true && that.isSetUcx();
5129
      if (this_present_ucx || that_present_ucx) {
5130
        if (!(this_present_ucx && that_present_ucx))
5131
          return false;
5132
        if (!this.ucx.equals(that.ucx))
5133
          return false;
5134
      }
5135
 
5136
      return true;
5137
    }
5138
 
5139
    @Override
5140
    public int hashCode() {
5141
      return 0;
5142
    }
5143
 
5144
    public void read(TProtocol iprot) throws TException {
5145
      TField field;
5146
      iprot.readStructBegin();
5147
      while (true)
5148
      {
5149
        field = iprot.readFieldBegin();
5150
        if (field.type == TType.STOP) { 
5151
          break;
5152
        }
5153
        _Fields fieldId = _Fields.findByThriftId(field.id);
5154
        if (fieldId == null) {
5155
          TProtocolUtil.skip(iprot, field.type);
5156
        } else {
5157
          switch (fieldId) {
5158
            case SUCCESS:
5159
              if (field.type == TType.STRUCT) {
123 ashish 5160
                this.success = new UserPrimaryInfo();
48 ashish 5161
                this.success.read(iprot);
5162
              } else { 
5163
                TProtocolUtil.skip(iprot, field.type);
5164
              }
5165
              break;
5166
            case UCX:
5167
              if (field.type == TType.STRUCT) {
5168
                this.ucx = new UserContextException();
5169
                this.ucx.read(iprot);
5170
              } else { 
5171
                TProtocolUtil.skip(iprot, field.type);
5172
              }
5173
              break;
5174
          }
5175
          iprot.readFieldEnd();
5176
        }
5177
      }
5178
      iprot.readStructEnd();
5179
      validate();
5180
    }
5181
 
5182
    public void write(TProtocol oprot) throws TException {
5183
      oprot.writeStructBegin(STRUCT_DESC);
5184
 
5185
      if (this.isSetSuccess()) {
5186
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5187
        this.success.write(oprot);
5188
        oprot.writeFieldEnd();
5189
      } else if (this.isSetUcx()) {
5190
        oprot.writeFieldBegin(UCX_FIELD_DESC);
5191
        this.ucx.write(oprot);
5192
        oprot.writeFieldEnd();
5193
      }
5194
      oprot.writeFieldStop();
5195
      oprot.writeStructEnd();
5196
    }
5197
 
5198
    @Override
5199
    public String toString() {
5200
      StringBuilder sb = new StringBuilder("getPrimaryInfo_result(");
5201
      boolean first = true;
5202
 
5203
      sb.append("success:");
5204
      if (this.success == null) {
5205
        sb.append("null");
5206
      } else {
5207
        sb.append(this.success);
5208
      }
5209
      first = false;
5210
      if (!first) sb.append(", ");
5211
      sb.append("ucx:");
5212
      if (this.ucx == null) {
5213
        sb.append("null");
5214
      } else {
5215
        sb.append(this.ucx);
5216
      }
5217
      first = false;
5218
      sb.append(")");
5219
      return sb.toString();
5220
    }
5221
 
5222
    public void validate() throws TException {
5223
      // check for required fields
5224
    }
5225
 
5226
  }
5227
 
5228
  public static class getInternalInfo_args implements TBase<getInternalInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getInternalInfo_args>   {
5229
    private static final TStruct STRUCT_DESC = new TStruct("getInternalInfo_args");
5230
 
5231
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
123 ashish 5232
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 5233
 
5234
    private long userId;
123 ashish 5235
    private boolean isSessionId;
48 ashish 5236
 
5237
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5238
    public enum _Fields implements TFieldIdEnum {
123 ashish 5239
      USER_ID((short)1, "userId"),
5240
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 5241
 
5242
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5244
 
5245
      static {
5246
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5247
          byId.put((int)field._thriftId, field);
5248
          byName.put(field.getFieldName(), field);
5249
        }
5250
      }
5251
 
5252
      /**
5253
       * Find the _Fields constant that matches fieldId, or null if its not found.
5254
       */
5255
      public static _Fields findByThriftId(int fieldId) {
5256
        return byId.get(fieldId);
5257
      }
5258
 
5259
      /**
5260
       * Find the _Fields constant that matches fieldId, throwing an exception
5261
       * if it is not found.
5262
       */
5263
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5264
        _Fields fields = findByThriftId(fieldId);
5265
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5266
        return fields;
5267
      }
5268
 
5269
      /**
5270
       * Find the _Fields constant that matches name, or null if its not found.
5271
       */
5272
      public static _Fields findByName(String name) {
5273
        return byName.get(name);
5274
      }
5275
 
5276
      private final short _thriftId;
5277
      private final String _fieldName;
5278
 
5279
      _Fields(short thriftId, String fieldName) {
5280
        _thriftId = thriftId;
5281
        _fieldName = fieldName;
5282
      }
5283
 
5284
      public short getThriftFieldId() {
5285
        return _thriftId;
5286
      }
5287
 
5288
      public String getFieldName() {
5289
        return _fieldName;
5290
      }
5291
    }
5292
 
5293
    // isset id assignments
5294
    private static final int __USERID_ISSET_ID = 0;
123 ashish 5295
    private static final int __ISSESSIONID_ISSET_ID = 1;
5296
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 5297
 
5298
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5299
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5300
          new FieldValueMetaData(TType.I64)));
123 ashish 5301
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
5302
          new FieldValueMetaData(TType.BOOL)));
48 ashish 5303
    }});
5304
 
5305
    static {
5306
      FieldMetaData.addStructMetaDataMap(getInternalInfo_args.class, metaDataMap);
5307
    }
5308
 
5309
    public getInternalInfo_args() {
5310
    }
5311
 
5312
    public getInternalInfo_args(
123 ashish 5313
      long userId,
5314
      boolean isSessionId)
48 ashish 5315
    {
5316
      this();
5317
      this.userId = userId;
5318
      setUserIdIsSet(true);
123 ashish 5319
      this.isSessionId = isSessionId;
5320
      setIsSessionIdIsSet(true);
48 ashish 5321
    }
5322
 
5323
    /**
5324
     * Performs a deep copy on <i>other</i>.
5325
     */
5326
    public getInternalInfo_args(getInternalInfo_args other) {
5327
      __isset_bit_vector.clear();
5328
      __isset_bit_vector.or(other.__isset_bit_vector);
5329
      this.userId = other.userId;
123 ashish 5330
      this.isSessionId = other.isSessionId;
48 ashish 5331
    }
5332
 
5333
    public getInternalInfo_args deepCopy() {
5334
      return new getInternalInfo_args(this);
5335
    }
5336
 
5337
    @Deprecated
5338
    public getInternalInfo_args clone() {
5339
      return new getInternalInfo_args(this);
5340
    }
5341
 
5342
    public long getUserId() {
5343
      return this.userId;
5344
    }
5345
 
5346
    public getInternalInfo_args setUserId(long userId) {
5347
      this.userId = userId;
5348
      setUserIdIsSet(true);
5349
      return this;
5350
    }
5351
 
5352
    public void unsetUserId() {
5353
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5354
    }
5355
 
5356
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5357
    public boolean isSetUserId() {
5358
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5359
    }
5360
 
5361
    public void setUserIdIsSet(boolean value) {
5362
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5363
    }
5364
 
123 ashish 5365
    public boolean isIsSessionId() {
5366
      return this.isSessionId;
5367
    }
5368
 
5369
    public getInternalInfo_args setIsSessionId(boolean isSessionId) {
5370
      this.isSessionId = isSessionId;
5371
      setIsSessionIdIsSet(true);
5372
      return this;
5373
    }
5374
 
5375
    public void unsetIsSessionId() {
5376
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
5377
    }
5378
 
5379
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
5380
    public boolean isSetIsSessionId() {
5381
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
5382
    }
5383
 
5384
    public void setIsSessionIdIsSet(boolean value) {
5385
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
5386
    }
5387
 
48 ashish 5388
    public void setFieldValue(_Fields field, Object value) {
5389
      switch (field) {
5390
      case USER_ID:
5391
        if (value == null) {
5392
          unsetUserId();
5393
        } else {
5394
          setUserId((Long)value);
5395
        }
5396
        break;
5397
 
123 ashish 5398
      case IS_SESSION_ID:
5399
        if (value == null) {
5400
          unsetIsSessionId();
5401
        } else {
5402
          setIsSessionId((Boolean)value);
5403
        }
5404
        break;
5405
 
48 ashish 5406
      }
5407
    }
5408
 
5409
    public void setFieldValue(int fieldID, Object value) {
5410
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5411
    }
5412
 
5413
    public Object getFieldValue(_Fields field) {
5414
      switch (field) {
5415
      case USER_ID:
5416
        return new Long(getUserId());
5417
 
123 ashish 5418
      case IS_SESSION_ID:
5419
        return new Boolean(isIsSessionId());
5420
 
48 ashish 5421
      }
5422
      throw new IllegalStateException();
5423
    }
5424
 
5425
    public Object getFieldValue(int fieldId) {
5426
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5427
    }
5428
 
5429
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5430
    public boolean isSet(_Fields field) {
5431
      switch (field) {
5432
      case USER_ID:
5433
        return isSetUserId();
123 ashish 5434
      case IS_SESSION_ID:
5435
        return isSetIsSessionId();
48 ashish 5436
      }
5437
      throw new IllegalStateException();
5438
    }
5439
 
5440
    public boolean isSet(int fieldID) {
5441
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5442
    }
5443
 
5444
    @Override
5445
    public boolean equals(Object that) {
5446
      if (that == null)
5447
        return false;
5448
      if (that instanceof getInternalInfo_args)
5449
        return this.equals((getInternalInfo_args)that);
5450
      return false;
5451
    }
5452
 
5453
    public boolean equals(getInternalInfo_args that) {
5454
      if (that == null)
5455
        return false;
5456
 
5457
      boolean this_present_userId = true;
5458
      boolean that_present_userId = true;
5459
      if (this_present_userId || that_present_userId) {
5460
        if (!(this_present_userId && that_present_userId))
5461
          return false;
5462
        if (this.userId != that.userId)
5463
          return false;
5464
      }
5465
 
123 ashish 5466
      boolean this_present_isSessionId = true;
5467
      boolean that_present_isSessionId = true;
5468
      if (this_present_isSessionId || that_present_isSessionId) {
5469
        if (!(this_present_isSessionId && that_present_isSessionId))
5470
          return false;
5471
        if (this.isSessionId != that.isSessionId)
5472
          return false;
5473
      }
5474
 
48 ashish 5475
      return true;
5476
    }
5477
 
5478
    @Override
5479
    public int hashCode() {
5480
      return 0;
5481
    }
5482
 
5483
    public int compareTo(getInternalInfo_args other) {
5484
      if (!getClass().equals(other.getClass())) {
5485
        return getClass().getName().compareTo(other.getClass().getName());
5486
      }
5487
 
5488
      int lastComparison = 0;
5489
      getInternalInfo_args typedOther = (getInternalInfo_args)other;
5490
 
5491
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
5492
      if (lastComparison != 0) {
5493
        return lastComparison;
5494
      }
5495
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
5496
      if (lastComparison != 0) {
5497
        return lastComparison;
5498
      }
123 ashish 5499
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
5500
      if (lastComparison != 0) {
5501
        return lastComparison;
5502
      }
5503
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
5504
      if (lastComparison != 0) {
5505
        return lastComparison;
5506
      }
48 ashish 5507
      return 0;
5508
    }
5509
 
5510
    public void read(TProtocol iprot) throws TException {
5511
      TField field;
5512
      iprot.readStructBegin();
5513
      while (true)
5514
      {
5515
        field = iprot.readFieldBegin();
5516
        if (field.type == TType.STOP) { 
5517
          break;
5518
        }
5519
        _Fields fieldId = _Fields.findByThriftId(field.id);
5520
        if (fieldId == null) {
5521
          TProtocolUtil.skip(iprot, field.type);
5522
        } else {
5523
          switch (fieldId) {
5524
            case USER_ID:
5525
              if (field.type == TType.I64) {
5526
                this.userId = iprot.readI64();
5527
                setUserIdIsSet(true);
5528
              } else { 
5529
                TProtocolUtil.skip(iprot, field.type);
5530
              }
5531
              break;
123 ashish 5532
            case IS_SESSION_ID:
5533
              if (field.type == TType.BOOL) {
5534
                this.isSessionId = iprot.readBool();
5535
                setIsSessionIdIsSet(true);
5536
              } else { 
5537
                TProtocolUtil.skip(iprot, field.type);
5538
              }
5539
              break;
48 ashish 5540
          }
5541
          iprot.readFieldEnd();
5542
        }
5543
      }
5544
      iprot.readStructEnd();
5545
      validate();
5546
    }
5547
 
5548
    public void write(TProtocol oprot) throws TException {
5549
      validate();
5550
 
5551
      oprot.writeStructBegin(STRUCT_DESC);
5552
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
5553
      oprot.writeI64(this.userId);
5554
      oprot.writeFieldEnd();
123 ashish 5555
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
5556
      oprot.writeBool(this.isSessionId);
5557
      oprot.writeFieldEnd();
48 ashish 5558
      oprot.writeFieldStop();
5559
      oprot.writeStructEnd();
5560
    }
5561
 
5562
    @Override
5563
    public String toString() {
5564
      StringBuilder sb = new StringBuilder("getInternalInfo_args(");
5565
      boolean first = true;
5566
 
5567
      sb.append("userId:");
5568
      sb.append(this.userId);
5569
      first = false;
123 ashish 5570
      if (!first) sb.append(", ");
5571
      sb.append("isSessionId:");
5572
      sb.append(this.isSessionId);
5573
      first = false;
48 ashish 5574
      sb.append(")");
5575
      return sb.toString();
5576
    }
5577
 
5578
    public void validate() throws TException {
5579
      // check for required fields
5580
    }
5581
 
5582
  }
5583
 
5584
  public static class getInternalInfo_result implements TBase<getInternalInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getInternalInfo_result>   {
5585
    private static final TStruct STRUCT_DESC = new TStruct("getInternalInfo_result");
5586
 
5587
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
5588
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
5589
 
123 ashish 5590
    private UserInternalInfo success;
48 ashish 5591
    private UserContextException ucx;
5592
 
5593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5594
    public enum _Fields implements TFieldIdEnum {
5595
      SUCCESS((short)0, "success"),
5596
      UCX((short)1, "ucx");
5597
 
5598
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5599
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5600
 
5601
      static {
5602
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5603
          byId.put((int)field._thriftId, field);
5604
          byName.put(field.getFieldName(), field);
5605
        }
5606
      }
5607
 
5608
      /**
5609
       * Find the _Fields constant that matches fieldId, or null if its not found.
5610
       */
5611
      public static _Fields findByThriftId(int fieldId) {
5612
        return byId.get(fieldId);
5613
      }
5614
 
5615
      /**
5616
       * Find the _Fields constant that matches fieldId, throwing an exception
5617
       * if it is not found.
5618
       */
5619
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5620
        _Fields fields = findByThriftId(fieldId);
5621
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5622
        return fields;
5623
      }
5624
 
5625
      /**
5626
       * Find the _Fields constant that matches name, or null if its not found.
5627
       */
5628
      public static _Fields findByName(String name) {
5629
        return byName.get(name);
5630
      }
5631
 
5632
      private final short _thriftId;
5633
      private final String _fieldName;
5634
 
5635
      _Fields(short thriftId, String fieldName) {
5636
        _thriftId = thriftId;
5637
        _fieldName = fieldName;
5638
      }
5639
 
5640
      public short getThriftFieldId() {
5641
        return _thriftId;
5642
      }
5643
 
5644
      public String getFieldName() {
5645
        return _fieldName;
5646
      }
5647
    }
5648
 
5649
    // isset id assignments
5650
 
5651
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5652
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 5653
          new StructMetaData(TType.STRUCT, UserInternalInfo.class)));
48 ashish 5654
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
5655
          new FieldValueMetaData(TType.STRUCT)));
5656
    }});
5657
 
5658
    static {
5659
      FieldMetaData.addStructMetaDataMap(getInternalInfo_result.class, metaDataMap);
5660
    }
5661
 
5662
    public getInternalInfo_result() {
5663
    }
5664
 
5665
    public getInternalInfo_result(
123 ashish 5666
      UserInternalInfo success,
48 ashish 5667
      UserContextException ucx)
5668
    {
5669
      this();
5670
      this.success = success;
5671
      this.ucx = ucx;
5672
    }
5673
 
5674
    /**
5675
     * Performs a deep copy on <i>other</i>.
5676
     */
5677
    public getInternalInfo_result(getInternalInfo_result other) {
5678
      if (other.isSetSuccess()) {
123 ashish 5679
        this.success = new UserInternalInfo(other.success);
48 ashish 5680
      }
5681
      if (other.isSetUcx()) {
5682
        this.ucx = new UserContextException(other.ucx);
5683
      }
5684
    }
5685
 
5686
    public getInternalInfo_result deepCopy() {
5687
      return new getInternalInfo_result(this);
5688
    }
5689
 
5690
    @Deprecated
5691
    public getInternalInfo_result clone() {
5692
      return new getInternalInfo_result(this);
5693
    }
5694
 
123 ashish 5695
    public UserInternalInfo getSuccess() {
48 ashish 5696
      return this.success;
5697
    }
5698
 
123 ashish 5699
    public getInternalInfo_result setSuccess(UserInternalInfo success) {
48 ashish 5700
      this.success = success;
5701
      return this;
5702
    }
5703
 
5704
    public void unsetSuccess() {
5705
      this.success = null;
5706
    }
5707
 
5708
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5709
    public boolean isSetSuccess() {
5710
      return this.success != null;
5711
    }
5712
 
5713
    public void setSuccessIsSet(boolean value) {
5714
      if (!value) {
5715
        this.success = null;
5716
      }
5717
    }
5718
 
5719
    public UserContextException getUcx() {
5720
      return this.ucx;
5721
    }
5722
 
5723
    public getInternalInfo_result setUcx(UserContextException ucx) {
5724
      this.ucx = ucx;
5725
      return this;
5726
    }
5727
 
5728
    public void unsetUcx() {
5729
      this.ucx = null;
5730
    }
5731
 
5732
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
5733
    public boolean isSetUcx() {
5734
      return this.ucx != null;
5735
    }
5736
 
5737
    public void setUcxIsSet(boolean value) {
5738
      if (!value) {
5739
        this.ucx = null;
5740
      }
5741
    }
5742
 
5743
    public void setFieldValue(_Fields field, Object value) {
5744
      switch (field) {
5745
      case SUCCESS:
5746
        if (value == null) {
5747
          unsetSuccess();
5748
        } else {
123 ashish 5749
          setSuccess((UserInternalInfo)value);
48 ashish 5750
        }
5751
        break;
5752
 
5753
      case UCX:
5754
        if (value == null) {
5755
          unsetUcx();
5756
        } else {
5757
          setUcx((UserContextException)value);
5758
        }
5759
        break;
5760
 
5761
      }
5762
    }
5763
 
5764
    public void setFieldValue(int fieldID, Object value) {
5765
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5766
    }
5767
 
5768
    public Object getFieldValue(_Fields field) {
5769
      switch (field) {
5770
      case SUCCESS:
5771
        return getSuccess();
5772
 
5773
      case UCX:
5774
        return getUcx();
5775
 
5776
      }
5777
      throw new IllegalStateException();
5778
    }
5779
 
5780
    public Object getFieldValue(int fieldId) {
5781
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5782
    }
5783
 
5784
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5785
    public boolean isSet(_Fields field) {
5786
      switch (field) {
5787
      case SUCCESS:
5788
        return isSetSuccess();
5789
      case UCX:
5790
        return isSetUcx();
5791
      }
5792
      throw new IllegalStateException();
5793
    }
5794
 
5795
    public boolean isSet(int fieldID) {
5796
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5797
    }
5798
 
5799
    @Override
5800
    public boolean equals(Object that) {
5801
      if (that == null)
5802
        return false;
5803
      if (that instanceof getInternalInfo_result)
5804
        return this.equals((getInternalInfo_result)that);
5805
      return false;
5806
    }
5807
 
5808
    public boolean equals(getInternalInfo_result that) {
5809
      if (that == null)
5810
        return false;
5811
 
5812
      boolean this_present_success = true && this.isSetSuccess();
5813
      boolean that_present_success = true && that.isSetSuccess();
5814
      if (this_present_success || that_present_success) {
5815
        if (!(this_present_success && that_present_success))
5816
          return false;
5817
        if (!this.success.equals(that.success))
5818
          return false;
5819
      }
5820
 
5821
      boolean this_present_ucx = true && this.isSetUcx();
5822
      boolean that_present_ucx = true && that.isSetUcx();
5823
      if (this_present_ucx || that_present_ucx) {
5824
        if (!(this_present_ucx && that_present_ucx))
5825
          return false;
5826
        if (!this.ucx.equals(that.ucx))
5827
          return false;
5828
      }
5829
 
5830
      return true;
5831
    }
5832
 
5833
    @Override
5834
    public int hashCode() {
5835
      return 0;
5836
    }
5837
 
5838
    public int compareTo(getInternalInfo_result other) {
5839
      if (!getClass().equals(other.getClass())) {
5840
        return getClass().getName().compareTo(other.getClass().getName());
5841
      }
5842
 
5843
      int lastComparison = 0;
5844
      getInternalInfo_result typedOther = (getInternalInfo_result)other;
5845
 
5846
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5847
      if (lastComparison != 0) {
5848
        return lastComparison;
5849
      }
5850
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5851
      if (lastComparison != 0) {
5852
        return lastComparison;
5853
      }
5854
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
5855
      if (lastComparison != 0) {
5856
        return lastComparison;
5857
      }
5858
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
5859
      if (lastComparison != 0) {
5860
        return lastComparison;
5861
      }
5862
      return 0;
5863
    }
5864
 
5865
    public void read(TProtocol iprot) throws TException {
5866
      TField field;
5867
      iprot.readStructBegin();
5868
      while (true)
5869
      {
5870
        field = iprot.readFieldBegin();
5871
        if (field.type == TType.STOP) { 
5872
          break;
5873
        }
5874
        _Fields fieldId = _Fields.findByThriftId(field.id);
5875
        if (fieldId == null) {
5876
          TProtocolUtil.skip(iprot, field.type);
5877
        } else {
5878
          switch (fieldId) {
5879
            case SUCCESS:
5880
              if (field.type == TType.STRUCT) {
123 ashish 5881
                this.success = new UserInternalInfo();
48 ashish 5882
                this.success.read(iprot);
5883
              } else { 
5884
                TProtocolUtil.skip(iprot, field.type);
5885
              }
5886
              break;
5887
            case UCX:
5888
              if (field.type == TType.STRUCT) {
5889
                this.ucx = new UserContextException();
5890
                this.ucx.read(iprot);
5891
              } else { 
5892
                TProtocolUtil.skip(iprot, field.type);
5893
              }
5894
              break;
5895
          }
5896
          iprot.readFieldEnd();
5897
        }
5898
      }
5899
      iprot.readStructEnd();
5900
      validate();
5901
    }
5902
 
5903
    public void write(TProtocol oprot) throws TException {
5904
      oprot.writeStructBegin(STRUCT_DESC);
5905
 
5906
      if (this.isSetSuccess()) {
5907
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5908
        this.success.write(oprot);
5909
        oprot.writeFieldEnd();
5910
      } else if (this.isSetUcx()) {
5911
        oprot.writeFieldBegin(UCX_FIELD_DESC);
5912
        this.ucx.write(oprot);
5913
        oprot.writeFieldEnd();
5914
      }
5915
      oprot.writeFieldStop();
5916
      oprot.writeStructEnd();
5917
    }
5918
 
5919
    @Override
5920
    public String toString() {
5921
      StringBuilder sb = new StringBuilder("getInternalInfo_result(");
5922
      boolean first = true;
5923
 
5924
      sb.append("success:");
5925
      if (this.success == null) {
5926
        sb.append("null");
5927
      } else {
5928
        sb.append(this.success);
5929
      }
5930
      first = false;
5931
      if (!first) sb.append(", ");
5932
      sb.append("ucx:");
5933
      if (this.ucx == null) {
5934
        sb.append("null");
5935
      } else {
5936
        sb.append(this.ucx);
5937
      }
5938
      first = false;
5939
      sb.append(")");
5940
      return sb.toString();
5941
    }
5942
 
5943
    public void validate() throws TException {
5944
      // check for required fields
5945
    }
5946
 
5947
  }
5948
 
5949
  public static class getContext_args implements TBase<getContext_args._Fields>, java.io.Serializable, Cloneable, Comparable<getContext_args>   {
5950
    private static final TStruct STRUCT_DESC = new TStruct("getContext_args");
5951
 
5952
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
5953
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
5954
 
5955
    private String email;
5956
    private String password;
5957
 
5958
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5959
    public enum _Fields implements TFieldIdEnum {
5960
      EMAIL((short)1, "email"),
5961
      PASSWORD((short)2, "password");
5962
 
5963
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5964
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5965
 
5966
      static {
5967
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5968
          byId.put((int)field._thriftId, field);
5969
          byName.put(field.getFieldName(), field);
5970
        }
5971
      }
5972
 
5973
      /**
5974
       * Find the _Fields constant that matches fieldId, or null if its not found.
5975
       */
5976
      public static _Fields findByThriftId(int fieldId) {
5977
        return byId.get(fieldId);
5978
      }
5979
 
5980
      /**
5981
       * Find the _Fields constant that matches fieldId, throwing an exception
5982
       * if it is not found.
5983
       */
5984
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5985
        _Fields fields = findByThriftId(fieldId);
5986
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5987
        return fields;
5988
      }
5989
 
5990
      /**
5991
       * Find the _Fields constant that matches name, or null if its not found.
5992
       */
5993
      public static _Fields findByName(String name) {
5994
        return byName.get(name);
5995
      }
5996
 
5997
      private final short _thriftId;
5998
      private final String _fieldName;
5999
 
6000
      _Fields(short thriftId, String fieldName) {
6001
        _thriftId = thriftId;
6002
        _fieldName = fieldName;
6003
      }
6004
 
6005
      public short getThriftFieldId() {
6006
        return _thriftId;
6007
      }
6008
 
6009
      public String getFieldName() {
6010
        return _fieldName;
6011
      }
6012
    }
6013
 
6014
    // isset id assignments
6015
 
6016
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6017
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
6018
          new FieldValueMetaData(TType.STRING)));
6019
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
6020
          new FieldValueMetaData(TType.STRING)));
6021
    }});
6022
 
6023
    static {
6024
      FieldMetaData.addStructMetaDataMap(getContext_args.class, metaDataMap);
6025
    }
6026
 
6027
    public getContext_args() {
6028
    }
6029
 
6030
    public getContext_args(
6031
      String email,
6032
      String password)
6033
    {
6034
      this();
6035
      this.email = email;
6036
      this.password = password;
6037
    }
6038
 
6039
    /**
6040
     * Performs a deep copy on <i>other</i>.
6041
     */
6042
    public getContext_args(getContext_args other) {
6043
      if (other.isSetEmail()) {
6044
        this.email = other.email;
6045
      }
6046
      if (other.isSetPassword()) {
6047
        this.password = other.password;
6048
      }
6049
    }
6050
 
6051
    public getContext_args deepCopy() {
6052
      return new getContext_args(this);
6053
    }
6054
 
6055
    @Deprecated
6056
    public getContext_args clone() {
6057
      return new getContext_args(this);
6058
    }
6059
 
6060
    public String getEmail() {
6061
      return this.email;
6062
    }
6063
 
6064
    public getContext_args setEmail(String email) {
6065
      this.email = email;
6066
      return this;
6067
    }
6068
 
6069
    public void unsetEmail() {
6070
      this.email = null;
6071
    }
6072
 
6073
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
6074
    public boolean isSetEmail() {
6075
      return this.email != null;
6076
    }
6077
 
6078
    public void setEmailIsSet(boolean value) {
6079
      if (!value) {
6080
        this.email = null;
6081
      }
6082
    }
6083
 
6084
    public String getPassword() {
6085
      return this.password;
6086
    }
6087
 
6088
    public getContext_args setPassword(String password) {
6089
      this.password = password;
6090
      return this;
6091
    }
6092
 
6093
    public void unsetPassword() {
6094
      this.password = null;
6095
    }
6096
 
6097
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
6098
    public boolean isSetPassword() {
6099
      return this.password != null;
6100
    }
6101
 
6102
    public void setPasswordIsSet(boolean value) {
6103
      if (!value) {
6104
        this.password = null;
6105
      }
6106
    }
6107
 
6108
    public void setFieldValue(_Fields field, Object value) {
6109
      switch (field) {
6110
      case EMAIL:
6111
        if (value == null) {
6112
          unsetEmail();
6113
        } else {
6114
          setEmail((String)value);
6115
        }
6116
        break;
6117
 
6118
      case PASSWORD:
6119
        if (value == null) {
6120
          unsetPassword();
6121
        } else {
6122
          setPassword((String)value);
6123
        }
6124
        break;
6125
 
6126
      }
6127
    }
6128
 
6129
    public void setFieldValue(int fieldID, Object value) {
6130
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6131
    }
6132
 
6133
    public Object getFieldValue(_Fields field) {
6134
      switch (field) {
6135
      case EMAIL:
6136
        return getEmail();
6137
 
6138
      case PASSWORD:
6139
        return getPassword();
6140
 
6141
      }
6142
      throw new IllegalStateException();
6143
    }
6144
 
6145
    public Object getFieldValue(int fieldId) {
6146
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6147
    }
6148
 
6149
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6150
    public boolean isSet(_Fields field) {
6151
      switch (field) {
6152
      case EMAIL:
6153
        return isSetEmail();
6154
      case PASSWORD:
6155
        return isSetPassword();
6156
      }
6157
      throw new IllegalStateException();
6158
    }
6159
 
6160
    public boolean isSet(int fieldID) {
6161
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6162
    }
6163
 
6164
    @Override
6165
    public boolean equals(Object that) {
6166
      if (that == null)
6167
        return false;
6168
      if (that instanceof getContext_args)
6169
        return this.equals((getContext_args)that);
6170
      return false;
6171
    }
6172
 
6173
    public boolean equals(getContext_args that) {
6174
      if (that == null)
6175
        return false;
6176
 
6177
      boolean this_present_email = true && this.isSetEmail();
6178
      boolean that_present_email = true && that.isSetEmail();
6179
      if (this_present_email || that_present_email) {
6180
        if (!(this_present_email && that_present_email))
6181
          return false;
6182
        if (!this.email.equals(that.email))
6183
          return false;
6184
      }
6185
 
6186
      boolean this_present_password = true && this.isSetPassword();
6187
      boolean that_present_password = true && that.isSetPassword();
6188
      if (this_present_password || that_present_password) {
6189
        if (!(this_present_password && that_present_password))
6190
          return false;
6191
        if (!this.password.equals(that.password))
6192
          return false;
6193
      }
6194
 
6195
      return true;
6196
    }
6197
 
6198
    @Override
6199
    public int hashCode() {
6200
      return 0;
6201
    }
6202
 
6203
    public int compareTo(getContext_args other) {
6204
      if (!getClass().equals(other.getClass())) {
6205
        return getClass().getName().compareTo(other.getClass().getName());
6206
      }
6207
 
6208
      int lastComparison = 0;
6209
      getContext_args typedOther = (getContext_args)other;
6210
 
6211
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
6212
      if (lastComparison != 0) {
6213
        return lastComparison;
6214
      }
6215
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
6216
      if (lastComparison != 0) {
6217
        return lastComparison;
6218
      }
6219
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
6220
      if (lastComparison != 0) {
6221
        return lastComparison;
6222
      }
6223
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
6224
      if (lastComparison != 0) {
6225
        return lastComparison;
6226
      }
6227
      return 0;
6228
    }
6229
 
6230
    public void read(TProtocol iprot) throws TException {
6231
      TField field;
6232
      iprot.readStructBegin();
6233
      while (true)
6234
      {
6235
        field = iprot.readFieldBegin();
6236
        if (field.type == TType.STOP) { 
6237
          break;
6238
        }
6239
        _Fields fieldId = _Fields.findByThriftId(field.id);
6240
        if (fieldId == null) {
6241
          TProtocolUtil.skip(iprot, field.type);
6242
        } else {
6243
          switch (fieldId) {
6244
            case EMAIL:
6245
              if (field.type == TType.STRING) {
6246
                this.email = iprot.readString();
6247
              } else { 
6248
                TProtocolUtil.skip(iprot, field.type);
6249
              }
6250
              break;
6251
            case PASSWORD:
6252
              if (field.type == TType.STRING) {
6253
                this.password = iprot.readString();
6254
              } else { 
6255
                TProtocolUtil.skip(iprot, field.type);
6256
              }
6257
              break;
6258
          }
6259
          iprot.readFieldEnd();
6260
        }
6261
      }
6262
      iprot.readStructEnd();
6263
      validate();
6264
    }
6265
 
6266
    public void write(TProtocol oprot) throws TException {
6267
      validate();
6268
 
6269
      oprot.writeStructBegin(STRUCT_DESC);
6270
      if (this.email != null) {
6271
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
6272
        oprot.writeString(this.email);
6273
        oprot.writeFieldEnd();
6274
      }
6275
      if (this.password != null) {
6276
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
6277
        oprot.writeString(this.password);
6278
        oprot.writeFieldEnd();
6279
      }
6280
      oprot.writeFieldStop();
6281
      oprot.writeStructEnd();
6282
    }
6283
 
6284
    @Override
6285
    public String toString() {
6286
      StringBuilder sb = new StringBuilder("getContext_args(");
6287
      boolean first = true;
6288
 
6289
      sb.append("email:");
6290
      if (this.email == null) {
6291
        sb.append("null");
6292
      } else {
6293
        sb.append(this.email);
6294
      }
6295
      first = false;
6296
      if (!first) sb.append(", ");
6297
      sb.append("password:");
6298
      if (this.password == null) {
6299
        sb.append("null");
6300
      } else {
6301
        sb.append(this.password);
6302
      }
6303
      first = false;
6304
      sb.append(")");
6305
      return sb.toString();
6306
    }
6307
 
6308
    public void validate() throws TException {
6309
      // check for required fields
6310
    }
6311
 
6312
  }
6313
 
6314
  public static class getContext_result implements TBase<getContext_result._Fields>, java.io.Serializable, Cloneable   {
6315
    private static final TStruct STRUCT_DESC = new TStruct("getContext_result");
6316
 
6317
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
6318
    private static final TField AX_FIELD_DESC = new TField("ax", TType.STRUCT, (short)1);
6319
 
123 ashish 6320
    private UserContext success;
48 ashish 6321
    private AuthenticationException ax;
6322
 
6323
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6324
    public enum _Fields implements TFieldIdEnum {
6325
      SUCCESS((short)0, "success"),
6326
      AX((short)1, "ax");
6327
 
6328
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6329
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6330
 
6331
      static {
6332
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6333
          byId.put((int)field._thriftId, field);
6334
          byName.put(field.getFieldName(), field);
6335
        }
6336
      }
6337
 
6338
      /**
6339
       * Find the _Fields constant that matches fieldId, or null if its not found.
6340
       */
6341
      public static _Fields findByThriftId(int fieldId) {
6342
        return byId.get(fieldId);
6343
      }
6344
 
6345
      /**
6346
       * Find the _Fields constant that matches fieldId, throwing an exception
6347
       * if it is not found.
6348
       */
6349
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6350
        _Fields fields = findByThriftId(fieldId);
6351
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6352
        return fields;
6353
      }
6354
 
6355
      /**
6356
       * Find the _Fields constant that matches name, or null if its not found.
6357
       */
6358
      public static _Fields findByName(String name) {
6359
        return byName.get(name);
6360
      }
6361
 
6362
      private final short _thriftId;
6363
      private final String _fieldName;
6364
 
6365
      _Fields(short thriftId, String fieldName) {
6366
        _thriftId = thriftId;
6367
        _fieldName = fieldName;
6368
      }
6369
 
6370
      public short getThriftFieldId() {
6371
        return _thriftId;
6372
      }
6373
 
6374
      public String getFieldName() {
6375
        return _fieldName;
6376
      }
6377
    }
6378
 
6379
    // isset id assignments
6380
 
6381
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6382
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 6383
          new StructMetaData(TType.STRUCT, UserContext.class)));
48 ashish 6384
      put(_Fields.AX, new FieldMetaData("ax", TFieldRequirementType.DEFAULT, 
6385
          new FieldValueMetaData(TType.STRUCT)));
6386
    }});
6387
 
6388
    static {
6389
      FieldMetaData.addStructMetaDataMap(getContext_result.class, metaDataMap);
6390
    }
6391
 
6392
    public getContext_result() {
6393
    }
6394
 
6395
    public getContext_result(
123 ashish 6396
      UserContext success,
48 ashish 6397
      AuthenticationException ax)
6398
    {
6399
      this();
6400
      this.success = success;
6401
      this.ax = ax;
6402
    }
6403
 
6404
    /**
6405
     * Performs a deep copy on <i>other</i>.
6406
     */
6407
    public getContext_result(getContext_result other) {
6408
      if (other.isSetSuccess()) {
123 ashish 6409
        this.success = new UserContext(other.success);
48 ashish 6410
      }
6411
      if (other.isSetAx()) {
6412
        this.ax = new AuthenticationException(other.ax);
6413
      }
6414
    }
6415
 
6416
    public getContext_result deepCopy() {
6417
      return new getContext_result(this);
6418
    }
6419
 
6420
    @Deprecated
6421
    public getContext_result clone() {
6422
      return new getContext_result(this);
6423
    }
6424
 
123 ashish 6425
    public UserContext getSuccess() {
48 ashish 6426
      return this.success;
6427
    }
6428
 
123 ashish 6429
    public getContext_result setSuccess(UserContext success) {
48 ashish 6430
      this.success = success;
6431
      return this;
6432
    }
6433
 
6434
    public void unsetSuccess() {
6435
      this.success = null;
6436
    }
6437
 
6438
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6439
    public boolean isSetSuccess() {
6440
      return this.success != null;
6441
    }
6442
 
6443
    public void setSuccessIsSet(boolean value) {
6444
      if (!value) {
6445
        this.success = null;
6446
      }
6447
    }
6448
 
6449
    public AuthenticationException getAx() {
6450
      return this.ax;
6451
    }
6452
 
6453
    public getContext_result setAx(AuthenticationException ax) {
6454
      this.ax = ax;
6455
      return this;
6456
    }
6457
 
6458
    public void unsetAx() {
6459
      this.ax = null;
6460
    }
6461
 
6462
    /** Returns true if field ax is set (has been asigned a value) and false otherwise */
6463
    public boolean isSetAx() {
6464
      return this.ax != null;
6465
    }
6466
 
6467
    public void setAxIsSet(boolean value) {
6468
      if (!value) {
6469
        this.ax = null;
6470
      }
6471
    }
6472
 
6473
    public void setFieldValue(_Fields field, Object value) {
6474
      switch (field) {
6475
      case SUCCESS:
6476
        if (value == null) {
6477
          unsetSuccess();
6478
        } else {
123 ashish 6479
          setSuccess((UserContext)value);
48 ashish 6480
        }
6481
        break;
6482
 
6483
      case AX:
6484
        if (value == null) {
6485
          unsetAx();
6486
        } else {
6487
          setAx((AuthenticationException)value);
6488
        }
6489
        break;
6490
 
6491
      }
6492
    }
6493
 
6494
    public void setFieldValue(int fieldID, Object value) {
6495
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6496
    }
6497
 
6498
    public Object getFieldValue(_Fields field) {
6499
      switch (field) {
6500
      case SUCCESS:
6501
        return getSuccess();
6502
 
6503
      case AX:
6504
        return getAx();
6505
 
6506
      }
6507
      throw new IllegalStateException();
6508
    }
6509
 
6510
    public Object getFieldValue(int fieldId) {
6511
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6512
    }
6513
 
6514
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6515
    public boolean isSet(_Fields field) {
6516
      switch (field) {
6517
      case SUCCESS:
6518
        return isSetSuccess();
6519
      case AX:
6520
        return isSetAx();
6521
      }
6522
      throw new IllegalStateException();
6523
    }
6524
 
6525
    public boolean isSet(int fieldID) {
6526
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6527
    }
6528
 
6529
    @Override
6530
    public boolean equals(Object that) {
6531
      if (that == null)
6532
        return false;
6533
      if (that instanceof getContext_result)
6534
        return this.equals((getContext_result)that);
6535
      return false;
6536
    }
6537
 
6538
    public boolean equals(getContext_result that) {
6539
      if (that == null)
6540
        return false;
6541
 
6542
      boolean this_present_success = true && this.isSetSuccess();
6543
      boolean that_present_success = true && that.isSetSuccess();
6544
      if (this_present_success || that_present_success) {
6545
        if (!(this_present_success && that_present_success))
6546
          return false;
6547
        if (!this.success.equals(that.success))
6548
          return false;
6549
      }
6550
 
6551
      boolean this_present_ax = true && this.isSetAx();
6552
      boolean that_present_ax = true && that.isSetAx();
6553
      if (this_present_ax || that_present_ax) {
6554
        if (!(this_present_ax && that_present_ax))
6555
          return false;
6556
        if (!this.ax.equals(that.ax))
6557
          return false;
6558
      }
6559
 
6560
      return true;
6561
    }
6562
 
6563
    @Override
6564
    public int hashCode() {
6565
      return 0;
6566
    }
6567
 
6568
    public void read(TProtocol iprot) throws TException {
6569
      TField field;
6570
      iprot.readStructBegin();
6571
      while (true)
6572
      {
6573
        field = iprot.readFieldBegin();
6574
        if (field.type == TType.STOP) { 
6575
          break;
6576
        }
6577
        _Fields fieldId = _Fields.findByThriftId(field.id);
6578
        if (fieldId == null) {
6579
          TProtocolUtil.skip(iprot, field.type);
6580
        } else {
6581
          switch (fieldId) {
6582
            case SUCCESS:
6583
              if (field.type == TType.STRUCT) {
123 ashish 6584
                this.success = new UserContext();
48 ashish 6585
                this.success.read(iprot);
6586
              } else { 
6587
                TProtocolUtil.skip(iprot, field.type);
6588
              }
6589
              break;
6590
            case AX:
6591
              if (field.type == TType.STRUCT) {
6592
                this.ax = new AuthenticationException();
6593
                this.ax.read(iprot);
6594
              } else { 
6595
                TProtocolUtil.skip(iprot, field.type);
6596
              }
6597
              break;
6598
          }
6599
          iprot.readFieldEnd();
6600
        }
6601
      }
6602
      iprot.readStructEnd();
6603
      validate();
6604
    }
6605
 
6606
    public void write(TProtocol oprot) throws TException {
6607
      oprot.writeStructBegin(STRUCT_DESC);
6608
 
6609
      if (this.isSetSuccess()) {
6610
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6611
        this.success.write(oprot);
6612
        oprot.writeFieldEnd();
6613
      } else if (this.isSetAx()) {
6614
        oprot.writeFieldBegin(AX_FIELD_DESC);
6615
        this.ax.write(oprot);
6616
        oprot.writeFieldEnd();
6617
      }
6618
      oprot.writeFieldStop();
6619
      oprot.writeStructEnd();
6620
    }
6621
 
6622
    @Override
6623
    public String toString() {
6624
      StringBuilder sb = new StringBuilder("getContext_result(");
6625
      boolean first = true;
6626
 
6627
      sb.append("success:");
6628
      if (this.success == null) {
6629
        sb.append("null");
6630
      } else {
6631
        sb.append(this.success);
6632
      }
6633
      first = false;
6634
      if (!first) sb.append(", ");
6635
      sb.append("ax:");
6636
      if (this.ax == null) {
6637
        sb.append("null");
6638
      } else {
6639
        sb.append(this.ax);
6640
      }
6641
      first = false;
6642
      sb.append(")");
6643
      return sb.toString();
6644
    }
6645
 
6646
    public void validate() throws TException {
6647
      // check for required fields
6648
    }
6649
 
6650
  }
6651
 
123 ashish 6652
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
6653
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
6654
 
6655
    private static final TField HANDLE_FIELD_DESC = new TField("handle", TType.STRING, (short)1);
6656
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
6657
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)3);
6658
 
6659
    private String handle;
6660
    private String password;
6661
    private boolean isEmail;
6662
 
6663
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6664
    public enum _Fields implements TFieldIdEnum {
6665
      HANDLE((short)1, "handle"),
6666
      PASSWORD((short)2, "password"),
6667
      IS_EMAIL((short)3, "isEmail");
6668
 
6669
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6670
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6671
 
6672
      static {
6673
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6674
          byId.put((int)field._thriftId, field);
6675
          byName.put(field.getFieldName(), field);
6676
        }
6677
      }
6678
 
6679
      /**
6680
       * Find the _Fields constant that matches fieldId, or null if its not found.
6681
       */
6682
      public static _Fields findByThriftId(int fieldId) {
6683
        return byId.get(fieldId);
6684
      }
6685
 
6686
      /**
6687
       * Find the _Fields constant that matches fieldId, throwing an exception
6688
       * if it is not found.
6689
       */
6690
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6691
        _Fields fields = findByThriftId(fieldId);
6692
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6693
        return fields;
6694
      }
6695
 
6696
      /**
6697
       * Find the _Fields constant that matches name, or null if its not found.
6698
       */
6699
      public static _Fields findByName(String name) {
6700
        return byName.get(name);
6701
      }
6702
 
6703
      private final short _thriftId;
6704
      private final String _fieldName;
6705
 
6706
      _Fields(short thriftId, String fieldName) {
6707
        _thriftId = thriftId;
6708
        _fieldName = fieldName;
6709
      }
6710
 
6711
      public short getThriftFieldId() {
6712
        return _thriftId;
6713
      }
6714
 
6715
      public String getFieldName() {
6716
        return _fieldName;
6717
      }
6718
    }
6719
 
6720
    // isset id assignments
6721
    private static final int __ISEMAIL_ISSET_ID = 0;
6722
    private BitSet __isset_bit_vector = new BitSet(1);
6723
 
6724
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6725
      put(_Fields.HANDLE, new FieldMetaData("handle", TFieldRequirementType.DEFAULT, 
6726
          new FieldValueMetaData(TType.STRING)));
6727
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
6728
          new FieldValueMetaData(TType.STRING)));
6729
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
6730
          new FieldValueMetaData(TType.BOOL)));
6731
    }});
6732
 
6733
    static {
6734
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
6735
    }
6736
 
6737
    public authenticateUser_args() {
6738
    }
6739
 
6740
    public authenticateUser_args(
6741
      String handle,
6742
      String password,
6743
      boolean isEmail)
6744
    {
6745
      this();
6746
      this.handle = handle;
6747
      this.password = password;
6748
      this.isEmail = isEmail;
6749
      setIsEmailIsSet(true);
6750
    }
6751
 
6752
    /**
6753
     * Performs a deep copy on <i>other</i>.
6754
     */
6755
    public authenticateUser_args(authenticateUser_args other) {
6756
      __isset_bit_vector.clear();
6757
      __isset_bit_vector.or(other.__isset_bit_vector);
6758
      if (other.isSetHandle()) {
6759
        this.handle = other.handle;
6760
      }
6761
      if (other.isSetPassword()) {
6762
        this.password = other.password;
6763
      }
6764
      this.isEmail = other.isEmail;
6765
    }
6766
 
6767
    public authenticateUser_args deepCopy() {
6768
      return new authenticateUser_args(this);
6769
    }
6770
 
6771
    @Deprecated
6772
    public authenticateUser_args clone() {
6773
      return new authenticateUser_args(this);
6774
    }
6775
 
6776
    public String getHandle() {
6777
      return this.handle;
6778
    }
6779
 
6780
    public authenticateUser_args setHandle(String handle) {
6781
      this.handle = handle;
6782
      return this;
6783
    }
6784
 
6785
    public void unsetHandle() {
6786
      this.handle = null;
6787
    }
6788
 
6789
    /** Returns true if field handle is set (has been asigned a value) and false otherwise */
6790
    public boolean isSetHandle() {
6791
      return this.handle != null;
6792
    }
6793
 
6794
    public void setHandleIsSet(boolean value) {
6795
      if (!value) {
6796
        this.handle = null;
6797
      }
6798
    }
6799
 
6800
    public String getPassword() {
6801
      return this.password;
6802
    }
6803
 
6804
    public authenticateUser_args setPassword(String password) {
6805
      this.password = password;
6806
      return this;
6807
    }
6808
 
6809
    public void unsetPassword() {
6810
      this.password = null;
6811
    }
6812
 
6813
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
6814
    public boolean isSetPassword() {
6815
      return this.password != null;
6816
    }
6817
 
6818
    public void setPasswordIsSet(boolean value) {
6819
      if (!value) {
6820
        this.password = null;
6821
      }
6822
    }
6823
 
6824
    public boolean isIsEmail() {
6825
      return this.isEmail;
6826
    }
6827
 
6828
    public authenticateUser_args setIsEmail(boolean isEmail) {
6829
      this.isEmail = isEmail;
6830
      setIsEmailIsSet(true);
6831
      return this;
6832
    }
6833
 
6834
    public void unsetIsEmail() {
6835
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
6836
    }
6837
 
6838
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
6839
    public boolean isSetIsEmail() {
6840
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
6841
    }
6842
 
6843
    public void setIsEmailIsSet(boolean value) {
6844
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
6845
    }
6846
 
6847
    public void setFieldValue(_Fields field, Object value) {
6848
      switch (field) {
6849
      case HANDLE:
6850
        if (value == null) {
6851
          unsetHandle();
6852
        } else {
6853
          setHandle((String)value);
6854
        }
6855
        break;
6856
 
6857
      case PASSWORD:
6858
        if (value == null) {
6859
          unsetPassword();
6860
        } else {
6861
          setPassword((String)value);
6862
        }
6863
        break;
6864
 
6865
      case IS_EMAIL:
6866
        if (value == null) {
6867
          unsetIsEmail();
6868
        } else {
6869
          setIsEmail((Boolean)value);
6870
        }
6871
        break;
6872
 
6873
      }
6874
    }
6875
 
6876
    public void setFieldValue(int fieldID, Object value) {
6877
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6878
    }
6879
 
6880
    public Object getFieldValue(_Fields field) {
6881
      switch (field) {
6882
      case HANDLE:
6883
        return getHandle();
6884
 
6885
      case PASSWORD:
6886
        return getPassword();
6887
 
6888
      case IS_EMAIL:
6889
        return new Boolean(isIsEmail());
6890
 
6891
      }
6892
      throw new IllegalStateException();
6893
    }
6894
 
6895
    public Object getFieldValue(int fieldId) {
6896
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6897
    }
6898
 
6899
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6900
    public boolean isSet(_Fields field) {
6901
      switch (field) {
6902
      case HANDLE:
6903
        return isSetHandle();
6904
      case PASSWORD:
6905
        return isSetPassword();
6906
      case IS_EMAIL:
6907
        return isSetIsEmail();
6908
      }
6909
      throw new IllegalStateException();
6910
    }
6911
 
6912
    public boolean isSet(int fieldID) {
6913
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6914
    }
6915
 
6916
    @Override
6917
    public boolean equals(Object that) {
6918
      if (that == null)
6919
        return false;
6920
      if (that instanceof authenticateUser_args)
6921
        return this.equals((authenticateUser_args)that);
6922
      return false;
6923
    }
6924
 
6925
    public boolean equals(authenticateUser_args that) {
6926
      if (that == null)
6927
        return false;
6928
 
6929
      boolean this_present_handle = true && this.isSetHandle();
6930
      boolean that_present_handle = true && that.isSetHandle();
6931
      if (this_present_handle || that_present_handle) {
6932
        if (!(this_present_handle && that_present_handle))
6933
          return false;
6934
        if (!this.handle.equals(that.handle))
6935
          return false;
6936
      }
6937
 
6938
      boolean this_present_password = true && this.isSetPassword();
6939
      boolean that_present_password = true && that.isSetPassword();
6940
      if (this_present_password || that_present_password) {
6941
        if (!(this_present_password && that_present_password))
6942
          return false;
6943
        if (!this.password.equals(that.password))
6944
          return false;
6945
      }
6946
 
6947
      boolean this_present_isEmail = true;
6948
      boolean that_present_isEmail = true;
6949
      if (this_present_isEmail || that_present_isEmail) {
6950
        if (!(this_present_isEmail && that_present_isEmail))
6951
          return false;
6952
        if (this.isEmail != that.isEmail)
6953
          return false;
6954
      }
6955
 
6956
      return true;
6957
    }
6958
 
6959
    @Override
6960
    public int hashCode() {
6961
      return 0;
6962
    }
6963
 
6964
    public int compareTo(authenticateUser_args other) {
6965
      if (!getClass().equals(other.getClass())) {
6966
        return getClass().getName().compareTo(other.getClass().getName());
6967
      }
6968
 
6969
      int lastComparison = 0;
6970
      authenticateUser_args typedOther = (authenticateUser_args)other;
6971
 
6972
      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(isSetHandle());
6973
      if (lastComparison != 0) {
6974
        return lastComparison;
6975
      }
6976
      lastComparison = TBaseHelper.compareTo(handle, typedOther.handle);
6977
      if (lastComparison != 0) {
6978
        return lastComparison;
6979
      }
6980
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
6981
      if (lastComparison != 0) {
6982
        return lastComparison;
6983
      }
6984
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
6985
      if (lastComparison != 0) {
6986
        return lastComparison;
6987
      }
6988
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
6989
      if (lastComparison != 0) {
6990
        return lastComparison;
6991
      }
6992
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
6993
      if (lastComparison != 0) {
6994
        return lastComparison;
6995
      }
6996
      return 0;
6997
    }
6998
 
6999
    public void read(TProtocol iprot) throws TException {
7000
      TField field;
7001
      iprot.readStructBegin();
7002
      while (true)
7003
      {
7004
        field = iprot.readFieldBegin();
7005
        if (field.type == TType.STOP) { 
7006
          break;
7007
        }
7008
        _Fields fieldId = _Fields.findByThriftId(field.id);
7009
        if (fieldId == null) {
7010
          TProtocolUtil.skip(iprot, field.type);
7011
        } else {
7012
          switch (fieldId) {
7013
            case HANDLE:
7014
              if (field.type == TType.STRING) {
7015
                this.handle = iprot.readString();
7016
              } else { 
7017
                TProtocolUtil.skip(iprot, field.type);
7018
              }
7019
              break;
7020
            case PASSWORD:
7021
              if (field.type == TType.STRING) {
7022
                this.password = iprot.readString();
7023
              } else { 
7024
                TProtocolUtil.skip(iprot, field.type);
7025
              }
7026
              break;
7027
            case IS_EMAIL:
7028
              if (field.type == TType.BOOL) {
7029
                this.isEmail = iprot.readBool();
7030
                setIsEmailIsSet(true);
7031
              } else { 
7032
                TProtocolUtil.skip(iprot, field.type);
7033
              }
7034
              break;
7035
          }
7036
          iprot.readFieldEnd();
7037
        }
7038
      }
7039
      iprot.readStructEnd();
7040
      validate();
7041
    }
7042
 
7043
    public void write(TProtocol oprot) throws TException {
7044
      validate();
7045
 
7046
      oprot.writeStructBegin(STRUCT_DESC);
7047
      if (this.handle != null) {
7048
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
7049
        oprot.writeString(this.handle);
7050
        oprot.writeFieldEnd();
7051
      }
7052
      if (this.password != null) {
7053
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7054
        oprot.writeString(this.password);
7055
        oprot.writeFieldEnd();
7056
      }
7057
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
7058
      oprot.writeBool(this.isEmail);
7059
      oprot.writeFieldEnd();
7060
      oprot.writeFieldStop();
7061
      oprot.writeStructEnd();
7062
    }
7063
 
7064
    @Override
7065
    public String toString() {
7066
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
7067
      boolean first = true;
7068
 
7069
      sb.append("handle:");
7070
      if (this.handle == null) {
7071
        sb.append("null");
7072
      } else {
7073
        sb.append(this.handle);
7074
      }
7075
      first = false;
7076
      if (!first) sb.append(", ");
7077
      sb.append("password:");
7078
      if (this.password == null) {
7079
        sb.append("null");
7080
      } else {
7081
        sb.append(this.password);
7082
      }
7083
      first = false;
7084
      if (!first) sb.append(", ");
7085
      sb.append("isEmail:");
7086
      sb.append(this.isEmail);
7087
      first = false;
7088
      sb.append(")");
7089
      return sb.toString();
7090
    }
7091
 
7092
    public void validate() throws TException {
7093
      // check for required fields
7094
    }
7095
 
7096
  }
7097
 
7098
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
7099
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
7100
 
7101
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7102
    private static final TField AX_FIELD_DESC = new TField("ax", TType.STRUCT, (short)1);
7103
 
7104
    private boolean success;
7105
    private AuthenticationException ax;
7106
 
7107
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7108
    public enum _Fields implements TFieldIdEnum {
7109
      SUCCESS((short)0, "success"),
7110
      AX((short)1, "ax");
7111
 
7112
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7113
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7114
 
7115
      static {
7116
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7117
          byId.put((int)field._thriftId, field);
7118
          byName.put(field.getFieldName(), field);
7119
        }
7120
      }
7121
 
7122
      /**
7123
       * Find the _Fields constant that matches fieldId, or null if its not found.
7124
       */
7125
      public static _Fields findByThriftId(int fieldId) {
7126
        return byId.get(fieldId);
7127
      }
7128
 
7129
      /**
7130
       * Find the _Fields constant that matches fieldId, throwing an exception
7131
       * if it is not found.
7132
       */
7133
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7134
        _Fields fields = findByThriftId(fieldId);
7135
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7136
        return fields;
7137
      }
7138
 
7139
      /**
7140
       * Find the _Fields constant that matches name, or null if its not found.
7141
       */
7142
      public static _Fields findByName(String name) {
7143
        return byName.get(name);
7144
      }
7145
 
7146
      private final short _thriftId;
7147
      private final String _fieldName;
7148
 
7149
      _Fields(short thriftId, String fieldName) {
7150
        _thriftId = thriftId;
7151
        _fieldName = fieldName;
7152
      }
7153
 
7154
      public short getThriftFieldId() {
7155
        return _thriftId;
7156
      }
7157
 
7158
      public String getFieldName() {
7159
        return _fieldName;
7160
      }
7161
    }
7162
 
7163
    // isset id assignments
7164
    private static final int __SUCCESS_ISSET_ID = 0;
7165
    private BitSet __isset_bit_vector = new BitSet(1);
7166
 
7167
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7168
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7169
          new FieldValueMetaData(TType.BOOL)));
7170
      put(_Fields.AX, new FieldMetaData("ax", TFieldRequirementType.DEFAULT, 
7171
          new FieldValueMetaData(TType.STRUCT)));
7172
    }});
7173
 
7174
    static {
7175
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
7176
    }
7177
 
7178
    public authenticateUser_result() {
7179
    }
7180
 
7181
    public authenticateUser_result(
7182
      boolean success,
7183
      AuthenticationException ax)
7184
    {
7185
      this();
7186
      this.success = success;
7187
      setSuccessIsSet(true);
7188
      this.ax = ax;
7189
    }
7190
 
7191
    /**
7192
     * Performs a deep copy on <i>other</i>.
7193
     */
7194
    public authenticateUser_result(authenticateUser_result other) {
7195
      __isset_bit_vector.clear();
7196
      __isset_bit_vector.or(other.__isset_bit_vector);
7197
      this.success = other.success;
7198
      if (other.isSetAx()) {
7199
        this.ax = new AuthenticationException(other.ax);
7200
      }
7201
    }
7202
 
7203
    public authenticateUser_result deepCopy() {
7204
      return new authenticateUser_result(this);
7205
    }
7206
 
7207
    @Deprecated
7208
    public authenticateUser_result clone() {
7209
      return new authenticateUser_result(this);
7210
    }
7211
 
7212
    public boolean isSuccess() {
7213
      return this.success;
7214
    }
7215
 
7216
    public authenticateUser_result setSuccess(boolean success) {
7217
      this.success = success;
7218
      setSuccessIsSet(true);
7219
      return this;
7220
    }
7221
 
7222
    public void unsetSuccess() {
7223
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7224
    }
7225
 
7226
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7227
    public boolean isSetSuccess() {
7228
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7229
    }
7230
 
7231
    public void setSuccessIsSet(boolean value) {
7232
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7233
    }
7234
 
7235
    public AuthenticationException getAx() {
7236
      return this.ax;
7237
    }
7238
 
7239
    public authenticateUser_result setAx(AuthenticationException ax) {
7240
      this.ax = ax;
7241
      return this;
7242
    }
7243
 
7244
    public void unsetAx() {
7245
      this.ax = null;
7246
    }
7247
 
7248
    /** Returns true if field ax is set (has been asigned a value) and false otherwise */
7249
    public boolean isSetAx() {
7250
      return this.ax != null;
7251
    }
7252
 
7253
    public void setAxIsSet(boolean value) {
7254
      if (!value) {
7255
        this.ax = null;
7256
      }
7257
    }
7258
 
7259
    public void setFieldValue(_Fields field, Object value) {
7260
      switch (field) {
7261
      case SUCCESS:
7262
        if (value == null) {
7263
          unsetSuccess();
7264
        } else {
7265
          setSuccess((Boolean)value);
7266
        }
7267
        break;
7268
 
7269
      case AX:
7270
        if (value == null) {
7271
          unsetAx();
7272
        } else {
7273
          setAx((AuthenticationException)value);
7274
        }
7275
        break;
7276
 
7277
      }
7278
    }
7279
 
7280
    public void setFieldValue(int fieldID, Object value) {
7281
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7282
    }
7283
 
7284
    public Object getFieldValue(_Fields field) {
7285
      switch (field) {
7286
      case SUCCESS:
7287
        return new Boolean(isSuccess());
7288
 
7289
      case AX:
7290
        return getAx();
7291
 
7292
      }
7293
      throw new IllegalStateException();
7294
    }
7295
 
7296
    public Object getFieldValue(int fieldId) {
7297
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7298
    }
7299
 
7300
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7301
    public boolean isSet(_Fields field) {
7302
      switch (field) {
7303
      case SUCCESS:
7304
        return isSetSuccess();
7305
      case AX:
7306
        return isSetAx();
7307
      }
7308
      throw new IllegalStateException();
7309
    }
7310
 
7311
    public boolean isSet(int fieldID) {
7312
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7313
    }
7314
 
7315
    @Override
7316
    public boolean equals(Object that) {
7317
      if (that == null)
7318
        return false;
7319
      if (that instanceof authenticateUser_result)
7320
        return this.equals((authenticateUser_result)that);
7321
      return false;
7322
    }
7323
 
7324
    public boolean equals(authenticateUser_result that) {
7325
      if (that == null)
7326
        return false;
7327
 
7328
      boolean this_present_success = true;
7329
      boolean that_present_success = true;
7330
      if (this_present_success || that_present_success) {
7331
        if (!(this_present_success && that_present_success))
7332
          return false;
7333
        if (this.success != that.success)
7334
          return false;
7335
      }
7336
 
7337
      boolean this_present_ax = true && this.isSetAx();
7338
      boolean that_present_ax = true && that.isSetAx();
7339
      if (this_present_ax || that_present_ax) {
7340
        if (!(this_present_ax && that_present_ax))
7341
          return false;
7342
        if (!this.ax.equals(that.ax))
7343
          return false;
7344
      }
7345
 
7346
      return true;
7347
    }
7348
 
7349
    @Override
7350
    public int hashCode() {
7351
      return 0;
7352
    }
7353
 
7354
    public int compareTo(authenticateUser_result other) {
7355
      if (!getClass().equals(other.getClass())) {
7356
        return getClass().getName().compareTo(other.getClass().getName());
7357
      }
7358
 
7359
      int lastComparison = 0;
7360
      authenticateUser_result typedOther = (authenticateUser_result)other;
7361
 
7362
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7363
      if (lastComparison != 0) {
7364
        return lastComparison;
7365
      }
7366
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7367
      if (lastComparison != 0) {
7368
        return lastComparison;
7369
      }
7370
      lastComparison = Boolean.valueOf(isSetAx()).compareTo(isSetAx());
7371
      if (lastComparison != 0) {
7372
        return lastComparison;
7373
      }
7374
      lastComparison = TBaseHelper.compareTo(ax, typedOther.ax);
7375
      if (lastComparison != 0) {
7376
        return lastComparison;
7377
      }
7378
      return 0;
7379
    }
7380
 
7381
    public void read(TProtocol iprot) throws TException {
7382
      TField field;
7383
      iprot.readStructBegin();
7384
      while (true)
7385
      {
7386
        field = iprot.readFieldBegin();
7387
        if (field.type == TType.STOP) { 
7388
          break;
7389
        }
7390
        _Fields fieldId = _Fields.findByThriftId(field.id);
7391
        if (fieldId == null) {
7392
          TProtocolUtil.skip(iprot, field.type);
7393
        } else {
7394
          switch (fieldId) {
7395
            case SUCCESS:
7396
              if (field.type == TType.BOOL) {
7397
                this.success = iprot.readBool();
7398
                setSuccessIsSet(true);
7399
              } else { 
7400
                TProtocolUtil.skip(iprot, field.type);
7401
              }
7402
              break;
7403
            case AX:
7404
              if (field.type == TType.STRUCT) {
7405
                this.ax = new AuthenticationException();
7406
                this.ax.read(iprot);
7407
              } else { 
7408
                TProtocolUtil.skip(iprot, field.type);
7409
              }
7410
              break;
7411
          }
7412
          iprot.readFieldEnd();
7413
        }
7414
      }
7415
      iprot.readStructEnd();
7416
      validate();
7417
    }
7418
 
7419
    public void write(TProtocol oprot) throws TException {
7420
      oprot.writeStructBegin(STRUCT_DESC);
7421
 
7422
      if (this.isSetSuccess()) {
7423
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7424
        oprot.writeBool(this.success);
7425
        oprot.writeFieldEnd();
7426
      } else if (this.isSetAx()) {
7427
        oprot.writeFieldBegin(AX_FIELD_DESC);
7428
        this.ax.write(oprot);
7429
        oprot.writeFieldEnd();
7430
      }
7431
      oprot.writeFieldStop();
7432
      oprot.writeStructEnd();
7433
    }
7434
 
7435
    @Override
7436
    public String toString() {
7437
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
7438
      boolean first = true;
7439
 
7440
      sb.append("success:");
7441
      sb.append(this.success);
7442
      first = false;
7443
      if (!first) sb.append(", ");
7444
      sb.append("ax:");
7445
      if (this.ax == null) {
7446
        sb.append("null");
7447
      } else {
7448
        sb.append(this.ax);
7449
      }
7450
      first = false;
7451
      sb.append(")");
7452
      return sb.toString();
7453
    }
7454
 
7455
    public void validate() throws TException {
7456
      // check for required fields
7457
    }
7458
 
7459
  }
7460
 
48 ashish 7461
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7462
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
7463
 
7464
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7465
 
7466
    private String email;
7467
 
7468
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7469
    public enum _Fields implements TFieldIdEnum {
7470
      EMAIL((short)1, "email");
7471
 
7472
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7473
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7474
 
7475
      static {
7476
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7477
          byId.put((int)field._thriftId, field);
7478
          byName.put(field.getFieldName(), field);
7479
        }
7480
      }
7481
 
7482
      /**
7483
       * Find the _Fields constant that matches fieldId, or null if its not found.
7484
       */
7485
      public static _Fields findByThriftId(int fieldId) {
7486
        return byId.get(fieldId);
7487
      }
7488
 
7489
      /**
7490
       * Find the _Fields constant that matches fieldId, throwing an exception
7491
       * if it is not found.
7492
       */
7493
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7494
        _Fields fields = findByThriftId(fieldId);
7495
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7496
        return fields;
7497
      }
7498
 
7499
      /**
7500
       * Find the _Fields constant that matches name, or null if its not found.
7501
       */
7502
      public static _Fields findByName(String name) {
7503
        return byName.get(name);
7504
      }
7505
 
7506
      private final short _thriftId;
7507
      private final String _fieldName;
7508
 
7509
      _Fields(short thriftId, String fieldName) {
7510
        _thriftId = thriftId;
7511
        _fieldName = fieldName;
7512
      }
7513
 
7514
      public short getThriftFieldId() {
7515
        return _thriftId;
7516
      }
7517
 
7518
      public String getFieldName() {
7519
        return _fieldName;
7520
      }
7521
    }
7522
 
7523
    // isset id assignments
7524
 
7525
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7526
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7527
          new FieldValueMetaData(TType.STRING)));
7528
    }});
7529
 
7530
    static {
7531
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7532
    }
7533
 
7534
    public userExists_args() {
7535
    }
7536
 
7537
    public userExists_args(
7538
      String email)
7539
    {
7540
      this();
7541
      this.email = email;
7542
    }
7543
 
7544
    /**
7545
     * Performs a deep copy on <i>other</i>.
7546
     */
7547
    public userExists_args(userExists_args other) {
7548
      if (other.isSetEmail()) {
7549
        this.email = other.email;
7550
      }
7551
    }
7552
 
7553
    public userExists_args deepCopy() {
7554
      return new userExists_args(this);
7555
    }
7556
 
7557
    @Deprecated
7558
    public userExists_args clone() {
7559
      return new userExists_args(this);
7560
    }
7561
 
7562
    public String getEmail() {
7563
      return this.email;
7564
    }
7565
 
7566
    public userExists_args setEmail(String email) {
7567
      this.email = email;
7568
      return this;
7569
    }
7570
 
7571
    public void unsetEmail() {
7572
      this.email = null;
7573
    }
7574
 
7575
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7576
    public boolean isSetEmail() {
7577
      return this.email != null;
7578
    }
7579
 
7580
    public void setEmailIsSet(boolean value) {
7581
      if (!value) {
7582
        this.email = null;
7583
      }
7584
    }
7585
 
7586
    public void setFieldValue(_Fields field, Object value) {
7587
      switch (field) {
7588
      case EMAIL:
7589
        if (value == null) {
7590
          unsetEmail();
7591
        } else {
7592
          setEmail((String)value);
7593
        }
7594
        break;
7595
 
7596
      }
7597
    }
7598
 
7599
    public void setFieldValue(int fieldID, Object value) {
7600
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7601
    }
7602
 
7603
    public Object getFieldValue(_Fields field) {
7604
      switch (field) {
7605
      case EMAIL:
7606
        return getEmail();
7607
 
7608
      }
7609
      throw new IllegalStateException();
7610
    }
7611
 
7612
    public Object getFieldValue(int fieldId) {
7613
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7614
    }
7615
 
7616
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7617
    public boolean isSet(_Fields field) {
7618
      switch (field) {
7619
      case EMAIL:
7620
        return isSetEmail();
7621
      }
7622
      throw new IllegalStateException();
7623
    }
7624
 
7625
    public boolean isSet(int fieldID) {
7626
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7627
    }
7628
 
7629
    @Override
7630
    public boolean equals(Object that) {
7631
      if (that == null)
7632
        return false;
7633
      if (that instanceof userExists_args)
7634
        return this.equals((userExists_args)that);
7635
      return false;
7636
    }
7637
 
7638
    public boolean equals(userExists_args that) {
7639
      if (that == null)
7640
        return false;
7641
 
7642
      boolean this_present_email = true && this.isSetEmail();
7643
      boolean that_present_email = true && that.isSetEmail();
7644
      if (this_present_email || that_present_email) {
7645
        if (!(this_present_email && that_present_email))
7646
          return false;
7647
        if (!this.email.equals(that.email))
7648
          return false;
7649
      }
7650
 
7651
      return true;
7652
    }
7653
 
7654
    @Override
7655
    public int hashCode() {
7656
      return 0;
7657
    }
7658
 
7659
    public int compareTo(userExists_args other) {
7660
      if (!getClass().equals(other.getClass())) {
7661
        return getClass().getName().compareTo(other.getClass().getName());
7662
      }
7663
 
7664
      int lastComparison = 0;
7665
      userExists_args typedOther = (userExists_args)other;
7666
 
7667
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7668
      if (lastComparison != 0) {
7669
        return lastComparison;
7670
      }
7671
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7672
      if (lastComparison != 0) {
7673
        return lastComparison;
7674
      }
7675
      return 0;
7676
    }
7677
 
7678
    public void read(TProtocol iprot) throws TException {
7679
      TField field;
7680
      iprot.readStructBegin();
7681
      while (true)
7682
      {
7683
        field = iprot.readFieldBegin();
7684
        if (field.type == TType.STOP) { 
7685
          break;
7686
        }
7687
        _Fields fieldId = _Fields.findByThriftId(field.id);
7688
        if (fieldId == null) {
7689
          TProtocolUtil.skip(iprot, field.type);
7690
        } else {
7691
          switch (fieldId) {
7692
            case EMAIL:
7693
              if (field.type == TType.STRING) {
7694
                this.email = iprot.readString();
7695
              } else { 
7696
                TProtocolUtil.skip(iprot, field.type);
7697
              }
7698
              break;
7699
          }
7700
          iprot.readFieldEnd();
7701
        }
7702
      }
7703
      iprot.readStructEnd();
7704
      validate();
7705
    }
7706
 
7707
    public void write(TProtocol oprot) throws TException {
7708
      validate();
7709
 
7710
      oprot.writeStructBegin(STRUCT_DESC);
7711
      if (this.email != null) {
7712
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7713
        oprot.writeString(this.email);
7714
        oprot.writeFieldEnd();
7715
      }
7716
      oprot.writeFieldStop();
7717
      oprot.writeStructEnd();
7718
    }
7719
 
7720
    @Override
7721
    public String toString() {
7722
      StringBuilder sb = new StringBuilder("userExists_args(");
7723
      boolean first = true;
7724
 
7725
      sb.append("email:");
7726
      if (this.email == null) {
7727
        sb.append("null");
7728
      } else {
7729
        sb.append(this.email);
7730
      }
7731
      first = false;
7732
      sb.append(")");
7733
      return sb.toString();
7734
    }
7735
 
7736
    public void validate() throws TException {
7737
      // check for required fields
7738
    }
7739
 
7740
  }
7741
 
7742
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
7743
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
7744
 
7745
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7746
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
7747
 
7748
    private boolean success;
7749
    private UserContextException ucx;
7750
 
7751
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7752
    public enum _Fields implements TFieldIdEnum {
7753
      SUCCESS((short)0, "success"),
7754
      UCX((short)1, "ucx");
7755
 
7756
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7757
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7758
 
7759
      static {
7760
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7761
          byId.put((int)field._thriftId, field);
7762
          byName.put(field.getFieldName(), field);
7763
        }
7764
      }
7765
 
7766
      /**
7767
       * Find the _Fields constant that matches fieldId, or null if its not found.
7768
       */
7769
      public static _Fields findByThriftId(int fieldId) {
7770
        return byId.get(fieldId);
7771
      }
7772
 
7773
      /**
7774
       * Find the _Fields constant that matches fieldId, throwing an exception
7775
       * if it is not found.
7776
       */
7777
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7778
        _Fields fields = findByThriftId(fieldId);
7779
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7780
        return fields;
7781
      }
7782
 
7783
      /**
7784
       * Find the _Fields constant that matches name, or null if its not found.
7785
       */
7786
      public static _Fields findByName(String name) {
7787
        return byName.get(name);
7788
      }
7789
 
7790
      private final short _thriftId;
7791
      private final String _fieldName;
7792
 
7793
      _Fields(short thriftId, String fieldName) {
7794
        _thriftId = thriftId;
7795
        _fieldName = fieldName;
7796
      }
7797
 
7798
      public short getThriftFieldId() {
7799
        return _thriftId;
7800
      }
7801
 
7802
      public String getFieldName() {
7803
        return _fieldName;
7804
      }
7805
    }
7806
 
7807
    // isset id assignments
7808
    private static final int __SUCCESS_ISSET_ID = 0;
7809
    private BitSet __isset_bit_vector = new BitSet(1);
7810
 
7811
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7812
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7813
          new FieldValueMetaData(TType.BOOL)));
7814
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
7815
          new FieldValueMetaData(TType.STRUCT)));
7816
    }});
7817
 
7818
    static {
7819
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
7820
    }
7821
 
7822
    public userExists_result() {
7823
    }
7824
 
7825
    public userExists_result(
7826
      boolean success,
7827
      UserContextException ucx)
7828
    {
7829
      this();
7830
      this.success = success;
7831
      setSuccessIsSet(true);
7832
      this.ucx = ucx;
7833
    }
7834
 
7835
    /**
7836
     * Performs a deep copy on <i>other</i>.
7837
     */
7838
    public userExists_result(userExists_result other) {
7839
      __isset_bit_vector.clear();
7840
      __isset_bit_vector.or(other.__isset_bit_vector);
7841
      this.success = other.success;
7842
      if (other.isSetUcx()) {
7843
        this.ucx = new UserContextException(other.ucx);
7844
      }
7845
    }
7846
 
7847
    public userExists_result deepCopy() {
7848
      return new userExists_result(this);
7849
    }
7850
 
7851
    @Deprecated
7852
    public userExists_result clone() {
7853
      return new userExists_result(this);
7854
    }
7855
 
7856
    public boolean isSuccess() {
7857
      return this.success;
7858
    }
7859
 
7860
    public userExists_result setSuccess(boolean success) {
7861
      this.success = success;
7862
      setSuccessIsSet(true);
7863
      return this;
7864
    }
7865
 
7866
    public void unsetSuccess() {
7867
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7868
    }
7869
 
7870
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7871
    public boolean isSetSuccess() {
7872
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7873
    }
7874
 
7875
    public void setSuccessIsSet(boolean value) {
7876
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7877
    }
7878
 
7879
    public UserContextException getUcx() {
7880
      return this.ucx;
7881
    }
7882
 
7883
    public userExists_result setUcx(UserContextException ucx) {
7884
      this.ucx = ucx;
7885
      return this;
7886
    }
7887
 
7888
    public void unsetUcx() {
7889
      this.ucx = null;
7890
    }
7891
 
7892
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
7893
    public boolean isSetUcx() {
7894
      return this.ucx != null;
7895
    }
7896
 
7897
    public void setUcxIsSet(boolean value) {
7898
      if (!value) {
7899
        this.ucx = null;
7900
      }
7901
    }
7902
 
7903
    public void setFieldValue(_Fields field, Object value) {
7904
      switch (field) {
7905
      case SUCCESS:
7906
        if (value == null) {
7907
          unsetSuccess();
7908
        } else {
7909
          setSuccess((Boolean)value);
7910
        }
7911
        break;
7912
 
7913
      case UCX:
7914
        if (value == null) {
7915
          unsetUcx();
7916
        } else {
7917
          setUcx((UserContextException)value);
7918
        }
7919
        break;
7920
 
7921
      }
7922
    }
7923
 
7924
    public void setFieldValue(int fieldID, Object value) {
7925
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7926
    }
7927
 
7928
    public Object getFieldValue(_Fields field) {
7929
      switch (field) {
7930
      case SUCCESS:
7931
        return new Boolean(isSuccess());
7932
 
7933
      case UCX:
7934
        return getUcx();
7935
 
7936
      }
7937
      throw new IllegalStateException();
7938
    }
7939
 
7940
    public Object getFieldValue(int fieldId) {
7941
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7942
    }
7943
 
7944
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7945
    public boolean isSet(_Fields field) {
7946
      switch (field) {
7947
      case SUCCESS:
7948
        return isSetSuccess();
7949
      case UCX:
7950
        return isSetUcx();
7951
      }
7952
      throw new IllegalStateException();
7953
    }
7954
 
7955
    public boolean isSet(int fieldID) {
7956
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7957
    }
7958
 
7959
    @Override
7960
    public boolean equals(Object that) {
7961
      if (that == null)
7962
        return false;
7963
      if (that instanceof userExists_result)
7964
        return this.equals((userExists_result)that);
7965
      return false;
7966
    }
7967
 
7968
    public boolean equals(userExists_result that) {
7969
      if (that == null)
7970
        return false;
7971
 
7972
      boolean this_present_success = true;
7973
      boolean that_present_success = true;
7974
      if (this_present_success || that_present_success) {
7975
        if (!(this_present_success && that_present_success))
7976
          return false;
7977
        if (this.success != that.success)
7978
          return false;
7979
      }
7980
 
7981
      boolean this_present_ucx = true && this.isSetUcx();
7982
      boolean that_present_ucx = true && that.isSetUcx();
7983
      if (this_present_ucx || that_present_ucx) {
7984
        if (!(this_present_ucx && that_present_ucx))
7985
          return false;
7986
        if (!this.ucx.equals(that.ucx))
7987
          return false;
7988
      }
7989
 
7990
      return true;
7991
    }
7992
 
7993
    @Override
7994
    public int hashCode() {
7995
      return 0;
7996
    }
7997
 
7998
    public int compareTo(userExists_result other) {
7999
      if (!getClass().equals(other.getClass())) {
8000
        return getClass().getName().compareTo(other.getClass().getName());
8001
      }
8002
 
8003
      int lastComparison = 0;
8004
      userExists_result typedOther = (userExists_result)other;
8005
 
8006
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8007
      if (lastComparison != 0) {
8008
        return lastComparison;
8009
      }
8010
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8011
      if (lastComparison != 0) {
8012
        return lastComparison;
8013
      }
8014
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8015
      if (lastComparison != 0) {
8016
        return lastComparison;
8017
      }
8018
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8019
      if (lastComparison != 0) {
8020
        return lastComparison;
8021
      }
8022
      return 0;
8023
    }
8024
 
8025
    public void read(TProtocol iprot) throws TException {
8026
      TField field;
8027
      iprot.readStructBegin();
8028
      while (true)
8029
      {
8030
        field = iprot.readFieldBegin();
8031
        if (field.type == TType.STOP) { 
8032
          break;
8033
        }
8034
        _Fields fieldId = _Fields.findByThriftId(field.id);
8035
        if (fieldId == null) {
8036
          TProtocolUtil.skip(iprot, field.type);
8037
        } else {
8038
          switch (fieldId) {
8039
            case SUCCESS:
8040
              if (field.type == TType.BOOL) {
8041
                this.success = iprot.readBool();
8042
                setSuccessIsSet(true);
8043
              } else { 
8044
                TProtocolUtil.skip(iprot, field.type);
8045
              }
8046
              break;
8047
            case UCX:
8048
              if (field.type == TType.STRUCT) {
8049
                this.ucx = new UserContextException();
8050
                this.ucx.read(iprot);
8051
              } else { 
8052
                TProtocolUtil.skip(iprot, field.type);
8053
              }
8054
              break;
8055
          }
8056
          iprot.readFieldEnd();
8057
        }
8058
      }
8059
      iprot.readStructEnd();
8060
      validate();
8061
    }
8062
 
8063
    public void write(TProtocol oprot) throws TException {
8064
      oprot.writeStructBegin(STRUCT_DESC);
8065
 
8066
      if (this.isSetSuccess()) {
8067
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8068
        oprot.writeBool(this.success);
8069
        oprot.writeFieldEnd();
8070
      } else if (this.isSetUcx()) {
8071
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8072
        this.ucx.write(oprot);
8073
        oprot.writeFieldEnd();
8074
      }
8075
      oprot.writeFieldStop();
8076
      oprot.writeStructEnd();
8077
    }
8078
 
8079
    @Override
8080
    public String toString() {
8081
      StringBuilder sb = new StringBuilder("userExists_result(");
8082
      boolean first = true;
8083
 
8084
      sb.append("success:");
8085
      sb.append(this.success);
8086
      first = false;
8087
      if (!first) sb.append(", ");
8088
      sb.append("ucx:");
8089
      if (this.ucx == null) {
8090
        sb.append("null");
8091
      } else {
8092
        sb.append(this.ucx);
8093
      }
8094
      first = false;
8095
      sb.append(")");
8096
      return sb.toString();
8097
    }
8098
 
8099
    public void validate() throws TException {
8100
      // check for required fields
8101
    }
8102
 
8103
  }
8104
 
8105
  public static class addIpAdressForUser_args implements TBase<addIpAdressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addIpAdressForUser_args>   {
8106
    private static final TStruct STRUCT_DESC = new TStruct("addIpAdressForUser_args");
8107
 
8108
    private static final TField IP_FIELD_DESC = new TField("ip", TType.STRING, (short)1);
8109
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
8110
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)3);
8111
 
8112
    private String ip;
8113
    private long timestamp;
8114
    private long userId;
8115
 
8116
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8117
    public enum _Fields implements TFieldIdEnum {
8118
      IP((short)1, "ip"),
8119
      TIMESTAMP((short)2, "timestamp"),
8120
      USER_ID((short)3, "userId");
8121
 
8122
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8123
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8124
 
8125
      static {
8126
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8127
          byId.put((int)field._thriftId, field);
8128
          byName.put(field.getFieldName(), field);
8129
        }
8130
      }
8131
 
8132
      /**
8133
       * Find the _Fields constant that matches fieldId, or null if its not found.
8134
       */
8135
      public static _Fields findByThriftId(int fieldId) {
8136
        return byId.get(fieldId);
8137
      }
8138
 
8139
      /**
8140
       * Find the _Fields constant that matches fieldId, throwing an exception
8141
       * if it is not found.
8142
       */
8143
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8144
        _Fields fields = findByThriftId(fieldId);
8145
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8146
        return fields;
8147
      }
8148
 
8149
      /**
8150
       * Find the _Fields constant that matches name, or null if its not found.
8151
       */
8152
      public static _Fields findByName(String name) {
8153
        return byName.get(name);
8154
      }
8155
 
8156
      private final short _thriftId;
8157
      private final String _fieldName;
8158
 
8159
      _Fields(short thriftId, String fieldName) {
8160
        _thriftId = thriftId;
8161
        _fieldName = fieldName;
8162
      }
8163
 
8164
      public short getThriftFieldId() {
8165
        return _thriftId;
8166
      }
8167
 
8168
      public String getFieldName() {
8169
        return _fieldName;
8170
      }
8171
    }
8172
 
8173
    // isset id assignments
8174
    private static final int __TIMESTAMP_ISSET_ID = 0;
8175
    private static final int __USERID_ISSET_ID = 1;
8176
    private BitSet __isset_bit_vector = new BitSet(2);
8177
 
8178
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8179
      put(_Fields.IP, new FieldMetaData("ip", TFieldRequirementType.DEFAULT, 
8180
          new FieldValueMetaData(TType.STRING)));
8181
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
8182
          new FieldValueMetaData(TType.I64)));
8183
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8184
          new FieldValueMetaData(TType.I64)));
8185
    }});
8186
 
8187
    static {
8188
      FieldMetaData.addStructMetaDataMap(addIpAdressForUser_args.class, metaDataMap);
8189
    }
8190
 
8191
    public addIpAdressForUser_args() {
8192
    }
8193
 
8194
    public addIpAdressForUser_args(
8195
      String ip,
8196
      long timestamp,
8197
      long userId)
8198
    {
8199
      this();
8200
      this.ip = ip;
8201
      this.timestamp = timestamp;
8202
      setTimestampIsSet(true);
8203
      this.userId = userId;
8204
      setUserIdIsSet(true);
8205
    }
8206
 
8207
    /**
8208
     * Performs a deep copy on <i>other</i>.
8209
     */
8210
    public addIpAdressForUser_args(addIpAdressForUser_args other) {
8211
      __isset_bit_vector.clear();
8212
      __isset_bit_vector.or(other.__isset_bit_vector);
8213
      if (other.isSetIp()) {
8214
        this.ip = other.ip;
8215
      }
8216
      this.timestamp = other.timestamp;
8217
      this.userId = other.userId;
8218
    }
8219
 
8220
    public addIpAdressForUser_args deepCopy() {
8221
      return new addIpAdressForUser_args(this);
8222
    }
8223
 
8224
    @Deprecated
8225
    public addIpAdressForUser_args clone() {
8226
      return new addIpAdressForUser_args(this);
8227
    }
8228
 
8229
    public String getIp() {
8230
      return this.ip;
8231
    }
8232
 
8233
    public addIpAdressForUser_args setIp(String ip) {
8234
      this.ip = ip;
8235
      return this;
8236
    }
8237
 
8238
    public void unsetIp() {
8239
      this.ip = null;
8240
    }
8241
 
8242
    /** Returns true if field ip is set (has been asigned a value) and false otherwise */
8243
    public boolean isSetIp() {
8244
      return this.ip != null;
8245
    }
8246
 
8247
    public void setIpIsSet(boolean value) {
8248
      if (!value) {
8249
        this.ip = null;
8250
      }
8251
    }
8252
 
8253
    public long getTimestamp() {
8254
      return this.timestamp;
8255
    }
8256
 
8257
    public addIpAdressForUser_args setTimestamp(long timestamp) {
8258
      this.timestamp = timestamp;
8259
      setTimestampIsSet(true);
8260
      return this;
8261
    }
8262
 
8263
    public void unsetTimestamp() {
8264
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
8265
    }
8266
 
8267
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
8268
    public boolean isSetTimestamp() {
8269
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
8270
    }
8271
 
8272
    public void setTimestampIsSet(boolean value) {
8273
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
8274
    }
8275
 
8276
    public long getUserId() {
8277
      return this.userId;
8278
    }
8279
 
8280
    public addIpAdressForUser_args setUserId(long userId) {
8281
      this.userId = userId;
8282
      setUserIdIsSet(true);
8283
      return this;
8284
    }
8285
 
8286
    public void unsetUserId() {
8287
      __isset_bit_vector.clear(__USERID_ISSET_ID);
8288
    }
8289
 
8290
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8291
    public boolean isSetUserId() {
8292
      return __isset_bit_vector.get(__USERID_ISSET_ID);
8293
    }
8294
 
8295
    public void setUserIdIsSet(boolean value) {
8296
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8297
    }
8298
 
8299
    public void setFieldValue(_Fields field, Object value) {
8300
      switch (field) {
8301
      case IP:
8302
        if (value == null) {
8303
          unsetIp();
8304
        } else {
8305
          setIp((String)value);
8306
        }
8307
        break;
8308
 
8309
      case TIMESTAMP:
8310
        if (value == null) {
8311
          unsetTimestamp();
8312
        } else {
8313
          setTimestamp((Long)value);
8314
        }
8315
        break;
8316
 
8317
      case USER_ID:
8318
        if (value == null) {
8319
          unsetUserId();
8320
        } else {
8321
          setUserId((Long)value);
8322
        }
8323
        break;
8324
 
8325
      }
8326
    }
8327
 
8328
    public void setFieldValue(int fieldID, Object value) {
8329
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8330
    }
8331
 
8332
    public Object getFieldValue(_Fields field) {
8333
      switch (field) {
8334
      case IP:
8335
        return getIp();
8336
 
8337
      case TIMESTAMP:
8338
        return new Long(getTimestamp());
8339
 
8340
      case USER_ID:
8341
        return new Long(getUserId());
8342
 
8343
      }
8344
      throw new IllegalStateException();
8345
    }
8346
 
8347
    public Object getFieldValue(int fieldId) {
8348
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8349
    }
8350
 
8351
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8352
    public boolean isSet(_Fields field) {
8353
      switch (field) {
8354
      case IP:
8355
        return isSetIp();
8356
      case TIMESTAMP:
8357
        return isSetTimestamp();
8358
      case USER_ID:
8359
        return isSetUserId();
8360
      }
8361
      throw new IllegalStateException();
8362
    }
8363
 
8364
    public boolean isSet(int fieldID) {
8365
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8366
    }
8367
 
8368
    @Override
8369
    public boolean equals(Object that) {
8370
      if (that == null)
8371
        return false;
8372
      if (that instanceof addIpAdressForUser_args)
8373
        return this.equals((addIpAdressForUser_args)that);
8374
      return false;
8375
    }
8376
 
8377
    public boolean equals(addIpAdressForUser_args that) {
8378
      if (that == null)
8379
        return false;
8380
 
8381
      boolean this_present_ip = true && this.isSetIp();
8382
      boolean that_present_ip = true && that.isSetIp();
8383
      if (this_present_ip || that_present_ip) {
8384
        if (!(this_present_ip && that_present_ip))
8385
          return false;
8386
        if (!this.ip.equals(that.ip))
8387
          return false;
8388
      }
8389
 
8390
      boolean this_present_timestamp = true;
8391
      boolean that_present_timestamp = true;
8392
      if (this_present_timestamp || that_present_timestamp) {
8393
        if (!(this_present_timestamp && that_present_timestamp))
8394
          return false;
8395
        if (this.timestamp != that.timestamp)
8396
          return false;
8397
      }
8398
 
8399
      boolean this_present_userId = true;
8400
      boolean that_present_userId = true;
8401
      if (this_present_userId || that_present_userId) {
8402
        if (!(this_present_userId && that_present_userId))
8403
          return false;
8404
        if (this.userId != that.userId)
8405
          return false;
8406
      }
8407
 
8408
      return true;
8409
    }
8410
 
8411
    @Override
8412
    public int hashCode() {
8413
      return 0;
8414
    }
8415
 
8416
    public int compareTo(addIpAdressForUser_args other) {
8417
      if (!getClass().equals(other.getClass())) {
8418
        return getClass().getName().compareTo(other.getClass().getName());
8419
      }
8420
 
8421
      int lastComparison = 0;
8422
      addIpAdressForUser_args typedOther = (addIpAdressForUser_args)other;
8423
 
8424
      lastComparison = Boolean.valueOf(isSetIp()).compareTo(isSetIp());
8425
      if (lastComparison != 0) {
8426
        return lastComparison;
8427
      }
8428
      lastComparison = TBaseHelper.compareTo(ip, typedOther.ip);
8429
      if (lastComparison != 0) {
8430
        return lastComparison;
8431
      }
8432
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
8433
      if (lastComparison != 0) {
8434
        return lastComparison;
8435
      }
8436
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
8437
      if (lastComparison != 0) {
8438
        return lastComparison;
8439
      }
8440
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
8441
      if (lastComparison != 0) {
8442
        return lastComparison;
8443
      }
8444
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
8445
      if (lastComparison != 0) {
8446
        return lastComparison;
8447
      }
8448
      return 0;
8449
    }
8450
 
8451
    public void read(TProtocol iprot) throws TException {
8452
      TField field;
8453
      iprot.readStructBegin();
8454
      while (true)
8455
      {
8456
        field = iprot.readFieldBegin();
8457
        if (field.type == TType.STOP) { 
8458
          break;
8459
        }
8460
        _Fields fieldId = _Fields.findByThriftId(field.id);
8461
        if (fieldId == null) {
8462
          TProtocolUtil.skip(iprot, field.type);
8463
        } else {
8464
          switch (fieldId) {
8465
            case IP:
8466
              if (field.type == TType.STRING) {
8467
                this.ip = iprot.readString();
8468
              } else { 
8469
                TProtocolUtil.skip(iprot, field.type);
8470
              }
8471
              break;
8472
            case TIMESTAMP:
8473
              if (field.type == TType.I64) {
8474
                this.timestamp = iprot.readI64();
8475
                setTimestampIsSet(true);
8476
              } else { 
8477
                TProtocolUtil.skip(iprot, field.type);
8478
              }
8479
              break;
8480
            case USER_ID:
8481
              if (field.type == TType.I64) {
8482
                this.userId = iprot.readI64();
8483
                setUserIdIsSet(true);
8484
              } else { 
8485
                TProtocolUtil.skip(iprot, field.type);
8486
              }
8487
              break;
8488
          }
8489
          iprot.readFieldEnd();
8490
        }
8491
      }
8492
      iprot.readStructEnd();
8493
      validate();
8494
    }
8495
 
8496
    public void write(TProtocol oprot) throws TException {
8497
      validate();
8498
 
8499
      oprot.writeStructBegin(STRUCT_DESC);
8500
      if (this.ip != null) {
8501
        oprot.writeFieldBegin(IP_FIELD_DESC);
8502
        oprot.writeString(this.ip);
8503
        oprot.writeFieldEnd();
8504
      }
8505
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
8506
      oprot.writeI64(this.timestamp);
8507
      oprot.writeFieldEnd();
8508
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8509
      oprot.writeI64(this.userId);
8510
      oprot.writeFieldEnd();
8511
      oprot.writeFieldStop();
8512
      oprot.writeStructEnd();
8513
    }
8514
 
8515
    @Override
8516
    public String toString() {
8517
      StringBuilder sb = new StringBuilder("addIpAdressForUser_args(");
8518
      boolean first = true;
8519
 
8520
      sb.append("ip:");
8521
      if (this.ip == null) {
8522
        sb.append("null");
8523
      } else {
8524
        sb.append(this.ip);
8525
      }
8526
      first = false;
8527
      if (!first) sb.append(", ");
8528
      sb.append("timestamp:");
8529
      sb.append(this.timestamp);
8530
      first = false;
8531
      if (!first) sb.append(", ");
8532
      sb.append("userId:");
8533
      sb.append(this.userId);
8534
      first = false;
8535
      sb.append(")");
8536
      return sb.toString();
8537
    }
8538
 
8539
    public void validate() throws TException {
8540
      // check for required fields
8541
    }
8542
 
8543
  }
8544
 
8545
  public static class addIpAdressForUser_result implements TBase<addIpAdressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addIpAdressForUser_result>   {
8546
    private static final TStruct STRUCT_DESC = new TStruct("addIpAdressForUser_result");
8547
 
8548
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8549
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8550
 
8551
    private boolean success;
8552
    private UserContextException ucx;
8553
 
8554
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8555
    public enum _Fields implements TFieldIdEnum {
8556
      SUCCESS((short)0, "success"),
8557
      UCX((short)1, "ucx");
8558
 
8559
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8560
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8561
 
8562
      static {
8563
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8564
          byId.put((int)field._thriftId, field);
8565
          byName.put(field.getFieldName(), field);
8566
        }
8567
      }
8568
 
8569
      /**
8570
       * Find the _Fields constant that matches fieldId, or null if its not found.
8571
       */
8572
      public static _Fields findByThriftId(int fieldId) {
8573
        return byId.get(fieldId);
8574
      }
8575
 
8576
      /**
8577
       * Find the _Fields constant that matches fieldId, throwing an exception
8578
       * if it is not found.
8579
       */
8580
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8581
        _Fields fields = findByThriftId(fieldId);
8582
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8583
        return fields;
8584
      }
8585
 
8586
      /**
8587
       * Find the _Fields constant that matches name, or null if its not found.
8588
       */
8589
      public static _Fields findByName(String name) {
8590
        return byName.get(name);
8591
      }
8592
 
8593
      private final short _thriftId;
8594
      private final String _fieldName;
8595
 
8596
      _Fields(short thriftId, String fieldName) {
8597
        _thriftId = thriftId;
8598
        _fieldName = fieldName;
8599
      }
8600
 
8601
      public short getThriftFieldId() {
8602
        return _thriftId;
8603
      }
8604
 
8605
      public String getFieldName() {
8606
        return _fieldName;
8607
      }
8608
    }
8609
 
8610
    // isset id assignments
8611
    private static final int __SUCCESS_ISSET_ID = 0;
8612
    private BitSet __isset_bit_vector = new BitSet(1);
8613
 
8614
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8615
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8616
          new FieldValueMetaData(TType.BOOL)));
8617
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8618
          new FieldValueMetaData(TType.STRUCT)));
8619
    }});
8620
 
8621
    static {
8622
      FieldMetaData.addStructMetaDataMap(addIpAdressForUser_result.class, metaDataMap);
8623
    }
8624
 
8625
    public addIpAdressForUser_result() {
8626
    }
8627
 
8628
    public addIpAdressForUser_result(
8629
      boolean success,
8630
      UserContextException ucx)
8631
    {
8632
      this();
8633
      this.success = success;
8634
      setSuccessIsSet(true);
8635
      this.ucx = ucx;
8636
    }
8637
 
8638
    /**
8639
     * Performs a deep copy on <i>other</i>.
8640
     */
8641
    public addIpAdressForUser_result(addIpAdressForUser_result other) {
8642
      __isset_bit_vector.clear();
8643
      __isset_bit_vector.or(other.__isset_bit_vector);
8644
      this.success = other.success;
8645
      if (other.isSetUcx()) {
8646
        this.ucx = new UserContextException(other.ucx);
8647
      }
8648
    }
8649
 
8650
    public addIpAdressForUser_result deepCopy() {
8651
      return new addIpAdressForUser_result(this);
8652
    }
8653
 
8654
    @Deprecated
8655
    public addIpAdressForUser_result clone() {
8656
      return new addIpAdressForUser_result(this);
8657
    }
8658
 
8659
    public boolean isSuccess() {
8660
      return this.success;
8661
    }
8662
 
8663
    public addIpAdressForUser_result setSuccess(boolean success) {
8664
      this.success = success;
8665
      setSuccessIsSet(true);
8666
      return this;
8667
    }
8668
 
8669
    public void unsetSuccess() {
8670
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8671
    }
8672
 
8673
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8674
    public boolean isSetSuccess() {
8675
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8676
    }
8677
 
8678
    public void setSuccessIsSet(boolean value) {
8679
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8680
    }
8681
 
8682
    public UserContextException getUcx() {
8683
      return this.ucx;
8684
    }
8685
 
8686
    public addIpAdressForUser_result setUcx(UserContextException ucx) {
8687
      this.ucx = ucx;
8688
      return this;
8689
    }
8690
 
8691
    public void unsetUcx() {
8692
      this.ucx = null;
8693
    }
8694
 
8695
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8696
    public boolean isSetUcx() {
8697
      return this.ucx != null;
8698
    }
8699
 
8700
    public void setUcxIsSet(boolean value) {
8701
      if (!value) {
8702
        this.ucx = null;
8703
      }
8704
    }
8705
 
8706
    public void setFieldValue(_Fields field, Object value) {
8707
      switch (field) {
8708
      case SUCCESS:
8709
        if (value == null) {
8710
          unsetSuccess();
8711
        } else {
8712
          setSuccess((Boolean)value);
8713
        }
8714
        break;
8715
 
8716
      case UCX:
8717
        if (value == null) {
8718
          unsetUcx();
8719
        } else {
8720
          setUcx((UserContextException)value);
8721
        }
8722
        break;
8723
 
8724
      }
8725
    }
8726
 
8727
    public void setFieldValue(int fieldID, Object value) {
8728
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8729
    }
8730
 
8731
    public Object getFieldValue(_Fields field) {
8732
      switch (field) {
8733
      case SUCCESS:
8734
        return new Boolean(isSuccess());
8735
 
8736
      case UCX:
8737
        return getUcx();
8738
 
8739
      }
8740
      throw new IllegalStateException();
8741
    }
8742
 
8743
    public Object getFieldValue(int fieldId) {
8744
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8745
    }
8746
 
8747
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8748
    public boolean isSet(_Fields field) {
8749
      switch (field) {
8750
      case SUCCESS:
8751
        return isSetSuccess();
8752
      case UCX:
8753
        return isSetUcx();
8754
      }
8755
      throw new IllegalStateException();
8756
    }
8757
 
8758
    public boolean isSet(int fieldID) {
8759
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8760
    }
8761
 
8762
    @Override
8763
    public boolean equals(Object that) {
8764
      if (that == null)
8765
        return false;
8766
      if (that instanceof addIpAdressForUser_result)
8767
        return this.equals((addIpAdressForUser_result)that);
8768
      return false;
8769
    }
8770
 
8771
    public boolean equals(addIpAdressForUser_result that) {
8772
      if (that == null)
8773
        return false;
8774
 
8775
      boolean this_present_success = true;
8776
      boolean that_present_success = true;
8777
      if (this_present_success || that_present_success) {
8778
        if (!(this_present_success && that_present_success))
8779
          return false;
8780
        if (this.success != that.success)
8781
          return false;
8782
      }
8783
 
8784
      boolean this_present_ucx = true && this.isSetUcx();
8785
      boolean that_present_ucx = true && that.isSetUcx();
8786
      if (this_present_ucx || that_present_ucx) {
8787
        if (!(this_present_ucx && that_present_ucx))
8788
          return false;
8789
        if (!this.ucx.equals(that.ucx))
8790
          return false;
8791
      }
8792
 
8793
      return true;
8794
    }
8795
 
8796
    @Override
8797
    public int hashCode() {
8798
      return 0;
8799
    }
8800
 
8801
    public int compareTo(addIpAdressForUser_result other) {
8802
      if (!getClass().equals(other.getClass())) {
8803
        return getClass().getName().compareTo(other.getClass().getName());
8804
      }
8805
 
8806
      int lastComparison = 0;
8807
      addIpAdressForUser_result typedOther = (addIpAdressForUser_result)other;
8808
 
8809
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8810
      if (lastComparison != 0) {
8811
        return lastComparison;
8812
      }
8813
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8814
      if (lastComparison != 0) {
8815
        return lastComparison;
8816
      }
8817
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8818
      if (lastComparison != 0) {
8819
        return lastComparison;
8820
      }
8821
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8822
      if (lastComparison != 0) {
8823
        return lastComparison;
8824
      }
8825
      return 0;
8826
    }
8827
 
8828
    public void read(TProtocol iprot) throws TException {
8829
      TField field;
8830
      iprot.readStructBegin();
8831
      while (true)
8832
      {
8833
        field = iprot.readFieldBegin();
8834
        if (field.type == TType.STOP) { 
8835
          break;
8836
        }
8837
        _Fields fieldId = _Fields.findByThriftId(field.id);
8838
        if (fieldId == null) {
8839
          TProtocolUtil.skip(iprot, field.type);
8840
        } else {
8841
          switch (fieldId) {
8842
            case SUCCESS:
8843
              if (field.type == TType.BOOL) {
8844
                this.success = iprot.readBool();
8845
                setSuccessIsSet(true);
8846
              } else { 
8847
                TProtocolUtil.skip(iprot, field.type);
8848
              }
8849
              break;
8850
            case UCX:
8851
              if (field.type == TType.STRUCT) {
8852
                this.ucx = new UserContextException();
8853
                this.ucx.read(iprot);
8854
              } else { 
8855
                TProtocolUtil.skip(iprot, field.type);
8856
              }
8857
              break;
8858
          }
8859
          iprot.readFieldEnd();
8860
        }
8861
      }
8862
      iprot.readStructEnd();
8863
      validate();
8864
    }
8865
 
8866
    public void write(TProtocol oprot) throws TException {
8867
      oprot.writeStructBegin(STRUCT_DESC);
8868
 
8869
      if (this.isSetSuccess()) {
8870
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8871
        oprot.writeBool(this.success);
8872
        oprot.writeFieldEnd();
8873
      } else if (this.isSetUcx()) {
8874
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8875
        this.ucx.write(oprot);
8876
        oprot.writeFieldEnd();
8877
      }
8878
      oprot.writeFieldStop();
8879
      oprot.writeStructEnd();
8880
    }
8881
 
8882
    @Override
8883
    public String toString() {
8884
      StringBuilder sb = new StringBuilder("addIpAdressForUser_result(");
8885
      boolean first = true;
8886
 
8887
      sb.append("success:");
8888
      sb.append(this.success);
8889
      first = false;
8890
      if (!first) sb.append(", ");
8891
      sb.append("ucx:");
8892
      if (this.ucx == null) {
8893
        sb.append("null");
8894
      } else {
8895
        sb.append(this.ucx);
8896
      }
8897
      first = false;
8898
      sb.append(")");
8899
      return sb.toString();
8900
    }
8901
 
8902
    public void validate() throws TException {
8903
      // check for required fields
8904
    }
8905
 
8906
  }
8907
 
8908
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8909
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8910
 
8911
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)1);
8912
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)2);
8913
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3);
513 rajveer 8914
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)4);
48 ashish 8915
 
123 ashish 8916
    private Address address;
48 ashish 8917
    private long userid;
8918
    private long timestamp;
513 rajveer 8919
    private boolean setDefault;
48 ashish 8920
 
8921
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8922
    public enum _Fields implements TFieldIdEnum {
8923
      ADDRESS((short)1, "address"),
8924
      USERID((short)2, "userid"),
513 rajveer 8925
      TIMESTAMP((short)3, "timestamp"),
8926
      SET_DEFAULT((short)4, "setDefault");
48 ashish 8927
 
8928
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8929
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8930
 
8931
      static {
8932
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8933
          byId.put((int)field._thriftId, field);
8934
          byName.put(field.getFieldName(), field);
8935
        }
8936
      }
8937
 
8938
      /**
8939
       * Find the _Fields constant that matches fieldId, or null if its not found.
8940
       */
8941
      public static _Fields findByThriftId(int fieldId) {
8942
        return byId.get(fieldId);
8943
      }
8944
 
8945
      /**
8946
       * Find the _Fields constant that matches fieldId, throwing an exception
8947
       * if it is not found.
8948
       */
8949
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8950
        _Fields fields = findByThriftId(fieldId);
8951
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8952
        return fields;
8953
      }
8954
 
8955
      /**
8956
       * Find the _Fields constant that matches name, or null if its not found.
8957
       */
8958
      public static _Fields findByName(String name) {
8959
        return byName.get(name);
8960
      }
8961
 
8962
      private final short _thriftId;
8963
      private final String _fieldName;
8964
 
8965
      _Fields(short thriftId, String fieldName) {
8966
        _thriftId = thriftId;
8967
        _fieldName = fieldName;
8968
      }
8969
 
8970
      public short getThriftFieldId() {
8971
        return _thriftId;
8972
      }
8973
 
8974
      public String getFieldName() {
8975
        return _fieldName;
8976
      }
8977
    }
8978
 
8979
    // isset id assignments
8980
    private static final int __USERID_ISSET_ID = 0;
8981
    private static final int __TIMESTAMP_ISSET_ID = 1;
513 rajveer 8982
    private static final int __SETDEFAULT_ISSET_ID = 2;
8983
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 8984
 
8985
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8986
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
123 ashish 8987
          new StructMetaData(TType.STRUCT, Address.class)));
48 ashish 8988
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
8989
          new FieldValueMetaData(TType.I64)));
8990
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
8991
          new FieldValueMetaData(TType.I64)));
513 rajveer 8992
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8993
          new FieldValueMetaData(TType.BOOL)));
48 ashish 8994
    }});
8995
 
8996
    static {
8997
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8998
    }
8999
 
9000
    public addAddressForUser_args() {
9001
    }
9002
 
9003
    public addAddressForUser_args(
123 ashish 9004
      Address address,
48 ashish 9005
      long userid,
513 rajveer 9006
      long timestamp,
9007
      boolean setDefault)
48 ashish 9008
    {
9009
      this();
9010
      this.address = address;
9011
      this.userid = userid;
9012
      setUseridIsSet(true);
9013
      this.timestamp = timestamp;
9014
      setTimestampIsSet(true);
513 rajveer 9015
      this.setDefault = setDefault;
9016
      setSetDefaultIsSet(true);
48 ashish 9017
    }
9018
 
9019
    /**
9020
     * Performs a deep copy on <i>other</i>.
9021
     */
9022
    public addAddressForUser_args(addAddressForUser_args other) {
9023
      __isset_bit_vector.clear();
9024
      __isset_bit_vector.or(other.__isset_bit_vector);
9025
      if (other.isSetAddress()) {
123 ashish 9026
        this.address = new Address(other.address);
48 ashish 9027
      }
9028
      this.userid = other.userid;
9029
      this.timestamp = other.timestamp;
513 rajveer 9030
      this.setDefault = other.setDefault;
48 ashish 9031
    }
9032
 
9033
    public addAddressForUser_args deepCopy() {
9034
      return new addAddressForUser_args(this);
9035
    }
9036
 
9037
    @Deprecated
9038
    public addAddressForUser_args clone() {
9039
      return new addAddressForUser_args(this);
9040
    }
9041
 
123 ashish 9042
    public Address getAddress() {
48 ashish 9043
      return this.address;
9044
    }
9045
 
123 ashish 9046
    public addAddressForUser_args setAddress(Address address) {
48 ashish 9047
      this.address = address;
9048
      return this;
9049
    }
9050
 
9051
    public void unsetAddress() {
9052
      this.address = null;
9053
    }
9054
 
9055
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
9056
    public boolean isSetAddress() {
9057
      return this.address != null;
9058
    }
9059
 
9060
    public void setAddressIsSet(boolean value) {
9061
      if (!value) {
9062
        this.address = null;
9063
      }
9064
    }
9065
 
9066
    public long getUserid() {
9067
      return this.userid;
9068
    }
9069
 
9070
    public addAddressForUser_args setUserid(long userid) {
9071
      this.userid = userid;
9072
      setUseridIsSet(true);
9073
      return this;
9074
    }
9075
 
9076
    public void unsetUserid() {
9077
      __isset_bit_vector.clear(__USERID_ISSET_ID);
9078
    }
9079
 
9080
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9081
    public boolean isSetUserid() {
9082
      return __isset_bit_vector.get(__USERID_ISSET_ID);
9083
    }
9084
 
9085
    public void setUseridIsSet(boolean value) {
9086
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9087
    }
9088
 
9089
    public long getTimestamp() {
9090
      return this.timestamp;
9091
    }
9092
 
9093
    public addAddressForUser_args setTimestamp(long timestamp) {
9094
      this.timestamp = timestamp;
9095
      setTimestampIsSet(true);
9096
      return this;
9097
    }
9098
 
9099
    public void unsetTimestamp() {
9100
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
9101
    }
9102
 
9103
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
9104
    public boolean isSetTimestamp() {
9105
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
9106
    }
9107
 
9108
    public void setTimestampIsSet(boolean value) {
9109
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
9110
    }
9111
 
513 rajveer 9112
    public boolean isSetDefault() {
9113
      return this.setDefault;
9114
    }
9115
 
9116
    public addAddressForUser_args setSetDefault(boolean setDefault) {
9117
      this.setDefault = setDefault;
9118
      setSetDefaultIsSet(true);
9119
      return this;
9120
    }
9121
 
9122
    public void unsetSetDefault() {
9123
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
9124
    }
9125
 
9126
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
9127
    public boolean isSetSetDefault() {
9128
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
9129
    }
9130
 
9131
    public void setSetDefaultIsSet(boolean value) {
9132
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
9133
    }
9134
 
48 ashish 9135
    public void setFieldValue(_Fields field, Object value) {
9136
      switch (field) {
9137
      case ADDRESS:
9138
        if (value == null) {
9139
          unsetAddress();
9140
        } else {
123 ashish 9141
          setAddress((Address)value);
48 ashish 9142
        }
9143
        break;
9144
 
9145
      case USERID:
9146
        if (value == null) {
9147
          unsetUserid();
9148
        } else {
9149
          setUserid((Long)value);
9150
        }
9151
        break;
9152
 
9153
      case TIMESTAMP:
9154
        if (value == null) {
9155
          unsetTimestamp();
9156
        } else {
9157
          setTimestamp((Long)value);
9158
        }
9159
        break;
9160
 
513 rajveer 9161
      case SET_DEFAULT:
9162
        if (value == null) {
9163
          unsetSetDefault();
9164
        } else {
9165
          setSetDefault((Boolean)value);
9166
        }
9167
        break;
9168
 
48 ashish 9169
      }
9170
    }
9171
 
9172
    public void setFieldValue(int fieldID, Object value) {
9173
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9174
    }
9175
 
9176
    public Object getFieldValue(_Fields field) {
9177
      switch (field) {
9178
      case ADDRESS:
9179
        return getAddress();
9180
 
9181
      case USERID:
9182
        return new Long(getUserid());
9183
 
9184
      case TIMESTAMP:
9185
        return new Long(getTimestamp());
9186
 
513 rajveer 9187
      case SET_DEFAULT:
9188
        return new Boolean(isSetDefault());
9189
 
48 ashish 9190
      }
9191
      throw new IllegalStateException();
9192
    }
9193
 
9194
    public Object getFieldValue(int fieldId) {
9195
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9196
    }
9197
 
9198
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9199
    public boolean isSet(_Fields field) {
9200
      switch (field) {
9201
      case ADDRESS:
9202
        return isSetAddress();
9203
      case USERID:
9204
        return isSetUserid();
9205
      case TIMESTAMP:
9206
        return isSetTimestamp();
513 rajveer 9207
      case SET_DEFAULT:
9208
        return isSetSetDefault();
48 ashish 9209
      }
9210
      throw new IllegalStateException();
9211
    }
9212
 
9213
    public boolean isSet(int fieldID) {
9214
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9215
    }
9216
 
9217
    @Override
9218
    public boolean equals(Object that) {
9219
      if (that == null)
9220
        return false;
9221
      if (that instanceof addAddressForUser_args)
9222
        return this.equals((addAddressForUser_args)that);
9223
      return false;
9224
    }
9225
 
9226
    public boolean equals(addAddressForUser_args that) {
9227
      if (that == null)
9228
        return false;
9229
 
9230
      boolean this_present_address = true && this.isSetAddress();
9231
      boolean that_present_address = true && that.isSetAddress();
9232
      if (this_present_address || that_present_address) {
9233
        if (!(this_present_address && that_present_address))
9234
          return false;
9235
        if (!this.address.equals(that.address))
9236
          return false;
9237
      }
9238
 
9239
      boolean this_present_userid = true;
9240
      boolean that_present_userid = true;
9241
      if (this_present_userid || that_present_userid) {
9242
        if (!(this_present_userid && that_present_userid))
9243
          return false;
9244
        if (this.userid != that.userid)
9245
          return false;
9246
      }
9247
 
9248
      boolean this_present_timestamp = true;
9249
      boolean that_present_timestamp = true;
9250
      if (this_present_timestamp || that_present_timestamp) {
9251
        if (!(this_present_timestamp && that_present_timestamp))
9252
          return false;
9253
        if (this.timestamp != that.timestamp)
9254
          return false;
9255
      }
9256
 
513 rajveer 9257
      boolean this_present_setDefault = true;
9258
      boolean that_present_setDefault = true;
9259
      if (this_present_setDefault || that_present_setDefault) {
9260
        if (!(this_present_setDefault && that_present_setDefault))
9261
          return false;
9262
        if (this.setDefault != that.setDefault)
9263
          return false;
9264
      }
9265
 
48 ashish 9266
      return true;
9267
    }
9268
 
9269
    @Override
9270
    public int hashCode() {
9271
      return 0;
9272
    }
9273
 
9274
    public int compareTo(addAddressForUser_args other) {
9275
      if (!getClass().equals(other.getClass())) {
9276
        return getClass().getName().compareTo(other.getClass().getName());
9277
      }
9278
 
9279
      int lastComparison = 0;
9280
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
9281
 
9282
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
9283
      if (lastComparison != 0) {
9284
        return lastComparison;
9285
      }
9286
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
9287
      if (lastComparison != 0) {
9288
        return lastComparison;
9289
      }
9290
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
9291
      if (lastComparison != 0) {
9292
        return lastComparison;
9293
      }
9294
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
9295
      if (lastComparison != 0) {
9296
        return lastComparison;
9297
      }
9298
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
9299
      if (lastComparison != 0) {
9300
        return lastComparison;
9301
      }
9302
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
9303
      if (lastComparison != 0) {
9304
        return lastComparison;
9305
      }
513 rajveer 9306
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
9307
      if (lastComparison != 0) {
9308
        return lastComparison;
9309
      }
9310
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
9311
      if (lastComparison != 0) {
9312
        return lastComparison;
9313
      }
48 ashish 9314
      return 0;
9315
    }
9316
 
9317
    public void read(TProtocol iprot) throws TException {
9318
      TField field;
9319
      iprot.readStructBegin();
9320
      while (true)
9321
      {
9322
        field = iprot.readFieldBegin();
9323
        if (field.type == TType.STOP) { 
9324
          break;
9325
        }
9326
        _Fields fieldId = _Fields.findByThriftId(field.id);
9327
        if (fieldId == null) {
9328
          TProtocolUtil.skip(iprot, field.type);
9329
        } else {
9330
          switch (fieldId) {
9331
            case ADDRESS:
9332
              if (field.type == TType.STRUCT) {
123 ashish 9333
                this.address = new Address();
48 ashish 9334
                this.address.read(iprot);
9335
              } else { 
9336
                TProtocolUtil.skip(iprot, field.type);
9337
              }
9338
              break;
9339
            case USERID:
9340
              if (field.type == TType.I64) {
9341
                this.userid = iprot.readI64();
9342
                setUseridIsSet(true);
9343
              } else { 
9344
                TProtocolUtil.skip(iprot, field.type);
9345
              }
9346
              break;
9347
            case TIMESTAMP:
9348
              if (field.type == TType.I64) {
9349
                this.timestamp = iprot.readI64();
9350
                setTimestampIsSet(true);
9351
              } else { 
9352
                TProtocolUtil.skip(iprot, field.type);
9353
              }
9354
              break;
513 rajveer 9355
            case SET_DEFAULT:
9356
              if (field.type == TType.BOOL) {
9357
                this.setDefault = iprot.readBool();
9358
                setSetDefaultIsSet(true);
9359
              } else { 
9360
                TProtocolUtil.skip(iprot, field.type);
9361
              }
9362
              break;
48 ashish 9363
          }
9364
          iprot.readFieldEnd();
9365
        }
9366
      }
9367
      iprot.readStructEnd();
9368
      validate();
9369
    }
9370
 
9371
    public void write(TProtocol oprot) throws TException {
9372
      validate();
9373
 
9374
      oprot.writeStructBegin(STRUCT_DESC);
9375
      if (this.address != null) {
9376
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
9377
        this.address.write(oprot);
9378
        oprot.writeFieldEnd();
9379
      }
9380
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9381
      oprot.writeI64(this.userid);
9382
      oprot.writeFieldEnd();
9383
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
9384
      oprot.writeI64(this.timestamp);
9385
      oprot.writeFieldEnd();
513 rajveer 9386
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
9387
      oprot.writeBool(this.setDefault);
9388
      oprot.writeFieldEnd();
48 ashish 9389
      oprot.writeFieldStop();
9390
      oprot.writeStructEnd();
9391
    }
9392
 
9393
    @Override
9394
    public String toString() {
9395
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
9396
      boolean first = true;
9397
 
9398
      sb.append("address:");
9399
      if (this.address == null) {
9400
        sb.append("null");
9401
      } else {
9402
        sb.append(this.address);
9403
      }
9404
      first = false;
9405
      if (!first) sb.append(", ");
9406
      sb.append("userid:");
9407
      sb.append(this.userid);
9408
      first = false;
9409
      if (!first) sb.append(", ");
9410
      sb.append("timestamp:");
9411
      sb.append(this.timestamp);
9412
      first = false;
513 rajveer 9413
      if (!first) sb.append(", ");
9414
      sb.append("setDefault:");
9415
      sb.append(this.setDefault);
9416
      first = false;
48 ashish 9417
      sb.append(")");
9418
      return sb.toString();
9419
    }
9420
 
9421
    public void validate() throws TException {
9422
      // check for required fields
9423
    }
9424
 
9425
  }
9426
 
9427
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
9428
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
9429
 
9430
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9431
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9432
 
9433
    private boolean success;
9434
    private UserContextException ucx;
9435
 
9436
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9437
    public enum _Fields implements TFieldIdEnum {
9438
      SUCCESS((short)0, "success"),
9439
      UCX((short)1, "ucx");
9440
 
9441
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9442
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9443
 
9444
      static {
9445
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9446
          byId.put((int)field._thriftId, field);
9447
          byName.put(field.getFieldName(), field);
9448
        }
9449
      }
9450
 
9451
      /**
9452
       * Find the _Fields constant that matches fieldId, or null if its not found.
9453
       */
9454
      public static _Fields findByThriftId(int fieldId) {
9455
        return byId.get(fieldId);
9456
      }
9457
 
9458
      /**
9459
       * Find the _Fields constant that matches fieldId, throwing an exception
9460
       * if it is not found.
9461
       */
9462
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9463
        _Fields fields = findByThriftId(fieldId);
9464
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9465
        return fields;
9466
      }
9467
 
9468
      /**
9469
       * Find the _Fields constant that matches name, or null if its not found.
9470
       */
9471
      public static _Fields findByName(String name) {
9472
        return byName.get(name);
9473
      }
9474
 
9475
      private final short _thriftId;
9476
      private final String _fieldName;
9477
 
9478
      _Fields(short thriftId, String fieldName) {
9479
        _thriftId = thriftId;
9480
        _fieldName = fieldName;
9481
      }
9482
 
9483
      public short getThriftFieldId() {
9484
        return _thriftId;
9485
      }
9486
 
9487
      public String getFieldName() {
9488
        return _fieldName;
9489
      }
9490
    }
9491
 
9492
    // isset id assignments
9493
    private static final int __SUCCESS_ISSET_ID = 0;
9494
    private BitSet __isset_bit_vector = new BitSet(1);
9495
 
9496
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9497
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9498
          new FieldValueMetaData(TType.BOOL)));
9499
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9500
          new FieldValueMetaData(TType.STRUCT)));
9501
    }});
9502
 
9503
    static {
9504
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
9505
    }
9506
 
9507
    public addAddressForUser_result() {
9508
    }
9509
 
9510
    public addAddressForUser_result(
9511
      boolean success,
9512
      UserContextException ucx)
9513
    {
9514
      this();
9515
      this.success = success;
9516
      setSuccessIsSet(true);
9517
      this.ucx = ucx;
9518
    }
9519
 
9520
    /**
9521
     * Performs a deep copy on <i>other</i>.
9522
     */
9523
    public addAddressForUser_result(addAddressForUser_result other) {
9524
      __isset_bit_vector.clear();
9525
      __isset_bit_vector.or(other.__isset_bit_vector);
9526
      this.success = other.success;
9527
      if (other.isSetUcx()) {
9528
        this.ucx = new UserContextException(other.ucx);
9529
      }
9530
    }
9531
 
9532
    public addAddressForUser_result deepCopy() {
9533
      return new addAddressForUser_result(this);
9534
    }
9535
 
9536
    @Deprecated
9537
    public addAddressForUser_result clone() {
9538
      return new addAddressForUser_result(this);
9539
    }
9540
 
9541
    public boolean isSuccess() {
9542
      return this.success;
9543
    }
9544
 
9545
    public addAddressForUser_result setSuccess(boolean success) {
9546
      this.success = success;
9547
      setSuccessIsSet(true);
9548
      return this;
9549
    }
9550
 
9551
    public void unsetSuccess() {
9552
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9553
    }
9554
 
9555
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9556
    public boolean isSetSuccess() {
9557
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9558
    }
9559
 
9560
    public void setSuccessIsSet(boolean value) {
9561
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9562
    }
9563
 
9564
    public UserContextException getUcx() {
9565
      return this.ucx;
9566
    }
9567
 
9568
    public addAddressForUser_result setUcx(UserContextException ucx) {
9569
      this.ucx = ucx;
9570
      return this;
9571
    }
9572
 
9573
    public void unsetUcx() {
9574
      this.ucx = null;
9575
    }
9576
 
9577
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9578
    public boolean isSetUcx() {
9579
      return this.ucx != null;
9580
    }
9581
 
9582
    public void setUcxIsSet(boolean value) {
9583
      if (!value) {
9584
        this.ucx = null;
9585
      }
9586
    }
9587
 
9588
    public void setFieldValue(_Fields field, Object value) {
9589
      switch (field) {
9590
      case SUCCESS:
9591
        if (value == null) {
9592
          unsetSuccess();
9593
        } else {
9594
          setSuccess((Boolean)value);
9595
        }
9596
        break;
9597
 
9598
      case UCX:
9599
        if (value == null) {
9600
          unsetUcx();
9601
        } else {
9602
          setUcx((UserContextException)value);
9603
        }
9604
        break;
9605
 
9606
      }
9607
    }
9608
 
9609
    public void setFieldValue(int fieldID, Object value) {
9610
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9611
    }
9612
 
9613
    public Object getFieldValue(_Fields field) {
9614
      switch (field) {
9615
      case SUCCESS:
9616
        return new Boolean(isSuccess());
9617
 
9618
      case UCX:
9619
        return getUcx();
9620
 
9621
      }
9622
      throw new IllegalStateException();
9623
    }
9624
 
9625
    public Object getFieldValue(int fieldId) {
9626
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9627
    }
9628
 
9629
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9630
    public boolean isSet(_Fields field) {
9631
      switch (field) {
9632
      case SUCCESS:
9633
        return isSetSuccess();
9634
      case UCX:
9635
        return isSetUcx();
9636
      }
9637
      throw new IllegalStateException();
9638
    }
9639
 
9640
    public boolean isSet(int fieldID) {
9641
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9642
    }
9643
 
9644
    @Override
9645
    public boolean equals(Object that) {
9646
      if (that == null)
9647
        return false;
9648
      if (that instanceof addAddressForUser_result)
9649
        return this.equals((addAddressForUser_result)that);
9650
      return false;
9651
    }
9652
 
9653
    public boolean equals(addAddressForUser_result that) {
9654
      if (that == null)
9655
        return false;
9656
 
9657
      boolean this_present_success = true;
9658
      boolean that_present_success = true;
9659
      if (this_present_success || that_present_success) {
9660
        if (!(this_present_success && that_present_success))
9661
          return false;
9662
        if (this.success != that.success)
9663
          return false;
9664
      }
9665
 
9666
      boolean this_present_ucx = true && this.isSetUcx();
9667
      boolean that_present_ucx = true && that.isSetUcx();
9668
      if (this_present_ucx || that_present_ucx) {
9669
        if (!(this_present_ucx && that_present_ucx))
9670
          return false;
9671
        if (!this.ucx.equals(that.ucx))
9672
          return false;
9673
      }
9674
 
9675
      return true;
9676
    }
9677
 
9678
    @Override
9679
    public int hashCode() {
9680
      return 0;
9681
    }
9682
 
9683
    public int compareTo(addAddressForUser_result other) {
9684
      if (!getClass().equals(other.getClass())) {
9685
        return getClass().getName().compareTo(other.getClass().getName());
9686
      }
9687
 
9688
      int lastComparison = 0;
9689
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
9690
 
9691
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9692
      if (lastComparison != 0) {
9693
        return lastComparison;
9694
      }
9695
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9696
      if (lastComparison != 0) {
9697
        return lastComparison;
9698
      }
9699
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9700
      if (lastComparison != 0) {
9701
        return lastComparison;
9702
      }
9703
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9704
      if (lastComparison != 0) {
9705
        return lastComparison;
9706
      }
9707
      return 0;
9708
    }
9709
 
9710
    public void read(TProtocol iprot) throws TException {
9711
      TField field;
9712
      iprot.readStructBegin();
9713
      while (true)
9714
      {
9715
        field = iprot.readFieldBegin();
9716
        if (field.type == TType.STOP) { 
9717
          break;
9718
        }
9719
        _Fields fieldId = _Fields.findByThriftId(field.id);
9720
        if (fieldId == null) {
9721
          TProtocolUtil.skip(iprot, field.type);
9722
        } else {
9723
          switch (fieldId) {
9724
            case SUCCESS:
9725
              if (field.type == TType.BOOL) {
9726
                this.success = iprot.readBool();
9727
                setSuccessIsSet(true);
9728
              } else { 
9729
                TProtocolUtil.skip(iprot, field.type);
9730
              }
9731
              break;
9732
            case UCX:
9733
              if (field.type == TType.STRUCT) {
9734
                this.ucx = new UserContextException();
9735
                this.ucx.read(iprot);
9736
              } else { 
9737
                TProtocolUtil.skip(iprot, field.type);
9738
              }
9739
              break;
9740
          }
9741
          iprot.readFieldEnd();
9742
        }
9743
      }
9744
      iprot.readStructEnd();
9745
      validate();
9746
    }
9747
 
9748
    public void write(TProtocol oprot) throws TException {
9749
      oprot.writeStructBegin(STRUCT_DESC);
9750
 
9751
      if (this.isSetSuccess()) {
9752
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9753
        oprot.writeBool(this.success);
9754
        oprot.writeFieldEnd();
9755
      } else if (this.isSetUcx()) {
9756
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9757
        this.ucx.write(oprot);
9758
        oprot.writeFieldEnd();
9759
      }
9760
      oprot.writeFieldStop();
9761
      oprot.writeStructEnd();
9762
    }
9763
 
9764
    @Override
9765
    public String toString() {
9766
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
9767
      boolean first = true;
9768
 
9769
      sb.append("success:");
9770
      sb.append(this.success);
9771
      first = false;
9772
      if (!first) sb.append(", ");
9773
      sb.append("ucx:");
9774
      if (this.ucx == null) {
9775
        sb.append("null");
9776
      } else {
9777
        sb.append(this.ucx);
9778
      }
9779
      first = false;
9780
      sb.append(")");
9781
      return sb.toString();
9782
    }
9783
 
9784
    public void validate() throws TException {
9785
      // check for required fields
9786
    }
9787
 
9788
  }
9789
 
9790
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9791
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
9792
 
9793
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9794
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
9795
 
9796
    private long userid;
9797
    private long addressId;
9798
 
9799
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9800
    public enum _Fields implements TFieldIdEnum {
9801
      USERID((short)1, "userid"),
9802
      ADDRESS_ID((short)2, "addressId");
9803
 
9804
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9806
 
9807
      static {
9808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9809
          byId.put((int)field._thriftId, field);
9810
          byName.put(field.getFieldName(), field);
9811
        }
9812
      }
9813
 
9814
      /**
9815
       * Find the _Fields constant that matches fieldId, or null if its not found.
9816
       */
9817
      public static _Fields findByThriftId(int fieldId) {
9818
        return byId.get(fieldId);
9819
      }
9820
 
9821
      /**
9822
       * Find the _Fields constant that matches fieldId, throwing an exception
9823
       * if it is not found.
9824
       */
9825
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9826
        _Fields fields = findByThriftId(fieldId);
9827
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9828
        return fields;
9829
      }
9830
 
9831
      /**
9832
       * Find the _Fields constant that matches name, or null if its not found.
9833
       */
9834
      public static _Fields findByName(String name) {
9835
        return byName.get(name);
9836
      }
9837
 
9838
      private final short _thriftId;
9839
      private final String _fieldName;
9840
 
9841
      _Fields(short thriftId, String fieldName) {
9842
        _thriftId = thriftId;
9843
        _fieldName = fieldName;
9844
      }
9845
 
9846
      public short getThriftFieldId() {
9847
        return _thriftId;
9848
      }
9849
 
9850
      public String getFieldName() {
9851
        return _fieldName;
9852
      }
9853
    }
9854
 
9855
    // isset id assignments
9856
    private static final int __USERID_ISSET_ID = 0;
9857
    private static final int __ADDRESSID_ISSET_ID = 1;
9858
    private BitSet __isset_bit_vector = new BitSet(2);
9859
 
9860
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9861
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9862
          new FieldValueMetaData(TType.I64)));
9863
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9864
          new FieldValueMetaData(TType.I64)));
9865
    }});
9866
 
9867
    static {
9868
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
9869
    }
9870
 
9871
    public removeAddressForUser_args() {
9872
    }
9873
 
9874
    public removeAddressForUser_args(
9875
      long userid,
9876
      long addressId)
9877
    {
9878
      this();
9879
      this.userid = userid;
9880
      setUseridIsSet(true);
9881
      this.addressId = addressId;
9882
      setAddressIdIsSet(true);
9883
    }
9884
 
9885
    /**
9886
     * Performs a deep copy on <i>other</i>.
9887
     */
9888
    public removeAddressForUser_args(removeAddressForUser_args other) {
9889
      __isset_bit_vector.clear();
9890
      __isset_bit_vector.or(other.__isset_bit_vector);
9891
      this.userid = other.userid;
9892
      this.addressId = other.addressId;
9893
    }
9894
 
9895
    public removeAddressForUser_args deepCopy() {
9896
      return new removeAddressForUser_args(this);
9897
    }
9898
 
9899
    @Deprecated
9900
    public removeAddressForUser_args clone() {
9901
      return new removeAddressForUser_args(this);
9902
    }
9903
 
9904
    public long getUserid() {
9905
      return this.userid;
9906
    }
9907
 
9908
    public removeAddressForUser_args setUserid(long userid) {
9909
      this.userid = userid;
9910
      setUseridIsSet(true);
9911
      return this;
9912
    }
9913
 
9914
    public void unsetUserid() {
9915
      __isset_bit_vector.clear(__USERID_ISSET_ID);
9916
    }
9917
 
9918
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9919
    public boolean isSetUserid() {
9920
      return __isset_bit_vector.get(__USERID_ISSET_ID);
9921
    }
9922
 
9923
    public void setUseridIsSet(boolean value) {
9924
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9925
    }
9926
 
9927
    public long getAddressId() {
9928
      return this.addressId;
9929
    }
9930
 
9931
    public removeAddressForUser_args setAddressId(long addressId) {
9932
      this.addressId = addressId;
9933
      setAddressIdIsSet(true);
9934
      return this;
9935
    }
9936
 
9937
    public void unsetAddressId() {
9938
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9939
    }
9940
 
9941
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9942
    public boolean isSetAddressId() {
9943
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9944
    }
9945
 
9946
    public void setAddressIdIsSet(boolean value) {
9947
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9948
    }
9949
 
9950
    public void setFieldValue(_Fields field, Object value) {
9951
      switch (field) {
9952
      case USERID:
9953
        if (value == null) {
9954
          unsetUserid();
9955
        } else {
9956
          setUserid((Long)value);
9957
        }
9958
        break;
9959
 
9960
      case ADDRESS_ID:
9961
        if (value == null) {
9962
          unsetAddressId();
9963
        } else {
9964
          setAddressId((Long)value);
9965
        }
9966
        break;
9967
 
9968
      }
9969
    }
9970
 
9971
    public void setFieldValue(int fieldID, Object value) {
9972
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9973
    }
9974
 
9975
    public Object getFieldValue(_Fields field) {
9976
      switch (field) {
9977
      case USERID:
9978
        return new Long(getUserid());
9979
 
9980
      case ADDRESS_ID:
9981
        return new Long(getAddressId());
9982
 
9983
      }
9984
      throw new IllegalStateException();
9985
    }
9986
 
9987
    public Object getFieldValue(int fieldId) {
9988
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9989
    }
9990
 
9991
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9992
    public boolean isSet(_Fields field) {
9993
      switch (field) {
9994
      case USERID:
9995
        return isSetUserid();
9996
      case ADDRESS_ID:
9997
        return isSetAddressId();
9998
      }
9999
      throw new IllegalStateException();
10000
    }
10001
 
10002
    public boolean isSet(int fieldID) {
10003
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10004
    }
10005
 
10006
    @Override
10007
    public boolean equals(Object that) {
10008
      if (that == null)
10009
        return false;
10010
      if (that instanceof removeAddressForUser_args)
10011
        return this.equals((removeAddressForUser_args)that);
10012
      return false;
10013
    }
10014
 
10015
    public boolean equals(removeAddressForUser_args that) {
10016
      if (that == null)
10017
        return false;
10018
 
10019
      boolean this_present_userid = true;
10020
      boolean that_present_userid = true;
10021
      if (this_present_userid || that_present_userid) {
10022
        if (!(this_present_userid && that_present_userid))
10023
          return false;
10024
        if (this.userid != that.userid)
10025
          return false;
10026
      }
10027
 
10028
      boolean this_present_addressId = true;
10029
      boolean that_present_addressId = true;
10030
      if (this_present_addressId || that_present_addressId) {
10031
        if (!(this_present_addressId && that_present_addressId))
10032
          return false;
10033
        if (this.addressId != that.addressId)
10034
          return false;
10035
      }
10036
 
10037
      return true;
10038
    }
10039
 
10040
    @Override
10041
    public int hashCode() {
10042
      return 0;
10043
    }
10044
 
10045
    public int compareTo(removeAddressForUser_args other) {
10046
      if (!getClass().equals(other.getClass())) {
10047
        return getClass().getName().compareTo(other.getClass().getName());
10048
      }
10049
 
10050
      int lastComparison = 0;
10051
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
10052
 
10053
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
10054
      if (lastComparison != 0) {
10055
        return lastComparison;
10056
      }
10057
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
10058
      if (lastComparison != 0) {
10059
        return lastComparison;
10060
      }
10061
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
10062
      if (lastComparison != 0) {
10063
        return lastComparison;
10064
      }
10065
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
10066
      if (lastComparison != 0) {
10067
        return lastComparison;
10068
      }
10069
      return 0;
10070
    }
10071
 
10072
    public void read(TProtocol iprot) throws TException {
10073
      TField field;
10074
      iprot.readStructBegin();
10075
      while (true)
10076
      {
10077
        field = iprot.readFieldBegin();
10078
        if (field.type == TType.STOP) { 
10079
          break;
10080
        }
10081
        _Fields fieldId = _Fields.findByThriftId(field.id);
10082
        if (fieldId == null) {
10083
          TProtocolUtil.skip(iprot, field.type);
10084
        } else {
10085
          switch (fieldId) {
10086
            case USERID:
10087
              if (field.type == TType.I64) {
10088
                this.userid = iprot.readI64();
10089
                setUseridIsSet(true);
10090
              } else { 
10091
                TProtocolUtil.skip(iprot, field.type);
10092
              }
10093
              break;
10094
            case ADDRESS_ID:
10095
              if (field.type == TType.I64) {
10096
                this.addressId = iprot.readI64();
10097
                setAddressIdIsSet(true);
10098
              } else { 
10099
                TProtocolUtil.skip(iprot, field.type);
10100
              }
10101
              break;
10102
          }
10103
          iprot.readFieldEnd();
10104
        }
10105
      }
10106
      iprot.readStructEnd();
10107
      validate();
10108
    }
10109
 
10110
    public void write(TProtocol oprot) throws TException {
10111
      validate();
10112
 
10113
      oprot.writeStructBegin(STRUCT_DESC);
10114
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10115
      oprot.writeI64(this.userid);
10116
      oprot.writeFieldEnd();
10117
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
10118
      oprot.writeI64(this.addressId);
10119
      oprot.writeFieldEnd();
10120
      oprot.writeFieldStop();
10121
      oprot.writeStructEnd();
10122
    }
10123
 
10124
    @Override
10125
    public String toString() {
10126
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
10127
      boolean first = true;
10128
 
10129
      sb.append("userid:");
10130
      sb.append(this.userid);
10131
      first = false;
10132
      if (!first) sb.append(", ");
10133
      sb.append("addressId:");
10134
      sb.append(this.addressId);
10135
      first = false;
10136
      sb.append(")");
10137
      return sb.toString();
10138
    }
10139
 
10140
    public void validate() throws TException {
10141
      // check for required fields
10142
    }
10143
 
10144
  }
10145
 
10146
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
10147
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
10148
 
10149
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10150
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10151
 
10152
    private boolean success;
10153
    private UserContextException ucx;
10154
 
10155
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10156
    public enum _Fields implements TFieldIdEnum {
10157
      SUCCESS((short)0, "success"),
10158
      UCX((short)1, "ucx");
10159
 
10160
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10161
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10162
 
10163
      static {
10164
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10165
          byId.put((int)field._thriftId, field);
10166
          byName.put(field.getFieldName(), field);
10167
        }
10168
      }
10169
 
10170
      /**
10171
       * Find the _Fields constant that matches fieldId, or null if its not found.
10172
       */
10173
      public static _Fields findByThriftId(int fieldId) {
10174
        return byId.get(fieldId);
10175
      }
10176
 
10177
      /**
10178
       * Find the _Fields constant that matches fieldId, throwing an exception
10179
       * if it is not found.
10180
       */
10181
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10182
        _Fields fields = findByThriftId(fieldId);
10183
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10184
        return fields;
10185
      }
10186
 
10187
      /**
10188
       * Find the _Fields constant that matches name, or null if its not found.
10189
       */
10190
      public static _Fields findByName(String name) {
10191
        return byName.get(name);
10192
      }
10193
 
10194
      private final short _thriftId;
10195
      private final String _fieldName;
10196
 
10197
      _Fields(short thriftId, String fieldName) {
10198
        _thriftId = thriftId;
10199
        _fieldName = fieldName;
10200
      }
10201
 
10202
      public short getThriftFieldId() {
10203
        return _thriftId;
10204
      }
10205
 
10206
      public String getFieldName() {
10207
        return _fieldName;
10208
      }
10209
    }
10210
 
10211
    // isset id assignments
10212
    private static final int __SUCCESS_ISSET_ID = 0;
10213
    private BitSet __isset_bit_vector = new BitSet(1);
10214
 
10215
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10216
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10217
          new FieldValueMetaData(TType.BOOL)));
10218
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10219
          new FieldValueMetaData(TType.STRUCT)));
10220
    }});
10221
 
10222
    static {
10223
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
10224
    }
10225
 
10226
    public removeAddressForUser_result() {
10227
    }
10228
 
10229
    public removeAddressForUser_result(
10230
      boolean success,
10231
      UserContextException ucx)
10232
    {
10233
      this();
10234
      this.success = success;
10235
      setSuccessIsSet(true);
10236
      this.ucx = ucx;
10237
    }
10238
 
10239
    /**
10240
     * Performs a deep copy on <i>other</i>.
10241
     */
10242
    public removeAddressForUser_result(removeAddressForUser_result other) {
10243
      __isset_bit_vector.clear();
10244
      __isset_bit_vector.or(other.__isset_bit_vector);
10245
      this.success = other.success;
10246
      if (other.isSetUcx()) {
10247
        this.ucx = new UserContextException(other.ucx);
10248
      }
10249
    }
10250
 
10251
    public removeAddressForUser_result deepCopy() {
10252
      return new removeAddressForUser_result(this);
10253
    }
10254
 
10255
    @Deprecated
10256
    public removeAddressForUser_result clone() {
10257
      return new removeAddressForUser_result(this);
10258
    }
10259
 
10260
    public boolean isSuccess() {
10261
      return this.success;
10262
    }
10263
 
10264
    public removeAddressForUser_result setSuccess(boolean success) {
10265
      this.success = success;
10266
      setSuccessIsSet(true);
10267
      return this;
10268
    }
10269
 
10270
    public void unsetSuccess() {
10271
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10272
    }
10273
 
10274
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10275
    public boolean isSetSuccess() {
10276
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10277
    }
10278
 
10279
    public void setSuccessIsSet(boolean value) {
10280
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10281
    }
10282
 
10283
    public UserContextException getUcx() {
10284
      return this.ucx;
10285
    }
10286
 
10287
    public removeAddressForUser_result setUcx(UserContextException ucx) {
10288
      this.ucx = ucx;
10289
      return this;
10290
    }
10291
 
10292
    public void unsetUcx() {
10293
      this.ucx = null;
10294
    }
10295
 
10296
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10297
    public boolean isSetUcx() {
10298
      return this.ucx != null;
10299
    }
10300
 
10301
    public void setUcxIsSet(boolean value) {
10302
      if (!value) {
10303
        this.ucx = null;
10304
      }
10305
    }
10306
 
10307
    public void setFieldValue(_Fields field, Object value) {
10308
      switch (field) {
10309
      case SUCCESS:
10310
        if (value == null) {
10311
          unsetSuccess();
10312
        } else {
10313
          setSuccess((Boolean)value);
10314
        }
10315
        break;
10316
 
10317
      case UCX:
10318
        if (value == null) {
10319
          unsetUcx();
10320
        } else {
10321
          setUcx((UserContextException)value);
10322
        }
10323
        break;
10324
 
10325
      }
10326
    }
10327
 
10328
    public void setFieldValue(int fieldID, Object value) {
10329
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10330
    }
10331
 
10332
    public Object getFieldValue(_Fields field) {
10333
      switch (field) {
10334
      case SUCCESS:
10335
        return new Boolean(isSuccess());
10336
 
10337
      case UCX:
10338
        return getUcx();
10339
 
10340
      }
10341
      throw new IllegalStateException();
10342
    }
10343
 
10344
    public Object getFieldValue(int fieldId) {
10345
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10346
    }
10347
 
10348
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10349
    public boolean isSet(_Fields field) {
10350
      switch (field) {
10351
      case SUCCESS:
10352
        return isSetSuccess();
10353
      case UCX:
10354
        return isSetUcx();
10355
      }
10356
      throw new IllegalStateException();
10357
    }
10358
 
10359
    public boolean isSet(int fieldID) {
10360
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10361
    }
10362
 
10363
    @Override
10364
    public boolean equals(Object that) {
10365
      if (that == null)
10366
        return false;
10367
      if (that instanceof removeAddressForUser_result)
10368
        return this.equals((removeAddressForUser_result)that);
10369
      return false;
10370
    }
10371
 
10372
    public boolean equals(removeAddressForUser_result that) {
10373
      if (that == null)
10374
        return false;
10375
 
10376
      boolean this_present_success = true;
10377
      boolean that_present_success = true;
10378
      if (this_present_success || that_present_success) {
10379
        if (!(this_present_success && that_present_success))
10380
          return false;
10381
        if (this.success != that.success)
10382
          return false;
10383
      }
10384
 
10385
      boolean this_present_ucx = true && this.isSetUcx();
10386
      boolean that_present_ucx = true && that.isSetUcx();
10387
      if (this_present_ucx || that_present_ucx) {
10388
        if (!(this_present_ucx && that_present_ucx))
10389
          return false;
10390
        if (!this.ucx.equals(that.ucx))
10391
          return false;
10392
      }
10393
 
10394
      return true;
10395
    }
10396
 
10397
    @Override
10398
    public int hashCode() {
10399
      return 0;
10400
    }
10401
 
10402
    public int compareTo(removeAddressForUser_result other) {
10403
      if (!getClass().equals(other.getClass())) {
10404
        return getClass().getName().compareTo(other.getClass().getName());
10405
      }
10406
 
10407
      int lastComparison = 0;
10408
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
10409
 
10410
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10411
      if (lastComparison != 0) {
10412
        return lastComparison;
10413
      }
10414
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10415
      if (lastComparison != 0) {
10416
        return lastComparison;
10417
      }
10418
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10419
      if (lastComparison != 0) {
10420
        return lastComparison;
10421
      }
10422
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10423
      if (lastComparison != 0) {
10424
        return lastComparison;
10425
      }
10426
      return 0;
10427
    }
10428
 
10429
    public void read(TProtocol iprot) throws TException {
10430
      TField field;
10431
      iprot.readStructBegin();
10432
      while (true)
10433
      {
10434
        field = iprot.readFieldBegin();
10435
        if (field.type == TType.STOP) { 
10436
          break;
10437
        }
10438
        _Fields fieldId = _Fields.findByThriftId(field.id);
10439
        if (fieldId == null) {
10440
          TProtocolUtil.skip(iprot, field.type);
10441
        } else {
10442
          switch (fieldId) {
10443
            case SUCCESS:
10444
              if (field.type == TType.BOOL) {
10445
                this.success = iprot.readBool();
10446
                setSuccessIsSet(true);
10447
              } else { 
10448
                TProtocolUtil.skip(iprot, field.type);
10449
              }
10450
              break;
10451
            case UCX:
10452
              if (field.type == TType.STRUCT) {
10453
                this.ucx = new UserContextException();
10454
                this.ucx.read(iprot);
10455
              } else { 
10456
                TProtocolUtil.skip(iprot, field.type);
10457
              }
10458
              break;
10459
          }
10460
          iprot.readFieldEnd();
10461
        }
10462
      }
10463
      iprot.readStructEnd();
10464
      validate();
10465
    }
10466
 
10467
    public void write(TProtocol oprot) throws TException {
10468
      oprot.writeStructBegin(STRUCT_DESC);
10469
 
10470
      if (this.isSetSuccess()) {
10471
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10472
        oprot.writeBool(this.success);
10473
        oprot.writeFieldEnd();
10474
      } else if (this.isSetUcx()) {
10475
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10476
        this.ucx.write(oprot);
10477
        oprot.writeFieldEnd();
10478
      }
10479
      oprot.writeFieldStop();
10480
      oprot.writeStructEnd();
10481
    }
10482
 
10483
    @Override
10484
    public String toString() {
10485
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
10486
      boolean first = true;
10487
 
10488
      sb.append("success:");
10489
      sb.append(this.success);
10490
      first = false;
10491
      if (!first) sb.append(", ");
10492
      sb.append("ucx:");
10493
      if (this.ucx == null) {
10494
        sb.append("null");
10495
      } else {
10496
        sb.append(this.ucx);
10497
      }
10498
      first = false;
10499
      sb.append(")");
10500
      return sb.toString();
10501
    }
10502
 
10503
    public void validate() throws TException {
10504
      // check for required fields
10505
    }
10506
 
10507
  }
10508
 
10509
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10510
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
10511
 
10512
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
10513
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10514
 
10515
    private long userId;
10516
    private long timestamp;
10517
 
10518
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10519
    public enum _Fields implements TFieldIdEnum {
10520
      USER_ID((short)1, "userId"),
10521
      TIMESTAMP((short)2, "timestamp");
10522
 
10523
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10524
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10525
 
10526
      static {
10527
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10528
          byId.put((int)field._thriftId, field);
10529
          byName.put(field.getFieldName(), field);
10530
        }
10531
      }
10532
 
10533
      /**
10534
       * Find the _Fields constant that matches fieldId, or null if its not found.
10535
       */
10536
      public static _Fields findByThriftId(int fieldId) {
10537
        return byId.get(fieldId);
10538
      }
10539
 
10540
      /**
10541
       * Find the _Fields constant that matches fieldId, throwing an exception
10542
       * if it is not found.
10543
       */
10544
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10545
        _Fields fields = findByThriftId(fieldId);
10546
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10547
        return fields;
10548
      }
10549
 
10550
      /**
10551
       * Find the _Fields constant that matches name, or null if its not found.
10552
       */
10553
      public static _Fields findByName(String name) {
10554
        return byName.get(name);
10555
      }
10556
 
10557
      private final short _thriftId;
10558
      private final String _fieldName;
10559
 
10560
      _Fields(short thriftId, String fieldName) {
10561
        _thriftId = thriftId;
10562
        _fieldName = fieldName;
10563
      }
10564
 
10565
      public short getThriftFieldId() {
10566
        return _thriftId;
10567
      }
10568
 
10569
      public String getFieldName() {
10570
        return _fieldName;
10571
      }
10572
    }
10573
 
10574
    // isset id assignments
10575
    private static final int __USERID_ISSET_ID = 0;
10576
    private static final int __TIMESTAMP_ISSET_ID = 1;
10577
    private BitSet __isset_bit_vector = new BitSet(2);
10578
 
10579
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10580
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10581
          new FieldValueMetaData(TType.I64)));
10582
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10583
          new FieldValueMetaData(TType.I64)));
10584
    }});
10585
 
10586
    static {
10587
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
10588
    }
10589
 
10590
    public setUserAsLoggedIn_args() {
10591
    }
10592
 
10593
    public setUserAsLoggedIn_args(
10594
      long userId,
10595
      long timestamp)
10596
    {
10597
      this();
10598
      this.userId = userId;
10599
      setUserIdIsSet(true);
10600
      this.timestamp = timestamp;
10601
      setTimestampIsSet(true);
10602
    }
10603
 
10604
    /**
10605
     * Performs a deep copy on <i>other</i>.
10606
     */
10607
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
10608
      __isset_bit_vector.clear();
10609
      __isset_bit_vector.or(other.__isset_bit_vector);
10610
      this.userId = other.userId;
10611
      this.timestamp = other.timestamp;
10612
    }
10613
 
10614
    public setUserAsLoggedIn_args deepCopy() {
10615
      return new setUserAsLoggedIn_args(this);
10616
    }
10617
 
10618
    @Deprecated
10619
    public setUserAsLoggedIn_args clone() {
10620
      return new setUserAsLoggedIn_args(this);
10621
    }
10622
 
10623
    public long getUserId() {
10624
      return this.userId;
10625
    }
10626
 
10627
    public setUserAsLoggedIn_args setUserId(long userId) {
10628
      this.userId = userId;
10629
      setUserIdIsSet(true);
10630
      return this;
10631
    }
10632
 
10633
    public void unsetUserId() {
10634
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10635
    }
10636
 
10637
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10638
    public boolean isSetUserId() {
10639
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10640
    }
10641
 
10642
    public void setUserIdIsSet(boolean value) {
10643
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10644
    }
10645
 
10646
    public long getTimestamp() {
10647
      return this.timestamp;
10648
    }
10649
 
10650
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
10651
      this.timestamp = timestamp;
10652
      setTimestampIsSet(true);
10653
      return this;
10654
    }
10655
 
10656
    public void unsetTimestamp() {
10657
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10658
    }
10659
 
10660
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10661
    public boolean isSetTimestamp() {
10662
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10663
    }
10664
 
10665
    public void setTimestampIsSet(boolean value) {
10666
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10667
    }
10668
 
10669
    public void setFieldValue(_Fields field, Object value) {
10670
      switch (field) {
10671
      case USER_ID:
10672
        if (value == null) {
10673
          unsetUserId();
10674
        } else {
10675
          setUserId((Long)value);
10676
        }
10677
        break;
10678
 
10679
      case TIMESTAMP:
10680
        if (value == null) {
10681
          unsetTimestamp();
10682
        } else {
10683
          setTimestamp((Long)value);
10684
        }
10685
        break;
10686
 
10687
      }
10688
    }
10689
 
10690
    public void setFieldValue(int fieldID, Object value) {
10691
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10692
    }
10693
 
10694
    public Object getFieldValue(_Fields field) {
10695
      switch (field) {
10696
      case USER_ID:
10697
        return new Long(getUserId());
10698
 
10699
      case TIMESTAMP:
10700
        return new Long(getTimestamp());
10701
 
10702
      }
10703
      throw new IllegalStateException();
10704
    }
10705
 
10706
    public Object getFieldValue(int fieldId) {
10707
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10708
    }
10709
 
10710
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10711
    public boolean isSet(_Fields field) {
10712
      switch (field) {
10713
      case USER_ID:
10714
        return isSetUserId();
10715
      case TIMESTAMP:
10716
        return isSetTimestamp();
10717
      }
10718
      throw new IllegalStateException();
10719
    }
10720
 
10721
    public boolean isSet(int fieldID) {
10722
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10723
    }
10724
 
10725
    @Override
10726
    public boolean equals(Object that) {
10727
      if (that == null)
10728
        return false;
10729
      if (that instanceof setUserAsLoggedIn_args)
10730
        return this.equals((setUserAsLoggedIn_args)that);
10731
      return false;
10732
    }
10733
 
10734
    public boolean equals(setUserAsLoggedIn_args that) {
10735
      if (that == null)
10736
        return false;
10737
 
10738
      boolean this_present_userId = true;
10739
      boolean that_present_userId = true;
10740
      if (this_present_userId || that_present_userId) {
10741
        if (!(this_present_userId && that_present_userId))
10742
          return false;
10743
        if (this.userId != that.userId)
10744
          return false;
10745
      }
10746
 
10747
      boolean this_present_timestamp = true;
10748
      boolean that_present_timestamp = true;
10749
      if (this_present_timestamp || that_present_timestamp) {
10750
        if (!(this_present_timestamp && that_present_timestamp))
10751
          return false;
10752
        if (this.timestamp != that.timestamp)
10753
          return false;
10754
      }
10755
 
10756
      return true;
10757
    }
10758
 
10759
    @Override
10760
    public int hashCode() {
10761
      return 0;
10762
    }
10763
 
10764
    public int compareTo(setUserAsLoggedIn_args other) {
10765
      if (!getClass().equals(other.getClass())) {
10766
        return getClass().getName().compareTo(other.getClass().getName());
10767
      }
10768
 
10769
      int lastComparison = 0;
10770
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
10771
 
10772
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
10773
      if (lastComparison != 0) {
10774
        return lastComparison;
10775
      }
10776
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
10777
      if (lastComparison != 0) {
10778
        return lastComparison;
10779
      }
10780
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10781
      if (lastComparison != 0) {
10782
        return lastComparison;
10783
      }
10784
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10785
      if (lastComparison != 0) {
10786
        return lastComparison;
10787
      }
10788
      return 0;
10789
    }
10790
 
10791
    public void read(TProtocol iprot) throws TException {
10792
      TField field;
10793
      iprot.readStructBegin();
10794
      while (true)
10795
      {
10796
        field = iprot.readFieldBegin();
10797
        if (field.type == TType.STOP) { 
10798
          break;
10799
        }
10800
        _Fields fieldId = _Fields.findByThriftId(field.id);
10801
        if (fieldId == null) {
10802
          TProtocolUtil.skip(iprot, field.type);
10803
        } else {
10804
          switch (fieldId) {
10805
            case USER_ID:
10806
              if (field.type == TType.I64) {
10807
                this.userId = iprot.readI64();
10808
                setUserIdIsSet(true);
10809
              } else { 
10810
                TProtocolUtil.skip(iprot, field.type);
10811
              }
10812
              break;
10813
            case TIMESTAMP:
10814
              if (field.type == TType.I64) {
10815
                this.timestamp = iprot.readI64();
10816
                setTimestampIsSet(true);
10817
              } else { 
10818
                TProtocolUtil.skip(iprot, field.type);
10819
              }
10820
              break;
10821
          }
10822
          iprot.readFieldEnd();
10823
        }
10824
      }
10825
      iprot.readStructEnd();
10826
      validate();
10827
    }
10828
 
10829
    public void write(TProtocol oprot) throws TException {
10830
      validate();
10831
 
10832
      oprot.writeStructBegin(STRUCT_DESC);
10833
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10834
      oprot.writeI64(this.userId);
10835
      oprot.writeFieldEnd();
10836
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10837
      oprot.writeI64(this.timestamp);
10838
      oprot.writeFieldEnd();
10839
      oprot.writeFieldStop();
10840
      oprot.writeStructEnd();
10841
    }
10842
 
10843
    @Override
10844
    public String toString() {
10845
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
10846
      boolean first = true;
10847
 
10848
      sb.append("userId:");
10849
      sb.append(this.userId);
10850
      first = false;
10851
      if (!first) sb.append(", ");
10852
      sb.append("timestamp:");
10853
      sb.append(this.timestamp);
10854
      first = false;
10855
      sb.append(")");
10856
      return sb.toString();
10857
    }
10858
 
10859
    public void validate() throws TException {
10860
      // check for required fields
10861
    }
10862
 
10863
  }
10864
 
10865
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10866
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
10867
 
10868
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10869
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10870
 
10871
    private boolean success;
10872
    private UserContextException ucx;
10873
 
10874
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10875
    public enum _Fields implements TFieldIdEnum {
10876
      SUCCESS((short)0, "success"),
10877
      UCX((short)1, "ucx");
10878
 
10879
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10880
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10881
 
10882
      static {
10883
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10884
          byId.put((int)field._thriftId, field);
10885
          byName.put(field.getFieldName(), field);
10886
        }
10887
      }
10888
 
10889
      /**
10890
       * Find the _Fields constant that matches fieldId, or null if its not found.
10891
       */
10892
      public static _Fields findByThriftId(int fieldId) {
10893
        return byId.get(fieldId);
10894
      }
10895
 
10896
      /**
10897
       * Find the _Fields constant that matches fieldId, throwing an exception
10898
       * if it is not found.
10899
       */
10900
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10901
        _Fields fields = findByThriftId(fieldId);
10902
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10903
        return fields;
10904
      }
10905
 
10906
      /**
10907
       * Find the _Fields constant that matches name, or null if its not found.
10908
       */
10909
      public static _Fields findByName(String name) {
10910
        return byName.get(name);
10911
      }
10912
 
10913
      private final short _thriftId;
10914
      private final String _fieldName;
10915
 
10916
      _Fields(short thriftId, String fieldName) {
10917
        _thriftId = thriftId;
10918
        _fieldName = fieldName;
10919
      }
10920
 
10921
      public short getThriftFieldId() {
10922
        return _thriftId;
10923
      }
10924
 
10925
      public String getFieldName() {
10926
        return _fieldName;
10927
      }
10928
    }
10929
 
10930
    // isset id assignments
10931
    private static final int __SUCCESS_ISSET_ID = 0;
10932
    private BitSet __isset_bit_vector = new BitSet(1);
10933
 
10934
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10935
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10936
          new FieldValueMetaData(TType.BOOL)));
10937
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10938
          new FieldValueMetaData(TType.STRUCT)));
10939
    }});
10940
 
10941
    static {
10942
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
10943
    }
10944
 
10945
    public setUserAsLoggedIn_result() {
10946
    }
10947
 
10948
    public setUserAsLoggedIn_result(
10949
      boolean success,
10950
      UserContextException ucx)
10951
    {
10952
      this();
10953
      this.success = success;
10954
      setSuccessIsSet(true);
10955
      this.ucx = ucx;
10956
    }
10957
 
10958
    /**
10959
     * Performs a deep copy on <i>other</i>.
10960
     */
10961
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
10962
      __isset_bit_vector.clear();
10963
      __isset_bit_vector.or(other.__isset_bit_vector);
10964
      this.success = other.success;
10965
      if (other.isSetUcx()) {
10966
        this.ucx = new UserContextException(other.ucx);
10967
      }
10968
    }
10969
 
10970
    public setUserAsLoggedIn_result deepCopy() {
10971
      return new setUserAsLoggedIn_result(this);
10972
    }
10973
 
10974
    @Deprecated
10975
    public setUserAsLoggedIn_result clone() {
10976
      return new setUserAsLoggedIn_result(this);
10977
    }
10978
 
10979
    public boolean isSuccess() {
10980
      return this.success;
10981
    }
10982
 
10983
    public setUserAsLoggedIn_result setSuccess(boolean success) {
10984
      this.success = success;
10985
      setSuccessIsSet(true);
10986
      return this;
10987
    }
10988
 
10989
    public void unsetSuccess() {
10990
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10991
    }
10992
 
10993
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10994
    public boolean isSetSuccess() {
10995
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10996
    }
10997
 
10998
    public void setSuccessIsSet(boolean value) {
10999
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11000
    }
11001
 
11002
    public UserContextException getUcx() {
11003
      return this.ucx;
11004
    }
11005
 
11006
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
11007
      this.ucx = ucx;
11008
      return this;
11009
    }
11010
 
11011
    public void unsetUcx() {
11012
      this.ucx = null;
11013
    }
11014
 
11015
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11016
    public boolean isSetUcx() {
11017
      return this.ucx != null;
11018
    }
11019
 
11020
    public void setUcxIsSet(boolean value) {
11021
      if (!value) {
11022
        this.ucx = null;
11023
      }
11024
    }
11025
 
11026
    public void setFieldValue(_Fields field, Object value) {
11027
      switch (field) {
11028
      case SUCCESS:
11029
        if (value == null) {
11030
          unsetSuccess();
11031
        } else {
11032
          setSuccess((Boolean)value);
11033
        }
11034
        break;
11035
 
11036
      case UCX:
11037
        if (value == null) {
11038
          unsetUcx();
11039
        } else {
11040
          setUcx((UserContextException)value);
11041
        }
11042
        break;
11043
 
11044
      }
11045
    }
11046
 
11047
    public void setFieldValue(int fieldID, Object value) {
11048
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11049
    }
11050
 
11051
    public Object getFieldValue(_Fields field) {
11052
      switch (field) {
11053
      case SUCCESS:
11054
        return new Boolean(isSuccess());
11055
 
11056
      case UCX:
11057
        return getUcx();
11058
 
11059
      }
11060
      throw new IllegalStateException();
11061
    }
11062
 
11063
    public Object getFieldValue(int fieldId) {
11064
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11065
    }
11066
 
11067
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11068
    public boolean isSet(_Fields field) {
11069
      switch (field) {
11070
      case SUCCESS:
11071
        return isSetSuccess();
11072
      case UCX:
11073
        return isSetUcx();
11074
      }
11075
      throw new IllegalStateException();
11076
    }
11077
 
11078
    public boolean isSet(int fieldID) {
11079
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11080
    }
11081
 
11082
    @Override
11083
    public boolean equals(Object that) {
11084
      if (that == null)
11085
        return false;
11086
      if (that instanceof setUserAsLoggedIn_result)
11087
        return this.equals((setUserAsLoggedIn_result)that);
11088
      return false;
11089
    }
11090
 
11091
    public boolean equals(setUserAsLoggedIn_result that) {
11092
      if (that == null)
11093
        return false;
11094
 
11095
      boolean this_present_success = true;
11096
      boolean that_present_success = true;
11097
      if (this_present_success || that_present_success) {
11098
        if (!(this_present_success && that_present_success))
11099
          return false;
11100
        if (this.success != that.success)
11101
          return false;
11102
      }
11103
 
11104
      boolean this_present_ucx = true && this.isSetUcx();
11105
      boolean that_present_ucx = true && that.isSetUcx();
11106
      if (this_present_ucx || that_present_ucx) {
11107
        if (!(this_present_ucx && that_present_ucx))
11108
          return false;
11109
        if (!this.ucx.equals(that.ucx))
11110
          return false;
11111
      }
11112
 
11113
      return true;
11114
    }
11115
 
11116
    @Override
11117
    public int hashCode() {
11118
      return 0;
11119
    }
11120
 
11121
    public int compareTo(setUserAsLoggedIn_result other) {
11122
      if (!getClass().equals(other.getClass())) {
11123
        return getClass().getName().compareTo(other.getClass().getName());
11124
      }
11125
 
11126
      int lastComparison = 0;
11127
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
11128
 
11129
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11130
      if (lastComparison != 0) {
11131
        return lastComparison;
11132
      }
11133
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11134
      if (lastComparison != 0) {
11135
        return lastComparison;
11136
      }
11137
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11138
      if (lastComparison != 0) {
11139
        return lastComparison;
11140
      }
11141
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11142
      if (lastComparison != 0) {
11143
        return lastComparison;
11144
      }
11145
      return 0;
11146
    }
11147
 
11148
    public void read(TProtocol iprot) throws TException {
11149
      TField field;
11150
      iprot.readStructBegin();
11151
      while (true)
11152
      {
11153
        field = iprot.readFieldBegin();
11154
        if (field.type == TType.STOP) { 
11155
          break;
11156
        }
11157
        _Fields fieldId = _Fields.findByThriftId(field.id);
11158
        if (fieldId == null) {
11159
          TProtocolUtil.skip(iprot, field.type);
11160
        } else {
11161
          switch (fieldId) {
11162
            case SUCCESS:
11163
              if (field.type == TType.BOOL) {
11164
                this.success = iprot.readBool();
11165
                setSuccessIsSet(true);
11166
              } else { 
11167
                TProtocolUtil.skip(iprot, field.type);
11168
              }
11169
              break;
11170
            case UCX:
11171
              if (field.type == TType.STRUCT) {
11172
                this.ucx = new UserContextException();
11173
                this.ucx.read(iprot);
11174
              } else { 
11175
                TProtocolUtil.skip(iprot, field.type);
11176
              }
11177
              break;
11178
          }
11179
          iprot.readFieldEnd();
11180
        }
11181
      }
11182
      iprot.readStructEnd();
11183
      validate();
11184
    }
11185
 
11186
    public void write(TProtocol oprot) throws TException {
11187
      oprot.writeStructBegin(STRUCT_DESC);
11188
 
11189
      if (this.isSetSuccess()) {
11190
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11191
        oprot.writeBool(this.success);
11192
        oprot.writeFieldEnd();
11193
      } else if (this.isSetUcx()) {
11194
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11195
        this.ucx.write(oprot);
11196
        oprot.writeFieldEnd();
11197
      }
11198
      oprot.writeFieldStop();
11199
      oprot.writeStructEnd();
11200
    }
11201
 
11202
    @Override
11203
    public String toString() {
11204
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
11205
      boolean first = true;
11206
 
11207
      sb.append("success:");
11208
      sb.append(this.success);
11209
      first = false;
11210
      if (!first) sb.append(", ");
11211
      sb.append("ucx:");
11212
      if (this.ucx == null) {
11213
        sb.append("null");
11214
      } else {
11215
        sb.append(this.ucx);
11216
      }
11217
      first = false;
11218
      sb.append(")");
11219
      return sb.toString();
11220
    }
11221
 
11222
    public void validate() throws TException {
11223
      // check for required fields
11224
    }
11225
 
11226
  }
11227
 
11228
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
11229
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
11230
 
11231
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11232
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
11233
 
11234
    private long userid;
11235
    private long timestamp;
11236
 
11237
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11238
    public enum _Fields implements TFieldIdEnum {
11239
      USERID((short)1, "userid"),
11240
      TIMESTAMP((short)2, "timestamp");
11241
 
11242
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11244
 
11245
      static {
11246
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11247
          byId.put((int)field._thriftId, field);
11248
          byName.put(field.getFieldName(), field);
11249
        }
11250
      }
11251
 
11252
      /**
11253
       * Find the _Fields constant that matches fieldId, or null if its not found.
11254
       */
11255
      public static _Fields findByThriftId(int fieldId) {
11256
        return byId.get(fieldId);
11257
      }
11258
 
11259
      /**
11260
       * Find the _Fields constant that matches fieldId, throwing an exception
11261
       * if it is not found.
11262
       */
11263
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11264
        _Fields fields = findByThriftId(fieldId);
11265
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11266
        return fields;
11267
      }
11268
 
11269
      /**
11270
       * Find the _Fields constant that matches name, or null if its not found.
11271
       */
11272
      public static _Fields findByName(String name) {
11273
        return byName.get(name);
11274
      }
11275
 
11276
      private final short _thriftId;
11277
      private final String _fieldName;
11278
 
11279
      _Fields(short thriftId, String fieldName) {
11280
        _thriftId = thriftId;
11281
        _fieldName = fieldName;
11282
      }
11283
 
11284
      public short getThriftFieldId() {
11285
        return _thriftId;
11286
      }
11287
 
11288
      public String getFieldName() {
11289
        return _fieldName;
11290
      }
11291
    }
11292
 
11293
    // isset id assignments
11294
    private static final int __USERID_ISSET_ID = 0;
11295
    private static final int __TIMESTAMP_ISSET_ID = 1;
11296
    private BitSet __isset_bit_vector = new BitSet(2);
11297
 
11298
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11299
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11300
          new FieldValueMetaData(TType.I64)));
11301
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
11302
          new FieldValueMetaData(TType.I64)));
11303
    }});
11304
 
11305
    static {
11306
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
11307
    }
11308
 
11309
    public setUserAsLoggedOut_args() {
11310
    }
11311
 
11312
    public setUserAsLoggedOut_args(
11313
      long userid,
11314
      long timestamp)
11315
    {
11316
      this();
11317
      this.userid = userid;
11318
      setUseridIsSet(true);
11319
      this.timestamp = timestamp;
11320
      setTimestampIsSet(true);
11321
    }
11322
 
11323
    /**
11324
     * Performs a deep copy on <i>other</i>.
11325
     */
11326
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
11327
      __isset_bit_vector.clear();
11328
      __isset_bit_vector.or(other.__isset_bit_vector);
11329
      this.userid = other.userid;
11330
      this.timestamp = other.timestamp;
11331
    }
11332
 
11333
    public setUserAsLoggedOut_args deepCopy() {
11334
      return new setUserAsLoggedOut_args(this);
11335
    }
11336
 
11337
    @Deprecated
11338
    public setUserAsLoggedOut_args clone() {
11339
      return new setUserAsLoggedOut_args(this);
11340
    }
11341
 
11342
    public long getUserid() {
11343
      return this.userid;
11344
    }
11345
 
11346
    public setUserAsLoggedOut_args setUserid(long userid) {
11347
      this.userid = userid;
11348
      setUseridIsSet(true);
11349
      return this;
11350
    }
11351
 
11352
    public void unsetUserid() {
11353
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11354
    }
11355
 
11356
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11357
    public boolean isSetUserid() {
11358
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11359
    }
11360
 
11361
    public void setUseridIsSet(boolean value) {
11362
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11363
    }
11364
 
11365
    public long getTimestamp() {
11366
      return this.timestamp;
11367
    }
11368
 
11369
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
11370
      this.timestamp = timestamp;
11371
      setTimestampIsSet(true);
11372
      return this;
11373
    }
11374
 
11375
    public void unsetTimestamp() {
11376
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
11377
    }
11378
 
11379
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
11380
    public boolean isSetTimestamp() {
11381
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
11382
    }
11383
 
11384
    public void setTimestampIsSet(boolean value) {
11385
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
11386
    }
11387
 
11388
    public void setFieldValue(_Fields field, Object value) {
11389
      switch (field) {
11390
      case USERID:
11391
        if (value == null) {
11392
          unsetUserid();
11393
        } else {
11394
          setUserid((Long)value);
11395
        }
11396
        break;
11397
 
11398
      case TIMESTAMP:
11399
        if (value == null) {
11400
          unsetTimestamp();
11401
        } else {
11402
          setTimestamp((Long)value);
11403
        }
11404
        break;
11405
 
11406
      }
11407
    }
11408
 
11409
    public void setFieldValue(int fieldID, Object value) {
11410
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11411
    }
11412
 
11413
    public Object getFieldValue(_Fields field) {
11414
      switch (field) {
11415
      case USERID:
11416
        return new Long(getUserid());
11417
 
11418
      case TIMESTAMP:
11419
        return new Long(getTimestamp());
11420
 
11421
      }
11422
      throw new IllegalStateException();
11423
    }
11424
 
11425
    public Object getFieldValue(int fieldId) {
11426
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11427
    }
11428
 
11429
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11430
    public boolean isSet(_Fields field) {
11431
      switch (field) {
11432
      case USERID:
11433
        return isSetUserid();
11434
      case TIMESTAMP:
11435
        return isSetTimestamp();
11436
      }
11437
      throw new IllegalStateException();
11438
    }
11439
 
11440
    public boolean isSet(int fieldID) {
11441
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11442
    }
11443
 
11444
    @Override
11445
    public boolean equals(Object that) {
11446
      if (that == null)
11447
        return false;
11448
      if (that instanceof setUserAsLoggedOut_args)
11449
        return this.equals((setUserAsLoggedOut_args)that);
11450
      return false;
11451
    }
11452
 
11453
    public boolean equals(setUserAsLoggedOut_args that) {
11454
      if (that == null)
11455
        return false;
11456
 
11457
      boolean this_present_userid = true;
11458
      boolean that_present_userid = true;
11459
      if (this_present_userid || that_present_userid) {
11460
        if (!(this_present_userid && that_present_userid))
11461
          return false;
11462
        if (this.userid != that.userid)
11463
          return false;
11464
      }
11465
 
11466
      boolean this_present_timestamp = true;
11467
      boolean that_present_timestamp = true;
11468
      if (this_present_timestamp || that_present_timestamp) {
11469
        if (!(this_present_timestamp && that_present_timestamp))
11470
          return false;
11471
        if (this.timestamp != that.timestamp)
11472
          return false;
11473
      }
11474
 
11475
      return true;
11476
    }
11477
 
11478
    @Override
11479
    public int hashCode() {
11480
      return 0;
11481
    }
11482
 
11483
    public int compareTo(setUserAsLoggedOut_args other) {
11484
      if (!getClass().equals(other.getClass())) {
11485
        return getClass().getName().compareTo(other.getClass().getName());
11486
      }
11487
 
11488
      int lastComparison = 0;
11489
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
11490
 
11491
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11492
      if (lastComparison != 0) {
11493
        return lastComparison;
11494
      }
11495
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11496
      if (lastComparison != 0) {
11497
        return lastComparison;
11498
      }
11499
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11500
      if (lastComparison != 0) {
11501
        return lastComparison;
11502
      }
11503
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11504
      if (lastComparison != 0) {
11505
        return lastComparison;
11506
      }
11507
      return 0;
11508
    }
11509
 
11510
    public void read(TProtocol iprot) throws TException {
11511
      TField field;
11512
      iprot.readStructBegin();
11513
      while (true)
11514
      {
11515
        field = iprot.readFieldBegin();
11516
        if (field.type == TType.STOP) { 
11517
          break;
11518
        }
11519
        _Fields fieldId = _Fields.findByThriftId(field.id);
11520
        if (fieldId == null) {
11521
          TProtocolUtil.skip(iprot, field.type);
11522
        } else {
11523
          switch (fieldId) {
11524
            case USERID:
11525
              if (field.type == TType.I64) {
11526
                this.userid = iprot.readI64();
11527
                setUseridIsSet(true);
11528
              } else { 
11529
                TProtocolUtil.skip(iprot, field.type);
11530
              }
11531
              break;
11532
            case TIMESTAMP:
11533
              if (field.type == TType.I64) {
11534
                this.timestamp = iprot.readI64();
11535
                setTimestampIsSet(true);
11536
              } else { 
11537
                TProtocolUtil.skip(iprot, field.type);
11538
              }
11539
              break;
11540
          }
11541
          iprot.readFieldEnd();
11542
        }
11543
      }
11544
      iprot.readStructEnd();
11545
      validate();
11546
    }
11547
 
11548
    public void write(TProtocol oprot) throws TException {
11549
      validate();
11550
 
11551
      oprot.writeStructBegin(STRUCT_DESC);
11552
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11553
      oprot.writeI64(this.userid);
11554
      oprot.writeFieldEnd();
11555
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11556
      oprot.writeI64(this.timestamp);
11557
      oprot.writeFieldEnd();
11558
      oprot.writeFieldStop();
11559
      oprot.writeStructEnd();
11560
    }
11561
 
11562
    @Override
11563
    public String toString() {
11564
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
11565
      boolean first = true;
11566
 
11567
      sb.append("userid:");
11568
      sb.append(this.userid);
11569
      first = false;
11570
      if (!first) sb.append(", ");
11571
      sb.append("timestamp:");
11572
      sb.append(this.timestamp);
11573
      first = false;
11574
      sb.append(")");
11575
      return sb.toString();
11576
    }
11577
 
11578
    public void validate() throws TException {
11579
      // check for required fields
11580
    }
11581
 
11582
  }
11583
 
11584
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11585
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
11586
 
11587
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11588
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11589
 
11590
    private boolean success;
11591
    private UserContextException ucx;
11592
 
11593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11594
    public enum _Fields implements TFieldIdEnum {
11595
      SUCCESS((short)0, "success"),
11596
      UCX((short)1, "ucx");
11597
 
11598
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11599
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11600
 
11601
      static {
11602
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11603
          byId.put((int)field._thriftId, field);
11604
          byName.put(field.getFieldName(), field);
11605
        }
11606
      }
11607
 
11608
      /**
11609
       * Find the _Fields constant that matches fieldId, or null if its not found.
11610
       */
11611
      public static _Fields findByThriftId(int fieldId) {
11612
        return byId.get(fieldId);
11613
      }
11614
 
11615
      /**
11616
       * Find the _Fields constant that matches fieldId, throwing an exception
11617
       * if it is not found.
11618
       */
11619
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11620
        _Fields fields = findByThriftId(fieldId);
11621
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11622
        return fields;
11623
      }
11624
 
11625
      /**
11626
       * Find the _Fields constant that matches name, or null if its not found.
11627
       */
11628
      public static _Fields findByName(String name) {
11629
        return byName.get(name);
11630
      }
11631
 
11632
      private final short _thriftId;
11633
      private final String _fieldName;
11634
 
11635
      _Fields(short thriftId, String fieldName) {
11636
        _thriftId = thriftId;
11637
        _fieldName = fieldName;
11638
      }
11639
 
11640
      public short getThriftFieldId() {
11641
        return _thriftId;
11642
      }
11643
 
11644
      public String getFieldName() {
11645
        return _fieldName;
11646
      }
11647
    }
11648
 
11649
    // isset id assignments
11650
    private static final int __SUCCESS_ISSET_ID = 0;
11651
    private BitSet __isset_bit_vector = new BitSet(1);
11652
 
11653
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11654
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11655
          new FieldValueMetaData(TType.BOOL)));
11656
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11657
          new FieldValueMetaData(TType.STRUCT)));
11658
    }});
11659
 
11660
    static {
11661
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
11662
    }
11663
 
11664
    public setUserAsLoggedOut_result() {
11665
    }
11666
 
11667
    public setUserAsLoggedOut_result(
11668
      boolean success,
11669
      UserContextException ucx)
11670
    {
11671
      this();
11672
      this.success = success;
11673
      setSuccessIsSet(true);
11674
      this.ucx = ucx;
11675
    }
11676
 
11677
    /**
11678
     * Performs a deep copy on <i>other</i>.
11679
     */
11680
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
11681
      __isset_bit_vector.clear();
11682
      __isset_bit_vector.or(other.__isset_bit_vector);
11683
      this.success = other.success;
11684
      if (other.isSetUcx()) {
11685
        this.ucx = new UserContextException(other.ucx);
11686
      }
11687
    }
11688
 
11689
    public setUserAsLoggedOut_result deepCopy() {
11690
      return new setUserAsLoggedOut_result(this);
11691
    }
11692
 
11693
    @Deprecated
11694
    public setUserAsLoggedOut_result clone() {
11695
      return new setUserAsLoggedOut_result(this);
11696
    }
11697
 
11698
    public boolean isSuccess() {
11699
      return this.success;
11700
    }
11701
 
11702
    public setUserAsLoggedOut_result setSuccess(boolean success) {
11703
      this.success = success;
11704
      setSuccessIsSet(true);
11705
      return this;
11706
    }
11707
 
11708
    public void unsetSuccess() {
11709
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11710
    }
11711
 
11712
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11713
    public boolean isSetSuccess() {
11714
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11715
    }
11716
 
11717
    public void setSuccessIsSet(boolean value) {
11718
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11719
    }
11720
 
11721
    public UserContextException getUcx() {
11722
      return this.ucx;
11723
    }
11724
 
11725
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
11726
      this.ucx = ucx;
11727
      return this;
11728
    }
11729
 
11730
    public void unsetUcx() {
11731
      this.ucx = null;
11732
    }
11733
 
11734
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11735
    public boolean isSetUcx() {
11736
      return this.ucx != null;
11737
    }
11738
 
11739
    public void setUcxIsSet(boolean value) {
11740
      if (!value) {
11741
        this.ucx = null;
11742
      }
11743
    }
11744
 
11745
    public void setFieldValue(_Fields field, Object value) {
11746
      switch (field) {
11747
      case SUCCESS:
11748
        if (value == null) {
11749
          unsetSuccess();
11750
        } else {
11751
          setSuccess((Boolean)value);
11752
        }
11753
        break;
11754
 
11755
      case UCX:
11756
        if (value == null) {
11757
          unsetUcx();
11758
        } else {
11759
          setUcx((UserContextException)value);
11760
        }
11761
        break;
11762
 
11763
      }
11764
    }
11765
 
11766
    public void setFieldValue(int fieldID, Object value) {
11767
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11768
    }
11769
 
11770
    public Object getFieldValue(_Fields field) {
11771
      switch (field) {
11772
      case SUCCESS:
11773
        return new Boolean(isSuccess());
11774
 
11775
      case UCX:
11776
        return getUcx();
11777
 
11778
      }
11779
      throw new IllegalStateException();
11780
    }
11781
 
11782
    public Object getFieldValue(int fieldId) {
11783
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11784
    }
11785
 
11786
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11787
    public boolean isSet(_Fields field) {
11788
      switch (field) {
11789
      case SUCCESS:
11790
        return isSetSuccess();
11791
      case UCX:
11792
        return isSetUcx();
11793
      }
11794
      throw new IllegalStateException();
11795
    }
11796
 
11797
    public boolean isSet(int fieldID) {
11798
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11799
    }
11800
 
11801
    @Override
11802
    public boolean equals(Object that) {
11803
      if (that == null)
11804
        return false;
11805
      if (that instanceof setUserAsLoggedOut_result)
11806
        return this.equals((setUserAsLoggedOut_result)that);
11807
      return false;
11808
    }
11809
 
11810
    public boolean equals(setUserAsLoggedOut_result that) {
11811
      if (that == null)
11812
        return false;
11813
 
11814
      boolean this_present_success = true;
11815
      boolean that_present_success = true;
11816
      if (this_present_success || that_present_success) {
11817
        if (!(this_present_success && that_present_success))
11818
          return false;
11819
        if (this.success != that.success)
11820
          return false;
11821
      }
11822
 
11823
      boolean this_present_ucx = true && this.isSetUcx();
11824
      boolean that_present_ucx = true && that.isSetUcx();
11825
      if (this_present_ucx || that_present_ucx) {
11826
        if (!(this_present_ucx && that_present_ucx))
11827
          return false;
11828
        if (!this.ucx.equals(that.ucx))
11829
          return false;
11830
      }
11831
 
11832
      return true;
11833
    }
11834
 
11835
    @Override
11836
    public int hashCode() {
11837
      return 0;
11838
    }
11839
 
11840
    public int compareTo(setUserAsLoggedOut_result other) {
11841
      if (!getClass().equals(other.getClass())) {
11842
        return getClass().getName().compareTo(other.getClass().getName());
11843
      }
11844
 
11845
      int lastComparison = 0;
11846
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
11847
 
11848
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11849
      if (lastComparison != 0) {
11850
        return lastComparison;
11851
      }
11852
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11853
      if (lastComparison != 0) {
11854
        return lastComparison;
11855
      }
11856
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11857
      if (lastComparison != 0) {
11858
        return lastComparison;
11859
      }
11860
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11861
      if (lastComparison != 0) {
11862
        return lastComparison;
11863
      }
11864
      return 0;
11865
    }
11866
 
11867
    public void read(TProtocol iprot) throws TException {
11868
      TField field;
11869
      iprot.readStructBegin();
11870
      while (true)
11871
      {
11872
        field = iprot.readFieldBegin();
11873
        if (field.type == TType.STOP) { 
11874
          break;
11875
        }
11876
        _Fields fieldId = _Fields.findByThriftId(field.id);
11877
        if (fieldId == null) {
11878
          TProtocolUtil.skip(iprot, field.type);
11879
        } else {
11880
          switch (fieldId) {
11881
            case SUCCESS:
11882
              if (field.type == TType.BOOL) {
11883
                this.success = iprot.readBool();
11884
                setSuccessIsSet(true);
11885
              } else { 
11886
                TProtocolUtil.skip(iprot, field.type);
11887
              }
11888
              break;
11889
            case UCX:
11890
              if (field.type == TType.STRUCT) {
11891
                this.ucx = new UserContextException();
11892
                this.ucx.read(iprot);
11893
              } else { 
11894
                TProtocolUtil.skip(iprot, field.type);
11895
              }
11896
              break;
11897
          }
11898
          iprot.readFieldEnd();
11899
        }
11900
      }
11901
      iprot.readStructEnd();
11902
      validate();
11903
    }
11904
 
11905
    public void write(TProtocol oprot) throws TException {
11906
      oprot.writeStructBegin(STRUCT_DESC);
11907
 
11908
      if (this.isSetSuccess()) {
11909
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11910
        oprot.writeBool(this.success);
11911
        oprot.writeFieldEnd();
11912
      } else if (this.isSetUcx()) {
11913
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11914
        this.ucx.write(oprot);
11915
        oprot.writeFieldEnd();
11916
      }
11917
      oprot.writeFieldStop();
11918
      oprot.writeStructEnd();
11919
    }
11920
 
11921
    @Override
11922
    public String toString() {
11923
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
11924
      boolean first = true;
11925
 
11926
      sb.append("success:");
11927
      sb.append(this.success);
11928
      first = false;
11929
      if (!first) sb.append(", ");
11930
      sb.append("ucx:");
11931
      if (this.ucx == null) {
11932
        sb.append("null");
11933
      } else {
11934
        sb.append(this.ucx);
11935
      }
11936
      first = false;
11937
      sb.append(")");
11938
      return sb.toString();
11939
    }
11940
 
11941
    public void validate() throws TException {
11942
      // check for required fields
11943
    }
11944
 
11945
  }
11946
 
506 rajveer 11947
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11948
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
11949
 
11950
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11951
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11952
 
11953
    private long userid;
11954
    private long addressId;
11955
 
11956
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11957
    public enum _Fields implements TFieldIdEnum {
11958
      USERID((short)1, "userid"),
11959
      ADDRESS_ID((short)2, "addressId");
11960
 
11961
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11962
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11963
 
11964
      static {
11965
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11966
          byId.put((int)field._thriftId, field);
11967
          byName.put(field.getFieldName(), field);
11968
        }
11969
      }
11970
 
11971
      /**
11972
       * Find the _Fields constant that matches fieldId, or null if its not found.
11973
       */
11974
      public static _Fields findByThriftId(int fieldId) {
11975
        return byId.get(fieldId);
11976
      }
11977
 
11978
      /**
11979
       * Find the _Fields constant that matches fieldId, throwing an exception
11980
       * if it is not found.
11981
       */
11982
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11983
        _Fields fields = findByThriftId(fieldId);
11984
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11985
        return fields;
11986
      }
11987
 
11988
      /**
11989
       * Find the _Fields constant that matches name, or null if its not found.
11990
       */
11991
      public static _Fields findByName(String name) {
11992
        return byName.get(name);
11993
      }
11994
 
11995
      private final short _thriftId;
11996
      private final String _fieldName;
11997
 
11998
      _Fields(short thriftId, String fieldName) {
11999
        _thriftId = thriftId;
12000
        _fieldName = fieldName;
12001
      }
12002
 
12003
      public short getThriftFieldId() {
12004
        return _thriftId;
12005
      }
12006
 
12007
      public String getFieldName() {
12008
        return _fieldName;
12009
      }
12010
    }
12011
 
12012
    // isset id assignments
12013
    private static final int __USERID_ISSET_ID = 0;
12014
    private static final int __ADDRESSID_ISSET_ID = 1;
12015
    private BitSet __isset_bit_vector = new BitSet(2);
12016
 
12017
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12018
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
12019
          new FieldValueMetaData(TType.I64)));
12020
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
12021
          new FieldValueMetaData(TType.I64)));
12022
    }});
12023
 
12024
    static {
12025
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
12026
    }
12027
 
12028
    public setDefaultAddress_args() {
12029
    }
12030
 
12031
    public setDefaultAddress_args(
12032
      long userid,
12033
      long addressId)
12034
    {
12035
      this();
12036
      this.userid = userid;
12037
      setUseridIsSet(true);
12038
      this.addressId = addressId;
12039
      setAddressIdIsSet(true);
12040
    }
12041
 
12042
    /**
12043
     * Performs a deep copy on <i>other</i>.
12044
     */
12045
    public setDefaultAddress_args(setDefaultAddress_args other) {
12046
      __isset_bit_vector.clear();
12047
      __isset_bit_vector.or(other.__isset_bit_vector);
12048
      this.userid = other.userid;
12049
      this.addressId = other.addressId;
12050
    }
12051
 
12052
    public setDefaultAddress_args deepCopy() {
12053
      return new setDefaultAddress_args(this);
12054
    }
12055
 
12056
    @Deprecated
12057
    public setDefaultAddress_args clone() {
12058
      return new setDefaultAddress_args(this);
12059
    }
12060
 
12061
    public long getUserid() {
12062
      return this.userid;
12063
    }
12064
 
12065
    public setDefaultAddress_args setUserid(long userid) {
12066
      this.userid = userid;
12067
      setUseridIsSet(true);
12068
      return this;
12069
    }
12070
 
12071
    public void unsetUserid() {
12072
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12073
    }
12074
 
12075
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12076
    public boolean isSetUserid() {
12077
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12078
    }
12079
 
12080
    public void setUseridIsSet(boolean value) {
12081
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12082
    }
12083
 
12084
    public long getAddressId() {
12085
      return this.addressId;
12086
    }
12087
 
12088
    public setDefaultAddress_args setAddressId(long addressId) {
12089
      this.addressId = addressId;
12090
      setAddressIdIsSet(true);
12091
      return this;
12092
    }
12093
 
12094
    public void unsetAddressId() {
12095
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
12096
    }
12097
 
12098
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
12099
    public boolean isSetAddressId() {
12100
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
12101
    }
12102
 
12103
    public void setAddressIdIsSet(boolean value) {
12104
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
12105
    }
12106
 
12107
    public void setFieldValue(_Fields field, Object value) {
12108
      switch (field) {
12109
      case USERID:
12110
        if (value == null) {
12111
          unsetUserid();
12112
        } else {
12113
          setUserid((Long)value);
12114
        }
12115
        break;
12116
 
12117
      case ADDRESS_ID:
12118
        if (value == null) {
12119
          unsetAddressId();
12120
        } else {
12121
          setAddressId((Long)value);
12122
        }
12123
        break;
12124
 
12125
      }
12126
    }
12127
 
12128
    public void setFieldValue(int fieldID, Object value) {
12129
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12130
    }
12131
 
12132
    public Object getFieldValue(_Fields field) {
12133
      switch (field) {
12134
      case USERID:
12135
        return new Long(getUserid());
12136
 
12137
      case ADDRESS_ID:
12138
        return new Long(getAddressId());
12139
 
12140
      }
12141
      throw new IllegalStateException();
12142
    }
12143
 
12144
    public Object getFieldValue(int fieldId) {
12145
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12146
    }
12147
 
12148
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12149
    public boolean isSet(_Fields field) {
12150
      switch (field) {
12151
      case USERID:
12152
        return isSetUserid();
12153
      case ADDRESS_ID:
12154
        return isSetAddressId();
12155
      }
12156
      throw new IllegalStateException();
12157
    }
12158
 
12159
    public boolean isSet(int fieldID) {
12160
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12161
    }
12162
 
12163
    @Override
12164
    public boolean equals(Object that) {
12165
      if (that == null)
12166
        return false;
12167
      if (that instanceof setDefaultAddress_args)
12168
        return this.equals((setDefaultAddress_args)that);
12169
      return false;
12170
    }
12171
 
12172
    public boolean equals(setDefaultAddress_args that) {
12173
      if (that == null)
12174
        return false;
12175
 
12176
      boolean this_present_userid = true;
12177
      boolean that_present_userid = true;
12178
      if (this_present_userid || that_present_userid) {
12179
        if (!(this_present_userid && that_present_userid))
12180
          return false;
12181
        if (this.userid != that.userid)
12182
          return false;
12183
      }
12184
 
12185
      boolean this_present_addressId = true;
12186
      boolean that_present_addressId = true;
12187
      if (this_present_addressId || that_present_addressId) {
12188
        if (!(this_present_addressId && that_present_addressId))
12189
          return false;
12190
        if (this.addressId != that.addressId)
12191
          return false;
12192
      }
12193
 
12194
      return true;
12195
    }
12196
 
12197
    @Override
12198
    public int hashCode() {
12199
      return 0;
12200
    }
12201
 
12202
    public int compareTo(setDefaultAddress_args other) {
12203
      if (!getClass().equals(other.getClass())) {
12204
        return getClass().getName().compareTo(other.getClass().getName());
12205
      }
12206
 
12207
      int lastComparison = 0;
12208
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
12209
 
12210
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12211
      if (lastComparison != 0) {
12212
        return lastComparison;
12213
      }
12214
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12215
      if (lastComparison != 0) {
12216
        return lastComparison;
12217
      }
12218
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
12219
      if (lastComparison != 0) {
12220
        return lastComparison;
12221
      }
12222
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
12223
      if (lastComparison != 0) {
12224
        return lastComparison;
12225
      }
12226
      return 0;
12227
    }
12228
 
12229
    public void read(TProtocol iprot) throws TException {
12230
      TField field;
12231
      iprot.readStructBegin();
12232
      while (true)
12233
      {
12234
        field = iprot.readFieldBegin();
12235
        if (field.type == TType.STOP) { 
12236
          break;
12237
        }
12238
        _Fields fieldId = _Fields.findByThriftId(field.id);
12239
        if (fieldId == null) {
12240
          TProtocolUtil.skip(iprot, field.type);
12241
        } else {
12242
          switch (fieldId) {
12243
            case USERID:
12244
              if (field.type == TType.I64) {
12245
                this.userid = iprot.readI64();
12246
                setUseridIsSet(true);
12247
              } else { 
12248
                TProtocolUtil.skip(iprot, field.type);
12249
              }
12250
              break;
12251
            case ADDRESS_ID:
12252
              if (field.type == TType.I64) {
12253
                this.addressId = iprot.readI64();
12254
                setAddressIdIsSet(true);
12255
              } else { 
12256
                TProtocolUtil.skip(iprot, field.type);
12257
              }
12258
              break;
12259
          }
12260
          iprot.readFieldEnd();
12261
        }
12262
      }
12263
      iprot.readStructEnd();
12264
      validate();
12265
    }
12266
 
12267
    public void write(TProtocol oprot) throws TException {
12268
      validate();
12269
 
12270
      oprot.writeStructBegin(STRUCT_DESC);
12271
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12272
      oprot.writeI64(this.userid);
12273
      oprot.writeFieldEnd();
12274
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
12275
      oprot.writeI64(this.addressId);
12276
      oprot.writeFieldEnd();
12277
      oprot.writeFieldStop();
12278
      oprot.writeStructEnd();
12279
    }
12280
 
12281
    @Override
12282
    public String toString() {
12283
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
12284
      boolean first = true;
12285
 
12286
      sb.append("userid:");
12287
      sb.append(this.userid);
12288
      first = false;
12289
      if (!first) sb.append(", ");
12290
      sb.append("addressId:");
12291
      sb.append(this.addressId);
12292
      first = false;
12293
      sb.append(")");
12294
      return sb.toString();
12295
    }
12296
 
12297
    public void validate() throws TException {
12298
      // check for required fields
12299
    }
12300
 
12301
  }
12302
 
12303
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
12304
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
12305
 
12306
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12307
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12308
 
12309
    private boolean success;
12310
    private UserContextException ucx;
12311
 
12312
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12313
    public enum _Fields implements TFieldIdEnum {
12314
      SUCCESS((short)0, "success"),
12315
      UCX((short)1, "ucx");
12316
 
12317
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12318
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12319
 
12320
      static {
12321
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12322
          byId.put((int)field._thriftId, field);
12323
          byName.put(field.getFieldName(), field);
12324
        }
12325
      }
12326
 
12327
      /**
12328
       * Find the _Fields constant that matches fieldId, or null if its not found.
12329
       */
12330
      public static _Fields findByThriftId(int fieldId) {
12331
        return byId.get(fieldId);
12332
      }
12333
 
12334
      /**
12335
       * Find the _Fields constant that matches fieldId, throwing an exception
12336
       * if it is not found.
12337
       */
12338
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12339
        _Fields fields = findByThriftId(fieldId);
12340
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12341
        return fields;
12342
      }
12343
 
12344
      /**
12345
       * Find the _Fields constant that matches name, or null if its not found.
12346
       */
12347
      public static _Fields findByName(String name) {
12348
        return byName.get(name);
12349
      }
12350
 
12351
      private final short _thriftId;
12352
      private final String _fieldName;
12353
 
12354
      _Fields(short thriftId, String fieldName) {
12355
        _thriftId = thriftId;
12356
        _fieldName = fieldName;
12357
      }
12358
 
12359
      public short getThriftFieldId() {
12360
        return _thriftId;
12361
      }
12362
 
12363
      public String getFieldName() {
12364
        return _fieldName;
12365
      }
12366
    }
12367
 
12368
    // isset id assignments
12369
    private static final int __SUCCESS_ISSET_ID = 0;
12370
    private BitSet __isset_bit_vector = new BitSet(1);
12371
 
12372
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12373
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12374
          new FieldValueMetaData(TType.BOOL)));
12375
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12376
          new FieldValueMetaData(TType.STRUCT)));
12377
    }});
12378
 
12379
    static {
12380
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
12381
    }
12382
 
12383
    public setDefaultAddress_result() {
12384
    }
12385
 
12386
    public setDefaultAddress_result(
12387
      boolean success,
12388
      UserContextException ucx)
12389
    {
12390
      this();
12391
      this.success = success;
12392
      setSuccessIsSet(true);
12393
      this.ucx = ucx;
12394
    }
12395
 
12396
    /**
12397
     * Performs a deep copy on <i>other</i>.
12398
     */
12399
    public setDefaultAddress_result(setDefaultAddress_result other) {
12400
      __isset_bit_vector.clear();
12401
      __isset_bit_vector.or(other.__isset_bit_vector);
12402
      this.success = other.success;
12403
      if (other.isSetUcx()) {
12404
        this.ucx = new UserContextException(other.ucx);
12405
      }
12406
    }
12407
 
12408
    public setDefaultAddress_result deepCopy() {
12409
      return new setDefaultAddress_result(this);
12410
    }
12411
 
12412
    @Deprecated
12413
    public setDefaultAddress_result clone() {
12414
      return new setDefaultAddress_result(this);
12415
    }
12416
 
12417
    public boolean isSuccess() {
12418
      return this.success;
12419
    }
12420
 
12421
    public setDefaultAddress_result setSuccess(boolean success) {
12422
      this.success = success;
12423
      setSuccessIsSet(true);
12424
      return this;
12425
    }
12426
 
12427
    public void unsetSuccess() {
12428
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12429
    }
12430
 
12431
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12432
    public boolean isSetSuccess() {
12433
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12434
    }
12435
 
12436
    public void setSuccessIsSet(boolean value) {
12437
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12438
    }
12439
 
12440
    public UserContextException getUcx() {
12441
      return this.ucx;
12442
    }
12443
 
12444
    public setDefaultAddress_result setUcx(UserContextException ucx) {
12445
      this.ucx = ucx;
12446
      return this;
12447
    }
12448
 
12449
    public void unsetUcx() {
12450
      this.ucx = null;
12451
    }
12452
 
12453
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12454
    public boolean isSetUcx() {
12455
      return this.ucx != null;
12456
    }
12457
 
12458
    public void setUcxIsSet(boolean value) {
12459
      if (!value) {
12460
        this.ucx = null;
12461
      }
12462
    }
12463
 
12464
    public void setFieldValue(_Fields field, Object value) {
12465
      switch (field) {
12466
      case SUCCESS:
12467
        if (value == null) {
12468
          unsetSuccess();
12469
        } else {
12470
          setSuccess((Boolean)value);
12471
        }
12472
        break;
12473
 
12474
      case UCX:
12475
        if (value == null) {
12476
          unsetUcx();
12477
        } else {
12478
          setUcx((UserContextException)value);
12479
        }
12480
        break;
12481
 
12482
      }
12483
    }
12484
 
12485
    public void setFieldValue(int fieldID, Object value) {
12486
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12487
    }
12488
 
12489
    public Object getFieldValue(_Fields field) {
12490
      switch (field) {
12491
      case SUCCESS:
12492
        return new Boolean(isSuccess());
12493
 
12494
      case UCX:
12495
        return getUcx();
12496
 
12497
      }
12498
      throw new IllegalStateException();
12499
    }
12500
 
12501
    public Object getFieldValue(int fieldId) {
12502
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12503
    }
12504
 
12505
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12506
    public boolean isSet(_Fields field) {
12507
      switch (field) {
12508
      case SUCCESS:
12509
        return isSetSuccess();
12510
      case UCX:
12511
        return isSetUcx();
12512
      }
12513
      throw new IllegalStateException();
12514
    }
12515
 
12516
    public boolean isSet(int fieldID) {
12517
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12518
    }
12519
 
12520
    @Override
12521
    public boolean equals(Object that) {
12522
      if (that == null)
12523
        return false;
12524
      if (that instanceof setDefaultAddress_result)
12525
        return this.equals((setDefaultAddress_result)that);
12526
      return false;
12527
    }
12528
 
12529
    public boolean equals(setDefaultAddress_result that) {
12530
      if (that == null)
12531
        return false;
12532
 
12533
      boolean this_present_success = true;
12534
      boolean that_present_success = true;
12535
      if (this_present_success || that_present_success) {
12536
        if (!(this_present_success && that_present_success))
12537
          return false;
12538
        if (this.success != that.success)
12539
          return false;
12540
      }
12541
 
12542
      boolean this_present_ucx = true && this.isSetUcx();
12543
      boolean that_present_ucx = true && that.isSetUcx();
12544
      if (this_present_ucx || that_present_ucx) {
12545
        if (!(this_present_ucx && that_present_ucx))
12546
          return false;
12547
        if (!this.ucx.equals(that.ucx))
12548
          return false;
12549
      }
12550
 
12551
      return true;
12552
    }
12553
 
12554
    @Override
12555
    public int hashCode() {
12556
      return 0;
12557
    }
12558
 
12559
    public int compareTo(setDefaultAddress_result other) {
12560
      if (!getClass().equals(other.getClass())) {
12561
        return getClass().getName().compareTo(other.getClass().getName());
12562
      }
12563
 
12564
      int lastComparison = 0;
12565
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
12566
 
12567
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12568
      if (lastComparison != 0) {
12569
        return lastComparison;
12570
      }
12571
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12572
      if (lastComparison != 0) {
12573
        return lastComparison;
12574
      }
12575
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12576
      if (lastComparison != 0) {
12577
        return lastComparison;
12578
      }
12579
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12580
      if (lastComparison != 0) {
12581
        return lastComparison;
12582
      }
12583
      return 0;
12584
    }
12585
 
12586
    public void read(TProtocol iprot) throws TException {
12587
      TField field;
12588
      iprot.readStructBegin();
12589
      while (true)
12590
      {
12591
        field = iprot.readFieldBegin();
12592
        if (field.type == TType.STOP) { 
12593
          break;
12594
        }
12595
        _Fields fieldId = _Fields.findByThriftId(field.id);
12596
        if (fieldId == null) {
12597
          TProtocolUtil.skip(iprot, field.type);
12598
        } else {
12599
          switch (fieldId) {
12600
            case SUCCESS:
12601
              if (field.type == TType.BOOL) {
12602
                this.success = iprot.readBool();
12603
                setSuccessIsSet(true);
12604
              } else { 
12605
                TProtocolUtil.skip(iprot, field.type);
12606
              }
12607
              break;
12608
            case UCX:
12609
              if (field.type == TType.STRUCT) {
12610
                this.ucx = new UserContextException();
12611
                this.ucx.read(iprot);
12612
              } else { 
12613
                TProtocolUtil.skip(iprot, field.type);
12614
              }
12615
              break;
12616
          }
12617
          iprot.readFieldEnd();
12618
        }
12619
      }
12620
      iprot.readStructEnd();
12621
      validate();
12622
    }
12623
 
12624
    public void write(TProtocol oprot) throws TException {
12625
      oprot.writeStructBegin(STRUCT_DESC);
12626
 
12627
      if (this.isSetSuccess()) {
12628
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12629
        oprot.writeBool(this.success);
12630
        oprot.writeFieldEnd();
12631
      } else if (this.isSetUcx()) {
12632
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12633
        this.ucx.write(oprot);
12634
        oprot.writeFieldEnd();
12635
      }
12636
      oprot.writeFieldStop();
12637
      oprot.writeStructEnd();
12638
    }
12639
 
12640
    @Override
12641
    public String toString() {
12642
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
12643
      boolean first = true;
12644
 
12645
      sb.append("success:");
12646
      sb.append(this.success);
12647
      first = false;
12648
      if (!first) sb.append(", ");
12649
      sb.append("ucx:");
12650
      if (this.ucx == null) {
12651
        sb.append("null");
12652
      } else {
12653
        sb.append(this.ucx);
12654
      }
12655
      first = false;
12656
      sb.append(")");
12657
      return sb.toString();
12658
    }
12659
 
12660
    public void validate() throws TException {
12661
      // check for required fields
12662
    }
12663
 
12664
  }
12665
 
48 ashish 12666
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12667
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
12668
 
12669
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
12670
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
12671
 
12672
    private long userid;
12673
    private String password;
12674
 
12675
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12676
    public enum _Fields implements TFieldIdEnum {
12677
      USERID((short)1, "userid"),
12678
      PASSWORD((short)2, "password");
12679
 
12680
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12681
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12682
 
12683
      static {
12684
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12685
          byId.put((int)field._thriftId, field);
12686
          byName.put(field.getFieldName(), field);
12687
        }
12688
      }
12689
 
12690
      /**
12691
       * Find the _Fields constant that matches fieldId, or null if its not found.
12692
       */
12693
      public static _Fields findByThriftId(int fieldId) {
12694
        return byId.get(fieldId);
12695
      }
12696
 
12697
      /**
12698
       * Find the _Fields constant that matches fieldId, throwing an exception
12699
       * if it is not found.
12700
       */
12701
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12702
        _Fields fields = findByThriftId(fieldId);
12703
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12704
        return fields;
12705
      }
12706
 
12707
      /**
12708
       * Find the _Fields constant that matches name, or null if its not found.
12709
       */
12710
      public static _Fields findByName(String name) {
12711
        return byName.get(name);
12712
      }
12713
 
12714
      private final short _thriftId;
12715
      private final String _fieldName;
12716
 
12717
      _Fields(short thriftId, String fieldName) {
12718
        _thriftId = thriftId;
12719
        _fieldName = fieldName;
12720
      }
12721
 
12722
      public short getThriftFieldId() {
12723
        return _thriftId;
12724
      }
12725
 
12726
      public String getFieldName() {
12727
        return _fieldName;
12728
      }
12729
    }
12730
 
12731
    // isset id assignments
12732
    private static final int __USERID_ISSET_ID = 0;
12733
    private BitSet __isset_bit_vector = new BitSet(1);
12734
 
12735
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12736
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
12737
          new FieldValueMetaData(TType.I64)));
12738
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
12739
          new FieldValueMetaData(TType.STRING)));
12740
    }});
12741
 
12742
    static {
12743
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
12744
    }
12745
 
12746
    public updatePassword_args() {
12747
    }
12748
 
12749
    public updatePassword_args(
12750
      long userid,
12751
      String password)
12752
    {
12753
      this();
12754
      this.userid = userid;
12755
      setUseridIsSet(true);
12756
      this.password = password;
12757
    }
12758
 
12759
    /**
12760
     * Performs a deep copy on <i>other</i>.
12761
     */
12762
    public updatePassword_args(updatePassword_args other) {
12763
      __isset_bit_vector.clear();
12764
      __isset_bit_vector.or(other.__isset_bit_vector);
12765
      this.userid = other.userid;
12766
      if (other.isSetPassword()) {
12767
        this.password = other.password;
12768
      }
12769
    }
12770
 
12771
    public updatePassword_args deepCopy() {
12772
      return new updatePassword_args(this);
12773
    }
12774
 
12775
    @Deprecated
12776
    public updatePassword_args clone() {
12777
      return new updatePassword_args(this);
12778
    }
12779
 
12780
    public long getUserid() {
12781
      return this.userid;
12782
    }
12783
 
12784
    public updatePassword_args setUserid(long userid) {
12785
      this.userid = userid;
12786
      setUseridIsSet(true);
12787
      return this;
12788
    }
12789
 
12790
    public void unsetUserid() {
12791
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12792
    }
12793
 
12794
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12795
    public boolean isSetUserid() {
12796
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12797
    }
12798
 
12799
    public void setUseridIsSet(boolean value) {
12800
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12801
    }
12802
 
12803
    public String getPassword() {
12804
      return this.password;
12805
    }
12806
 
12807
    public updatePassword_args setPassword(String password) {
12808
      this.password = password;
12809
      return this;
12810
    }
12811
 
12812
    public void unsetPassword() {
12813
      this.password = null;
12814
    }
12815
 
12816
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
12817
    public boolean isSetPassword() {
12818
      return this.password != null;
12819
    }
12820
 
12821
    public void setPasswordIsSet(boolean value) {
12822
      if (!value) {
12823
        this.password = null;
12824
      }
12825
    }
12826
 
12827
    public void setFieldValue(_Fields field, Object value) {
12828
      switch (field) {
12829
      case USERID:
12830
        if (value == null) {
12831
          unsetUserid();
12832
        } else {
12833
          setUserid((Long)value);
12834
        }
12835
        break;
12836
 
12837
      case PASSWORD:
12838
        if (value == null) {
12839
          unsetPassword();
12840
        } else {
12841
          setPassword((String)value);
12842
        }
12843
        break;
12844
 
12845
      }
12846
    }
12847
 
12848
    public void setFieldValue(int fieldID, Object value) {
12849
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12850
    }
12851
 
12852
    public Object getFieldValue(_Fields field) {
12853
      switch (field) {
12854
      case USERID:
12855
        return new Long(getUserid());
12856
 
12857
      case PASSWORD:
12858
        return getPassword();
12859
 
12860
      }
12861
      throw new IllegalStateException();
12862
    }
12863
 
12864
    public Object getFieldValue(int fieldId) {
12865
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12866
    }
12867
 
12868
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12869
    public boolean isSet(_Fields field) {
12870
      switch (field) {
12871
      case USERID:
12872
        return isSetUserid();
12873
      case PASSWORD:
12874
        return isSetPassword();
12875
      }
12876
      throw new IllegalStateException();
12877
    }
12878
 
12879
    public boolean isSet(int fieldID) {
12880
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12881
    }
12882
 
12883
    @Override
12884
    public boolean equals(Object that) {
12885
      if (that == null)
12886
        return false;
12887
      if (that instanceof updatePassword_args)
12888
        return this.equals((updatePassword_args)that);
12889
      return false;
12890
    }
12891
 
12892
    public boolean equals(updatePassword_args that) {
12893
      if (that == null)
12894
        return false;
12895
 
12896
      boolean this_present_userid = true;
12897
      boolean that_present_userid = true;
12898
      if (this_present_userid || that_present_userid) {
12899
        if (!(this_present_userid && that_present_userid))
12900
          return false;
12901
        if (this.userid != that.userid)
12902
          return false;
12903
      }
12904
 
12905
      boolean this_present_password = true && this.isSetPassword();
12906
      boolean that_present_password = true && that.isSetPassword();
12907
      if (this_present_password || that_present_password) {
12908
        if (!(this_present_password && that_present_password))
12909
          return false;
12910
        if (!this.password.equals(that.password))
12911
          return false;
12912
      }
12913
 
12914
      return true;
12915
    }
12916
 
12917
    @Override
12918
    public int hashCode() {
12919
      return 0;
12920
    }
12921
 
12922
    public int compareTo(updatePassword_args other) {
12923
      if (!getClass().equals(other.getClass())) {
12924
        return getClass().getName().compareTo(other.getClass().getName());
12925
      }
12926
 
12927
      int lastComparison = 0;
12928
      updatePassword_args typedOther = (updatePassword_args)other;
12929
 
12930
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12931
      if (lastComparison != 0) {
12932
        return lastComparison;
12933
      }
12934
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12935
      if (lastComparison != 0) {
12936
        return lastComparison;
12937
      }
12938
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
12939
      if (lastComparison != 0) {
12940
        return lastComparison;
12941
      }
12942
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
12943
      if (lastComparison != 0) {
12944
        return lastComparison;
12945
      }
12946
      return 0;
12947
    }
12948
 
12949
    public void read(TProtocol iprot) throws TException {
12950
      TField field;
12951
      iprot.readStructBegin();
12952
      while (true)
12953
      {
12954
        field = iprot.readFieldBegin();
12955
        if (field.type == TType.STOP) { 
12956
          break;
12957
        }
12958
        _Fields fieldId = _Fields.findByThriftId(field.id);
12959
        if (fieldId == null) {
12960
          TProtocolUtil.skip(iprot, field.type);
12961
        } else {
12962
          switch (fieldId) {
12963
            case USERID:
12964
              if (field.type == TType.I64) {
12965
                this.userid = iprot.readI64();
12966
                setUseridIsSet(true);
12967
              } else { 
12968
                TProtocolUtil.skip(iprot, field.type);
12969
              }
12970
              break;
12971
            case PASSWORD:
12972
              if (field.type == TType.STRING) {
12973
                this.password = iprot.readString();
12974
              } else { 
12975
                TProtocolUtil.skip(iprot, field.type);
12976
              }
12977
              break;
12978
          }
12979
          iprot.readFieldEnd();
12980
        }
12981
      }
12982
      iprot.readStructEnd();
12983
      validate();
12984
    }
12985
 
12986
    public void write(TProtocol oprot) throws TException {
12987
      validate();
12988
 
12989
      oprot.writeStructBegin(STRUCT_DESC);
12990
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12991
      oprot.writeI64(this.userid);
12992
      oprot.writeFieldEnd();
12993
      if (this.password != null) {
12994
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
12995
        oprot.writeString(this.password);
12996
        oprot.writeFieldEnd();
12997
      }
12998
      oprot.writeFieldStop();
12999
      oprot.writeStructEnd();
13000
    }
13001
 
13002
    @Override
13003
    public String toString() {
13004
      StringBuilder sb = new StringBuilder("updatePassword_args(");
13005
      boolean first = true;
13006
 
13007
      sb.append("userid:");
13008
      sb.append(this.userid);
13009
      first = false;
13010
      if (!first) sb.append(", ");
13011
      sb.append("password:");
13012
      if (this.password == null) {
13013
        sb.append("null");
13014
      } else {
13015
        sb.append(this.password);
13016
      }
13017
      first = false;
13018
      sb.append(")");
13019
      return sb.toString();
13020
    }
13021
 
13022
    public void validate() throws TException {
13023
      // check for required fields
13024
    }
13025
 
13026
  }
13027
 
13028
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
13029
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
13030
 
13031
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13032
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13033
 
13034
    private boolean success;
13035
    private UserContextException ucx;
13036
 
13037
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13038
    public enum _Fields implements TFieldIdEnum {
13039
      SUCCESS((short)0, "success"),
13040
      UCX((short)1, "ucx");
13041
 
13042
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13044
 
13045
      static {
13046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13047
          byId.put((int)field._thriftId, field);
13048
          byName.put(field.getFieldName(), field);
13049
        }
13050
      }
13051
 
13052
      /**
13053
       * Find the _Fields constant that matches fieldId, or null if its not found.
13054
       */
13055
      public static _Fields findByThriftId(int fieldId) {
13056
        return byId.get(fieldId);
13057
      }
13058
 
13059
      /**
13060
       * Find the _Fields constant that matches fieldId, throwing an exception
13061
       * if it is not found.
13062
       */
13063
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13064
        _Fields fields = findByThriftId(fieldId);
13065
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13066
        return fields;
13067
      }
13068
 
13069
      /**
13070
       * Find the _Fields constant that matches name, or null if its not found.
13071
       */
13072
      public static _Fields findByName(String name) {
13073
        return byName.get(name);
13074
      }
13075
 
13076
      private final short _thriftId;
13077
      private final String _fieldName;
13078
 
13079
      _Fields(short thriftId, String fieldName) {
13080
        _thriftId = thriftId;
13081
        _fieldName = fieldName;
13082
      }
13083
 
13084
      public short getThriftFieldId() {
13085
        return _thriftId;
13086
      }
13087
 
13088
      public String getFieldName() {
13089
        return _fieldName;
13090
      }
13091
    }
13092
 
13093
    // isset id assignments
13094
    private static final int __SUCCESS_ISSET_ID = 0;
13095
    private BitSet __isset_bit_vector = new BitSet(1);
13096
 
13097
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13098
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13099
          new FieldValueMetaData(TType.BOOL)));
13100
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13101
          new FieldValueMetaData(TType.STRUCT)));
13102
    }});
13103
 
13104
    static {
13105
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
13106
    }
13107
 
13108
    public updatePassword_result() {
13109
    }
13110
 
13111
    public updatePassword_result(
13112
      boolean success,
13113
      UserContextException ucx)
13114
    {
13115
      this();
13116
      this.success = success;
13117
      setSuccessIsSet(true);
13118
      this.ucx = ucx;
13119
    }
13120
 
13121
    /**
13122
     * Performs a deep copy on <i>other</i>.
13123
     */
13124
    public updatePassword_result(updatePassword_result other) {
13125
      __isset_bit_vector.clear();
13126
      __isset_bit_vector.or(other.__isset_bit_vector);
13127
      this.success = other.success;
13128
      if (other.isSetUcx()) {
13129
        this.ucx = new UserContextException(other.ucx);
13130
      }
13131
    }
13132
 
13133
    public updatePassword_result deepCopy() {
13134
      return new updatePassword_result(this);
13135
    }
13136
 
13137
    @Deprecated
13138
    public updatePassword_result clone() {
13139
      return new updatePassword_result(this);
13140
    }
13141
 
13142
    public boolean isSuccess() {
13143
      return this.success;
13144
    }
13145
 
13146
    public updatePassword_result setSuccess(boolean success) {
13147
      this.success = success;
13148
      setSuccessIsSet(true);
13149
      return this;
13150
    }
13151
 
13152
    public void unsetSuccess() {
13153
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13154
    }
13155
 
13156
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13157
    public boolean isSetSuccess() {
13158
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13159
    }
13160
 
13161
    public void setSuccessIsSet(boolean value) {
13162
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13163
    }
13164
 
13165
    public UserContextException getUcx() {
13166
      return this.ucx;
13167
    }
13168
 
13169
    public updatePassword_result setUcx(UserContextException ucx) {
13170
      this.ucx = ucx;
13171
      return this;
13172
    }
13173
 
13174
    public void unsetUcx() {
13175
      this.ucx = null;
13176
    }
13177
 
13178
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13179
    public boolean isSetUcx() {
13180
      return this.ucx != null;
13181
    }
13182
 
13183
    public void setUcxIsSet(boolean value) {
13184
      if (!value) {
13185
        this.ucx = null;
13186
      }
13187
    }
13188
 
13189
    public void setFieldValue(_Fields field, Object value) {
13190
      switch (field) {
13191
      case SUCCESS:
13192
        if (value == null) {
13193
          unsetSuccess();
13194
        } else {
13195
          setSuccess((Boolean)value);
13196
        }
13197
        break;
13198
 
13199
      case UCX:
13200
        if (value == null) {
13201
          unsetUcx();
13202
        } else {
13203
          setUcx((UserContextException)value);
13204
        }
13205
        break;
13206
 
13207
      }
13208
    }
13209
 
13210
    public void setFieldValue(int fieldID, Object value) {
13211
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13212
    }
13213
 
13214
    public Object getFieldValue(_Fields field) {
13215
      switch (field) {
13216
      case SUCCESS:
13217
        return new Boolean(isSuccess());
13218
 
13219
      case UCX:
13220
        return getUcx();
13221
 
13222
      }
13223
      throw new IllegalStateException();
13224
    }
13225
 
13226
    public Object getFieldValue(int fieldId) {
13227
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13228
    }
13229
 
13230
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13231
    public boolean isSet(_Fields field) {
13232
      switch (field) {
13233
      case SUCCESS:
13234
        return isSetSuccess();
13235
      case UCX:
13236
        return isSetUcx();
13237
      }
13238
      throw new IllegalStateException();
13239
    }
13240
 
13241
    public boolean isSet(int fieldID) {
13242
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13243
    }
13244
 
13245
    @Override
13246
    public boolean equals(Object that) {
13247
      if (that == null)
13248
        return false;
13249
      if (that instanceof updatePassword_result)
13250
        return this.equals((updatePassword_result)that);
13251
      return false;
13252
    }
13253
 
13254
    public boolean equals(updatePassword_result that) {
13255
      if (that == null)
13256
        return false;
13257
 
13258
      boolean this_present_success = true;
13259
      boolean that_present_success = true;
13260
      if (this_present_success || that_present_success) {
13261
        if (!(this_present_success && that_present_success))
13262
          return false;
13263
        if (this.success != that.success)
13264
          return false;
13265
      }
13266
 
13267
      boolean this_present_ucx = true && this.isSetUcx();
13268
      boolean that_present_ucx = true && that.isSetUcx();
13269
      if (this_present_ucx || that_present_ucx) {
13270
        if (!(this_present_ucx && that_present_ucx))
13271
          return false;
13272
        if (!this.ucx.equals(that.ucx))
13273
          return false;
13274
      }
13275
 
13276
      return true;
13277
    }
13278
 
13279
    @Override
13280
    public int hashCode() {
13281
      return 0;
13282
    }
13283
 
13284
    public int compareTo(updatePassword_result other) {
13285
      if (!getClass().equals(other.getClass())) {
13286
        return getClass().getName().compareTo(other.getClass().getName());
13287
      }
13288
 
13289
      int lastComparison = 0;
13290
      updatePassword_result typedOther = (updatePassword_result)other;
13291
 
13292
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13293
      if (lastComparison != 0) {
13294
        return lastComparison;
13295
      }
13296
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13297
      if (lastComparison != 0) {
13298
        return lastComparison;
13299
      }
13300
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13301
      if (lastComparison != 0) {
13302
        return lastComparison;
13303
      }
13304
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13305
      if (lastComparison != 0) {
13306
        return lastComparison;
13307
      }
13308
      return 0;
13309
    }
13310
 
13311
    public void read(TProtocol iprot) throws TException {
13312
      TField field;
13313
      iprot.readStructBegin();
13314
      while (true)
13315
      {
13316
        field = iprot.readFieldBegin();
13317
        if (field.type == TType.STOP) { 
13318
          break;
13319
        }
13320
        _Fields fieldId = _Fields.findByThriftId(field.id);
13321
        if (fieldId == null) {
13322
          TProtocolUtil.skip(iprot, field.type);
13323
        } else {
13324
          switch (fieldId) {
13325
            case SUCCESS:
13326
              if (field.type == TType.BOOL) {
13327
                this.success = iprot.readBool();
13328
                setSuccessIsSet(true);
13329
              } else { 
13330
                TProtocolUtil.skip(iprot, field.type);
13331
              }
13332
              break;
13333
            case UCX:
13334
              if (field.type == TType.STRUCT) {
13335
                this.ucx = new UserContextException();
13336
                this.ucx.read(iprot);
13337
              } else { 
13338
                TProtocolUtil.skip(iprot, field.type);
13339
              }
13340
              break;
13341
          }
13342
          iprot.readFieldEnd();
13343
        }
13344
      }
13345
      iprot.readStructEnd();
13346
      validate();
13347
    }
13348
 
13349
    public void write(TProtocol oprot) throws TException {
13350
      oprot.writeStructBegin(STRUCT_DESC);
13351
 
13352
      if (this.isSetSuccess()) {
13353
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13354
        oprot.writeBool(this.success);
13355
        oprot.writeFieldEnd();
13356
      } else if (this.isSetUcx()) {
13357
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13358
        this.ucx.write(oprot);
13359
        oprot.writeFieldEnd();
13360
      }
13361
      oprot.writeFieldStop();
13362
      oprot.writeStructEnd();
13363
    }
13364
 
13365
    @Override
13366
    public String toString() {
13367
      StringBuilder sb = new StringBuilder("updatePassword_result(");
13368
      boolean first = true;
13369
 
13370
      sb.append("success:");
13371
      sb.append(this.success);
13372
      first = false;
13373
      if (!first) sb.append(", ");
13374
      sb.append("ucx:");
13375
      if (this.ucx == null) {
13376
        sb.append("null");
13377
      } else {
13378
        sb.append(this.ucx);
13379
      }
13380
      first = false;
13381
      sb.append(")");
13382
      return sb.toString();
13383
    }
13384
 
13385
    public void validate() throws TException {
13386
      // check for required fields
13387
    }
13388
 
13389
  }
13390
 
13391
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
13392
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
13393
 
13394
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
123 ashish 13395
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
48 ashish 13396
 
13397
    private long userid;
123 ashish 13398
    private boolean isSessionId;
48 ashish 13399
 
13400
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13401
    public enum _Fields implements TFieldIdEnum {
123 ashish 13402
      USERID((short)1, "userid"),
13403
      IS_SESSION_ID((short)2, "isSessionId");
48 ashish 13404
 
13405
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13406
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13407
 
13408
      static {
13409
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13410
          byId.put((int)field._thriftId, field);
13411
          byName.put(field.getFieldName(), field);
13412
        }
13413
      }
13414
 
13415
      /**
13416
       * Find the _Fields constant that matches fieldId, or null if its not found.
13417
       */
13418
      public static _Fields findByThriftId(int fieldId) {
13419
        return byId.get(fieldId);
13420
      }
13421
 
13422
      /**
13423
       * Find the _Fields constant that matches fieldId, throwing an exception
13424
       * if it is not found.
13425
       */
13426
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13427
        _Fields fields = findByThriftId(fieldId);
13428
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13429
        return fields;
13430
      }
13431
 
13432
      /**
13433
       * Find the _Fields constant that matches name, or null if its not found.
13434
       */
13435
      public static _Fields findByName(String name) {
13436
        return byName.get(name);
13437
      }
13438
 
13439
      private final short _thriftId;
13440
      private final String _fieldName;
13441
 
13442
      _Fields(short thriftId, String fieldName) {
13443
        _thriftId = thriftId;
13444
        _fieldName = fieldName;
13445
      }
13446
 
13447
      public short getThriftFieldId() {
13448
        return _thriftId;
13449
      }
13450
 
13451
      public String getFieldName() {
13452
        return _fieldName;
13453
      }
13454
    }
13455
 
13456
    // isset id assignments
13457
    private static final int __USERID_ISSET_ID = 0;
123 ashish 13458
    private static final int __ISSESSIONID_ISSET_ID = 1;
13459
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 13460
 
13461
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13462
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
13463
          new FieldValueMetaData(TType.I64)));
123 ashish 13464
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
13465
          new FieldValueMetaData(TType.BOOL)));
48 ashish 13466
    }});
13467
 
13468
    static {
13469
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
13470
    }
13471
 
13472
    public deleteUser_args() {
13473
    }
13474
 
13475
    public deleteUser_args(
123 ashish 13476
      long userid,
13477
      boolean isSessionId)
48 ashish 13478
    {
13479
      this();
13480
      this.userid = userid;
13481
      setUseridIsSet(true);
123 ashish 13482
      this.isSessionId = isSessionId;
13483
      setIsSessionIdIsSet(true);
48 ashish 13484
    }
13485
 
13486
    /**
13487
     * Performs a deep copy on <i>other</i>.
13488
     */
13489
    public deleteUser_args(deleteUser_args other) {
13490
      __isset_bit_vector.clear();
13491
      __isset_bit_vector.or(other.__isset_bit_vector);
13492
      this.userid = other.userid;
123 ashish 13493
      this.isSessionId = other.isSessionId;
48 ashish 13494
    }
13495
 
13496
    public deleteUser_args deepCopy() {
13497
      return new deleteUser_args(this);
13498
    }
13499
 
13500
    @Deprecated
13501
    public deleteUser_args clone() {
13502
      return new deleteUser_args(this);
13503
    }
13504
 
13505
    public long getUserid() {
13506
      return this.userid;
13507
    }
13508
 
13509
    public deleteUser_args setUserid(long userid) {
13510
      this.userid = userid;
13511
      setUseridIsSet(true);
13512
      return this;
13513
    }
13514
 
13515
    public void unsetUserid() {
13516
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13517
    }
13518
 
13519
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
13520
    public boolean isSetUserid() {
13521
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13522
    }
13523
 
13524
    public void setUseridIsSet(boolean value) {
13525
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13526
    }
13527
 
123 ashish 13528
    public boolean isIsSessionId() {
13529
      return this.isSessionId;
13530
    }
13531
 
13532
    public deleteUser_args setIsSessionId(boolean isSessionId) {
13533
      this.isSessionId = isSessionId;
13534
      setIsSessionIdIsSet(true);
13535
      return this;
13536
    }
13537
 
13538
    public void unsetIsSessionId() {
13539
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
13540
    }
13541
 
13542
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
13543
    public boolean isSetIsSessionId() {
13544
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
13545
    }
13546
 
13547
    public void setIsSessionIdIsSet(boolean value) {
13548
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
13549
    }
13550
 
48 ashish 13551
    public void setFieldValue(_Fields field, Object value) {
13552
      switch (field) {
13553
      case USERID:
13554
        if (value == null) {
13555
          unsetUserid();
13556
        } else {
13557
          setUserid((Long)value);
13558
        }
13559
        break;
13560
 
123 ashish 13561
      case IS_SESSION_ID:
13562
        if (value == null) {
13563
          unsetIsSessionId();
13564
        } else {
13565
          setIsSessionId((Boolean)value);
13566
        }
13567
        break;
13568
 
48 ashish 13569
      }
13570
    }
13571
 
13572
    public void setFieldValue(int fieldID, Object value) {
13573
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13574
    }
13575
 
13576
    public Object getFieldValue(_Fields field) {
13577
      switch (field) {
13578
      case USERID:
13579
        return new Long(getUserid());
13580
 
123 ashish 13581
      case IS_SESSION_ID:
13582
        return new Boolean(isIsSessionId());
13583
 
48 ashish 13584
      }
13585
      throw new IllegalStateException();
13586
    }
13587
 
13588
    public Object getFieldValue(int fieldId) {
13589
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13590
    }
13591
 
13592
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13593
    public boolean isSet(_Fields field) {
13594
      switch (field) {
13595
      case USERID:
13596
        return isSetUserid();
123 ashish 13597
      case IS_SESSION_ID:
13598
        return isSetIsSessionId();
48 ashish 13599
      }
13600
      throw new IllegalStateException();
13601
    }
13602
 
13603
    public boolean isSet(int fieldID) {
13604
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13605
    }
13606
 
13607
    @Override
13608
    public boolean equals(Object that) {
13609
      if (that == null)
13610
        return false;
13611
      if (that instanceof deleteUser_args)
13612
        return this.equals((deleteUser_args)that);
13613
      return false;
13614
    }
13615
 
13616
    public boolean equals(deleteUser_args that) {
13617
      if (that == null)
13618
        return false;
13619
 
13620
      boolean this_present_userid = true;
13621
      boolean that_present_userid = true;
13622
      if (this_present_userid || that_present_userid) {
13623
        if (!(this_present_userid && that_present_userid))
13624
          return false;
13625
        if (this.userid != that.userid)
13626
          return false;
13627
      }
13628
 
123 ashish 13629
      boolean this_present_isSessionId = true;
13630
      boolean that_present_isSessionId = true;
13631
      if (this_present_isSessionId || that_present_isSessionId) {
13632
        if (!(this_present_isSessionId && that_present_isSessionId))
13633
          return false;
13634
        if (this.isSessionId != that.isSessionId)
13635
          return false;
13636
      }
13637
 
48 ashish 13638
      return true;
13639
    }
13640
 
13641
    @Override
13642
    public int hashCode() {
13643
      return 0;
13644
    }
13645
 
13646
    public int compareTo(deleteUser_args other) {
13647
      if (!getClass().equals(other.getClass())) {
13648
        return getClass().getName().compareTo(other.getClass().getName());
13649
      }
13650
 
13651
      int lastComparison = 0;
13652
      deleteUser_args typedOther = (deleteUser_args)other;
13653
 
13654
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
13655
      if (lastComparison != 0) {
13656
        return lastComparison;
13657
      }
13658
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
13659
      if (lastComparison != 0) {
13660
        return lastComparison;
13661
      }
123 ashish 13662
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
13663
      if (lastComparison != 0) {
13664
        return lastComparison;
13665
      }
13666
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
13667
      if (lastComparison != 0) {
13668
        return lastComparison;
13669
      }
48 ashish 13670
      return 0;
13671
    }
13672
 
13673
    public void read(TProtocol iprot) throws TException {
13674
      TField field;
13675
      iprot.readStructBegin();
13676
      while (true)
13677
      {
13678
        field = iprot.readFieldBegin();
13679
        if (field.type == TType.STOP) { 
13680
          break;
13681
        }
13682
        _Fields fieldId = _Fields.findByThriftId(field.id);
13683
        if (fieldId == null) {
13684
          TProtocolUtil.skip(iprot, field.type);
13685
        } else {
13686
          switch (fieldId) {
13687
            case USERID:
13688
              if (field.type == TType.I64) {
13689
                this.userid = iprot.readI64();
13690
                setUseridIsSet(true);
13691
              } else { 
13692
                TProtocolUtil.skip(iprot, field.type);
13693
              }
13694
              break;
123 ashish 13695
            case IS_SESSION_ID:
13696
              if (field.type == TType.BOOL) {
13697
                this.isSessionId = iprot.readBool();
13698
                setIsSessionIdIsSet(true);
13699
              } else { 
13700
                TProtocolUtil.skip(iprot, field.type);
13701
              }
13702
              break;
48 ashish 13703
          }
13704
          iprot.readFieldEnd();
13705
        }
13706
      }
13707
      iprot.readStructEnd();
13708
      validate();
13709
    }
13710
 
13711
    public void write(TProtocol oprot) throws TException {
13712
      validate();
13713
 
13714
      oprot.writeStructBegin(STRUCT_DESC);
13715
      oprot.writeFieldBegin(USERID_FIELD_DESC);
13716
      oprot.writeI64(this.userid);
13717
      oprot.writeFieldEnd();
123 ashish 13718
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
13719
      oprot.writeBool(this.isSessionId);
13720
      oprot.writeFieldEnd();
48 ashish 13721
      oprot.writeFieldStop();
13722
      oprot.writeStructEnd();
13723
    }
13724
 
13725
    @Override
13726
    public String toString() {
13727
      StringBuilder sb = new StringBuilder("deleteUser_args(");
13728
      boolean first = true;
13729
 
13730
      sb.append("userid:");
13731
      sb.append(this.userid);
13732
      first = false;
123 ashish 13733
      if (!first) sb.append(", ");
13734
      sb.append("isSessionId:");
13735
      sb.append(this.isSessionId);
13736
      first = false;
48 ashish 13737
      sb.append(")");
13738
      return sb.toString();
13739
    }
13740
 
13741
    public void validate() throws TException {
13742
      // check for required fields
13743
    }
13744
 
13745
  }
13746
 
13747
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
13748
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
13749
 
13750
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13751
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13752
 
13753
    private boolean success;
13754
    private UserContextException ucx;
13755
 
13756
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13757
    public enum _Fields implements TFieldIdEnum {
13758
      SUCCESS((short)0, "success"),
13759
      UCX((short)1, "ucx");
13760
 
13761
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13762
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13763
 
13764
      static {
13765
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13766
          byId.put((int)field._thriftId, field);
13767
          byName.put(field.getFieldName(), field);
13768
        }
13769
      }
13770
 
13771
      /**
13772
       * Find the _Fields constant that matches fieldId, or null if its not found.
13773
       */
13774
      public static _Fields findByThriftId(int fieldId) {
13775
        return byId.get(fieldId);
13776
      }
13777
 
13778
      /**
13779
       * Find the _Fields constant that matches fieldId, throwing an exception
13780
       * if it is not found.
13781
       */
13782
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13783
        _Fields fields = findByThriftId(fieldId);
13784
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13785
        return fields;
13786
      }
13787
 
13788
      /**
13789
       * Find the _Fields constant that matches name, or null if its not found.
13790
       */
13791
      public static _Fields findByName(String name) {
13792
        return byName.get(name);
13793
      }
13794
 
13795
      private final short _thriftId;
13796
      private final String _fieldName;
13797
 
13798
      _Fields(short thriftId, String fieldName) {
13799
        _thriftId = thriftId;
13800
        _fieldName = fieldName;
13801
      }
13802
 
13803
      public short getThriftFieldId() {
13804
        return _thriftId;
13805
      }
13806
 
13807
      public String getFieldName() {
13808
        return _fieldName;
13809
      }
13810
    }
13811
 
13812
    // isset id assignments
13813
    private static final int __SUCCESS_ISSET_ID = 0;
13814
    private BitSet __isset_bit_vector = new BitSet(1);
13815
 
13816
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13817
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13818
          new FieldValueMetaData(TType.BOOL)));
13819
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13820
          new FieldValueMetaData(TType.STRUCT)));
13821
    }});
13822
 
13823
    static {
13824
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
13825
    }
13826
 
13827
    public deleteUser_result() {
13828
    }
13829
 
13830
    public deleteUser_result(
13831
      boolean success,
13832
      UserContextException ucx)
13833
    {
13834
      this();
13835
      this.success = success;
13836
      setSuccessIsSet(true);
13837
      this.ucx = ucx;
13838
    }
13839
 
13840
    /**
13841
     * Performs a deep copy on <i>other</i>.
13842
     */
13843
    public deleteUser_result(deleteUser_result other) {
13844
      __isset_bit_vector.clear();
13845
      __isset_bit_vector.or(other.__isset_bit_vector);
13846
      this.success = other.success;
13847
      if (other.isSetUcx()) {
13848
        this.ucx = new UserContextException(other.ucx);
13849
      }
13850
    }
13851
 
13852
    public deleteUser_result deepCopy() {
13853
      return new deleteUser_result(this);
13854
    }
13855
 
13856
    @Deprecated
13857
    public deleteUser_result clone() {
13858
      return new deleteUser_result(this);
13859
    }
13860
 
13861
    public boolean isSuccess() {
13862
      return this.success;
13863
    }
13864
 
13865
    public deleteUser_result setSuccess(boolean success) {
13866
      this.success = success;
13867
      setSuccessIsSet(true);
13868
      return this;
13869
    }
13870
 
13871
    public void unsetSuccess() {
13872
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13873
    }
13874
 
13875
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13876
    public boolean isSetSuccess() {
13877
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13878
    }
13879
 
13880
    public void setSuccessIsSet(boolean value) {
13881
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13882
    }
13883
 
13884
    public UserContextException getUcx() {
13885
      return this.ucx;
13886
    }
13887
 
13888
    public deleteUser_result setUcx(UserContextException ucx) {
13889
      this.ucx = ucx;
13890
      return this;
13891
    }
13892
 
13893
    public void unsetUcx() {
13894
      this.ucx = null;
13895
    }
13896
 
13897
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13898
    public boolean isSetUcx() {
13899
      return this.ucx != null;
13900
    }
13901
 
13902
    public void setUcxIsSet(boolean value) {
13903
      if (!value) {
13904
        this.ucx = null;
13905
      }
13906
    }
13907
 
13908
    public void setFieldValue(_Fields field, Object value) {
13909
      switch (field) {
13910
      case SUCCESS:
13911
        if (value == null) {
13912
          unsetSuccess();
13913
        } else {
13914
          setSuccess((Boolean)value);
13915
        }
13916
        break;
13917
 
13918
      case UCX:
13919
        if (value == null) {
13920
          unsetUcx();
13921
        } else {
13922
          setUcx((UserContextException)value);
13923
        }
13924
        break;
13925
 
13926
      }
13927
    }
13928
 
13929
    public void setFieldValue(int fieldID, Object value) {
13930
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13931
    }
13932
 
13933
    public Object getFieldValue(_Fields field) {
13934
      switch (field) {
13935
      case SUCCESS:
13936
        return new Boolean(isSuccess());
13937
 
13938
      case UCX:
13939
        return getUcx();
13940
 
13941
      }
13942
      throw new IllegalStateException();
13943
    }
13944
 
13945
    public Object getFieldValue(int fieldId) {
13946
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13947
    }
13948
 
13949
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13950
    public boolean isSet(_Fields field) {
13951
      switch (field) {
13952
      case SUCCESS:
13953
        return isSetSuccess();
13954
      case UCX:
13955
        return isSetUcx();
13956
      }
13957
      throw new IllegalStateException();
13958
    }
13959
 
13960
    public boolean isSet(int fieldID) {
13961
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13962
    }
13963
 
13964
    @Override
13965
    public boolean equals(Object that) {
13966
      if (that == null)
13967
        return false;
13968
      if (that instanceof deleteUser_result)
13969
        return this.equals((deleteUser_result)that);
13970
      return false;
13971
    }
13972
 
13973
    public boolean equals(deleteUser_result that) {
13974
      if (that == null)
13975
        return false;
13976
 
13977
      boolean this_present_success = true;
13978
      boolean that_present_success = true;
13979
      if (this_present_success || that_present_success) {
13980
        if (!(this_present_success && that_present_success))
13981
          return false;
13982
        if (this.success != that.success)
13983
          return false;
13984
      }
13985
 
13986
      boolean this_present_ucx = true && this.isSetUcx();
13987
      boolean that_present_ucx = true && that.isSetUcx();
13988
      if (this_present_ucx || that_present_ucx) {
13989
        if (!(this_present_ucx && that_present_ucx))
13990
          return false;
13991
        if (!this.ucx.equals(that.ucx))
13992
          return false;
13993
      }
13994
 
13995
      return true;
13996
    }
13997
 
13998
    @Override
13999
    public int hashCode() {
14000
      return 0;
14001
    }
14002
 
14003
    public int compareTo(deleteUser_result other) {
14004
      if (!getClass().equals(other.getClass())) {
14005
        return getClass().getName().compareTo(other.getClass().getName());
14006
      }
14007
 
14008
      int lastComparison = 0;
14009
      deleteUser_result typedOther = (deleteUser_result)other;
14010
 
14011
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14012
      if (lastComparison != 0) {
14013
        return lastComparison;
14014
      }
14015
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14016
      if (lastComparison != 0) {
14017
        return lastComparison;
14018
      }
14019
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14020
      if (lastComparison != 0) {
14021
        return lastComparison;
14022
      }
14023
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14024
      if (lastComparison != 0) {
14025
        return lastComparison;
14026
      }
14027
      return 0;
14028
    }
14029
 
14030
    public void read(TProtocol iprot) throws TException {
14031
      TField field;
14032
      iprot.readStructBegin();
14033
      while (true)
14034
      {
14035
        field = iprot.readFieldBegin();
14036
        if (field.type == TType.STOP) { 
14037
          break;
14038
        }
14039
        _Fields fieldId = _Fields.findByThriftId(field.id);
14040
        if (fieldId == null) {
14041
          TProtocolUtil.skip(iprot, field.type);
14042
        } else {
14043
          switch (fieldId) {
14044
            case SUCCESS:
14045
              if (field.type == TType.BOOL) {
14046
                this.success = iprot.readBool();
14047
                setSuccessIsSet(true);
14048
              } else { 
14049
                TProtocolUtil.skip(iprot, field.type);
14050
              }
14051
              break;
14052
            case UCX:
14053
              if (field.type == TType.STRUCT) {
14054
                this.ucx = new UserContextException();
14055
                this.ucx.read(iprot);
14056
              } else { 
14057
                TProtocolUtil.skip(iprot, field.type);
14058
              }
14059
              break;
14060
          }
14061
          iprot.readFieldEnd();
14062
        }
14063
      }
14064
      iprot.readStructEnd();
14065
      validate();
14066
    }
14067
 
14068
    public void write(TProtocol oprot) throws TException {
14069
      oprot.writeStructBegin(STRUCT_DESC);
14070
 
14071
      if (this.isSetSuccess()) {
14072
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14073
        oprot.writeBool(this.success);
14074
        oprot.writeFieldEnd();
14075
      } else if (this.isSetUcx()) {
14076
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14077
        this.ucx.write(oprot);
14078
        oprot.writeFieldEnd();
14079
      }
14080
      oprot.writeFieldStop();
14081
      oprot.writeStructEnd();
14082
    }
14083
 
14084
    @Override
14085
    public String toString() {
14086
      StringBuilder sb = new StringBuilder("deleteUser_result(");
14087
      boolean first = true;
14088
 
14089
      sb.append("success:");
14090
      sb.append(this.success);
14091
      first = false;
14092
      if (!first) sb.append(", ");
14093
      sb.append("ucx:");
14094
      if (this.ucx == null) {
14095
        sb.append("null");
14096
      } else {
14097
        sb.append(this.ucx);
14098
      }
14099
      first = false;
14100
      sb.append(")");
14101
      return sb.toString();
14102
    }
14103
 
14104
    public void validate() throws TException {
14105
      // check for required fields
14106
    }
14107
 
14108
  }
14109
 
14110
  public static class sendEmailVerification_args implements TBase<sendEmailVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendEmailVerification_args>   {
14111
    private static final TStruct STRUCT_DESC = new TStruct("sendEmailVerification_args");
14112
 
14113
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
14114
 
14115
    private long userid;
14116
 
14117
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14118
    public enum _Fields implements TFieldIdEnum {
14119
      USERID((short)1, "userid");
14120
 
14121
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14122
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14123
 
14124
      static {
14125
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14126
          byId.put((int)field._thriftId, field);
14127
          byName.put(field.getFieldName(), field);
14128
        }
14129
      }
14130
 
14131
      /**
14132
       * Find the _Fields constant that matches fieldId, or null if its not found.
14133
       */
14134
      public static _Fields findByThriftId(int fieldId) {
14135
        return byId.get(fieldId);
14136
      }
14137
 
14138
      /**
14139
       * Find the _Fields constant that matches fieldId, throwing an exception
14140
       * if it is not found.
14141
       */
14142
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14143
        _Fields fields = findByThriftId(fieldId);
14144
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14145
        return fields;
14146
      }
14147
 
14148
      /**
14149
       * Find the _Fields constant that matches name, or null if its not found.
14150
       */
14151
      public static _Fields findByName(String name) {
14152
        return byName.get(name);
14153
      }
14154
 
14155
      private final short _thriftId;
14156
      private final String _fieldName;
14157
 
14158
      _Fields(short thriftId, String fieldName) {
14159
        _thriftId = thriftId;
14160
        _fieldName = fieldName;
14161
      }
14162
 
14163
      public short getThriftFieldId() {
14164
        return _thriftId;
14165
      }
14166
 
14167
      public String getFieldName() {
14168
        return _fieldName;
14169
      }
14170
    }
14171
 
14172
    // isset id assignments
14173
    private static final int __USERID_ISSET_ID = 0;
14174
    private BitSet __isset_bit_vector = new BitSet(1);
14175
 
14176
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14177
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
14178
          new FieldValueMetaData(TType.I64)));
14179
    }});
14180
 
14181
    static {
14182
      FieldMetaData.addStructMetaDataMap(sendEmailVerification_args.class, metaDataMap);
14183
    }
14184
 
14185
    public sendEmailVerification_args() {
14186
    }
14187
 
14188
    public sendEmailVerification_args(
14189
      long userid)
14190
    {
14191
      this();
14192
      this.userid = userid;
14193
      setUseridIsSet(true);
14194
    }
14195
 
14196
    /**
14197
     * Performs a deep copy on <i>other</i>.
14198
     */
14199
    public sendEmailVerification_args(sendEmailVerification_args other) {
14200
      __isset_bit_vector.clear();
14201
      __isset_bit_vector.or(other.__isset_bit_vector);
14202
      this.userid = other.userid;
14203
    }
14204
 
14205
    public sendEmailVerification_args deepCopy() {
14206
      return new sendEmailVerification_args(this);
14207
    }
14208
 
14209
    @Deprecated
14210
    public sendEmailVerification_args clone() {
14211
      return new sendEmailVerification_args(this);
14212
    }
14213
 
14214
    public long getUserid() {
14215
      return this.userid;
14216
    }
14217
 
14218
    public sendEmailVerification_args setUserid(long userid) {
14219
      this.userid = userid;
14220
      setUseridIsSet(true);
14221
      return this;
14222
    }
14223
 
14224
    public void unsetUserid() {
14225
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14226
    }
14227
 
14228
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
14229
    public boolean isSetUserid() {
14230
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14231
    }
14232
 
14233
    public void setUseridIsSet(boolean value) {
14234
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14235
    }
14236
 
14237
    public void setFieldValue(_Fields field, Object value) {
14238
      switch (field) {
14239
      case USERID:
14240
        if (value == null) {
14241
          unsetUserid();
14242
        } else {
14243
          setUserid((Long)value);
14244
        }
14245
        break;
14246
 
14247
      }
14248
    }
14249
 
14250
    public void setFieldValue(int fieldID, Object value) {
14251
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14252
    }
14253
 
14254
    public Object getFieldValue(_Fields field) {
14255
      switch (field) {
14256
      case USERID:
14257
        return new Long(getUserid());
14258
 
14259
      }
14260
      throw new IllegalStateException();
14261
    }
14262
 
14263
    public Object getFieldValue(int fieldId) {
14264
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14265
    }
14266
 
14267
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14268
    public boolean isSet(_Fields field) {
14269
      switch (field) {
14270
      case USERID:
14271
        return isSetUserid();
14272
      }
14273
      throw new IllegalStateException();
14274
    }
14275
 
14276
    public boolean isSet(int fieldID) {
14277
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14278
    }
14279
 
14280
    @Override
14281
    public boolean equals(Object that) {
14282
      if (that == null)
14283
        return false;
14284
      if (that instanceof sendEmailVerification_args)
14285
        return this.equals((sendEmailVerification_args)that);
14286
      return false;
14287
    }
14288
 
14289
    public boolean equals(sendEmailVerification_args that) {
14290
      if (that == null)
14291
        return false;
14292
 
14293
      boolean this_present_userid = true;
14294
      boolean that_present_userid = true;
14295
      if (this_present_userid || that_present_userid) {
14296
        if (!(this_present_userid && that_present_userid))
14297
          return false;
14298
        if (this.userid != that.userid)
14299
          return false;
14300
      }
14301
 
14302
      return true;
14303
    }
14304
 
14305
    @Override
14306
    public int hashCode() {
14307
      return 0;
14308
    }
14309
 
14310
    public int compareTo(sendEmailVerification_args other) {
14311
      if (!getClass().equals(other.getClass())) {
14312
        return getClass().getName().compareTo(other.getClass().getName());
14313
      }
14314
 
14315
      int lastComparison = 0;
14316
      sendEmailVerification_args typedOther = (sendEmailVerification_args)other;
14317
 
14318
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
14319
      if (lastComparison != 0) {
14320
        return lastComparison;
14321
      }
14322
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
14323
      if (lastComparison != 0) {
14324
        return lastComparison;
14325
      }
14326
      return 0;
14327
    }
14328
 
14329
    public void read(TProtocol iprot) throws TException {
14330
      TField field;
14331
      iprot.readStructBegin();
14332
      while (true)
14333
      {
14334
        field = iprot.readFieldBegin();
14335
        if (field.type == TType.STOP) { 
14336
          break;
14337
        }
14338
        _Fields fieldId = _Fields.findByThriftId(field.id);
14339
        if (fieldId == null) {
14340
          TProtocolUtil.skip(iprot, field.type);
14341
        } else {
14342
          switch (fieldId) {
14343
            case USERID:
14344
              if (field.type == TType.I64) {
14345
                this.userid = iprot.readI64();
14346
                setUseridIsSet(true);
14347
              } else { 
14348
                TProtocolUtil.skip(iprot, field.type);
14349
              }
14350
              break;
14351
          }
14352
          iprot.readFieldEnd();
14353
        }
14354
      }
14355
      iprot.readStructEnd();
14356
      validate();
14357
    }
14358
 
14359
    public void write(TProtocol oprot) throws TException {
14360
      validate();
14361
 
14362
      oprot.writeStructBegin(STRUCT_DESC);
14363
      oprot.writeFieldBegin(USERID_FIELD_DESC);
14364
      oprot.writeI64(this.userid);
14365
      oprot.writeFieldEnd();
14366
      oprot.writeFieldStop();
14367
      oprot.writeStructEnd();
14368
    }
14369
 
14370
    @Override
14371
    public String toString() {
14372
      StringBuilder sb = new StringBuilder("sendEmailVerification_args(");
14373
      boolean first = true;
14374
 
14375
      sb.append("userid:");
14376
      sb.append(this.userid);
14377
      first = false;
14378
      sb.append(")");
14379
      return sb.toString();
14380
    }
14381
 
14382
    public void validate() throws TException {
14383
      // check for required fields
14384
    }
14385
 
14386
  }
14387
 
14388
  public static class sendEmailVerification_result implements TBase<sendEmailVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendEmailVerification_result>   {
14389
    private static final TStruct STRUCT_DESC = new TStruct("sendEmailVerification_result");
14390
 
14391
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14392
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14393
 
14394
    private boolean success;
14395
    private UserContextException ucx;
14396
 
14397
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14398
    public enum _Fields implements TFieldIdEnum {
14399
      SUCCESS((short)0, "success"),
14400
      UCX((short)1, "ucx");
14401
 
14402
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14403
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14404
 
14405
      static {
14406
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14407
          byId.put((int)field._thriftId, field);
14408
          byName.put(field.getFieldName(), field);
14409
        }
14410
      }
14411
 
14412
      /**
14413
       * Find the _Fields constant that matches fieldId, or null if its not found.
14414
       */
14415
      public static _Fields findByThriftId(int fieldId) {
14416
        return byId.get(fieldId);
14417
      }
14418
 
14419
      /**
14420
       * Find the _Fields constant that matches fieldId, throwing an exception
14421
       * if it is not found.
14422
       */
14423
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14424
        _Fields fields = findByThriftId(fieldId);
14425
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14426
        return fields;
14427
      }
14428
 
14429
      /**
14430
       * Find the _Fields constant that matches name, or null if its not found.
14431
       */
14432
      public static _Fields findByName(String name) {
14433
        return byName.get(name);
14434
      }
14435
 
14436
      private final short _thriftId;
14437
      private final String _fieldName;
14438
 
14439
      _Fields(short thriftId, String fieldName) {
14440
        _thriftId = thriftId;
14441
        _fieldName = fieldName;
14442
      }
14443
 
14444
      public short getThriftFieldId() {
14445
        return _thriftId;
14446
      }
14447
 
14448
      public String getFieldName() {
14449
        return _fieldName;
14450
      }
14451
    }
14452
 
14453
    // isset id assignments
14454
    private static final int __SUCCESS_ISSET_ID = 0;
14455
    private BitSet __isset_bit_vector = new BitSet(1);
14456
 
14457
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14458
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14459
          new FieldValueMetaData(TType.BOOL)));
14460
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14461
          new FieldValueMetaData(TType.STRUCT)));
14462
    }});
14463
 
14464
    static {
14465
      FieldMetaData.addStructMetaDataMap(sendEmailVerification_result.class, metaDataMap);
14466
    }
14467
 
14468
    public sendEmailVerification_result() {
14469
    }
14470
 
14471
    public sendEmailVerification_result(
14472
      boolean success,
14473
      UserContextException ucx)
14474
    {
14475
      this();
14476
      this.success = success;
14477
      setSuccessIsSet(true);
14478
      this.ucx = ucx;
14479
    }
14480
 
14481
    /**
14482
     * Performs a deep copy on <i>other</i>.
14483
     */
14484
    public sendEmailVerification_result(sendEmailVerification_result other) {
14485
      __isset_bit_vector.clear();
14486
      __isset_bit_vector.or(other.__isset_bit_vector);
14487
      this.success = other.success;
14488
      if (other.isSetUcx()) {
14489
        this.ucx = new UserContextException(other.ucx);
14490
      }
14491
    }
14492
 
14493
    public sendEmailVerification_result deepCopy() {
14494
      return new sendEmailVerification_result(this);
14495
    }
14496
 
14497
    @Deprecated
14498
    public sendEmailVerification_result clone() {
14499
      return new sendEmailVerification_result(this);
14500
    }
14501
 
14502
    public boolean isSuccess() {
14503
      return this.success;
14504
    }
14505
 
14506
    public sendEmailVerification_result setSuccess(boolean success) {
14507
      this.success = success;
14508
      setSuccessIsSet(true);
14509
      return this;
14510
    }
14511
 
14512
    public void unsetSuccess() {
14513
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14514
    }
14515
 
14516
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14517
    public boolean isSetSuccess() {
14518
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14519
    }
14520
 
14521
    public void setSuccessIsSet(boolean value) {
14522
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14523
    }
14524
 
14525
    public UserContextException getUcx() {
14526
      return this.ucx;
14527
    }
14528
 
14529
    public sendEmailVerification_result setUcx(UserContextException ucx) {
14530
      this.ucx = ucx;
14531
      return this;
14532
    }
14533
 
14534
    public void unsetUcx() {
14535
      this.ucx = null;
14536
    }
14537
 
14538
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14539
    public boolean isSetUcx() {
14540
      return this.ucx != null;
14541
    }
14542
 
14543
    public void setUcxIsSet(boolean value) {
14544
      if (!value) {
14545
        this.ucx = null;
14546
      }
14547
    }
14548
 
14549
    public void setFieldValue(_Fields field, Object value) {
14550
      switch (field) {
14551
      case SUCCESS:
14552
        if (value == null) {
14553
          unsetSuccess();
14554
        } else {
14555
          setSuccess((Boolean)value);
14556
        }
14557
        break;
14558
 
14559
      case UCX:
14560
        if (value == null) {
14561
          unsetUcx();
14562
        } else {
14563
          setUcx((UserContextException)value);
14564
        }
14565
        break;
14566
 
14567
      }
14568
    }
14569
 
14570
    public void setFieldValue(int fieldID, Object value) {
14571
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14572
    }
14573
 
14574
    public Object getFieldValue(_Fields field) {
14575
      switch (field) {
14576
      case SUCCESS:
14577
        return new Boolean(isSuccess());
14578
 
14579
      case UCX:
14580
        return getUcx();
14581
 
14582
      }
14583
      throw new IllegalStateException();
14584
    }
14585
 
14586
    public Object getFieldValue(int fieldId) {
14587
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14588
    }
14589
 
14590
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14591
    public boolean isSet(_Fields field) {
14592
      switch (field) {
14593
      case SUCCESS:
14594
        return isSetSuccess();
14595
      case UCX:
14596
        return isSetUcx();
14597
      }
14598
      throw new IllegalStateException();
14599
    }
14600
 
14601
    public boolean isSet(int fieldID) {
14602
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14603
    }
14604
 
14605
    @Override
14606
    public boolean equals(Object that) {
14607
      if (that == null)
14608
        return false;
14609
      if (that instanceof sendEmailVerification_result)
14610
        return this.equals((sendEmailVerification_result)that);
14611
      return false;
14612
    }
14613
 
14614
    public boolean equals(sendEmailVerification_result that) {
14615
      if (that == null)
14616
        return false;
14617
 
14618
      boolean this_present_success = true;
14619
      boolean that_present_success = true;
14620
      if (this_present_success || that_present_success) {
14621
        if (!(this_present_success && that_present_success))
14622
          return false;
14623
        if (this.success != that.success)
14624
          return false;
14625
      }
14626
 
14627
      boolean this_present_ucx = true && this.isSetUcx();
14628
      boolean that_present_ucx = true && that.isSetUcx();
14629
      if (this_present_ucx || that_present_ucx) {
14630
        if (!(this_present_ucx && that_present_ucx))
14631
          return false;
14632
        if (!this.ucx.equals(that.ucx))
14633
          return false;
14634
      }
14635
 
14636
      return true;
14637
    }
14638
 
14639
    @Override
14640
    public int hashCode() {
14641
      return 0;
14642
    }
14643
 
14644
    public int compareTo(sendEmailVerification_result other) {
14645
      if (!getClass().equals(other.getClass())) {
14646
        return getClass().getName().compareTo(other.getClass().getName());
14647
      }
14648
 
14649
      int lastComparison = 0;
14650
      sendEmailVerification_result typedOther = (sendEmailVerification_result)other;
14651
 
14652
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14653
      if (lastComparison != 0) {
14654
        return lastComparison;
14655
      }
14656
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14657
      if (lastComparison != 0) {
14658
        return lastComparison;
14659
      }
14660
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14661
      if (lastComparison != 0) {
14662
        return lastComparison;
14663
      }
14664
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14665
      if (lastComparison != 0) {
14666
        return lastComparison;
14667
      }
14668
      return 0;
14669
    }
14670
 
14671
    public void read(TProtocol iprot) throws TException {
14672
      TField field;
14673
      iprot.readStructBegin();
14674
      while (true)
14675
      {
14676
        field = iprot.readFieldBegin();
14677
        if (field.type == TType.STOP) { 
14678
          break;
14679
        }
14680
        _Fields fieldId = _Fields.findByThriftId(field.id);
14681
        if (fieldId == null) {
14682
          TProtocolUtil.skip(iprot, field.type);
14683
        } else {
14684
          switch (fieldId) {
14685
            case SUCCESS:
14686
              if (field.type == TType.BOOL) {
14687
                this.success = iprot.readBool();
14688
                setSuccessIsSet(true);
14689
              } else { 
14690
                TProtocolUtil.skip(iprot, field.type);
14691
              }
14692
              break;
14693
            case UCX:
14694
              if (field.type == TType.STRUCT) {
14695
                this.ucx = new UserContextException();
14696
                this.ucx.read(iprot);
14697
              } else { 
14698
                TProtocolUtil.skip(iprot, field.type);
14699
              }
14700
              break;
14701
          }
14702
          iprot.readFieldEnd();
14703
        }
14704
      }
14705
      iprot.readStructEnd();
14706
      validate();
14707
    }
14708
 
14709
    public void write(TProtocol oprot) throws TException {
14710
      oprot.writeStructBegin(STRUCT_DESC);
14711
 
14712
      if (this.isSetSuccess()) {
14713
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14714
        oprot.writeBool(this.success);
14715
        oprot.writeFieldEnd();
14716
      } else if (this.isSetUcx()) {
14717
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14718
        this.ucx.write(oprot);
14719
        oprot.writeFieldEnd();
14720
      }
14721
      oprot.writeFieldStop();
14722
      oprot.writeStructEnd();
14723
    }
14724
 
14725
    @Override
14726
    public String toString() {
14727
      StringBuilder sb = new StringBuilder("sendEmailVerification_result(");
14728
      boolean first = true;
14729
 
14730
      sb.append("success:");
14731
      sb.append(this.success);
14732
      first = false;
14733
      if (!first) sb.append(", ");
14734
      sb.append("ucx:");
14735
      if (this.ucx == null) {
14736
        sb.append("null");
14737
      } else {
14738
        sb.append(this.ucx);
14739
      }
14740
      first = false;
14741
      sb.append(")");
14742
      return sb.toString();
14743
    }
14744
 
14745
    public void validate() throws TException {
14746
      // check for required fields
14747
    }
14748
 
14749
  }
14750
 
14751
  public static class sendSMSVerification_args implements TBase<sendSMSVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendSMSVerification_args>   {
14752
    private static final TStruct STRUCT_DESC = new TStruct("sendSMSVerification_args");
14753
 
14754
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
14755
 
14756
    private long userid;
14757
 
14758
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14759
    public enum _Fields implements TFieldIdEnum {
14760
      USERID((short)1, "userid");
14761
 
14762
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14763
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14764
 
14765
      static {
14766
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14767
          byId.put((int)field._thriftId, field);
14768
          byName.put(field.getFieldName(), field);
14769
        }
14770
      }
14771
 
14772
      /**
14773
       * Find the _Fields constant that matches fieldId, or null if its not found.
14774
       */
14775
      public static _Fields findByThriftId(int fieldId) {
14776
        return byId.get(fieldId);
14777
      }
14778
 
14779
      /**
14780
       * Find the _Fields constant that matches fieldId, throwing an exception
14781
       * if it is not found.
14782
       */
14783
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14784
        _Fields fields = findByThriftId(fieldId);
14785
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14786
        return fields;
14787
      }
14788
 
14789
      /**
14790
       * Find the _Fields constant that matches name, or null if its not found.
14791
       */
14792
      public static _Fields findByName(String name) {
14793
        return byName.get(name);
14794
      }
14795
 
14796
      private final short _thriftId;
14797
      private final String _fieldName;
14798
 
14799
      _Fields(short thriftId, String fieldName) {
14800
        _thriftId = thriftId;
14801
        _fieldName = fieldName;
14802
      }
14803
 
14804
      public short getThriftFieldId() {
14805
        return _thriftId;
14806
      }
14807
 
14808
      public String getFieldName() {
14809
        return _fieldName;
14810
      }
14811
    }
14812
 
14813
    // isset id assignments
14814
    private static final int __USERID_ISSET_ID = 0;
14815
    private BitSet __isset_bit_vector = new BitSet(1);
14816
 
14817
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14818
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
14819
          new FieldValueMetaData(TType.I64)));
14820
    }});
14821
 
14822
    static {
14823
      FieldMetaData.addStructMetaDataMap(sendSMSVerification_args.class, metaDataMap);
14824
    }
14825
 
14826
    public sendSMSVerification_args() {
14827
    }
14828
 
14829
    public sendSMSVerification_args(
14830
      long userid)
14831
    {
14832
      this();
14833
      this.userid = userid;
14834
      setUseridIsSet(true);
14835
    }
14836
 
14837
    /**
14838
     * Performs a deep copy on <i>other</i>.
14839
     */
14840
    public sendSMSVerification_args(sendSMSVerification_args other) {
14841
      __isset_bit_vector.clear();
14842
      __isset_bit_vector.or(other.__isset_bit_vector);
14843
      this.userid = other.userid;
14844
    }
14845
 
14846
    public sendSMSVerification_args deepCopy() {
14847
      return new sendSMSVerification_args(this);
14848
    }
14849
 
14850
    @Deprecated
14851
    public sendSMSVerification_args clone() {
14852
      return new sendSMSVerification_args(this);
14853
    }
14854
 
14855
    public long getUserid() {
14856
      return this.userid;
14857
    }
14858
 
14859
    public sendSMSVerification_args setUserid(long userid) {
14860
      this.userid = userid;
14861
      setUseridIsSet(true);
14862
      return this;
14863
    }
14864
 
14865
    public void unsetUserid() {
14866
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14867
    }
14868
 
14869
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
14870
    public boolean isSetUserid() {
14871
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14872
    }
14873
 
14874
    public void setUseridIsSet(boolean value) {
14875
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14876
    }
14877
 
14878
    public void setFieldValue(_Fields field, Object value) {
14879
      switch (field) {
14880
      case USERID:
14881
        if (value == null) {
14882
          unsetUserid();
14883
        } else {
14884
          setUserid((Long)value);
14885
        }
14886
        break;
14887
 
14888
      }
14889
    }
14890
 
14891
    public void setFieldValue(int fieldID, Object value) {
14892
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14893
    }
14894
 
14895
    public Object getFieldValue(_Fields field) {
14896
      switch (field) {
14897
      case USERID:
14898
        return new Long(getUserid());
14899
 
14900
      }
14901
      throw new IllegalStateException();
14902
    }
14903
 
14904
    public Object getFieldValue(int fieldId) {
14905
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14906
    }
14907
 
14908
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14909
    public boolean isSet(_Fields field) {
14910
      switch (field) {
14911
      case USERID:
14912
        return isSetUserid();
14913
      }
14914
      throw new IllegalStateException();
14915
    }
14916
 
14917
    public boolean isSet(int fieldID) {
14918
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14919
    }
14920
 
14921
    @Override
14922
    public boolean equals(Object that) {
14923
      if (that == null)
14924
        return false;
14925
      if (that instanceof sendSMSVerification_args)
14926
        return this.equals((sendSMSVerification_args)that);
14927
      return false;
14928
    }
14929
 
14930
    public boolean equals(sendSMSVerification_args that) {
14931
      if (that == null)
14932
        return false;
14933
 
14934
      boolean this_present_userid = true;
14935
      boolean that_present_userid = true;
14936
      if (this_present_userid || that_present_userid) {
14937
        if (!(this_present_userid && that_present_userid))
14938
          return false;
14939
        if (this.userid != that.userid)
14940
          return false;
14941
      }
14942
 
14943
      return true;
14944
    }
14945
 
14946
    @Override
14947
    public int hashCode() {
14948
      return 0;
14949
    }
14950
 
14951
    public int compareTo(sendSMSVerification_args other) {
14952
      if (!getClass().equals(other.getClass())) {
14953
        return getClass().getName().compareTo(other.getClass().getName());
14954
      }
14955
 
14956
      int lastComparison = 0;
14957
      sendSMSVerification_args typedOther = (sendSMSVerification_args)other;
14958
 
14959
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
14960
      if (lastComparison != 0) {
14961
        return lastComparison;
14962
      }
14963
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
14964
      if (lastComparison != 0) {
14965
        return lastComparison;
14966
      }
14967
      return 0;
14968
    }
14969
 
14970
    public void read(TProtocol iprot) throws TException {
14971
      TField field;
14972
      iprot.readStructBegin();
14973
      while (true)
14974
      {
14975
        field = iprot.readFieldBegin();
14976
        if (field.type == TType.STOP) { 
14977
          break;
14978
        }
14979
        _Fields fieldId = _Fields.findByThriftId(field.id);
14980
        if (fieldId == null) {
14981
          TProtocolUtil.skip(iprot, field.type);
14982
        } else {
14983
          switch (fieldId) {
14984
            case USERID:
14985
              if (field.type == TType.I64) {
14986
                this.userid = iprot.readI64();
14987
                setUseridIsSet(true);
14988
              } else { 
14989
                TProtocolUtil.skip(iprot, field.type);
14990
              }
14991
              break;
14992
          }
14993
          iprot.readFieldEnd();
14994
        }
14995
      }
14996
      iprot.readStructEnd();
14997
      validate();
14998
    }
14999
 
15000
    public void write(TProtocol oprot) throws TException {
15001
      validate();
15002
 
15003
      oprot.writeStructBegin(STRUCT_DESC);
15004
      oprot.writeFieldBegin(USERID_FIELD_DESC);
15005
      oprot.writeI64(this.userid);
15006
      oprot.writeFieldEnd();
15007
      oprot.writeFieldStop();
15008
      oprot.writeStructEnd();
15009
    }
15010
 
15011
    @Override
15012
    public String toString() {
15013
      StringBuilder sb = new StringBuilder("sendSMSVerification_args(");
15014
      boolean first = true;
15015
 
15016
      sb.append("userid:");
15017
      sb.append(this.userid);
15018
      first = false;
15019
      sb.append(")");
15020
      return sb.toString();
15021
    }
15022
 
15023
    public void validate() throws TException {
15024
      // check for required fields
15025
    }
15026
 
15027
  }
15028
 
15029
  public static class sendSMSVerification_result implements TBase<sendSMSVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendSMSVerification_result>   {
15030
    private static final TStruct STRUCT_DESC = new TStruct("sendSMSVerification_result");
15031
 
15032
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15033
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15034
 
15035
    private boolean success;
15036
    private UserContextException ucx;
15037
 
15038
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15039
    public enum _Fields implements TFieldIdEnum {
15040
      SUCCESS((short)0, "success"),
15041
      UCX((short)1, "ucx");
15042
 
15043
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15044
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15045
 
15046
      static {
15047
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15048
          byId.put((int)field._thriftId, field);
15049
          byName.put(field.getFieldName(), field);
15050
        }
15051
      }
15052
 
15053
      /**
15054
       * Find the _Fields constant that matches fieldId, or null if its not found.
15055
       */
15056
      public static _Fields findByThriftId(int fieldId) {
15057
        return byId.get(fieldId);
15058
      }
15059
 
15060
      /**
15061
       * Find the _Fields constant that matches fieldId, throwing an exception
15062
       * if it is not found.
15063
       */
15064
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15065
        _Fields fields = findByThriftId(fieldId);
15066
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15067
        return fields;
15068
      }
15069
 
15070
      /**
15071
       * Find the _Fields constant that matches name, or null if its not found.
15072
       */
15073
      public static _Fields findByName(String name) {
15074
        return byName.get(name);
15075
      }
15076
 
15077
      private final short _thriftId;
15078
      private final String _fieldName;
15079
 
15080
      _Fields(short thriftId, String fieldName) {
15081
        _thriftId = thriftId;
15082
        _fieldName = fieldName;
15083
      }
15084
 
15085
      public short getThriftFieldId() {
15086
        return _thriftId;
15087
      }
15088
 
15089
      public String getFieldName() {
15090
        return _fieldName;
15091
      }
15092
    }
15093
 
15094
    // isset id assignments
15095
    private static final int __SUCCESS_ISSET_ID = 0;
15096
    private BitSet __isset_bit_vector = new BitSet(1);
15097
 
15098
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15099
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15100
          new FieldValueMetaData(TType.BOOL)));
15101
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15102
          new FieldValueMetaData(TType.STRUCT)));
15103
    }});
15104
 
15105
    static {
15106
      FieldMetaData.addStructMetaDataMap(sendSMSVerification_result.class, metaDataMap);
15107
    }
15108
 
15109
    public sendSMSVerification_result() {
15110
    }
15111
 
15112
    public sendSMSVerification_result(
15113
      boolean success,
15114
      UserContextException ucx)
15115
    {
15116
      this();
15117
      this.success = success;
15118
      setSuccessIsSet(true);
15119
      this.ucx = ucx;
15120
    }
15121
 
15122
    /**
15123
     * Performs a deep copy on <i>other</i>.
15124
     */
15125
    public sendSMSVerification_result(sendSMSVerification_result other) {
15126
      __isset_bit_vector.clear();
15127
      __isset_bit_vector.or(other.__isset_bit_vector);
15128
      this.success = other.success;
15129
      if (other.isSetUcx()) {
15130
        this.ucx = new UserContextException(other.ucx);
15131
      }
15132
    }
15133
 
15134
    public sendSMSVerification_result deepCopy() {
15135
      return new sendSMSVerification_result(this);
15136
    }
15137
 
15138
    @Deprecated
15139
    public sendSMSVerification_result clone() {
15140
      return new sendSMSVerification_result(this);
15141
    }
15142
 
15143
    public boolean isSuccess() {
15144
      return this.success;
15145
    }
15146
 
15147
    public sendSMSVerification_result setSuccess(boolean success) {
15148
      this.success = success;
15149
      setSuccessIsSet(true);
15150
      return this;
15151
    }
15152
 
15153
    public void unsetSuccess() {
15154
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15155
    }
15156
 
15157
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15158
    public boolean isSetSuccess() {
15159
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15160
    }
15161
 
15162
    public void setSuccessIsSet(boolean value) {
15163
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15164
    }
15165
 
15166
    public UserContextException getUcx() {
15167
      return this.ucx;
15168
    }
15169
 
15170
    public sendSMSVerification_result setUcx(UserContextException ucx) {
15171
      this.ucx = ucx;
15172
      return this;
15173
    }
15174
 
15175
    public void unsetUcx() {
15176
      this.ucx = null;
15177
    }
15178
 
15179
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15180
    public boolean isSetUcx() {
15181
      return this.ucx != null;
15182
    }
15183
 
15184
    public void setUcxIsSet(boolean value) {
15185
      if (!value) {
15186
        this.ucx = null;
15187
      }
15188
    }
15189
 
15190
    public void setFieldValue(_Fields field, Object value) {
15191
      switch (field) {
15192
      case SUCCESS:
15193
        if (value == null) {
15194
          unsetSuccess();
15195
        } else {
15196
          setSuccess((Boolean)value);
15197
        }
15198
        break;
15199
 
15200
      case UCX:
15201
        if (value == null) {
15202
          unsetUcx();
15203
        } else {
15204
          setUcx((UserContextException)value);
15205
        }
15206
        break;
15207
 
15208
      }
15209
    }
15210
 
15211
    public void setFieldValue(int fieldID, Object value) {
15212
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15213
    }
15214
 
15215
    public Object getFieldValue(_Fields field) {
15216
      switch (field) {
15217
      case SUCCESS:
15218
        return new Boolean(isSuccess());
15219
 
15220
      case UCX:
15221
        return getUcx();
15222
 
15223
      }
15224
      throw new IllegalStateException();
15225
    }
15226
 
15227
    public Object getFieldValue(int fieldId) {
15228
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15229
    }
15230
 
15231
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15232
    public boolean isSet(_Fields field) {
15233
      switch (field) {
15234
      case SUCCESS:
15235
        return isSetSuccess();
15236
      case UCX:
15237
        return isSetUcx();
15238
      }
15239
      throw new IllegalStateException();
15240
    }
15241
 
15242
    public boolean isSet(int fieldID) {
15243
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15244
    }
15245
 
15246
    @Override
15247
    public boolean equals(Object that) {
15248
      if (that == null)
15249
        return false;
15250
      if (that instanceof sendSMSVerification_result)
15251
        return this.equals((sendSMSVerification_result)that);
15252
      return false;
15253
    }
15254
 
15255
    public boolean equals(sendSMSVerification_result that) {
15256
      if (that == null)
15257
        return false;
15258
 
15259
      boolean this_present_success = true;
15260
      boolean that_present_success = true;
15261
      if (this_present_success || that_present_success) {
15262
        if (!(this_present_success && that_present_success))
15263
          return false;
15264
        if (this.success != that.success)
15265
          return false;
15266
      }
15267
 
15268
      boolean this_present_ucx = true && this.isSetUcx();
15269
      boolean that_present_ucx = true && that.isSetUcx();
15270
      if (this_present_ucx || that_present_ucx) {
15271
        if (!(this_present_ucx && that_present_ucx))
15272
          return false;
15273
        if (!this.ucx.equals(that.ucx))
15274
          return false;
15275
      }
15276
 
15277
      return true;
15278
    }
15279
 
15280
    @Override
15281
    public int hashCode() {
15282
      return 0;
15283
    }
15284
 
15285
    public int compareTo(sendSMSVerification_result other) {
15286
      if (!getClass().equals(other.getClass())) {
15287
        return getClass().getName().compareTo(other.getClass().getName());
15288
      }
15289
 
15290
      int lastComparison = 0;
15291
      sendSMSVerification_result typedOther = (sendSMSVerification_result)other;
15292
 
15293
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15294
      if (lastComparison != 0) {
15295
        return lastComparison;
15296
      }
15297
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15298
      if (lastComparison != 0) {
15299
        return lastComparison;
15300
      }
15301
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15302
      if (lastComparison != 0) {
15303
        return lastComparison;
15304
      }
15305
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15306
      if (lastComparison != 0) {
15307
        return lastComparison;
15308
      }
15309
      return 0;
15310
    }
15311
 
15312
    public void read(TProtocol iprot) throws TException {
15313
      TField field;
15314
      iprot.readStructBegin();
15315
      while (true)
15316
      {
15317
        field = iprot.readFieldBegin();
15318
        if (field.type == TType.STOP) { 
15319
          break;
15320
        }
15321
        _Fields fieldId = _Fields.findByThriftId(field.id);
15322
        if (fieldId == null) {
15323
          TProtocolUtil.skip(iprot, field.type);
15324
        } else {
15325
          switch (fieldId) {
15326
            case SUCCESS:
15327
              if (field.type == TType.BOOL) {
15328
                this.success = iprot.readBool();
15329
                setSuccessIsSet(true);
15330
              } else { 
15331
                TProtocolUtil.skip(iprot, field.type);
15332
              }
15333
              break;
15334
            case UCX:
15335
              if (field.type == TType.STRUCT) {
15336
                this.ucx = new UserContextException();
15337
                this.ucx.read(iprot);
15338
              } else { 
15339
                TProtocolUtil.skip(iprot, field.type);
15340
              }
15341
              break;
15342
          }
15343
          iprot.readFieldEnd();
15344
        }
15345
      }
15346
      iprot.readStructEnd();
15347
      validate();
15348
    }
15349
 
15350
    public void write(TProtocol oprot) throws TException {
15351
      oprot.writeStructBegin(STRUCT_DESC);
15352
 
15353
      if (this.isSetSuccess()) {
15354
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15355
        oprot.writeBool(this.success);
15356
        oprot.writeFieldEnd();
15357
      } else if (this.isSetUcx()) {
15358
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15359
        this.ucx.write(oprot);
15360
        oprot.writeFieldEnd();
15361
      }
15362
      oprot.writeFieldStop();
15363
      oprot.writeStructEnd();
15364
    }
15365
 
15366
    @Override
15367
    public String toString() {
15368
      StringBuilder sb = new StringBuilder("sendSMSVerification_result(");
15369
      boolean first = true;
15370
 
15371
      sb.append("success:");
15372
      sb.append(this.success);
15373
      first = false;
15374
      if (!first) sb.append(", ");
15375
      sb.append("ucx:");
15376
      if (this.ucx == null) {
15377
        sb.append("null");
15378
      } else {
15379
        sb.append(this.ucx);
15380
      }
15381
      first = false;
15382
      sb.append(")");
15383
      return sb.toString();
15384
    }
15385
 
15386
    public void validate() throws TException {
15387
      // check for required fields
15388
    }
15389
 
15390
  }
15391
 
15392
  public static class confirmEmailVerification_args implements TBase<confirmEmailVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirmEmailVerification_args>   {
15393
    private static final TStruct STRUCT_DESC = new TStruct("confirmEmailVerification_args");
15394
 
15395
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
15396
 
15397
    private long userid;
15398
 
15399
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15400
    public enum _Fields implements TFieldIdEnum {
15401
      USERID((short)1, "userid");
15402
 
15403
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15404
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15405
 
15406
      static {
15407
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15408
          byId.put((int)field._thriftId, field);
15409
          byName.put(field.getFieldName(), field);
15410
        }
15411
      }
15412
 
15413
      /**
15414
       * Find the _Fields constant that matches fieldId, or null if its not found.
15415
       */
15416
      public static _Fields findByThriftId(int fieldId) {
15417
        return byId.get(fieldId);
15418
      }
15419
 
15420
      /**
15421
       * Find the _Fields constant that matches fieldId, throwing an exception
15422
       * if it is not found.
15423
       */
15424
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15425
        _Fields fields = findByThriftId(fieldId);
15426
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15427
        return fields;
15428
      }
15429
 
15430
      /**
15431
       * Find the _Fields constant that matches name, or null if its not found.
15432
       */
15433
      public static _Fields findByName(String name) {
15434
        return byName.get(name);
15435
      }
15436
 
15437
      private final short _thriftId;
15438
      private final String _fieldName;
15439
 
15440
      _Fields(short thriftId, String fieldName) {
15441
        _thriftId = thriftId;
15442
        _fieldName = fieldName;
15443
      }
15444
 
15445
      public short getThriftFieldId() {
15446
        return _thriftId;
15447
      }
15448
 
15449
      public String getFieldName() {
15450
        return _fieldName;
15451
      }
15452
    }
15453
 
15454
    // isset id assignments
15455
    private static final int __USERID_ISSET_ID = 0;
15456
    private BitSet __isset_bit_vector = new BitSet(1);
15457
 
15458
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15459
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
15460
          new FieldValueMetaData(TType.I64)));
15461
    }});
15462
 
15463
    static {
15464
      FieldMetaData.addStructMetaDataMap(confirmEmailVerification_args.class, metaDataMap);
15465
    }
15466
 
15467
    public confirmEmailVerification_args() {
15468
    }
15469
 
15470
    public confirmEmailVerification_args(
15471
      long userid)
15472
    {
15473
      this();
15474
      this.userid = userid;
15475
      setUseridIsSet(true);
15476
    }
15477
 
15478
    /**
15479
     * Performs a deep copy on <i>other</i>.
15480
     */
15481
    public confirmEmailVerification_args(confirmEmailVerification_args other) {
15482
      __isset_bit_vector.clear();
15483
      __isset_bit_vector.or(other.__isset_bit_vector);
15484
      this.userid = other.userid;
15485
    }
15486
 
15487
    public confirmEmailVerification_args deepCopy() {
15488
      return new confirmEmailVerification_args(this);
15489
    }
15490
 
15491
    @Deprecated
15492
    public confirmEmailVerification_args clone() {
15493
      return new confirmEmailVerification_args(this);
15494
    }
15495
 
15496
    public long getUserid() {
15497
      return this.userid;
15498
    }
15499
 
15500
    public confirmEmailVerification_args setUserid(long userid) {
15501
      this.userid = userid;
15502
      setUseridIsSet(true);
15503
      return this;
15504
    }
15505
 
15506
    public void unsetUserid() {
15507
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15508
    }
15509
 
15510
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
15511
    public boolean isSetUserid() {
15512
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15513
    }
15514
 
15515
    public void setUseridIsSet(boolean value) {
15516
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15517
    }
15518
 
15519
    public void setFieldValue(_Fields field, Object value) {
15520
      switch (field) {
15521
      case USERID:
15522
        if (value == null) {
15523
          unsetUserid();
15524
        } else {
15525
          setUserid((Long)value);
15526
        }
15527
        break;
15528
 
15529
      }
15530
    }
15531
 
15532
    public void setFieldValue(int fieldID, Object value) {
15533
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15534
    }
15535
 
15536
    public Object getFieldValue(_Fields field) {
15537
      switch (field) {
15538
      case USERID:
15539
        return new Long(getUserid());
15540
 
15541
      }
15542
      throw new IllegalStateException();
15543
    }
15544
 
15545
    public Object getFieldValue(int fieldId) {
15546
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15547
    }
15548
 
15549
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15550
    public boolean isSet(_Fields field) {
15551
      switch (field) {
15552
      case USERID:
15553
        return isSetUserid();
15554
      }
15555
      throw new IllegalStateException();
15556
    }
15557
 
15558
    public boolean isSet(int fieldID) {
15559
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15560
    }
15561
 
15562
    @Override
15563
    public boolean equals(Object that) {
15564
      if (that == null)
15565
        return false;
15566
      if (that instanceof confirmEmailVerification_args)
15567
        return this.equals((confirmEmailVerification_args)that);
15568
      return false;
15569
    }
15570
 
15571
    public boolean equals(confirmEmailVerification_args that) {
15572
      if (that == null)
15573
        return false;
15574
 
15575
      boolean this_present_userid = true;
15576
      boolean that_present_userid = true;
15577
      if (this_present_userid || that_present_userid) {
15578
        if (!(this_present_userid && that_present_userid))
15579
          return false;
15580
        if (this.userid != that.userid)
15581
          return false;
15582
      }
15583
 
15584
      return true;
15585
    }
15586
 
15587
    @Override
15588
    public int hashCode() {
15589
      return 0;
15590
    }
15591
 
15592
    public int compareTo(confirmEmailVerification_args other) {
15593
      if (!getClass().equals(other.getClass())) {
15594
        return getClass().getName().compareTo(other.getClass().getName());
15595
      }
15596
 
15597
      int lastComparison = 0;
15598
      confirmEmailVerification_args typedOther = (confirmEmailVerification_args)other;
15599
 
15600
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
15601
      if (lastComparison != 0) {
15602
        return lastComparison;
15603
      }
15604
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
15605
      if (lastComparison != 0) {
15606
        return lastComparison;
15607
      }
15608
      return 0;
15609
    }
15610
 
15611
    public void read(TProtocol iprot) throws TException {
15612
      TField field;
15613
      iprot.readStructBegin();
15614
      while (true)
15615
      {
15616
        field = iprot.readFieldBegin();
15617
        if (field.type == TType.STOP) { 
15618
          break;
15619
        }
15620
        _Fields fieldId = _Fields.findByThriftId(field.id);
15621
        if (fieldId == null) {
15622
          TProtocolUtil.skip(iprot, field.type);
15623
        } else {
15624
          switch (fieldId) {
15625
            case USERID:
15626
              if (field.type == TType.I64) {
15627
                this.userid = iprot.readI64();
15628
                setUseridIsSet(true);
15629
              } else { 
15630
                TProtocolUtil.skip(iprot, field.type);
15631
              }
15632
              break;
15633
          }
15634
          iprot.readFieldEnd();
15635
        }
15636
      }
15637
      iprot.readStructEnd();
15638
      validate();
15639
    }
15640
 
15641
    public void write(TProtocol oprot) throws TException {
15642
      validate();
15643
 
15644
      oprot.writeStructBegin(STRUCT_DESC);
15645
      oprot.writeFieldBegin(USERID_FIELD_DESC);
15646
      oprot.writeI64(this.userid);
15647
      oprot.writeFieldEnd();
15648
      oprot.writeFieldStop();
15649
      oprot.writeStructEnd();
15650
    }
15651
 
15652
    @Override
15653
    public String toString() {
15654
      StringBuilder sb = new StringBuilder("confirmEmailVerification_args(");
15655
      boolean first = true;
15656
 
15657
      sb.append("userid:");
15658
      sb.append(this.userid);
15659
      first = false;
15660
      sb.append(")");
15661
      return sb.toString();
15662
    }
15663
 
15664
    public void validate() throws TException {
15665
      // check for required fields
15666
    }
15667
 
15668
  }
15669
 
15670
  public static class confirmEmailVerification_result implements TBase<confirmEmailVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirmEmailVerification_result>   {
15671
    private static final TStruct STRUCT_DESC = new TStruct("confirmEmailVerification_result");
15672
 
15673
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15674
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15675
 
15676
    private boolean success;
15677
    private UserContextException ucx;
15678
 
15679
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15680
    public enum _Fields implements TFieldIdEnum {
15681
      SUCCESS((short)0, "success"),
15682
      UCX((short)1, "ucx");
15683
 
15684
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15685
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15686
 
15687
      static {
15688
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15689
          byId.put((int)field._thriftId, field);
15690
          byName.put(field.getFieldName(), field);
15691
        }
15692
      }
15693
 
15694
      /**
15695
       * Find the _Fields constant that matches fieldId, or null if its not found.
15696
       */
15697
      public static _Fields findByThriftId(int fieldId) {
15698
        return byId.get(fieldId);
15699
      }
15700
 
15701
      /**
15702
       * Find the _Fields constant that matches fieldId, throwing an exception
15703
       * if it is not found.
15704
       */
15705
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15706
        _Fields fields = findByThriftId(fieldId);
15707
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15708
        return fields;
15709
      }
15710
 
15711
      /**
15712
       * Find the _Fields constant that matches name, or null if its not found.
15713
       */
15714
      public static _Fields findByName(String name) {
15715
        return byName.get(name);
15716
      }
15717
 
15718
      private final short _thriftId;
15719
      private final String _fieldName;
15720
 
15721
      _Fields(short thriftId, String fieldName) {
15722
        _thriftId = thriftId;
15723
        _fieldName = fieldName;
15724
      }
15725
 
15726
      public short getThriftFieldId() {
15727
        return _thriftId;
15728
      }
15729
 
15730
      public String getFieldName() {
15731
        return _fieldName;
15732
      }
15733
    }
15734
 
15735
    // isset id assignments
15736
    private static final int __SUCCESS_ISSET_ID = 0;
15737
    private BitSet __isset_bit_vector = new BitSet(1);
15738
 
15739
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15740
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15741
          new FieldValueMetaData(TType.BOOL)));
15742
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15743
          new FieldValueMetaData(TType.STRUCT)));
15744
    }});
15745
 
15746
    static {
15747
      FieldMetaData.addStructMetaDataMap(confirmEmailVerification_result.class, metaDataMap);
15748
    }
15749
 
15750
    public confirmEmailVerification_result() {
15751
    }
15752
 
15753
    public confirmEmailVerification_result(
15754
      boolean success,
15755
      UserContextException ucx)
15756
    {
15757
      this();
15758
      this.success = success;
15759
      setSuccessIsSet(true);
15760
      this.ucx = ucx;
15761
    }
15762
 
15763
    /**
15764
     * Performs a deep copy on <i>other</i>.
15765
     */
15766
    public confirmEmailVerification_result(confirmEmailVerification_result other) {
15767
      __isset_bit_vector.clear();
15768
      __isset_bit_vector.or(other.__isset_bit_vector);
15769
      this.success = other.success;
15770
      if (other.isSetUcx()) {
15771
        this.ucx = new UserContextException(other.ucx);
15772
      }
15773
    }
15774
 
15775
    public confirmEmailVerification_result deepCopy() {
15776
      return new confirmEmailVerification_result(this);
15777
    }
15778
 
15779
    @Deprecated
15780
    public confirmEmailVerification_result clone() {
15781
      return new confirmEmailVerification_result(this);
15782
    }
15783
 
15784
    public boolean isSuccess() {
15785
      return this.success;
15786
    }
15787
 
15788
    public confirmEmailVerification_result setSuccess(boolean success) {
15789
      this.success = success;
15790
      setSuccessIsSet(true);
15791
      return this;
15792
    }
15793
 
15794
    public void unsetSuccess() {
15795
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15796
    }
15797
 
15798
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15799
    public boolean isSetSuccess() {
15800
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15801
    }
15802
 
15803
    public void setSuccessIsSet(boolean value) {
15804
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15805
    }
15806
 
15807
    public UserContextException getUcx() {
15808
      return this.ucx;
15809
    }
15810
 
15811
    public confirmEmailVerification_result setUcx(UserContextException ucx) {
15812
      this.ucx = ucx;
15813
      return this;
15814
    }
15815
 
15816
    public void unsetUcx() {
15817
      this.ucx = null;
15818
    }
15819
 
15820
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15821
    public boolean isSetUcx() {
15822
      return this.ucx != null;
15823
    }
15824
 
15825
    public void setUcxIsSet(boolean value) {
15826
      if (!value) {
15827
        this.ucx = null;
15828
      }
15829
    }
15830
 
15831
    public void setFieldValue(_Fields field, Object value) {
15832
      switch (field) {
15833
      case SUCCESS:
15834
        if (value == null) {
15835
          unsetSuccess();
15836
        } else {
15837
          setSuccess((Boolean)value);
15838
        }
15839
        break;
15840
 
15841
      case UCX:
15842
        if (value == null) {
15843
          unsetUcx();
15844
        } else {
15845
          setUcx((UserContextException)value);
15846
        }
15847
        break;
15848
 
15849
      }
15850
    }
15851
 
15852
    public void setFieldValue(int fieldID, Object value) {
15853
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15854
    }
15855
 
15856
    public Object getFieldValue(_Fields field) {
15857
      switch (field) {
15858
      case SUCCESS:
15859
        return new Boolean(isSuccess());
15860
 
15861
      case UCX:
15862
        return getUcx();
15863
 
15864
      }
15865
      throw new IllegalStateException();
15866
    }
15867
 
15868
    public Object getFieldValue(int fieldId) {
15869
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15870
    }
15871
 
15872
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15873
    public boolean isSet(_Fields field) {
15874
      switch (field) {
15875
      case SUCCESS:
15876
        return isSetSuccess();
15877
      case UCX:
15878
        return isSetUcx();
15879
      }
15880
      throw new IllegalStateException();
15881
    }
15882
 
15883
    public boolean isSet(int fieldID) {
15884
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15885
    }
15886
 
15887
    @Override
15888
    public boolean equals(Object that) {
15889
      if (that == null)
15890
        return false;
15891
      if (that instanceof confirmEmailVerification_result)
15892
        return this.equals((confirmEmailVerification_result)that);
15893
      return false;
15894
    }
15895
 
15896
    public boolean equals(confirmEmailVerification_result that) {
15897
      if (that == null)
15898
        return false;
15899
 
15900
      boolean this_present_success = true;
15901
      boolean that_present_success = true;
15902
      if (this_present_success || that_present_success) {
15903
        if (!(this_present_success && that_present_success))
15904
          return false;
15905
        if (this.success != that.success)
15906
          return false;
15907
      }
15908
 
15909
      boolean this_present_ucx = true && this.isSetUcx();
15910
      boolean that_present_ucx = true && that.isSetUcx();
15911
      if (this_present_ucx || that_present_ucx) {
15912
        if (!(this_present_ucx && that_present_ucx))
15913
          return false;
15914
        if (!this.ucx.equals(that.ucx))
15915
          return false;
15916
      }
15917
 
15918
      return true;
15919
    }
15920
 
15921
    @Override
15922
    public int hashCode() {
15923
      return 0;
15924
    }
15925
 
15926
    public int compareTo(confirmEmailVerification_result other) {
15927
      if (!getClass().equals(other.getClass())) {
15928
        return getClass().getName().compareTo(other.getClass().getName());
15929
      }
15930
 
15931
      int lastComparison = 0;
15932
      confirmEmailVerification_result typedOther = (confirmEmailVerification_result)other;
15933
 
15934
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15935
      if (lastComparison != 0) {
15936
        return lastComparison;
15937
      }
15938
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15939
      if (lastComparison != 0) {
15940
        return lastComparison;
15941
      }
15942
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15943
      if (lastComparison != 0) {
15944
        return lastComparison;
15945
      }
15946
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15947
      if (lastComparison != 0) {
15948
        return lastComparison;
15949
      }
15950
      return 0;
15951
    }
15952
 
15953
    public void read(TProtocol iprot) throws TException {
15954
      TField field;
15955
      iprot.readStructBegin();
15956
      while (true)
15957
      {
15958
        field = iprot.readFieldBegin();
15959
        if (field.type == TType.STOP) { 
15960
          break;
15961
        }
15962
        _Fields fieldId = _Fields.findByThriftId(field.id);
15963
        if (fieldId == null) {
15964
          TProtocolUtil.skip(iprot, field.type);
15965
        } else {
15966
          switch (fieldId) {
15967
            case SUCCESS:
15968
              if (field.type == TType.BOOL) {
15969
                this.success = iprot.readBool();
15970
                setSuccessIsSet(true);
15971
              } else { 
15972
                TProtocolUtil.skip(iprot, field.type);
15973
              }
15974
              break;
15975
            case UCX:
15976
              if (field.type == TType.STRUCT) {
15977
                this.ucx = new UserContextException();
15978
                this.ucx.read(iprot);
15979
              } else { 
15980
                TProtocolUtil.skip(iprot, field.type);
15981
              }
15982
              break;
15983
          }
15984
          iprot.readFieldEnd();
15985
        }
15986
      }
15987
      iprot.readStructEnd();
15988
      validate();
15989
    }
15990
 
15991
    public void write(TProtocol oprot) throws TException {
15992
      oprot.writeStructBegin(STRUCT_DESC);
15993
 
15994
      if (this.isSetSuccess()) {
15995
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15996
        oprot.writeBool(this.success);
15997
        oprot.writeFieldEnd();
15998
      } else if (this.isSetUcx()) {
15999
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16000
        this.ucx.write(oprot);
16001
        oprot.writeFieldEnd();
16002
      }
16003
      oprot.writeFieldStop();
16004
      oprot.writeStructEnd();
16005
    }
16006
 
16007
    @Override
16008
    public String toString() {
16009
      StringBuilder sb = new StringBuilder("confirmEmailVerification_result(");
16010
      boolean first = true;
16011
 
16012
      sb.append("success:");
16013
      sb.append(this.success);
16014
      first = false;
16015
      if (!first) sb.append(", ");
16016
      sb.append("ucx:");
16017
      if (this.ucx == null) {
16018
        sb.append("null");
16019
      } else {
16020
        sb.append(this.ucx);
16021
      }
16022
      first = false;
16023
      sb.append(")");
16024
      return sb.toString();
16025
    }
16026
 
16027
    public void validate() throws TException {
16028
      // check for required fields
16029
    }
16030
 
16031
  }
16032
 
16033
  public static class confirmSMSVerification_args implements TBase<confirmSMSVerification_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirmSMSVerification_args>   {
16034
    private static final TStruct STRUCT_DESC = new TStruct("confirmSMSVerification_args");
16035
 
16036
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
16037
 
16038
    private long userid;
16039
 
16040
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16041
    public enum _Fields implements TFieldIdEnum {
16042
      USERID((short)1, "userid");
16043
 
16044
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16045
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16046
 
16047
      static {
16048
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16049
          byId.put((int)field._thriftId, field);
16050
          byName.put(field.getFieldName(), field);
16051
        }
16052
      }
16053
 
16054
      /**
16055
       * Find the _Fields constant that matches fieldId, or null if its not found.
16056
       */
16057
      public static _Fields findByThriftId(int fieldId) {
16058
        return byId.get(fieldId);
16059
      }
16060
 
16061
      /**
16062
       * Find the _Fields constant that matches fieldId, throwing an exception
16063
       * if it is not found.
16064
       */
16065
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16066
        _Fields fields = findByThriftId(fieldId);
16067
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16068
        return fields;
16069
      }
16070
 
16071
      /**
16072
       * Find the _Fields constant that matches name, or null if its not found.
16073
       */
16074
      public static _Fields findByName(String name) {
16075
        return byName.get(name);
16076
      }
16077
 
16078
      private final short _thriftId;
16079
      private final String _fieldName;
16080
 
16081
      _Fields(short thriftId, String fieldName) {
16082
        _thriftId = thriftId;
16083
        _fieldName = fieldName;
16084
      }
16085
 
16086
      public short getThriftFieldId() {
16087
        return _thriftId;
16088
      }
16089
 
16090
      public String getFieldName() {
16091
        return _fieldName;
16092
      }
16093
    }
16094
 
16095
    // isset id assignments
16096
    private static final int __USERID_ISSET_ID = 0;
16097
    private BitSet __isset_bit_vector = new BitSet(1);
16098
 
16099
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16100
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
16101
          new FieldValueMetaData(TType.I64)));
16102
    }});
16103
 
16104
    static {
16105
      FieldMetaData.addStructMetaDataMap(confirmSMSVerification_args.class, metaDataMap);
16106
    }
16107
 
16108
    public confirmSMSVerification_args() {
16109
    }
16110
 
16111
    public confirmSMSVerification_args(
16112
      long userid)
16113
    {
16114
      this();
16115
      this.userid = userid;
16116
      setUseridIsSet(true);
16117
    }
16118
 
16119
    /**
16120
     * Performs a deep copy on <i>other</i>.
16121
     */
16122
    public confirmSMSVerification_args(confirmSMSVerification_args other) {
16123
      __isset_bit_vector.clear();
16124
      __isset_bit_vector.or(other.__isset_bit_vector);
16125
      this.userid = other.userid;
16126
    }
16127
 
16128
    public confirmSMSVerification_args deepCopy() {
16129
      return new confirmSMSVerification_args(this);
16130
    }
16131
 
16132
    @Deprecated
16133
    public confirmSMSVerification_args clone() {
16134
      return new confirmSMSVerification_args(this);
16135
    }
16136
 
16137
    public long getUserid() {
16138
      return this.userid;
16139
    }
16140
 
16141
    public confirmSMSVerification_args setUserid(long userid) {
16142
      this.userid = userid;
16143
      setUseridIsSet(true);
16144
      return this;
16145
    }
16146
 
16147
    public void unsetUserid() {
16148
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16149
    }
16150
 
16151
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
16152
    public boolean isSetUserid() {
16153
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16154
    }
16155
 
16156
    public void setUseridIsSet(boolean value) {
16157
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16158
    }
16159
 
16160
    public void setFieldValue(_Fields field, Object value) {
16161
      switch (field) {
16162
      case USERID:
16163
        if (value == null) {
16164
          unsetUserid();
16165
        } else {
16166
          setUserid((Long)value);
16167
        }
16168
        break;
16169
 
16170
      }
16171
    }
16172
 
16173
    public void setFieldValue(int fieldID, Object value) {
16174
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16175
    }
16176
 
16177
    public Object getFieldValue(_Fields field) {
16178
      switch (field) {
16179
      case USERID:
16180
        return new Long(getUserid());
16181
 
16182
      }
16183
      throw new IllegalStateException();
16184
    }
16185
 
16186
    public Object getFieldValue(int fieldId) {
16187
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16188
    }
16189
 
16190
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16191
    public boolean isSet(_Fields field) {
16192
      switch (field) {
16193
      case USERID:
16194
        return isSetUserid();
16195
      }
16196
      throw new IllegalStateException();
16197
    }
16198
 
16199
    public boolean isSet(int fieldID) {
16200
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16201
    }
16202
 
16203
    @Override
16204
    public boolean equals(Object that) {
16205
      if (that == null)
16206
        return false;
16207
      if (that instanceof confirmSMSVerification_args)
16208
        return this.equals((confirmSMSVerification_args)that);
16209
      return false;
16210
    }
16211
 
16212
    public boolean equals(confirmSMSVerification_args that) {
16213
      if (that == null)
16214
        return false;
16215
 
16216
      boolean this_present_userid = true;
16217
      boolean that_present_userid = true;
16218
      if (this_present_userid || that_present_userid) {
16219
        if (!(this_present_userid && that_present_userid))
16220
          return false;
16221
        if (this.userid != that.userid)
16222
          return false;
16223
      }
16224
 
16225
      return true;
16226
    }
16227
 
16228
    @Override
16229
    public int hashCode() {
16230
      return 0;
16231
    }
16232
 
16233
    public int compareTo(confirmSMSVerification_args other) {
16234
      if (!getClass().equals(other.getClass())) {
16235
        return getClass().getName().compareTo(other.getClass().getName());
16236
      }
16237
 
16238
      int lastComparison = 0;
16239
      confirmSMSVerification_args typedOther = (confirmSMSVerification_args)other;
16240
 
16241
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
16242
      if (lastComparison != 0) {
16243
        return lastComparison;
16244
      }
16245
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
16246
      if (lastComparison != 0) {
16247
        return lastComparison;
16248
      }
16249
      return 0;
16250
    }
16251
 
16252
    public void read(TProtocol iprot) throws TException {
16253
      TField field;
16254
      iprot.readStructBegin();
16255
      while (true)
16256
      {
16257
        field = iprot.readFieldBegin();
16258
        if (field.type == TType.STOP) { 
16259
          break;
16260
        }
16261
        _Fields fieldId = _Fields.findByThriftId(field.id);
16262
        if (fieldId == null) {
16263
          TProtocolUtil.skip(iprot, field.type);
16264
        } else {
16265
          switch (fieldId) {
16266
            case USERID:
16267
              if (field.type == TType.I64) {
16268
                this.userid = iprot.readI64();
16269
                setUseridIsSet(true);
16270
              } else { 
16271
                TProtocolUtil.skip(iprot, field.type);
16272
              }
16273
              break;
16274
          }
16275
          iprot.readFieldEnd();
16276
        }
16277
      }
16278
      iprot.readStructEnd();
16279
      validate();
16280
    }
16281
 
16282
    public void write(TProtocol oprot) throws TException {
16283
      validate();
16284
 
16285
      oprot.writeStructBegin(STRUCT_DESC);
16286
      oprot.writeFieldBegin(USERID_FIELD_DESC);
16287
      oprot.writeI64(this.userid);
16288
      oprot.writeFieldEnd();
16289
      oprot.writeFieldStop();
16290
      oprot.writeStructEnd();
16291
    }
16292
 
16293
    @Override
16294
    public String toString() {
16295
      StringBuilder sb = new StringBuilder("confirmSMSVerification_args(");
16296
      boolean first = true;
16297
 
16298
      sb.append("userid:");
16299
      sb.append(this.userid);
16300
      first = false;
16301
      sb.append(")");
16302
      return sb.toString();
16303
    }
16304
 
16305
    public void validate() throws TException {
16306
      // check for required fields
16307
    }
16308
 
16309
  }
16310
 
16311
  public static class confirmSMSVerification_result implements TBase<confirmSMSVerification_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirmSMSVerification_result>   {
16312
    private static final TStruct STRUCT_DESC = new TStruct("confirmSMSVerification_result");
16313
 
16314
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16315
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
16316
 
16317
    private boolean success;
16318
    private UserContextException ucx;
16319
 
16320
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16321
    public enum _Fields implements TFieldIdEnum {
16322
      SUCCESS((short)0, "success"),
16323
      UCX((short)1, "ucx");
16324
 
16325
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16326
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16327
 
16328
      static {
16329
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16330
          byId.put((int)field._thriftId, field);
16331
          byName.put(field.getFieldName(), field);
16332
        }
16333
      }
16334
 
16335
      /**
16336
       * Find the _Fields constant that matches fieldId, or null if its not found.
16337
       */
16338
      public static _Fields findByThriftId(int fieldId) {
16339
        return byId.get(fieldId);
16340
      }
16341
 
16342
      /**
16343
       * Find the _Fields constant that matches fieldId, throwing an exception
16344
       * if it is not found.
16345
       */
16346
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16347
        _Fields fields = findByThriftId(fieldId);
16348
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16349
        return fields;
16350
      }
16351
 
16352
      /**
16353
       * Find the _Fields constant that matches name, or null if its not found.
16354
       */
16355
      public static _Fields findByName(String name) {
16356
        return byName.get(name);
16357
      }
16358
 
16359
      private final short _thriftId;
16360
      private final String _fieldName;
16361
 
16362
      _Fields(short thriftId, String fieldName) {
16363
        _thriftId = thriftId;
16364
        _fieldName = fieldName;
16365
      }
16366
 
16367
      public short getThriftFieldId() {
16368
        return _thriftId;
16369
      }
16370
 
16371
      public String getFieldName() {
16372
        return _fieldName;
16373
      }
16374
    }
16375
 
16376
    // isset id assignments
16377
    private static final int __SUCCESS_ISSET_ID = 0;
16378
    private BitSet __isset_bit_vector = new BitSet(1);
16379
 
16380
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16381
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16382
          new FieldValueMetaData(TType.BOOL)));
16383
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
16384
          new FieldValueMetaData(TType.STRUCT)));
16385
    }});
16386
 
16387
    static {
16388
      FieldMetaData.addStructMetaDataMap(confirmSMSVerification_result.class, metaDataMap);
16389
    }
16390
 
16391
    public confirmSMSVerification_result() {
16392
    }
16393
 
16394
    public confirmSMSVerification_result(
16395
      boolean success,
16396
      UserContextException ucx)
16397
    {
16398
      this();
16399
      this.success = success;
16400
      setSuccessIsSet(true);
16401
      this.ucx = ucx;
16402
    }
16403
 
16404
    /**
16405
     * Performs a deep copy on <i>other</i>.
16406
     */
16407
    public confirmSMSVerification_result(confirmSMSVerification_result other) {
16408
      __isset_bit_vector.clear();
16409
      __isset_bit_vector.or(other.__isset_bit_vector);
16410
      this.success = other.success;
16411
      if (other.isSetUcx()) {
16412
        this.ucx = new UserContextException(other.ucx);
16413
      }
16414
    }
16415
 
16416
    public confirmSMSVerification_result deepCopy() {
16417
      return new confirmSMSVerification_result(this);
16418
    }
16419
 
16420
    @Deprecated
16421
    public confirmSMSVerification_result clone() {
16422
      return new confirmSMSVerification_result(this);
16423
    }
16424
 
16425
    public boolean isSuccess() {
16426
      return this.success;
16427
    }
16428
 
16429
    public confirmSMSVerification_result setSuccess(boolean success) {
16430
      this.success = success;
16431
      setSuccessIsSet(true);
16432
      return this;
16433
    }
16434
 
16435
    public void unsetSuccess() {
16436
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16437
    }
16438
 
16439
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16440
    public boolean isSetSuccess() {
16441
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16442
    }
16443
 
16444
    public void setSuccessIsSet(boolean value) {
16445
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16446
    }
16447
 
16448
    public UserContextException getUcx() {
16449
      return this.ucx;
16450
    }
16451
 
16452
    public confirmSMSVerification_result setUcx(UserContextException ucx) {
16453
      this.ucx = ucx;
16454
      return this;
16455
    }
16456
 
16457
    public void unsetUcx() {
16458
      this.ucx = null;
16459
    }
16460
 
16461
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
16462
    public boolean isSetUcx() {
16463
      return this.ucx != null;
16464
    }
16465
 
16466
    public void setUcxIsSet(boolean value) {
16467
      if (!value) {
16468
        this.ucx = null;
16469
      }
16470
    }
16471
 
16472
    public void setFieldValue(_Fields field, Object value) {
16473
      switch (field) {
16474
      case SUCCESS:
16475
        if (value == null) {
16476
          unsetSuccess();
16477
        } else {
16478
          setSuccess((Boolean)value);
16479
        }
16480
        break;
16481
 
16482
      case UCX:
16483
        if (value == null) {
16484
          unsetUcx();
16485
        } else {
16486
          setUcx((UserContextException)value);
16487
        }
16488
        break;
16489
 
16490
      }
16491
    }
16492
 
16493
    public void setFieldValue(int fieldID, Object value) {
16494
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16495
    }
16496
 
16497
    public Object getFieldValue(_Fields field) {
16498
      switch (field) {
16499
      case SUCCESS:
16500
        return new Boolean(isSuccess());
16501
 
16502
      case UCX:
16503
        return getUcx();
16504
 
16505
      }
16506
      throw new IllegalStateException();
16507
    }
16508
 
16509
    public Object getFieldValue(int fieldId) {
16510
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16511
    }
16512
 
16513
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16514
    public boolean isSet(_Fields field) {
16515
      switch (field) {
16516
      case SUCCESS:
16517
        return isSetSuccess();
16518
      case UCX:
16519
        return isSetUcx();
16520
      }
16521
      throw new IllegalStateException();
16522
    }
16523
 
16524
    public boolean isSet(int fieldID) {
16525
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16526
    }
16527
 
16528
    @Override
16529
    public boolean equals(Object that) {
16530
      if (that == null)
16531
        return false;
16532
      if (that instanceof confirmSMSVerification_result)
16533
        return this.equals((confirmSMSVerification_result)that);
16534
      return false;
16535
    }
16536
 
16537
    public boolean equals(confirmSMSVerification_result that) {
16538
      if (that == null)
16539
        return false;
16540
 
16541
      boolean this_present_success = true;
16542
      boolean that_present_success = true;
16543
      if (this_present_success || that_present_success) {
16544
        if (!(this_present_success && that_present_success))
16545
          return false;
16546
        if (this.success != that.success)
16547
          return false;
16548
      }
16549
 
16550
      boolean this_present_ucx = true && this.isSetUcx();
16551
      boolean that_present_ucx = true && that.isSetUcx();
16552
      if (this_present_ucx || that_present_ucx) {
16553
        if (!(this_present_ucx && that_present_ucx))
16554
          return false;
16555
        if (!this.ucx.equals(that.ucx))
16556
          return false;
16557
      }
16558
 
16559
      return true;
16560
    }
16561
 
16562
    @Override
16563
    public int hashCode() {
16564
      return 0;
16565
    }
16566
 
16567
    public int compareTo(confirmSMSVerification_result other) {
16568
      if (!getClass().equals(other.getClass())) {
16569
        return getClass().getName().compareTo(other.getClass().getName());
16570
      }
16571
 
16572
      int lastComparison = 0;
16573
      confirmSMSVerification_result typedOther = (confirmSMSVerification_result)other;
16574
 
16575
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16576
      if (lastComparison != 0) {
16577
        return lastComparison;
16578
      }
16579
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16580
      if (lastComparison != 0) {
16581
        return lastComparison;
16582
      }
16583
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
16584
      if (lastComparison != 0) {
16585
        return lastComparison;
16586
      }
16587
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
16588
      if (lastComparison != 0) {
16589
        return lastComparison;
16590
      }
16591
      return 0;
16592
    }
16593
 
16594
    public void read(TProtocol iprot) throws TException {
16595
      TField field;
16596
      iprot.readStructBegin();
16597
      while (true)
16598
      {
16599
        field = iprot.readFieldBegin();
16600
        if (field.type == TType.STOP) { 
16601
          break;
16602
        }
16603
        _Fields fieldId = _Fields.findByThriftId(field.id);
16604
        if (fieldId == null) {
16605
          TProtocolUtil.skip(iprot, field.type);
16606
        } else {
16607
          switch (fieldId) {
16608
            case SUCCESS:
16609
              if (field.type == TType.BOOL) {
16610
                this.success = iprot.readBool();
16611
                setSuccessIsSet(true);
16612
              } else { 
16613
                TProtocolUtil.skip(iprot, field.type);
16614
              }
16615
              break;
16616
            case UCX:
16617
              if (field.type == TType.STRUCT) {
16618
                this.ucx = new UserContextException();
16619
                this.ucx.read(iprot);
16620
              } else { 
16621
                TProtocolUtil.skip(iprot, field.type);
16622
              }
16623
              break;
16624
          }
16625
          iprot.readFieldEnd();
16626
        }
16627
      }
16628
      iprot.readStructEnd();
16629
      validate();
16630
    }
16631
 
16632
    public void write(TProtocol oprot) throws TException {
16633
      oprot.writeStructBegin(STRUCT_DESC);
16634
 
16635
      if (this.isSetSuccess()) {
16636
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16637
        oprot.writeBool(this.success);
16638
        oprot.writeFieldEnd();
16639
      } else if (this.isSetUcx()) {
16640
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16641
        this.ucx.write(oprot);
16642
        oprot.writeFieldEnd();
16643
      }
16644
      oprot.writeFieldStop();
16645
      oprot.writeStructEnd();
16646
    }
16647
 
16648
    @Override
16649
    public String toString() {
16650
      StringBuilder sb = new StringBuilder("confirmSMSVerification_result(");
16651
      boolean first = true;
16652
 
16653
      sb.append("success:");
16654
      sb.append(this.success);
16655
      first = false;
16656
      if (!first) sb.append(", ");
16657
      sb.append("ucx:");
16658
      if (this.ucx == null) {
16659
        sb.append("null");
16660
      } else {
16661
        sb.append(this.ucx);
16662
      }
16663
      first = false;
16664
      sb.append(")");
16665
      return sb.toString();
16666
    }
16667
 
16668
    public void validate() throws TException {
16669
      // check for required fields
16670
    }
16671
 
16672
  }
16673
 
16674
  public static class addSocialhandle_args implements TBase<addSocialhandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSocialhandle_args>   {
16675
    private static final TStruct STRUCT_DESC = new TStruct("addSocialhandle_args");
16676
 
16677
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
16678
    private static final TField SOCIAL_SERVICE_FIELD_DESC = new TField("socialService", TType.STRING, (short)2);
16679
    private static final TField HANDLE_FIELD_DESC = new TField("handle", TType.STRING, (short)3);
16680
 
16681
    private long userid;
16682
    private String socialService;
16683
    private String handle;
16684
 
16685
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16686
    public enum _Fields implements TFieldIdEnum {
16687
      USERID((short)1, "userid"),
16688
      SOCIAL_SERVICE((short)2, "socialService"),
16689
      HANDLE((short)3, "handle");
16690
 
16691
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16692
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16693
 
16694
      static {
16695
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16696
          byId.put((int)field._thriftId, field);
16697
          byName.put(field.getFieldName(), field);
16698
        }
16699
      }
16700
 
16701
      /**
16702
       * Find the _Fields constant that matches fieldId, or null if its not found.
16703
       */
16704
      public static _Fields findByThriftId(int fieldId) {
16705
        return byId.get(fieldId);
16706
      }
16707
 
16708
      /**
16709
       * Find the _Fields constant that matches fieldId, throwing an exception
16710
       * if it is not found.
16711
       */
16712
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16713
        _Fields fields = findByThriftId(fieldId);
16714
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16715
        return fields;
16716
      }
16717
 
16718
      /**
16719
       * Find the _Fields constant that matches name, or null if its not found.
16720
       */
16721
      public static _Fields findByName(String name) {
16722
        return byName.get(name);
16723
      }
16724
 
16725
      private final short _thriftId;
16726
      private final String _fieldName;
16727
 
16728
      _Fields(short thriftId, String fieldName) {
16729
        _thriftId = thriftId;
16730
        _fieldName = fieldName;
16731
      }
16732
 
16733
      public short getThriftFieldId() {
16734
        return _thriftId;
16735
      }
16736
 
16737
      public String getFieldName() {
16738
        return _fieldName;
16739
      }
16740
    }
16741
 
16742
    // isset id assignments
16743
    private static final int __USERID_ISSET_ID = 0;
16744
    private BitSet __isset_bit_vector = new BitSet(1);
16745
 
16746
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16747
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
16748
          new FieldValueMetaData(TType.I64)));
16749
      put(_Fields.SOCIAL_SERVICE, new FieldMetaData("socialService", TFieldRequirementType.DEFAULT, 
16750
          new FieldValueMetaData(TType.STRING)));
16751
      put(_Fields.HANDLE, new FieldMetaData("handle", TFieldRequirementType.DEFAULT, 
16752
          new FieldValueMetaData(TType.STRING)));
16753
    }});
16754
 
16755
    static {
16756
      FieldMetaData.addStructMetaDataMap(addSocialhandle_args.class, metaDataMap);
16757
    }
16758
 
16759
    public addSocialhandle_args() {
16760
    }
16761
 
16762
    public addSocialhandle_args(
16763
      long userid,
16764
      String socialService,
16765
      String handle)
16766
    {
16767
      this();
16768
      this.userid = userid;
16769
      setUseridIsSet(true);
16770
      this.socialService = socialService;
16771
      this.handle = handle;
16772
    }
16773
 
16774
    /**
16775
     * Performs a deep copy on <i>other</i>.
16776
     */
16777
    public addSocialhandle_args(addSocialhandle_args other) {
16778
      __isset_bit_vector.clear();
16779
      __isset_bit_vector.or(other.__isset_bit_vector);
16780
      this.userid = other.userid;
16781
      if (other.isSetSocialService()) {
16782
        this.socialService = other.socialService;
16783
      }
16784
      if (other.isSetHandle()) {
16785
        this.handle = other.handle;
16786
      }
16787
    }
16788
 
16789
    public addSocialhandle_args deepCopy() {
16790
      return new addSocialhandle_args(this);
16791
    }
16792
 
16793
    @Deprecated
16794
    public addSocialhandle_args clone() {
16795
      return new addSocialhandle_args(this);
16796
    }
16797
 
16798
    public long getUserid() {
16799
      return this.userid;
16800
    }
16801
 
16802
    public addSocialhandle_args setUserid(long userid) {
16803
      this.userid = userid;
16804
      setUseridIsSet(true);
16805
      return this;
16806
    }
16807
 
16808
    public void unsetUserid() {
16809
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16810
    }
16811
 
16812
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
16813
    public boolean isSetUserid() {
16814
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16815
    }
16816
 
16817
    public void setUseridIsSet(boolean value) {
16818
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16819
    }
16820
 
16821
    public String getSocialService() {
16822
      return this.socialService;
16823
    }
16824
 
16825
    public addSocialhandle_args setSocialService(String socialService) {
16826
      this.socialService = socialService;
16827
      return this;
16828
    }
16829
 
16830
    public void unsetSocialService() {
16831
      this.socialService = null;
16832
    }
16833
 
16834
    /** Returns true if field socialService is set (has been asigned a value) and false otherwise */
16835
    public boolean isSetSocialService() {
16836
      return this.socialService != null;
16837
    }
16838
 
16839
    public void setSocialServiceIsSet(boolean value) {
16840
      if (!value) {
16841
        this.socialService = null;
16842
      }
16843
    }
16844
 
16845
    public String getHandle() {
16846
      return this.handle;
16847
    }
16848
 
16849
    public addSocialhandle_args setHandle(String handle) {
16850
      this.handle = handle;
16851
      return this;
16852
    }
16853
 
16854
    public void unsetHandle() {
16855
      this.handle = null;
16856
    }
16857
 
16858
    /** Returns true if field handle is set (has been asigned a value) and false otherwise */
16859
    public boolean isSetHandle() {
16860
      return this.handle != null;
16861
    }
16862
 
16863
    public void setHandleIsSet(boolean value) {
16864
      if (!value) {
16865
        this.handle = null;
16866
      }
16867
    }
16868
 
16869
    public void setFieldValue(_Fields field, Object value) {
16870
      switch (field) {
16871
      case USERID:
16872
        if (value == null) {
16873
          unsetUserid();
16874
        } else {
16875
          setUserid((Long)value);
16876
        }
16877
        break;
16878
 
16879
      case SOCIAL_SERVICE:
16880
        if (value == null) {
16881
          unsetSocialService();
16882
        } else {
16883
          setSocialService((String)value);
16884
        }
16885
        break;
16886
 
16887
      case HANDLE:
16888
        if (value == null) {
16889
          unsetHandle();
16890
        } else {
16891
          setHandle((String)value);
16892
        }
16893
        break;
16894
 
16895
      }
16896
    }
16897
 
16898
    public void setFieldValue(int fieldID, Object value) {
16899
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16900
    }
16901
 
16902
    public Object getFieldValue(_Fields field) {
16903
      switch (field) {
16904
      case USERID:
16905
        return new Long(getUserid());
16906
 
16907
      case SOCIAL_SERVICE:
16908
        return getSocialService();
16909
 
16910
      case HANDLE:
16911
        return getHandle();
16912
 
16913
      }
16914
      throw new IllegalStateException();
16915
    }
16916
 
16917
    public Object getFieldValue(int fieldId) {
16918
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16919
    }
16920
 
16921
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16922
    public boolean isSet(_Fields field) {
16923
      switch (field) {
16924
      case USERID:
16925
        return isSetUserid();
16926
      case SOCIAL_SERVICE:
16927
        return isSetSocialService();
16928
      case HANDLE:
16929
        return isSetHandle();
16930
      }
16931
      throw new IllegalStateException();
16932
    }
16933
 
16934
    public boolean isSet(int fieldID) {
16935
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16936
    }
16937
 
16938
    @Override
16939
    public boolean equals(Object that) {
16940
      if (that == null)
16941
        return false;
16942
      if (that instanceof addSocialhandle_args)
16943
        return this.equals((addSocialhandle_args)that);
16944
      return false;
16945
    }
16946
 
16947
    public boolean equals(addSocialhandle_args that) {
16948
      if (that == null)
16949
        return false;
16950
 
16951
      boolean this_present_userid = true;
16952
      boolean that_present_userid = true;
16953
      if (this_present_userid || that_present_userid) {
16954
        if (!(this_present_userid && that_present_userid))
16955
          return false;
16956
        if (this.userid != that.userid)
16957
          return false;
16958
      }
16959
 
16960
      boolean this_present_socialService = true && this.isSetSocialService();
16961
      boolean that_present_socialService = true && that.isSetSocialService();
16962
      if (this_present_socialService || that_present_socialService) {
16963
        if (!(this_present_socialService && that_present_socialService))
16964
          return false;
16965
        if (!this.socialService.equals(that.socialService))
16966
          return false;
16967
      }
16968
 
16969
      boolean this_present_handle = true && this.isSetHandle();
16970
      boolean that_present_handle = true && that.isSetHandle();
16971
      if (this_present_handle || that_present_handle) {
16972
        if (!(this_present_handle && that_present_handle))
16973
          return false;
16974
        if (!this.handle.equals(that.handle))
16975
          return false;
16976
      }
16977
 
16978
      return true;
16979
    }
16980
 
16981
    @Override
16982
    public int hashCode() {
16983
      return 0;
16984
    }
16985
 
16986
    public int compareTo(addSocialhandle_args other) {
16987
      if (!getClass().equals(other.getClass())) {
16988
        return getClass().getName().compareTo(other.getClass().getName());
16989
      }
16990
 
16991
      int lastComparison = 0;
16992
      addSocialhandle_args typedOther = (addSocialhandle_args)other;
16993
 
16994
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
16995
      if (lastComparison != 0) {
16996
        return lastComparison;
16997
      }
16998
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
16999
      if (lastComparison != 0) {
17000
        return lastComparison;
17001
      }
17002
      lastComparison = Boolean.valueOf(isSetSocialService()).compareTo(isSetSocialService());
17003
      if (lastComparison != 0) {
17004
        return lastComparison;
17005
      }
17006
      lastComparison = TBaseHelper.compareTo(socialService, typedOther.socialService);
17007
      if (lastComparison != 0) {
17008
        return lastComparison;
17009
      }
17010
      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(isSetHandle());
17011
      if (lastComparison != 0) {
17012
        return lastComparison;
17013
      }
17014
      lastComparison = TBaseHelper.compareTo(handle, typedOther.handle);
17015
      if (lastComparison != 0) {
17016
        return lastComparison;
17017
      }
17018
      return 0;
17019
    }
17020
 
17021
    public void read(TProtocol iprot) throws TException {
17022
      TField field;
17023
      iprot.readStructBegin();
17024
      while (true)
17025
      {
17026
        field = iprot.readFieldBegin();
17027
        if (field.type == TType.STOP) { 
17028
          break;
17029
        }
17030
        _Fields fieldId = _Fields.findByThriftId(field.id);
17031
        if (fieldId == null) {
17032
          TProtocolUtil.skip(iprot, field.type);
17033
        } else {
17034
          switch (fieldId) {
17035
            case USERID:
17036
              if (field.type == TType.I64) {
17037
                this.userid = iprot.readI64();
17038
                setUseridIsSet(true);
17039
              } else { 
17040
                TProtocolUtil.skip(iprot, field.type);
17041
              }
17042
              break;
17043
            case SOCIAL_SERVICE:
17044
              if (field.type == TType.STRING) {
17045
                this.socialService = iprot.readString();
17046
              } else { 
17047
                TProtocolUtil.skip(iprot, field.type);
17048
              }
17049
              break;
17050
            case HANDLE:
17051
              if (field.type == TType.STRING) {
17052
                this.handle = iprot.readString();
17053
              } else { 
17054
                TProtocolUtil.skip(iprot, field.type);
17055
              }
17056
              break;
17057
          }
17058
          iprot.readFieldEnd();
17059
        }
17060
      }
17061
      iprot.readStructEnd();
17062
      validate();
17063
    }
17064
 
17065
    public void write(TProtocol oprot) throws TException {
17066
      validate();
17067
 
17068
      oprot.writeStructBegin(STRUCT_DESC);
17069
      oprot.writeFieldBegin(USERID_FIELD_DESC);
17070
      oprot.writeI64(this.userid);
17071
      oprot.writeFieldEnd();
17072
      if (this.socialService != null) {
17073
        oprot.writeFieldBegin(SOCIAL_SERVICE_FIELD_DESC);
17074
        oprot.writeString(this.socialService);
17075
        oprot.writeFieldEnd();
17076
      }
17077
      if (this.handle != null) {
17078
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
17079
        oprot.writeString(this.handle);
17080
        oprot.writeFieldEnd();
17081
      }
17082
      oprot.writeFieldStop();
17083
      oprot.writeStructEnd();
17084
    }
17085
 
17086
    @Override
17087
    public String toString() {
17088
      StringBuilder sb = new StringBuilder("addSocialhandle_args(");
17089
      boolean first = true;
17090
 
17091
      sb.append("userid:");
17092
      sb.append(this.userid);
17093
      first = false;
17094
      if (!first) sb.append(", ");
17095
      sb.append("socialService:");
17096
      if (this.socialService == null) {
17097
        sb.append("null");
17098
      } else {
17099
        sb.append(this.socialService);
17100
      }
17101
      first = false;
17102
      if (!first) sb.append(", ");
17103
      sb.append("handle:");
17104
      if (this.handle == null) {
17105
        sb.append("null");
17106
      } else {
17107
        sb.append(this.handle);
17108
      }
17109
      first = false;
17110
      sb.append(")");
17111
      return sb.toString();
17112
    }
17113
 
17114
    public void validate() throws TException {
17115
      // check for required fields
17116
    }
17117
 
17118
  }
17119
 
17120
  public static class addSocialhandle_result implements TBase<addSocialhandle_result._Fields>, java.io.Serializable, Cloneable, Comparable<addSocialhandle_result>   {
17121
    private static final TStruct STRUCT_DESC = new TStruct("addSocialhandle_result");
17122
 
17123
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
17124
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
17125
 
17126
    private boolean success;
17127
    private UserContextException ucx;
17128
 
17129
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17130
    public enum _Fields implements TFieldIdEnum {
17131
      SUCCESS((short)0, "success"),
17132
      UCX((short)1, "ucx");
17133
 
17134
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17135
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17136
 
17137
      static {
17138
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17139
          byId.put((int)field._thriftId, field);
17140
          byName.put(field.getFieldName(), field);
17141
        }
17142
      }
17143
 
17144
      /**
17145
       * Find the _Fields constant that matches fieldId, or null if its not found.
17146
       */
17147
      public static _Fields findByThriftId(int fieldId) {
17148
        return byId.get(fieldId);
17149
      }
17150
 
17151
      /**
17152
       * Find the _Fields constant that matches fieldId, throwing an exception
17153
       * if it is not found.
17154
       */
17155
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17156
        _Fields fields = findByThriftId(fieldId);
17157
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17158
        return fields;
17159
      }
17160
 
17161
      /**
17162
       * Find the _Fields constant that matches name, or null if its not found.
17163
       */
17164
      public static _Fields findByName(String name) {
17165
        return byName.get(name);
17166
      }
17167
 
17168
      private final short _thriftId;
17169
      private final String _fieldName;
17170
 
17171
      _Fields(short thriftId, String fieldName) {
17172
        _thriftId = thriftId;
17173
        _fieldName = fieldName;
17174
      }
17175
 
17176
      public short getThriftFieldId() {
17177
        return _thriftId;
17178
      }
17179
 
17180
      public String getFieldName() {
17181
        return _fieldName;
17182
      }
17183
    }
17184
 
17185
    // isset id assignments
17186
    private static final int __SUCCESS_ISSET_ID = 0;
17187
    private BitSet __isset_bit_vector = new BitSet(1);
17188
 
17189
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17190
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17191
          new FieldValueMetaData(TType.BOOL)));
17192
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
17193
          new FieldValueMetaData(TType.STRUCT)));
17194
    }});
17195
 
17196
    static {
17197
      FieldMetaData.addStructMetaDataMap(addSocialhandle_result.class, metaDataMap);
17198
    }
17199
 
17200
    public addSocialhandle_result() {
17201
    }
17202
 
17203
    public addSocialhandle_result(
17204
      boolean success,
17205
      UserContextException ucx)
17206
    {
17207
      this();
17208
      this.success = success;
17209
      setSuccessIsSet(true);
17210
      this.ucx = ucx;
17211
    }
17212
 
17213
    /**
17214
     * Performs a deep copy on <i>other</i>.
17215
     */
17216
    public addSocialhandle_result(addSocialhandle_result other) {
17217
      __isset_bit_vector.clear();
17218
      __isset_bit_vector.or(other.__isset_bit_vector);
17219
      this.success = other.success;
17220
      if (other.isSetUcx()) {
17221
        this.ucx = new UserContextException(other.ucx);
17222
      }
17223
    }
17224
 
17225
    public addSocialhandle_result deepCopy() {
17226
      return new addSocialhandle_result(this);
17227
    }
17228
 
17229
    @Deprecated
17230
    public addSocialhandle_result clone() {
17231
      return new addSocialhandle_result(this);
17232
    }
17233
 
17234
    public boolean isSuccess() {
17235
      return this.success;
17236
    }
17237
 
17238
    public addSocialhandle_result setSuccess(boolean success) {
17239
      this.success = success;
17240
      setSuccessIsSet(true);
17241
      return this;
17242
    }
17243
 
17244
    public void unsetSuccess() {
17245
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17246
    }
17247
 
17248
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17249
    public boolean isSetSuccess() {
17250
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17251
    }
17252
 
17253
    public void setSuccessIsSet(boolean value) {
17254
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17255
    }
17256
 
17257
    public UserContextException getUcx() {
17258
      return this.ucx;
17259
    }
17260
 
17261
    public addSocialhandle_result setUcx(UserContextException ucx) {
17262
      this.ucx = ucx;
17263
      return this;
17264
    }
17265
 
17266
    public void unsetUcx() {
17267
      this.ucx = null;
17268
    }
17269
 
17270
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
17271
    public boolean isSetUcx() {
17272
      return this.ucx != null;
17273
    }
17274
 
17275
    public void setUcxIsSet(boolean value) {
17276
      if (!value) {
17277
        this.ucx = null;
17278
      }
17279
    }
17280
 
17281
    public void setFieldValue(_Fields field, Object value) {
17282
      switch (field) {
17283
      case SUCCESS:
17284
        if (value == null) {
17285
          unsetSuccess();
17286
        } else {
17287
          setSuccess((Boolean)value);
17288
        }
17289
        break;
17290
 
17291
      case UCX:
17292
        if (value == null) {
17293
          unsetUcx();
17294
        } else {
17295
          setUcx((UserContextException)value);
17296
        }
17297
        break;
17298
 
17299
      }
17300
    }
17301
 
17302
    public void setFieldValue(int fieldID, Object value) {
17303
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17304
    }
17305
 
17306
    public Object getFieldValue(_Fields field) {
17307
      switch (field) {
17308
      case SUCCESS:
17309
        return new Boolean(isSuccess());
17310
 
17311
      case UCX:
17312
        return getUcx();
17313
 
17314
      }
17315
      throw new IllegalStateException();
17316
    }
17317
 
17318
    public Object getFieldValue(int fieldId) {
17319
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17320
    }
17321
 
17322
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17323
    public boolean isSet(_Fields field) {
17324
      switch (field) {
17325
      case SUCCESS:
17326
        return isSetSuccess();
17327
      case UCX:
17328
        return isSetUcx();
17329
      }
17330
      throw new IllegalStateException();
17331
    }
17332
 
17333
    public boolean isSet(int fieldID) {
17334
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17335
    }
17336
 
17337
    @Override
17338
    public boolean equals(Object that) {
17339
      if (that == null)
17340
        return false;
17341
      if (that instanceof addSocialhandle_result)
17342
        return this.equals((addSocialhandle_result)that);
17343
      return false;
17344
    }
17345
 
17346
    public boolean equals(addSocialhandle_result that) {
17347
      if (that == null)
17348
        return false;
17349
 
17350
      boolean this_present_success = true;
17351
      boolean that_present_success = true;
17352
      if (this_present_success || that_present_success) {
17353
        if (!(this_present_success && that_present_success))
17354
          return false;
17355
        if (this.success != that.success)
17356
          return false;
17357
      }
17358
 
17359
      boolean this_present_ucx = true && this.isSetUcx();
17360
      boolean that_present_ucx = true && that.isSetUcx();
17361
      if (this_present_ucx || that_present_ucx) {
17362
        if (!(this_present_ucx && that_present_ucx))
17363
          return false;
17364
        if (!this.ucx.equals(that.ucx))
17365
          return false;
17366
      }
17367
 
17368
      return true;
17369
    }
17370
 
17371
    @Override
17372
    public int hashCode() {
17373
      return 0;
17374
    }
17375
 
17376
    public int compareTo(addSocialhandle_result other) {
17377
      if (!getClass().equals(other.getClass())) {
17378
        return getClass().getName().compareTo(other.getClass().getName());
17379
      }
17380
 
17381
      int lastComparison = 0;
17382
      addSocialhandle_result typedOther = (addSocialhandle_result)other;
17383
 
17384
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17385
      if (lastComparison != 0) {
17386
        return lastComparison;
17387
      }
17388
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17389
      if (lastComparison != 0) {
17390
        return lastComparison;
17391
      }
17392
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
17393
      if (lastComparison != 0) {
17394
        return lastComparison;
17395
      }
17396
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
17397
      if (lastComparison != 0) {
17398
        return lastComparison;
17399
      }
17400
      return 0;
17401
    }
17402
 
17403
    public void read(TProtocol iprot) throws TException {
17404
      TField field;
17405
      iprot.readStructBegin();
17406
      while (true)
17407
      {
17408
        field = iprot.readFieldBegin();
17409
        if (field.type == TType.STOP) { 
17410
          break;
17411
        }
17412
        _Fields fieldId = _Fields.findByThriftId(field.id);
17413
        if (fieldId == null) {
17414
          TProtocolUtil.skip(iprot, field.type);
17415
        } else {
17416
          switch (fieldId) {
17417
            case SUCCESS:
17418
              if (field.type == TType.BOOL) {
17419
                this.success = iprot.readBool();
17420
                setSuccessIsSet(true);
17421
              } else { 
17422
                TProtocolUtil.skip(iprot, field.type);
17423
              }
17424
              break;
17425
            case UCX:
17426
              if (field.type == TType.STRUCT) {
17427
                this.ucx = new UserContextException();
17428
                this.ucx.read(iprot);
17429
              } else { 
17430
                TProtocolUtil.skip(iprot, field.type);
17431
              }
17432
              break;
17433
          }
17434
          iprot.readFieldEnd();
17435
        }
17436
      }
17437
      iprot.readStructEnd();
17438
      validate();
17439
    }
17440
 
17441
    public void write(TProtocol oprot) throws TException {
17442
      oprot.writeStructBegin(STRUCT_DESC);
17443
 
17444
      if (this.isSetSuccess()) {
17445
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17446
        oprot.writeBool(this.success);
17447
        oprot.writeFieldEnd();
17448
      } else if (this.isSetUcx()) {
17449
        oprot.writeFieldBegin(UCX_FIELD_DESC);
17450
        this.ucx.write(oprot);
17451
        oprot.writeFieldEnd();
17452
      }
17453
      oprot.writeFieldStop();
17454
      oprot.writeStructEnd();
17455
    }
17456
 
17457
    @Override
17458
    public String toString() {
17459
      StringBuilder sb = new StringBuilder("addSocialhandle_result(");
17460
      boolean first = true;
17461
 
17462
      sb.append("success:");
17463
      sb.append(this.success);
17464
      first = false;
17465
      if (!first) sb.append(", ");
17466
      sb.append("ucx:");
17467
      if (this.ucx == null) {
17468
        sb.append("null");
17469
      } else {
17470
        sb.append(this.ucx);
17471
      }
17472
      first = false;
17473
      sb.append(")");
17474
      return sb.toString();
17475
    }
17476
 
17477
    public void validate() throws TException {
17478
      // check for required fields
17479
    }
17480
 
17481
  }
17482
 
130 ashish 17483
  public static class sendNewPasswordById_args implements TBase<sendNewPasswordById_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordById_args>   {
17484
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordById_args");
17485
 
17486
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
17487
 
17488
    private long userid;
17489
 
17490
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17491
    public enum _Fields implements TFieldIdEnum {
17492
      USERID((short)1, "userid");
17493
 
17494
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17495
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17496
 
17497
      static {
17498
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17499
          byId.put((int)field._thriftId, field);
17500
          byName.put(field.getFieldName(), field);
17501
        }
17502
      }
17503
 
17504
      /**
17505
       * Find the _Fields constant that matches fieldId, or null if its not found.
17506
       */
17507
      public static _Fields findByThriftId(int fieldId) {
17508
        return byId.get(fieldId);
17509
      }
17510
 
17511
      /**
17512
       * Find the _Fields constant that matches fieldId, throwing an exception
17513
       * if it is not found.
17514
       */
17515
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17516
        _Fields fields = findByThriftId(fieldId);
17517
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17518
        return fields;
17519
      }
17520
 
17521
      /**
17522
       * Find the _Fields constant that matches name, or null if its not found.
17523
       */
17524
      public static _Fields findByName(String name) {
17525
        return byName.get(name);
17526
      }
17527
 
17528
      private final short _thriftId;
17529
      private final String _fieldName;
17530
 
17531
      _Fields(short thriftId, String fieldName) {
17532
        _thriftId = thriftId;
17533
        _fieldName = fieldName;
17534
      }
17535
 
17536
      public short getThriftFieldId() {
17537
        return _thriftId;
17538
      }
17539
 
17540
      public String getFieldName() {
17541
        return _fieldName;
17542
      }
17543
    }
17544
 
17545
    // isset id assignments
17546
    private static final int __USERID_ISSET_ID = 0;
17547
    private BitSet __isset_bit_vector = new BitSet(1);
17548
 
17549
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17550
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
17551
          new FieldValueMetaData(TType.I64)));
17552
    }});
17553
 
17554
    static {
17555
      FieldMetaData.addStructMetaDataMap(sendNewPasswordById_args.class, metaDataMap);
17556
    }
17557
 
17558
    public sendNewPasswordById_args() {
17559
    }
17560
 
17561
    public sendNewPasswordById_args(
17562
      long userid)
17563
    {
17564
      this();
17565
      this.userid = userid;
17566
      setUseridIsSet(true);
17567
    }
17568
 
17569
    /**
17570
     * Performs a deep copy on <i>other</i>.
17571
     */
17572
    public sendNewPasswordById_args(sendNewPasswordById_args other) {
17573
      __isset_bit_vector.clear();
17574
      __isset_bit_vector.or(other.__isset_bit_vector);
17575
      this.userid = other.userid;
17576
    }
17577
 
17578
    public sendNewPasswordById_args deepCopy() {
17579
      return new sendNewPasswordById_args(this);
17580
    }
17581
 
17582
    @Deprecated
17583
    public sendNewPasswordById_args clone() {
17584
      return new sendNewPasswordById_args(this);
17585
    }
17586
 
17587
    public long getUserid() {
17588
      return this.userid;
17589
    }
17590
 
17591
    public sendNewPasswordById_args setUserid(long userid) {
17592
      this.userid = userid;
17593
      setUseridIsSet(true);
17594
      return this;
17595
    }
17596
 
17597
    public void unsetUserid() {
17598
      __isset_bit_vector.clear(__USERID_ISSET_ID);
17599
    }
17600
 
17601
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
17602
    public boolean isSetUserid() {
17603
      return __isset_bit_vector.get(__USERID_ISSET_ID);
17604
    }
17605
 
17606
    public void setUseridIsSet(boolean value) {
17607
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17608
    }
17609
 
17610
    public void setFieldValue(_Fields field, Object value) {
17611
      switch (field) {
17612
      case USERID:
17613
        if (value == null) {
17614
          unsetUserid();
17615
        } else {
17616
          setUserid((Long)value);
17617
        }
17618
        break;
17619
 
17620
      }
17621
    }
17622
 
17623
    public void setFieldValue(int fieldID, Object value) {
17624
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17625
    }
17626
 
17627
    public Object getFieldValue(_Fields field) {
17628
      switch (field) {
17629
      case USERID:
17630
        return new Long(getUserid());
17631
 
17632
      }
17633
      throw new IllegalStateException();
17634
    }
17635
 
17636
    public Object getFieldValue(int fieldId) {
17637
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17638
    }
17639
 
17640
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17641
    public boolean isSet(_Fields field) {
17642
      switch (field) {
17643
      case USERID:
17644
        return isSetUserid();
17645
      }
17646
      throw new IllegalStateException();
17647
    }
17648
 
17649
    public boolean isSet(int fieldID) {
17650
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17651
    }
17652
 
17653
    @Override
17654
    public boolean equals(Object that) {
17655
      if (that == null)
17656
        return false;
17657
      if (that instanceof sendNewPasswordById_args)
17658
        return this.equals((sendNewPasswordById_args)that);
17659
      return false;
17660
    }
17661
 
17662
    public boolean equals(sendNewPasswordById_args that) {
17663
      if (that == null)
17664
        return false;
17665
 
17666
      boolean this_present_userid = true;
17667
      boolean that_present_userid = true;
17668
      if (this_present_userid || that_present_userid) {
17669
        if (!(this_present_userid && that_present_userid))
17670
          return false;
17671
        if (this.userid != that.userid)
17672
          return false;
17673
      }
17674
 
17675
      return true;
17676
    }
17677
 
17678
    @Override
17679
    public int hashCode() {
17680
      return 0;
17681
    }
17682
 
17683
    public int compareTo(sendNewPasswordById_args other) {
17684
      if (!getClass().equals(other.getClass())) {
17685
        return getClass().getName().compareTo(other.getClass().getName());
17686
      }
17687
 
17688
      int lastComparison = 0;
17689
      sendNewPasswordById_args typedOther = (sendNewPasswordById_args)other;
17690
 
17691
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
17692
      if (lastComparison != 0) {
17693
        return lastComparison;
17694
      }
17695
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
17696
      if (lastComparison != 0) {
17697
        return lastComparison;
17698
      }
17699
      return 0;
17700
    }
17701
 
17702
    public void read(TProtocol iprot) throws TException {
17703
      TField field;
17704
      iprot.readStructBegin();
17705
      while (true)
17706
      {
17707
        field = iprot.readFieldBegin();
17708
        if (field.type == TType.STOP) { 
17709
          break;
17710
        }
17711
        _Fields fieldId = _Fields.findByThriftId(field.id);
17712
        if (fieldId == null) {
17713
          TProtocolUtil.skip(iprot, field.type);
17714
        } else {
17715
          switch (fieldId) {
17716
            case USERID:
17717
              if (field.type == TType.I64) {
17718
                this.userid = iprot.readI64();
17719
                setUseridIsSet(true);
17720
              } else { 
17721
                TProtocolUtil.skip(iprot, field.type);
17722
              }
17723
              break;
17724
          }
17725
          iprot.readFieldEnd();
17726
        }
17727
      }
17728
      iprot.readStructEnd();
17729
      validate();
17730
    }
17731
 
17732
    public void write(TProtocol oprot) throws TException {
17733
      validate();
17734
 
17735
      oprot.writeStructBegin(STRUCT_DESC);
17736
      oprot.writeFieldBegin(USERID_FIELD_DESC);
17737
      oprot.writeI64(this.userid);
17738
      oprot.writeFieldEnd();
17739
      oprot.writeFieldStop();
17740
      oprot.writeStructEnd();
17741
    }
17742
 
17743
    @Override
17744
    public String toString() {
17745
      StringBuilder sb = new StringBuilder("sendNewPasswordById_args(");
17746
      boolean first = true;
17747
 
17748
      sb.append("userid:");
17749
      sb.append(this.userid);
17750
      first = false;
17751
      sb.append(")");
17752
      return sb.toString();
17753
    }
17754
 
17755
    public void validate() throws TException {
17756
      // check for required fields
17757
    }
17758
 
17759
  }
17760
 
17761
  public static class sendNewPasswordById_result implements TBase<sendNewPasswordById_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordById_result>   {
17762
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordById_result");
17763
 
17764
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
17765
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
17766
 
17767
    private boolean success;
17768
    private UserContextException ucx;
17769
 
17770
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17771
    public enum _Fields implements TFieldIdEnum {
17772
      SUCCESS((short)0, "success"),
17773
      UCX((short)1, "ucx");
17774
 
17775
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17776
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17777
 
17778
      static {
17779
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17780
          byId.put((int)field._thriftId, field);
17781
          byName.put(field.getFieldName(), field);
17782
        }
17783
      }
17784
 
17785
      /**
17786
       * Find the _Fields constant that matches fieldId, or null if its not found.
17787
       */
17788
      public static _Fields findByThriftId(int fieldId) {
17789
        return byId.get(fieldId);
17790
      }
17791
 
17792
      /**
17793
       * Find the _Fields constant that matches fieldId, throwing an exception
17794
       * if it is not found.
17795
       */
17796
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17797
        _Fields fields = findByThriftId(fieldId);
17798
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17799
        return fields;
17800
      }
17801
 
17802
      /**
17803
       * Find the _Fields constant that matches name, or null if its not found.
17804
       */
17805
      public static _Fields findByName(String name) {
17806
        return byName.get(name);
17807
      }
17808
 
17809
      private final short _thriftId;
17810
      private final String _fieldName;
17811
 
17812
      _Fields(short thriftId, String fieldName) {
17813
        _thriftId = thriftId;
17814
        _fieldName = fieldName;
17815
      }
17816
 
17817
      public short getThriftFieldId() {
17818
        return _thriftId;
17819
      }
17820
 
17821
      public String getFieldName() {
17822
        return _fieldName;
17823
      }
17824
    }
17825
 
17826
    // isset id assignments
17827
    private static final int __SUCCESS_ISSET_ID = 0;
17828
    private BitSet __isset_bit_vector = new BitSet(1);
17829
 
17830
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17831
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17832
          new FieldValueMetaData(TType.BOOL)));
17833
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
17834
          new FieldValueMetaData(TType.STRUCT)));
17835
    }});
17836
 
17837
    static {
17838
      FieldMetaData.addStructMetaDataMap(sendNewPasswordById_result.class, metaDataMap);
17839
    }
17840
 
17841
    public sendNewPasswordById_result() {
17842
    }
17843
 
17844
    public sendNewPasswordById_result(
17845
      boolean success,
17846
      UserContextException ucx)
17847
    {
17848
      this();
17849
      this.success = success;
17850
      setSuccessIsSet(true);
17851
      this.ucx = ucx;
17852
    }
17853
 
17854
    /**
17855
     * Performs a deep copy on <i>other</i>.
17856
     */
17857
    public sendNewPasswordById_result(sendNewPasswordById_result other) {
17858
      __isset_bit_vector.clear();
17859
      __isset_bit_vector.or(other.__isset_bit_vector);
17860
      this.success = other.success;
17861
      if (other.isSetUcx()) {
17862
        this.ucx = new UserContextException(other.ucx);
17863
      }
17864
    }
17865
 
17866
    public sendNewPasswordById_result deepCopy() {
17867
      return new sendNewPasswordById_result(this);
17868
    }
17869
 
17870
    @Deprecated
17871
    public sendNewPasswordById_result clone() {
17872
      return new sendNewPasswordById_result(this);
17873
    }
17874
 
17875
    public boolean isSuccess() {
17876
      return this.success;
17877
    }
17878
 
17879
    public sendNewPasswordById_result setSuccess(boolean success) {
17880
      this.success = success;
17881
      setSuccessIsSet(true);
17882
      return this;
17883
    }
17884
 
17885
    public void unsetSuccess() {
17886
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17887
    }
17888
 
17889
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17890
    public boolean isSetSuccess() {
17891
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17892
    }
17893
 
17894
    public void setSuccessIsSet(boolean value) {
17895
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17896
    }
17897
 
17898
    public UserContextException getUcx() {
17899
      return this.ucx;
17900
    }
17901
 
17902
    public sendNewPasswordById_result setUcx(UserContextException ucx) {
17903
      this.ucx = ucx;
17904
      return this;
17905
    }
17906
 
17907
    public void unsetUcx() {
17908
      this.ucx = null;
17909
    }
17910
 
17911
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
17912
    public boolean isSetUcx() {
17913
      return this.ucx != null;
17914
    }
17915
 
17916
    public void setUcxIsSet(boolean value) {
17917
      if (!value) {
17918
        this.ucx = null;
17919
      }
17920
    }
17921
 
17922
    public void setFieldValue(_Fields field, Object value) {
17923
      switch (field) {
17924
      case SUCCESS:
17925
        if (value == null) {
17926
          unsetSuccess();
17927
        } else {
17928
          setSuccess((Boolean)value);
17929
        }
17930
        break;
17931
 
17932
      case UCX:
17933
        if (value == null) {
17934
          unsetUcx();
17935
        } else {
17936
          setUcx((UserContextException)value);
17937
        }
17938
        break;
17939
 
17940
      }
17941
    }
17942
 
17943
    public void setFieldValue(int fieldID, Object value) {
17944
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17945
    }
17946
 
17947
    public Object getFieldValue(_Fields field) {
17948
      switch (field) {
17949
      case SUCCESS:
17950
        return new Boolean(isSuccess());
17951
 
17952
      case UCX:
17953
        return getUcx();
17954
 
17955
      }
17956
      throw new IllegalStateException();
17957
    }
17958
 
17959
    public Object getFieldValue(int fieldId) {
17960
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17961
    }
17962
 
17963
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17964
    public boolean isSet(_Fields field) {
17965
      switch (field) {
17966
      case SUCCESS:
17967
        return isSetSuccess();
17968
      case UCX:
17969
        return isSetUcx();
17970
      }
17971
      throw new IllegalStateException();
17972
    }
17973
 
17974
    public boolean isSet(int fieldID) {
17975
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17976
    }
17977
 
17978
    @Override
17979
    public boolean equals(Object that) {
17980
      if (that == null)
17981
        return false;
17982
      if (that instanceof sendNewPasswordById_result)
17983
        return this.equals((sendNewPasswordById_result)that);
17984
      return false;
17985
    }
17986
 
17987
    public boolean equals(sendNewPasswordById_result that) {
17988
      if (that == null)
17989
        return false;
17990
 
17991
      boolean this_present_success = true;
17992
      boolean that_present_success = true;
17993
      if (this_present_success || that_present_success) {
17994
        if (!(this_present_success && that_present_success))
17995
          return false;
17996
        if (this.success != that.success)
17997
          return false;
17998
      }
17999
 
18000
      boolean this_present_ucx = true && this.isSetUcx();
18001
      boolean that_present_ucx = true && that.isSetUcx();
18002
      if (this_present_ucx || that_present_ucx) {
18003
        if (!(this_present_ucx && that_present_ucx))
18004
          return false;
18005
        if (!this.ucx.equals(that.ucx))
18006
          return false;
18007
      }
18008
 
18009
      return true;
18010
    }
18011
 
18012
    @Override
18013
    public int hashCode() {
18014
      return 0;
18015
    }
18016
 
18017
    public int compareTo(sendNewPasswordById_result other) {
18018
      if (!getClass().equals(other.getClass())) {
18019
        return getClass().getName().compareTo(other.getClass().getName());
18020
      }
18021
 
18022
      int lastComparison = 0;
18023
      sendNewPasswordById_result typedOther = (sendNewPasswordById_result)other;
18024
 
18025
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18026
      if (lastComparison != 0) {
18027
        return lastComparison;
18028
      }
18029
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18030
      if (lastComparison != 0) {
18031
        return lastComparison;
18032
      }
18033
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
18034
      if (lastComparison != 0) {
18035
        return lastComparison;
18036
      }
18037
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
18038
      if (lastComparison != 0) {
18039
        return lastComparison;
18040
      }
18041
      return 0;
18042
    }
18043
 
18044
    public void read(TProtocol iprot) throws TException {
18045
      TField field;
18046
      iprot.readStructBegin();
18047
      while (true)
18048
      {
18049
        field = iprot.readFieldBegin();
18050
        if (field.type == TType.STOP) { 
18051
          break;
18052
        }
18053
        _Fields fieldId = _Fields.findByThriftId(field.id);
18054
        if (fieldId == null) {
18055
          TProtocolUtil.skip(iprot, field.type);
18056
        } else {
18057
          switch (fieldId) {
18058
            case SUCCESS:
18059
              if (field.type == TType.BOOL) {
18060
                this.success = iprot.readBool();
18061
                setSuccessIsSet(true);
18062
              } else { 
18063
                TProtocolUtil.skip(iprot, field.type);
18064
              }
18065
              break;
18066
            case UCX:
18067
              if (field.type == TType.STRUCT) {
18068
                this.ucx = new UserContextException();
18069
                this.ucx.read(iprot);
18070
              } else { 
18071
                TProtocolUtil.skip(iprot, field.type);
18072
              }
18073
              break;
18074
          }
18075
          iprot.readFieldEnd();
18076
        }
18077
      }
18078
      iprot.readStructEnd();
18079
      validate();
18080
    }
18081
 
18082
    public void write(TProtocol oprot) throws TException {
18083
      oprot.writeStructBegin(STRUCT_DESC);
18084
 
18085
      if (this.isSetSuccess()) {
18086
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18087
        oprot.writeBool(this.success);
18088
        oprot.writeFieldEnd();
18089
      } else if (this.isSetUcx()) {
18090
        oprot.writeFieldBegin(UCX_FIELD_DESC);
18091
        this.ucx.write(oprot);
18092
        oprot.writeFieldEnd();
18093
      }
18094
      oprot.writeFieldStop();
18095
      oprot.writeStructEnd();
18096
    }
18097
 
18098
    @Override
18099
    public String toString() {
18100
      StringBuilder sb = new StringBuilder("sendNewPasswordById_result(");
18101
      boolean first = true;
18102
 
18103
      sb.append("success:");
18104
      sb.append(this.success);
18105
      first = false;
18106
      if (!first) sb.append(", ");
18107
      sb.append("ucx:");
18108
      if (this.ucx == null) {
18109
        sb.append("null");
18110
      } else {
18111
        sb.append(this.ucx);
18112
      }
18113
      first = false;
18114
      sb.append(")");
18115
      return sb.toString();
18116
    }
18117
 
18118
    public void validate() throws TException {
18119
      // check for required fields
18120
    }
18121
 
18122
  }
18123
 
18124
  public static class sendNewPasswordByHandle_args implements TBase<sendNewPasswordByHandle_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordByHandle_args>   {
18125
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordByHandle_args");
18126
 
18127
    private static final TField EMAIL_OR_HANDLE_FIELD_DESC = new TField("emailOrHandle", TType.STRING, (short)1);
18128
    private static final TField IS_EMAIL_FIELD_DESC = new TField("isEmail", TType.BOOL, (short)2);
18129
 
18130
    private String emailOrHandle;
18131
    private boolean isEmail;
18132
 
18133
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18134
    public enum _Fields implements TFieldIdEnum {
18135
      EMAIL_OR_HANDLE((short)1, "emailOrHandle"),
18136
      IS_EMAIL((short)2, "isEmail");
18137
 
18138
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18139
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18140
 
18141
      static {
18142
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18143
          byId.put((int)field._thriftId, field);
18144
          byName.put(field.getFieldName(), field);
18145
        }
18146
      }
18147
 
18148
      /**
18149
       * Find the _Fields constant that matches fieldId, or null if its not found.
18150
       */
18151
      public static _Fields findByThriftId(int fieldId) {
18152
        return byId.get(fieldId);
18153
      }
18154
 
18155
      /**
18156
       * Find the _Fields constant that matches fieldId, throwing an exception
18157
       * if it is not found.
18158
       */
18159
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18160
        _Fields fields = findByThriftId(fieldId);
18161
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18162
        return fields;
18163
      }
18164
 
18165
      /**
18166
       * Find the _Fields constant that matches name, or null if its not found.
18167
       */
18168
      public static _Fields findByName(String name) {
18169
        return byName.get(name);
18170
      }
18171
 
18172
      private final short _thriftId;
18173
      private final String _fieldName;
18174
 
18175
      _Fields(short thriftId, String fieldName) {
18176
        _thriftId = thriftId;
18177
        _fieldName = fieldName;
18178
      }
18179
 
18180
      public short getThriftFieldId() {
18181
        return _thriftId;
18182
      }
18183
 
18184
      public String getFieldName() {
18185
        return _fieldName;
18186
      }
18187
    }
18188
 
18189
    // isset id assignments
18190
    private static final int __ISEMAIL_ISSET_ID = 0;
18191
    private BitSet __isset_bit_vector = new BitSet(1);
18192
 
18193
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18194
      put(_Fields.EMAIL_OR_HANDLE, new FieldMetaData("emailOrHandle", TFieldRequirementType.DEFAULT, 
18195
          new FieldValueMetaData(TType.STRING)));
18196
      put(_Fields.IS_EMAIL, new FieldMetaData("isEmail", TFieldRequirementType.DEFAULT, 
18197
          new FieldValueMetaData(TType.BOOL)));
18198
    }});
18199
 
18200
    static {
18201
      FieldMetaData.addStructMetaDataMap(sendNewPasswordByHandle_args.class, metaDataMap);
18202
    }
18203
 
18204
    public sendNewPasswordByHandle_args() {
18205
    }
18206
 
18207
    public sendNewPasswordByHandle_args(
18208
      String emailOrHandle,
18209
      boolean isEmail)
18210
    {
18211
      this();
18212
      this.emailOrHandle = emailOrHandle;
18213
      this.isEmail = isEmail;
18214
      setIsEmailIsSet(true);
18215
    }
18216
 
18217
    /**
18218
     * Performs a deep copy on <i>other</i>.
18219
     */
18220
    public sendNewPasswordByHandle_args(sendNewPasswordByHandle_args other) {
18221
      __isset_bit_vector.clear();
18222
      __isset_bit_vector.or(other.__isset_bit_vector);
18223
      if (other.isSetEmailOrHandle()) {
18224
        this.emailOrHandle = other.emailOrHandle;
18225
      }
18226
      this.isEmail = other.isEmail;
18227
    }
18228
 
18229
    public sendNewPasswordByHandle_args deepCopy() {
18230
      return new sendNewPasswordByHandle_args(this);
18231
    }
18232
 
18233
    @Deprecated
18234
    public sendNewPasswordByHandle_args clone() {
18235
      return new sendNewPasswordByHandle_args(this);
18236
    }
18237
 
18238
    public String getEmailOrHandle() {
18239
      return this.emailOrHandle;
18240
    }
18241
 
18242
    public sendNewPasswordByHandle_args setEmailOrHandle(String emailOrHandle) {
18243
      this.emailOrHandle = emailOrHandle;
18244
      return this;
18245
    }
18246
 
18247
    public void unsetEmailOrHandle() {
18248
      this.emailOrHandle = null;
18249
    }
18250
 
18251
    /** Returns true if field emailOrHandle is set (has been asigned a value) and false otherwise */
18252
    public boolean isSetEmailOrHandle() {
18253
      return this.emailOrHandle != null;
18254
    }
18255
 
18256
    public void setEmailOrHandleIsSet(boolean value) {
18257
      if (!value) {
18258
        this.emailOrHandle = null;
18259
      }
18260
    }
18261
 
18262
    public boolean isIsEmail() {
18263
      return this.isEmail;
18264
    }
18265
 
18266
    public sendNewPasswordByHandle_args setIsEmail(boolean isEmail) {
18267
      this.isEmail = isEmail;
18268
      setIsEmailIsSet(true);
18269
      return this;
18270
    }
18271
 
18272
    public void unsetIsEmail() {
18273
      __isset_bit_vector.clear(__ISEMAIL_ISSET_ID);
18274
    }
18275
 
18276
    /** Returns true if field isEmail is set (has been asigned a value) and false otherwise */
18277
    public boolean isSetIsEmail() {
18278
      return __isset_bit_vector.get(__ISEMAIL_ISSET_ID);
18279
    }
18280
 
18281
    public void setIsEmailIsSet(boolean value) {
18282
      __isset_bit_vector.set(__ISEMAIL_ISSET_ID, value);
18283
    }
18284
 
18285
    public void setFieldValue(_Fields field, Object value) {
18286
      switch (field) {
18287
      case EMAIL_OR_HANDLE:
18288
        if (value == null) {
18289
          unsetEmailOrHandle();
18290
        } else {
18291
          setEmailOrHandle((String)value);
18292
        }
18293
        break;
18294
 
18295
      case IS_EMAIL:
18296
        if (value == null) {
18297
          unsetIsEmail();
18298
        } else {
18299
          setIsEmail((Boolean)value);
18300
        }
18301
        break;
18302
 
18303
      }
18304
    }
18305
 
18306
    public void setFieldValue(int fieldID, Object value) {
18307
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18308
    }
18309
 
18310
    public Object getFieldValue(_Fields field) {
18311
      switch (field) {
18312
      case EMAIL_OR_HANDLE:
18313
        return getEmailOrHandle();
18314
 
18315
      case IS_EMAIL:
18316
        return new Boolean(isIsEmail());
18317
 
18318
      }
18319
      throw new IllegalStateException();
18320
    }
18321
 
18322
    public Object getFieldValue(int fieldId) {
18323
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18324
    }
18325
 
18326
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18327
    public boolean isSet(_Fields field) {
18328
      switch (field) {
18329
      case EMAIL_OR_HANDLE:
18330
        return isSetEmailOrHandle();
18331
      case IS_EMAIL:
18332
        return isSetIsEmail();
18333
      }
18334
      throw new IllegalStateException();
18335
    }
18336
 
18337
    public boolean isSet(int fieldID) {
18338
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18339
    }
18340
 
18341
    @Override
18342
    public boolean equals(Object that) {
18343
      if (that == null)
18344
        return false;
18345
      if (that instanceof sendNewPasswordByHandle_args)
18346
        return this.equals((sendNewPasswordByHandle_args)that);
18347
      return false;
18348
    }
18349
 
18350
    public boolean equals(sendNewPasswordByHandle_args that) {
18351
      if (that == null)
18352
        return false;
18353
 
18354
      boolean this_present_emailOrHandle = true && this.isSetEmailOrHandle();
18355
      boolean that_present_emailOrHandle = true && that.isSetEmailOrHandle();
18356
      if (this_present_emailOrHandle || that_present_emailOrHandle) {
18357
        if (!(this_present_emailOrHandle && that_present_emailOrHandle))
18358
          return false;
18359
        if (!this.emailOrHandle.equals(that.emailOrHandle))
18360
          return false;
18361
      }
18362
 
18363
      boolean this_present_isEmail = true;
18364
      boolean that_present_isEmail = true;
18365
      if (this_present_isEmail || that_present_isEmail) {
18366
        if (!(this_present_isEmail && that_present_isEmail))
18367
          return false;
18368
        if (this.isEmail != that.isEmail)
18369
          return false;
18370
      }
18371
 
18372
      return true;
18373
    }
18374
 
18375
    @Override
18376
    public int hashCode() {
18377
      return 0;
18378
    }
18379
 
18380
    public int compareTo(sendNewPasswordByHandle_args other) {
18381
      if (!getClass().equals(other.getClass())) {
18382
        return getClass().getName().compareTo(other.getClass().getName());
18383
      }
18384
 
18385
      int lastComparison = 0;
18386
      sendNewPasswordByHandle_args typedOther = (sendNewPasswordByHandle_args)other;
18387
 
18388
      lastComparison = Boolean.valueOf(isSetEmailOrHandle()).compareTo(isSetEmailOrHandle());
18389
      if (lastComparison != 0) {
18390
        return lastComparison;
18391
      }
18392
      lastComparison = TBaseHelper.compareTo(emailOrHandle, typedOther.emailOrHandle);
18393
      if (lastComparison != 0) {
18394
        return lastComparison;
18395
      }
18396
      lastComparison = Boolean.valueOf(isSetIsEmail()).compareTo(isSetIsEmail());
18397
      if (lastComparison != 0) {
18398
        return lastComparison;
18399
      }
18400
      lastComparison = TBaseHelper.compareTo(isEmail, typedOther.isEmail);
18401
      if (lastComparison != 0) {
18402
        return lastComparison;
18403
      }
18404
      return 0;
18405
    }
18406
 
18407
    public void read(TProtocol iprot) throws TException {
18408
      TField field;
18409
      iprot.readStructBegin();
18410
      while (true)
18411
      {
18412
        field = iprot.readFieldBegin();
18413
        if (field.type == TType.STOP) { 
18414
          break;
18415
        }
18416
        _Fields fieldId = _Fields.findByThriftId(field.id);
18417
        if (fieldId == null) {
18418
          TProtocolUtil.skip(iprot, field.type);
18419
        } else {
18420
          switch (fieldId) {
18421
            case EMAIL_OR_HANDLE:
18422
              if (field.type == TType.STRING) {
18423
                this.emailOrHandle = iprot.readString();
18424
              } else { 
18425
                TProtocolUtil.skip(iprot, field.type);
18426
              }
18427
              break;
18428
            case IS_EMAIL:
18429
              if (field.type == TType.BOOL) {
18430
                this.isEmail = iprot.readBool();
18431
                setIsEmailIsSet(true);
18432
              } else { 
18433
                TProtocolUtil.skip(iprot, field.type);
18434
              }
18435
              break;
18436
          }
18437
          iprot.readFieldEnd();
18438
        }
18439
      }
18440
      iprot.readStructEnd();
18441
      validate();
18442
    }
18443
 
18444
    public void write(TProtocol oprot) throws TException {
18445
      validate();
18446
 
18447
      oprot.writeStructBegin(STRUCT_DESC);
18448
      if (this.emailOrHandle != null) {
18449
        oprot.writeFieldBegin(EMAIL_OR_HANDLE_FIELD_DESC);
18450
        oprot.writeString(this.emailOrHandle);
18451
        oprot.writeFieldEnd();
18452
      }
18453
      oprot.writeFieldBegin(IS_EMAIL_FIELD_DESC);
18454
      oprot.writeBool(this.isEmail);
18455
      oprot.writeFieldEnd();
18456
      oprot.writeFieldStop();
18457
      oprot.writeStructEnd();
18458
    }
18459
 
18460
    @Override
18461
    public String toString() {
18462
      StringBuilder sb = new StringBuilder("sendNewPasswordByHandle_args(");
18463
      boolean first = true;
18464
 
18465
      sb.append("emailOrHandle:");
18466
      if (this.emailOrHandle == null) {
18467
        sb.append("null");
18468
      } else {
18469
        sb.append(this.emailOrHandle);
18470
      }
18471
      first = false;
18472
      if (!first) sb.append(", ");
18473
      sb.append("isEmail:");
18474
      sb.append(this.isEmail);
18475
      first = false;
18476
      sb.append(")");
18477
      return sb.toString();
18478
    }
18479
 
18480
    public void validate() throws TException {
18481
      // check for required fields
18482
    }
18483
 
18484
  }
18485
 
18486
  public static class sendNewPasswordByHandle_result implements TBase<sendNewPasswordByHandle_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendNewPasswordByHandle_result>   {
18487
    private static final TStruct STRUCT_DESC = new TStruct("sendNewPasswordByHandle_result");
18488
 
18489
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
18490
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
18491
 
18492
    private boolean success;
18493
    private UserContextException ucx;
18494
 
18495
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18496
    public enum _Fields implements TFieldIdEnum {
18497
      SUCCESS((short)0, "success"),
18498
      UCX((short)1, "ucx");
18499
 
18500
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18501
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18502
 
18503
      static {
18504
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18505
          byId.put((int)field._thriftId, field);
18506
          byName.put(field.getFieldName(), field);
18507
        }
18508
      }
18509
 
18510
      /**
18511
       * Find the _Fields constant that matches fieldId, or null if its not found.
18512
       */
18513
      public static _Fields findByThriftId(int fieldId) {
18514
        return byId.get(fieldId);
18515
      }
18516
 
18517
      /**
18518
       * Find the _Fields constant that matches fieldId, throwing an exception
18519
       * if it is not found.
18520
       */
18521
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18522
        _Fields fields = findByThriftId(fieldId);
18523
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18524
        return fields;
18525
      }
18526
 
18527
      /**
18528
       * Find the _Fields constant that matches name, or null if its not found.
18529
       */
18530
      public static _Fields findByName(String name) {
18531
        return byName.get(name);
18532
      }
18533
 
18534
      private final short _thriftId;
18535
      private final String _fieldName;
18536
 
18537
      _Fields(short thriftId, String fieldName) {
18538
        _thriftId = thriftId;
18539
        _fieldName = fieldName;
18540
      }
18541
 
18542
      public short getThriftFieldId() {
18543
        return _thriftId;
18544
      }
18545
 
18546
      public String getFieldName() {
18547
        return _fieldName;
18548
      }
18549
    }
18550
 
18551
    // isset id assignments
18552
    private static final int __SUCCESS_ISSET_ID = 0;
18553
    private BitSet __isset_bit_vector = new BitSet(1);
18554
 
18555
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18556
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18557
          new FieldValueMetaData(TType.BOOL)));
18558
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
18559
          new FieldValueMetaData(TType.STRUCT)));
18560
    }});
18561
 
18562
    static {
18563
      FieldMetaData.addStructMetaDataMap(sendNewPasswordByHandle_result.class, metaDataMap);
18564
    }
18565
 
18566
    public sendNewPasswordByHandle_result() {
18567
    }
18568
 
18569
    public sendNewPasswordByHandle_result(
18570
      boolean success,
18571
      UserContextException ucx)
18572
    {
18573
      this();
18574
      this.success = success;
18575
      setSuccessIsSet(true);
18576
      this.ucx = ucx;
18577
    }
18578
 
18579
    /**
18580
     * Performs a deep copy on <i>other</i>.
18581
     */
18582
    public sendNewPasswordByHandle_result(sendNewPasswordByHandle_result other) {
18583
      __isset_bit_vector.clear();
18584
      __isset_bit_vector.or(other.__isset_bit_vector);
18585
      this.success = other.success;
18586
      if (other.isSetUcx()) {
18587
        this.ucx = new UserContextException(other.ucx);
18588
      }
18589
    }
18590
 
18591
    public sendNewPasswordByHandle_result deepCopy() {
18592
      return new sendNewPasswordByHandle_result(this);
18593
    }
18594
 
18595
    @Deprecated
18596
    public sendNewPasswordByHandle_result clone() {
18597
      return new sendNewPasswordByHandle_result(this);
18598
    }
18599
 
18600
    public boolean isSuccess() {
18601
      return this.success;
18602
    }
18603
 
18604
    public sendNewPasswordByHandle_result setSuccess(boolean success) {
18605
      this.success = success;
18606
      setSuccessIsSet(true);
18607
      return this;
18608
    }
18609
 
18610
    public void unsetSuccess() {
18611
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18612
    }
18613
 
18614
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18615
    public boolean isSetSuccess() {
18616
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18617
    }
18618
 
18619
    public void setSuccessIsSet(boolean value) {
18620
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18621
    }
18622
 
18623
    public UserContextException getUcx() {
18624
      return this.ucx;
18625
    }
18626
 
18627
    public sendNewPasswordByHandle_result setUcx(UserContextException ucx) {
18628
      this.ucx = ucx;
18629
      return this;
18630
    }
18631
 
18632
    public void unsetUcx() {
18633
      this.ucx = null;
18634
    }
18635
 
18636
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
18637
    public boolean isSetUcx() {
18638
      return this.ucx != null;
18639
    }
18640
 
18641
    public void setUcxIsSet(boolean value) {
18642
      if (!value) {
18643
        this.ucx = null;
18644
      }
18645
    }
18646
 
18647
    public void setFieldValue(_Fields field, Object value) {
18648
      switch (field) {
18649
      case SUCCESS:
18650
        if (value == null) {
18651
          unsetSuccess();
18652
        } else {
18653
          setSuccess((Boolean)value);
18654
        }
18655
        break;
18656
 
18657
      case UCX:
18658
        if (value == null) {
18659
          unsetUcx();
18660
        } else {
18661
          setUcx((UserContextException)value);
18662
        }
18663
        break;
18664
 
18665
      }
18666
    }
18667
 
18668
    public void setFieldValue(int fieldID, Object value) {
18669
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18670
    }
18671
 
18672
    public Object getFieldValue(_Fields field) {
18673
      switch (field) {
18674
      case SUCCESS:
18675
        return new Boolean(isSuccess());
18676
 
18677
      case UCX:
18678
        return getUcx();
18679
 
18680
      }
18681
      throw new IllegalStateException();
18682
    }
18683
 
18684
    public Object getFieldValue(int fieldId) {
18685
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18686
    }
18687
 
18688
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18689
    public boolean isSet(_Fields field) {
18690
      switch (field) {
18691
      case SUCCESS:
18692
        return isSetSuccess();
18693
      case UCX:
18694
        return isSetUcx();
18695
      }
18696
      throw new IllegalStateException();
18697
    }
18698
 
18699
    public boolean isSet(int fieldID) {
18700
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18701
    }
18702
 
18703
    @Override
18704
    public boolean equals(Object that) {
18705
      if (that == null)
18706
        return false;
18707
      if (that instanceof sendNewPasswordByHandle_result)
18708
        return this.equals((sendNewPasswordByHandle_result)that);
18709
      return false;
18710
    }
18711
 
18712
    public boolean equals(sendNewPasswordByHandle_result that) {
18713
      if (that == null)
18714
        return false;
18715
 
18716
      boolean this_present_success = true;
18717
      boolean that_present_success = true;
18718
      if (this_present_success || that_present_success) {
18719
        if (!(this_present_success && that_present_success))
18720
          return false;
18721
        if (this.success != that.success)
18722
          return false;
18723
      }
18724
 
18725
      boolean this_present_ucx = true && this.isSetUcx();
18726
      boolean that_present_ucx = true && that.isSetUcx();
18727
      if (this_present_ucx || that_present_ucx) {
18728
        if (!(this_present_ucx && that_present_ucx))
18729
          return false;
18730
        if (!this.ucx.equals(that.ucx))
18731
          return false;
18732
      }
18733
 
18734
      return true;
18735
    }
18736
 
18737
    @Override
18738
    public int hashCode() {
18739
      return 0;
18740
    }
18741
 
18742
    public int compareTo(sendNewPasswordByHandle_result other) {
18743
      if (!getClass().equals(other.getClass())) {
18744
        return getClass().getName().compareTo(other.getClass().getName());
18745
      }
18746
 
18747
      int lastComparison = 0;
18748
      sendNewPasswordByHandle_result typedOther = (sendNewPasswordByHandle_result)other;
18749
 
18750
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18751
      if (lastComparison != 0) {
18752
        return lastComparison;
18753
      }
18754
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18755
      if (lastComparison != 0) {
18756
        return lastComparison;
18757
      }
18758
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
18759
      if (lastComparison != 0) {
18760
        return lastComparison;
18761
      }
18762
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
18763
      if (lastComparison != 0) {
18764
        return lastComparison;
18765
      }
18766
      return 0;
18767
    }
18768
 
18769
    public void read(TProtocol iprot) throws TException {
18770
      TField field;
18771
      iprot.readStructBegin();
18772
      while (true)
18773
      {
18774
        field = iprot.readFieldBegin();
18775
        if (field.type == TType.STOP) { 
18776
          break;
18777
        }
18778
        _Fields fieldId = _Fields.findByThriftId(field.id);
18779
        if (fieldId == null) {
18780
          TProtocolUtil.skip(iprot, field.type);
18781
        } else {
18782
          switch (fieldId) {
18783
            case SUCCESS:
18784
              if (field.type == TType.BOOL) {
18785
                this.success = iprot.readBool();
18786
                setSuccessIsSet(true);
18787
              } else { 
18788
                TProtocolUtil.skip(iprot, field.type);
18789
              }
18790
              break;
18791
            case UCX:
18792
              if (field.type == TType.STRUCT) {
18793
                this.ucx = new UserContextException();
18794
                this.ucx.read(iprot);
18795
              } else { 
18796
                TProtocolUtil.skip(iprot, field.type);
18797
              }
18798
              break;
18799
          }
18800
          iprot.readFieldEnd();
18801
        }
18802
      }
18803
      iprot.readStructEnd();
18804
      validate();
18805
    }
18806
 
18807
    public void write(TProtocol oprot) throws TException {
18808
      oprot.writeStructBegin(STRUCT_DESC);
18809
 
18810
      if (this.isSetSuccess()) {
18811
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18812
        oprot.writeBool(this.success);
18813
        oprot.writeFieldEnd();
18814
      } else if (this.isSetUcx()) {
18815
        oprot.writeFieldBegin(UCX_FIELD_DESC);
18816
        this.ucx.write(oprot);
18817
        oprot.writeFieldEnd();
18818
      }
18819
      oprot.writeFieldStop();
18820
      oprot.writeStructEnd();
18821
    }
18822
 
18823
    @Override
18824
    public String toString() {
18825
      StringBuilder sb = new StringBuilder("sendNewPasswordByHandle_result(");
18826
      boolean first = true;
18827
 
18828
      sb.append("success:");
18829
      sb.append(this.success);
18830
      first = false;
18831
      if (!first) sb.append(", ");
18832
      sb.append("ucx:");
18833
      if (this.ucx == null) {
18834
        sb.append("null");
18835
      } else {
18836
        sb.append(this.ucx);
18837
      }
18838
      first = false;
18839
      sb.append(")");
18840
      return sb.toString();
18841
    }
18842
 
18843
    public void validate() throws TException {
18844
      // check for required fields
18845
    }
18846
 
18847
  }
18848
 
48 ashish 18849
}