Subversion Repositories SmartDukaan

Rev

Rev 1422 | Rev 1891 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
352 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.utils;
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 HelperService {
27
 
28
  public interface Iface {
29
 
764 rajveer 30
    /**
31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
1395 varun.gupt 35
    public void saveUserEmailForSending(String emailTo, String emailFrom, String subject, String body, String source, String emailType) throws HelperServiceException, TException;
36
 
1422 varun.gupt 37
    public List<UserEmail> getEmailsToBeSent(String emailType) throws HelperServiceException, TException;
38
 
39
    public void markEmailAsSent(long emailId) throws HelperServiceException, TException;
40
 
352 ashish 41
    public void sendMail(Mail mail) throws HelperServiceException, TException;
42
 
43
    public void sendText(TextMessage message) throws HelperServiceException, TException;
44
 
45
    public void addMessage(Message message) throws HelperServiceException, TException;
46
 
47
    public void updateMessage(long id, String message) throws HelperServiceException, TException;
48
 
49
    public Message getMessage(long id) throws HelperServiceException, TException;
50
 
51
    public Message getSubstitutedMessage(long id, Map<String,String> params) throws HelperServiceException, TException;
52
 
495 rajveer 53
    public boolean addUser(String username, String password, long warehouseId) throws HelperServiceException, TException;
54
 
55
    public boolean deleteUser(String username) throws HelperServiceException, TException;
56
 
750 chandransh 57
    /**
58
     * Returns the warehouseId for the given user if the password matches. Returns -1 otherwise.
59
     * The loggedOn timestamp for the dashboard user is updated as a timestamp.
60
     * It's unclear to me when an exception is thrown : Chandranshu
61
     * 
62
     * @param username
63
     * @param password
64
     */
495 rajveer 65
    public long authenticateUser(String username, String password) throws HelperServiceException, TException;
66
 
67
    public boolean updatePassword(String username, String oldPassword, String newPassword) throws HelperServiceException, TException;
68
 
750 chandransh 69
    /**
70
     * Returns the LogisticsUser struct associated with the given username and password if they match.
71
     * Throws an exception otherwise.
72
     * 
73
     * @param username
74
     * @param password
75
     */
76
    public LogisticsUser authenticateLogisticsUser(String username, String password) throws HelperServiceException, TException;
77
 
1611 ankur.sing 78
    /**
79
     * Returns the StatisticsUser struct associated with the given username and password if they match.
80
     * Throws an exception otherwise.
81
     * 
82
     * @param username
83
     * @param password
84
     */
85
    public StatisticsUser authenticateStatisticsUser(String username, String password) throws HelperServiceException, TException;
86
 
352 ashish 87
  }
88
 
89
  public static class Client implements Iface {
90
    public Client(TProtocol prot)
91
    {
92
      this(prot, prot);
93
    }
94
 
95
    public Client(TProtocol iprot, TProtocol oprot)
96
    {
97
      iprot_ = iprot;
98
      oprot_ = oprot;
99
    }
100
 
101
    protected TProtocol iprot_;
102
    protected TProtocol oprot_;
103
 
104
    protected int seqid_;
105
 
106
    public TProtocol getInputProtocol()
107
    {
108
      return this.iprot_;
109
    }
110
 
111
    public TProtocol getOutputProtocol()
112
    {
113
      return this.oprot_;
114
    }
115
 
764 rajveer 116
    public void closeSession() throws TException
117
    {
118
      send_closeSession();
119
      recv_closeSession();
120
    }
121
 
122
    public void send_closeSession() throws TException
123
    {
124
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
125
      closeSession_args args = new closeSession_args();
126
      args.write(oprot_);
127
      oprot_.writeMessageEnd();
128
      oprot_.getTransport().flush();
129
    }
130
 
131
    public void recv_closeSession() throws TException
132
    {
133
      TMessage msg = iprot_.readMessageBegin();
134
      if (msg.type == TMessageType.EXCEPTION) {
135
        TApplicationException x = TApplicationException.read(iprot_);
136
        iprot_.readMessageEnd();
137
        throw x;
138
      }
139
      closeSession_result result = new closeSession_result();
140
      result.read(iprot_);
141
      iprot_.readMessageEnd();
142
      return;
143
    }
144
 
1395 varun.gupt 145
    public void saveUserEmailForSending(String emailTo, String emailFrom, String subject, String body, String source, String emailType) throws HelperServiceException, TException
146
    {
147
      send_saveUserEmailForSending(emailTo, emailFrom, subject, body, source, emailType);
148
      recv_saveUserEmailForSending();
149
    }
150
 
151
    public void send_saveUserEmailForSending(String emailTo, String emailFrom, String subject, String body, String source, String emailType) throws TException
152
    {
153
      oprot_.writeMessageBegin(new TMessage("saveUserEmailForSending", TMessageType.CALL, seqid_));
154
      saveUserEmailForSending_args args = new saveUserEmailForSending_args();
155
      args.emailTo = emailTo;
156
      args.emailFrom = emailFrom;
157
      args.subject = subject;
158
      args.body = body;
159
      args.source = source;
160
      args.emailType = emailType;
161
      args.write(oprot_);
162
      oprot_.writeMessageEnd();
163
      oprot_.getTransport().flush();
164
    }
165
 
166
    public void recv_saveUserEmailForSending() throws HelperServiceException, TException
167
    {
168
      TMessage msg = iprot_.readMessageBegin();
169
      if (msg.type == TMessageType.EXCEPTION) {
170
        TApplicationException x = TApplicationException.read(iprot_);
171
        iprot_.readMessageEnd();
172
        throw x;
173
      }
174
      saveUserEmailForSending_result result = new saveUserEmailForSending_result();
175
      result.read(iprot_);
176
      iprot_.readMessageEnd();
177
      if (result.se != null) {
178
        throw result.se;
179
      }
180
      return;
181
    }
182
 
1422 varun.gupt 183
    public List<UserEmail> getEmailsToBeSent(String emailType) throws HelperServiceException, TException
184
    {
185
      send_getEmailsToBeSent(emailType);
186
      return recv_getEmailsToBeSent();
187
    }
188
 
189
    public void send_getEmailsToBeSent(String emailType) throws TException
190
    {
191
      oprot_.writeMessageBegin(new TMessage("getEmailsToBeSent", TMessageType.CALL, seqid_));
192
      getEmailsToBeSent_args args = new getEmailsToBeSent_args();
193
      args.emailType = emailType;
194
      args.write(oprot_);
195
      oprot_.writeMessageEnd();
196
      oprot_.getTransport().flush();
197
    }
198
 
199
    public List<UserEmail> recv_getEmailsToBeSent() throws HelperServiceException, TException
200
    {
201
      TMessage msg = iprot_.readMessageBegin();
202
      if (msg.type == TMessageType.EXCEPTION) {
203
        TApplicationException x = TApplicationException.read(iprot_);
204
        iprot_.readMessageEnd();
205
        throw x;
206
      }
207
      getEmailsToBeSent_result result = new getEmailsToBeSent_result();
208
      result.read(iprot_);
209
      iprot_.readMessageEnd();
210
      if (result.isSetSuccess()) {
211
        return result.success;
212
      }
213
      if (result.se != null) {
214
        throw result.se;
215
      }
216
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getEmailsToBeSent failed: unknown result");
217
    }
218
 
219
    public void markEmailAsSent(long emailId) throws HelperServiceException, TException
220
    {
221
      send_markEmailAsSent(emailId);
222
      recv_markEmailAsSent();
223
    }
224
 
225
    public void send_markEmailAsSent(long emailId) throws TException
226
    {
227
      oprot_.writeMessageBegin(new TMessage("markEmailAsSent", TMessageType.CALL, seqid_));
228
      markEmailAsSent_args args = new markEmailAsSent_args();
229
      args.emailId = emailId;
230
      args.write(oprot_);
231
      oprot_.writeMessageEnd();
232
      oprot_.getTransport().flush();
233
    }
234
 
235
    public void recv_markEmailAsSent() throws HelperServiceException, TException
236
    {
237
      TMessage msg = iprot_.readMessageBegin();
238
      if (msg.type == TMessageType.EXCEPTION) {
239
        TApplicationException x = TApplicationException.read(iprot_);
240
        iprot_.readMessageEnd();
241
        throw x;
242
      }
243
      markEmailAsSent_result result = new markEmailAsSent_result();
244
      result.read(iprot_);
245
      iprot_.readMessageEnd();
246
      if (result.se != null) {
247
        throw result.se;
248
      }
249
      return;
250
    }
251
 
352 ashish 252
    public void sendMail(Mail mail) throws HelperServiceException, TException
253
    {
254
      send_sendMail(mail);
255
      recv_sendMail();
256
    }
257
 
258
    public void send_sendMail(Mail mail) throws TException
259
    {
260
      oprot_.writeMessageBegin(new TMessage("sendMail", TMessageType.CALL, seqid_));
261
      sendMail_args args = new sendMail_args();
262
      args.mail = mail;
263
      args.write(oprot_);
264
      oprot_.writeMessageEnd();
265
      oprot_.getTransport().flush();
266
    }
267
 
268
    public void recv_sendMail() throws HelperServiceException, TException
269
    {
270
      TMessage msg = iprot_.readMessageBegin();
271
      if (msg.type == TMessageType.EXCEPTION) {
272
        TApplicationException x = TApplicationException.read(iprot_);
273
        iprot_.readMessageEnd();
274
        throw x;
275
      }
276
      sendMail_result result = new sendMail_result();
277
      result.read(iprot_);
278
      iprot_.readMessageEnd();
279
      if (result.se != null) {
280
        throw result.se;
281
      }
282
      return;
283
    }
284
 
285
    public void sendText(TextMessage message) throws HelperServiceException, TException
286
    {
287
      send_sendText(message);
288
      recv_sendText();
289
    }
290
 
291
    public void send_sendText(TextMessage message) throws TException
292
    {
293
      oprot_.writeMessageBegin(new TMessage("sendText", TMessageType.CALL, seqid_));
294
      sendText_args args = new sendText_args();
295
      args.message = message;
296
      args.write(oprot_);
297
      oprot_.writeMessageEnd();
298
      oprot_.getTransport().flush();
299
    }
300
 
301
    public void recv_sendText() throws HelperServiceException, TException
302
    {
303
      TMessage msg = iprot_.readMessageBegin();
304
      if (msg.type == TMessageType.EXCEPTION) {
305
        TApplicationException x = TApplicationException.read(iprot_);
306
        iprot_.readMessageEnd();
307
        throw x;
308
      }
309
      sendText_result result = new sendText_result();
310
      result.read(iprot_);
311
      iprot_.readMessageEnd();
312
      if (result.se != null) {
313
        throw result.se;
314
      }
315
      return;
316
    }
317
 
318
    public void addMessage(Message message) throws HelperServiceException, TException
319
    {
320
      send_addMessage(message);
321
      recv_addMessage();
322
    }
323
 
324
    public void send_addMessage(Message message) throws TException
325
    {
326
      oprot_.writeMessageBegin(new TMessage("addMessage", TMessageType.CALL, seqid_));
327
      addMessage_args args = new addMessage_args();
328
      args.message = message;
329
      args.write(oprot_);
330
      oprot_.writeMessageEnd();
331
      oprot_.getTransport().flush();
332
    }
333
 
334
    public void recv_addMessage() throws HelperServiceException, TException
335
    {
336
      TMessage msg = iprot_.readMessageBegin();
337
      if (msg.type == TMessageType.EXCEPTION) {
338
        TApplicationException x = TApplicationException.read(iprot_);
339
        iprot_.readMessageEnd();
340
        throw x;
341
      }
342
      addMessage_result result = new addMessage_result();
343
      result.read(iprot_);
344
      iprot_.readMessageEnd();
345
      if (result.se != null) {
346
        throw result.se;
347
      }
348
      return;
349
    }
350
 
351
    public void updateMessage(long id, String message) throws HelperServiceException, TException
352
    {
353
      send_updateMessage(id, message);
354
      recv_updateMessage();
355
    }
356
 
357
    public void send_updateMessage(long id, String message) throws TException
358
    {
359
      oprot_.writeMessageBegin(new TMessage("updateMessage", TMessageType.CALL, seqid_));
360
      updateMessage_args args = new updateMessage_args();
361
      args.id = id;
362
      args.message = message;
363
      args.write(oprot_);
364
      oprot_.writeMessageEnd();
365
      oprot_.getTransport().flush();
366
    }
367
 
368
    public void recv_updateMessage() throws HelperServiceException, TException
369
    {
370
      TMessage msg = iprot_.readMessageBegin();
371
      if (msg.type == TMessageType.EXCEPTION) {
372
        TApplicationException x = TApplicationException.read(iprot_);
373
        iprot_.readMessageEnd();
374
        throw x;
375
      }
376
      updateMessage_result result = new updateMessage_result();
377
      result.read(iprot_);
378
      iprot_.readMessageEnd();
379
      if (result.se != null) {
380
        throw result.se;
381
      }
382
      return;
383
    }
384
 
385
    public Message getMessage(long id) throws HelperServiceException, TException
386
    {
387
      send_getMessage(id);
388
      return recv_getMessage();
389
    }
390
 
391
    public void send_getMessage(long id) throws TException
392
    {
393
      oprot_.writeMessageBegin(new TMessage("getMessage", TMessageType.CALL, seqid_));
394
      getMessage_args args = new getMessage_args();
395
      args.id = id;
396
      args.write(oprot_);
397
      oprot_.writeMessageEnd();
398
      oprot_.getTransport().flush();
399
    }
400
 
401
    public Message recv_getMessage() throws HelperServiceException, TException
402
    {
403
      TMessage msg = iprot_.readMessageBegin();
404
      if (msg.type == TMessageType.EXCEPTION) {
405
        TApplicationException x = TApplicationException.read(iprot_);
406
        iprot_.readMessageEnd();
407
        throw x;
408
      }
409
      getMessage_result result = new getMessage_result();
410
      result.read(iprot_);
411
      iprot_.readMessageEnd();
412
      if (result.isSetSuccess()) {
413
        return result.success;
414
      }
415
      if (result.se != null) {
416
        throw result.se;
417
      }
418
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMessage failed: unknown result");
419
    }
420
 
421
    public Message getSubstitutedMessage(long id, Map<String,String> params) throws HelperServiceException, TException
422
    {
423
      send_getSubstitutedMessage(id, params);
424
      return recv_getSubstitutedMessage();
425
    }
426
 
427
    public void send_getSubstitutedMessage(long id, Map<String,String> params) throws TException
428
    {
429
      oprot_.writeMessageBegin(new TMessage("getSubstitutedMessage", TMessageType.CALL, seqid_));
430
      getSubstitutedMessage_args args = new getSubstitutedMessage_args();
431
      args.id = id;
432
      args.params = params;
433
      args.write(oprot_);
434
      oprot_.writeMessageEnd();
435
      oprot_.getTransport().flush();
436
    }
437
 
438
    public Message recv_getSubstitutedMessage() throws HelperServiceException, TException
439
    {
440
      TMessage msg = iprot_.readMessageBegin();
441
      if (msg.type == TMessageType.EXCEPTION) {
442
        TApplicationException x = TApplicationException.read(iprot_);
443
        iprot_.readMessageEnd();
444
        throw x;
445
      }
446
      getSubstitutedMessage_result result = new getSubstitutedMessage_result();
447
      result.read(iprot_);
448
      iprot_.readMessageEnd();
449
      if (result.isSetSuccess()) {
450
        return result.success;
451
      }
452
      if (result.se != null) {
453
        throw result.se;
454
      }
455
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSubstitutedMessage failed: unknown result");
456
    }
457
 
495 rajveer 458
    public boolean addUser(String username, String password, long warehouseId) throws HelperServiceException, TException
459
    {
460
      send_addUser(username, password, warehouseId);
461
      return recv_addUser();
462
    }
463
 
464
    public void send_addUser(String username, String password, long warehouseId) throws TException
465
    {
466
      oprot_.writeMessageBegin(new TMessage("addUser", TMessageType.CALL, seqid_));
467
      addUser_args args = new addUser_args();
468
      args.username = username;
469
      args.password = password;
470
      args.warehouseId = warehouseId;
471
      args.write(oprot_);
472
      oprot_.writeMessageEnd();
473
      oprot_.getTransport().flush();
474
    }
475
 
476
    public boolean recv_addUser() throws HelperServiceException, TException
477
    {
478
      TMessage msg = iprot_.readMessageBegin();
479
      if (msg.type == TMessageType.EXCEPTION) {
480
        TApplicationException x = TApplicationException.read(iprot_);
481
        iprot_.readMessageEnd();
482
        throw x;
483
      }
484
      addUser_result result = new addUser_result();
485
      result.read(iprot_);
486
      iprot_.readMessageEnd();
487
      if (result.isSetSuccess()) {
488
        return result.success;
489
      }
490
      if (result.se != null) {
491
        throw result.se;
492
      }
493
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addUser failed: unknown result");
494
    }
495
 
496
    public boolean deleteUser(String username) throws HelperServiceException, TException
497
    {
498
      send_deleteUser(username);
499
      return recv_deleteUser();
500
    }
501
 
502
    public void send_deleteUser(String username) throws TException
503
    {
504
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
505
      deleteUser_args args = new deleteUser_args();
506
      args.username = username;
507
      args.write(oprot_);
508
      oprot_.writeMessageEnd();
509
      oprot_.getTransport().flush();
510
    }
511
 
512
    public boolean recv_deleteUser() throws HelperServiceException, TException
513
    {
514
      TMessage msg = iprot_.readMessageBegin();
515
      if (msg.type == TMessageType.EXCEPTION) {
516
        TApplicationException x = TApplicationException.read(iprot_);
517
        iprot_.readMessageEnd();
518
        throw x;
519
      }
520
      deleteUser_result result = new deleteUser_result();
521
      result.read(iprot_);
522
      iprot_.readMessageEnd();
523
      if (result.isSetSuccess()) {
524
        return result.success;
525
      }
526
      if (result.se != null) {
527
        throw result.se;
528
      }
529
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
530
    }
531
 
532
    public long authenticateUser(String username, String password) throws HelperServiceException, TException
533
    {
534
      send_authenticateUser(username, password);
535
      return recv_authenticateUser();
536
    }
537
 
538
    public void send_authenticateUser(String username, String password) throws TException
539
    {
540
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
541
      authenticateUser_args args = new authenticateUser_args();
542
      args.username = username;
543
      args.password = password;
544
      args.write(oprot_);
545
      oprot_.writeMessageEnd();
546
      oprot_.getTransport().flush();
547
    }
548
 
549
    public long recv_authenticateUser() throws HelperServiceException, TException
550
    {
551
      TMessage msg = iprot_.readMessageBegin();
552
      if (msg.type == TMessageType.EXCEPTION) {
553
        TApplicationException x = TApplicationException.read(iprot_);
554
        iprot_.readMessageEnd();
555
        throw x;
556
      }
557
      authenticateUser_result result = new authenticateUser_result();
558
      result.read(iprot_);
559
      iprot_.readMessageEnd();
560
      if (result.isSetSuccess()) {
561
        return result.success;
562
      }
563
      if (result.se != null) {
564
        throw result.se;
565
      }
566
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
567
    }
568
 
569
    public boolean updatePassword(String username, String oldPassword, String newPassword) throws HelperServiceException, TException
570
    {
571
      send_updatePassword(username, oldPassword, newPassword);
572
      return recv_updatePassword();
573
    }
574
 
575
    public void send_updatePassword(String username, String oldPassword, String newPassword) throws TException
576
    {
577
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
578
      updatePassword_args args = new updatePassword_args();
579
      args.username = username;
580
      args.oldPassword = oldPassword;
581
      args.newPassword = newPassword;
582
      args.write(oprot_);
583
      oprot_.writeMessageEnd();
584
      oprot_.getTransport().flush();
585
    }
586
 
587
    public boolean recv_updatePassword() throws HelperServiceException, TException
588
    {
589
      TMessage msg = iprot_.readMessageBegin();
590
      if (msg.type == TMessageType.EXCEPTION) {
591
        TApplicationException x = TApplicationException.read(iprot_);
592
        iprot_.readMessageEnd();
593
        throw x;
594
      }
595
      updatePassword_result result = new updatePassword_result();
596
      result.read(iprot_);
597
      iprot_.readMessageEnd();
598
      if (result.isSetSuccess()) {
599
        return result.success;
600
      }
601
      if (result.se != null) {
602
        throw result.se;
603
      }
604
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
605
    }
606
 
750 chandransh 607
    public LogisticsUser authenticateLogisticsUser(String username, String password) throws HelperServiceException, TException
608
    {
609
      send_authenticateLogisticsUser(username, password);
610
      return recv_authenticateLogisticsUser();
611
    }
612
 
613
    public void send_authenticateLogisticsUser(String username, String password) throws TException
614
    {
615
      oprot_.writeMessageBegin(new TMessage("authenticateLogisticsUser", TMessageType.CALL, seqid_));
616
      authenticateLogisticsUser_args args = new authenticateLogisticsUser_args();
617
      args.username = username;
618
      args.password = password;
619
      args.write(oprot_);
620
      oprot_.writeMessageEnd();
621
      oprot_.getTransport().flush();
622
    }
623
 
624
    public LogisticsUser recv_authenticateLogisticsUser() throws HelperServiceException, TException
625
    {
626
      TMessage msg = iprot_.readMessageBegin();
627
      if (msg.type == TMessageType.EXCEPTION) {
628
        TApplicationException x = TApplicationException.read(iprot_);
629
        iprot_.readMessageEnd();
630
        throw x;
631
      }
632
      authenticateLogisticsUser_result result = new authenticateLogisticsUser_result();
633
      result.read(iprot_);
634
      iprot_.readMessageEnd();
635
      if (result.isSetSuccess()) {
636
        return result.success;
637
      }
638
      if (result.hse != null) {
639
        throw result.hse;
640
      }
641
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateLogisticsUser failed: unknown result");
642
    }
643
 
1611 ankur.sing 644
    public StatisticsUser authenticateStatisticsUser(String username, String password) throws HelperServiceException, TException
645
    {
646
      send_authenticateStatisticsUser(username, password);
647
      return recv_authenticateStatisticsUser();
648
    }
649
 
650
    public void send_authenticateStatisticsUser(String username, String password) throws TException
651
    {
652
      oprot_.writeMessageBegin(new TMessage("authenticateStatisticsUser", TMessageType.CALL, seqid_));
653
      authenticateStatisticsUser_args args = new authenticateStatisticsUser_args();
654
      args.username = username;
655
      args.password = password;
656
      args.write(oprot_);
657
      oprot_.writeMessageEnd();
658
      oprot_.getTransport().flush();
659
    }
660
 
661
    public StatisticsUser recv_authenticateStatisticsUser() throws HelperServiceException, TException
662
    {
663
      TMessage msg = iprot_.readMessageBegin();
664
      if (msg.type == TMessageType.EXCEPTION) {
665
        TApplicationException x = TApplicationException.read(iprot_);
666
        iprot_.readMessageEnd();
667
        throw x;
668
      }
669
      authenticateStatisticsUser_result result = new authenticateStatisticsUser_result();
670
      result.read(iprot_);
671
      iprot_.readMessageEnd();
672
      if (result.isSetSuccess()) {
673
        return result.success;
674
      }
675
      if (result.hse != null) {
676
        throw result.hse;
677
      }
678
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateStatisticsUser failed: unknown result");
679
    }
680
 
352 ashish 681
  }
682
  public static class Processor implements TProcessor {
683
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
684
    public Processor(Iface iface)
685
    {
686
      iface_ = iface;
764 rajveer 687
      processMap_.put("closeSession", new closeSession());
1395 varun.gupt 688
      processMap_.put("saveUserEmailForSending", new saveUserEmailForSending());
1422 varun.gupt 689
      processMap_.put("getEmailsToBeSent", new getEmailsToBeSent());
690
      processMap_.put("markEmailAsSent", new markEmailAsSent());
352 ashish 691
      processMap_.put("sendMail", new sendMail());
692
      processMap_.put("sendText", new sendText());
693
      processMap_.put("addMessage", new addMessage());
694
      processMap_.put("updateMessage", new updateMessage());
695
      processMap_.put("getMessage", new getMessage());
696
      processMap_.put("getSubstitutedMessage", new getSubstitutedMessage());
495 rajveer 697
      processMap_.put("addUser", new addUser());
698
      processMap_.put("deleteUser", new deleteUser());
699
      processMap_.put("authenticateUser", new authenticateUser());
700
      processMap_.put("updatePassword", new updatePassword());
750 chandransh 701
      processMap_.put("authenticateLogisticsUser", new authenticateLogisticsUser());
1611 ankur.sing 702
      processMap_.put("authenticateStatisticsUser", new authenticateStatisticsUser());
352 ashish 703
    }
704
 
705
    protected static interface ProcessFunction {
706
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
707
    }
708
 
709
    private Iface iface_;
710
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
711
 
712
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
713
    {
714
      TMessage msg = iprot.readMessageBegin();
715
      ProcessFunction fn = processMap_.get(msg.name);
716
      if (fn == null) {
717
        TProtocolUtil.skip(iprot, TType.STRUCT);
718
        iprot.readMessageEnd();
719
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
720
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
721
        x.write(oprot);
722
        oprot.writeMessageEnd();
723
        oprot.getTransport().flush();
724
        return true;
725
      }
726
      fn.process(msg.seqid, iprot, oprot);
727
      return true;
728
    }
729
 
764 rajveer 730
    private class closeSession implements ProcessFunction {
731
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
732
      {
733
        closeSession_args args = new closeSession_args();
734
        args.read(iprot);
735
        iprot.readMessageEnd();
736
        closeSession_result result = new closeSession_result();
737
        iface_.closeSession();
738
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
739
        result.write(oprot);
740
        oprot.writeMessageEnd();
741
        oprot.getTransport().flush();
742
      }
743
 
744
    }
745
 
1395 varun.gupt 746
    private class saveUserEmailForSending implements ProcessFunction {
747
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
748
      {
749
        saveUserEmailForSending_args args = new saveUserEmailForSending_args();
750
        args.read(iprot);
751
        iprot.readMessageEnd();
752
        saveUserEmailForSending_result result = new saveUserEmailForSending_result();
753
        try {
754
          iface_.saveUserEmailForSending(args.emailTo, args.emailFrom, args.subject, args.body, args.source, args.emailType);
755
        } catch (HelperServiceException se) {
756
          result.se = se;
757
        } catch (Throwable th) {
758
          LOGGER.error("Internal error processing saveUserEmailForSending", th);
759
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing saveUserEmailForSending");
760
          oprot.writeMessageBegin(new TMessage("saveUserEmailForSending", TMessageType.EXCEPTION, seqid));
761
          x.write(oprot);
762
          oprot.writeMessageEnd();
763
          oprot.getTransport().flush();
764
          return;
765
        }
766
        oprot.writeMessageBegin(new TMessage("saveUserEmailForSending", TMessageType.REPLY, seqid));
767
        result.write(oprot);
768
        oprot.writeMessageEnd();
769
        oprot.getTransport().flush();
770
      }
771
 
772
    }
773
 
1422 varun.gupt 774
    private class getEmailsToBeSent implements ProcessFunction {
775
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
776
      {
777
        getEmailsToBeSent_args args = new getEmailsToBeSent_args();
778
        args.read(iprot);
779
        iprot.readMessageEnd();
780
        getEmailsToBeSent_result result = new getEmailsToBeSent_result();
781
        try {
782
          result.success = iface_.getEmailsToBeSent(args.emailType);
783
        } catch (HelperServiceException se) {
784
          result.se = se;
785
        } catch (Throwable th) {
786
          LOGGER.error("Internal error processing getEmailsToBeSent", th);
787
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getEmailsToBeSent");
788
          oprot.writeMessageBegin(new TMessage("getEmailsToBeSent", TMessageType.EXCEPTION, seqid));
789
          x.write(oprot);
790
          oprot.writeMessageEnd();
791
          oprot.getTransport().flush();
792
          return;
793
        }
794
        oprot.writeMessageBegin(new TMessage("getEmailsToBeSent", TMessageType.REPLY, seqid));
795
        result.write(oprot);
796
        oprot.writeMessageEnd();
797
        oprot.getTransport().flush();
798
      }
799
 
800
    }
801
 
802
    private class markEmailAsSent implements ProcessFunction {
803
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
804
      {
805
        markEmailAsSent_args args = new markEmailAsSent_args();
806
        args.read(iprot);
807
        iprot.readMessageEnd();
808
        markEmailAsSent_result result = new markEmailAsSent_result();
809
        try {
810
          iface_.markEmailAsSent(args.emailId);
811
        } catch (HelperServiceException se) {
812
          result.se = se;
813
        } catch (Throwable th) {
814
          LOGGER.error("Internal error processing markEmailAsSent", th);
815
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markEmailAsSent");
816
          oprot.writeMessageBegin(new TMessage("markEmailAsSent", TMessageType.EXCEPTION, seqid));
817
          x.write(oprot);
818
          oprot.writeMessageEnd();
819
          oprot.getTransport().flush();
820
          return;
821
        }
822
        oprot.writeMessageBegin(new TMessage("markEmailAsSent", TMessageType.REPLY, seqid));
823
        result.write(oprot);
824
        oprot.writeMessageEnd();
825
        oprot.getTransport().flush();
826
      }
827
 
828
    }
829
 
352 ashish 830
    private class sendMail implements ProcessFunction {
831
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
832
      {
833
        sendMail_args args = new sendMail_args();
834
        args.read(iprot);
835
        iprot.readMessageEnd();
836
        sendMail_result result = new sendMail_result();
837
        try {
838
          iface_.sendMail(args.mail);
839
        } catch (HelperServiceException se) {
840
          result.se = se;
841
        } catch (Throwable th) {
842
          LOGGER.error("Internal error processing sendMail", th);
843
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendMail");
844
          oprot.writeMessageBegin(new TMessage("sendMail", TMessageType.EXCEPTION, seqid));
845
          x.write(oprot);
846
          oprot.writeMessageEnd();
847
          oprot.getTransport().flush();
848
          return;
849
        }
850
        oprot.writeMessageBegin(new TMessage("sendMail", TMessageType.REPLY, seqid));
851
        result.write(oprot);
852
        oprot.writeMessageEnd();
853
        oprot.getTransport().flush();
854
      }
855
 
856
    }
857
 
858
    private class sendText implements ProcessFunction {
859
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
860
      {
861
        sendText_args args = new sendText_args();
862
        args.read(iprot);
863
        iprot.readMessageEnd();
864
        sendText_result result = new sendText_result();
865
        try {
866
          iface_.sendText(args.message);
867
        } catch (HelperServiceException se) {
868
          result.se = se;
869
        } catch (Throwable th) {
870
          LOGGER.error("Internal error processing sendText", th);
871
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendText");
872
          oprot.writeMessageBegin(new TMessage("sendText", TMessageType.EXCEPTION, seqid));
873
          x.write(oprot);
874
          oprot.writeMessageEnd();
875
          oprot.getTransport().flush();
876
          return;
877
        }
878
        oprot.writeMessageBegin(new TMessage("sendText", TMessageType.REPLY, seqid));
879
        result.write(oprot);
880
        oprot.writeMessageEnd();
881
        oprot.getTransport().flush();
882
      }
883
 
884
    }
885
 
886
    private class addMessage implements ProcessFunction {
887
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
888
      {
889
        addMessage_args args = new addMessage_args();
890
        args.read(iprot);
891
        iprot.readMessageEnd();
892
        addMessage_result result = new addMessage_result();
893
        try {
894
          iface_.addMessage(args.message);
895
        } catch (HelperServiceException se) {
896
          result.se = se;
897
        } catch (Throwable th) {
898
          LOGGER.error("Internal error processing addMessage", th);
899
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addMessage");
900
          oprot.writeMessageBegin(new TMessage("addMessage", TMessageType.EXCEPTION, seqid));
901
          x.write(oprot);
902
          oprot.writeMessageEnd();
903
          oprot.getTransport().flush();
904
          return;
905
        }
906
        oprot.writeMessageBegin(new TMessage("addMessage", TMessageType.REPLY, seqid));
907
        result.write(oprot);
908
        oprot.writeMessageEnd();
909
        oprot.getTransport().flush();
910
      }
911
 
912
    }
913
 
914
    private class updateMessage implements ProcessFunction {
915
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
916
      {
917
        updateMessage_args args = new updateMessage_args();
918
        args.read(iprot);
919
        iprot.readMessageEnd();
920
        updateMessage_result result = new updateMessage_result();
921
        try {
922
          iface_.updateMessage(args.id, args.message);
923
        } catch (HelperServiceException se) {
924
          result.se = se;
925
        } catch (Throwable th) {
926
          LOGGER.error("Internal error processing updateMessage", th);
927
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMessage");
928
          oprot.writeMessageBegin(new TMessage("updateMessage", TMessageType.EXCEPTION, seqid));
929
          x.write(oprot);
930
          oprot.writeMessageEnd();
931
          oprot.getTransport().flush();
932
          return;
933
        }
934
        oprot.writeMessageBegin(new TMessage("updateMessage", TMessageType.REPLY, seqid));
935
        result.write(oprot);
936
        oprot.writeMessageEnd();
937
        oprot.getTransport().flush();
938
      }
939
 
940
    }
941
 
942
    private class getMessage implements ProcessFunction {
943
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
944
      {
945
        getMessage_args args = new getMessage_args();
946
        args.read(iprot);
947
        iprot.readMessageEnd();
948
        getMessage_result result = new getMessage_result();
949
        try {
950
          result.success = iface_.getMessage(args.id);
951
        } catch (HelperServiceException se) {
952
          result.se = se;
953
        } catch (Throwable th) {
954
          LOGGER.error("Internal error processing getMessage", th);
955
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMessage");
956
          oprot.writeMessageBegin(new TMessage("getMessage", TMessageType.EXCEPTION, seqid));
957
          x.write(oprot);
958
          oprot.writeMessageEnd();
959
          oprot.getTransport().flush();
960
          return;
961
        }
962
        oprot.writeMessageBegin(new TMessage("getMessage", TMessageType.REPLY, seqid));
963
        result.write(oprot);
964
        oprot.writeMessageEnd();
965
        oprot.getTransport().flush();
966
      }
967
 
968
    }
969
 
970
    private class getSubstitutedMessage implements ProcessFunction {
971
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
972
      {
973
        getSubstitutedMessage_args args = new getSubstitutedMessage_args();
974
        args.read(iprot);
975
        iprot.readMessageEnd();
976
        getSubstitutedMessage_result result = new getSubstitutedMessage_result();
977
        try {
978
          result.success = iface_.getSubstitutedMessage(args.id, args.params);
979
        } catch (HelperServiceException se) {
980
          result.se = se;
981
        } catch (Throwable th) {
982
          LOGGER.error("Internal error processing getSubstitutedMessage", th);
983
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getSubstitutedMessage");
984
          oprot.writeMessageBegin(new TMessage("getSubstitutedMessage", TMessageType.EXCEPTION, seqid));
985
          x.write(oprot);
986
          oprot.writeMessageEnd();
987
          oprot.getTransport().flush();
988
          return;
989
        }
990
        oprot.writeMessageBegin(new TMessage("getSubstitutedMessage", TMessageType.REPLY, seqid));
991
        result.write(oprot);
992
        oprot.writeMessageEnd();
993
        oprot.getTransport().flush();
994
      }
995
 
996
    }
997
 
495 rajveer 998
    private class addUser implements ProcessFunction {
999
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1000
      {
1001
        addUser_args args = new addUser_args();
1002
        args.read(iprot);
1003
        iprot.readMessageEnd();
1004
        addUser_result result = new addUser_result();
1005
        try {
1006
          result.success = iface_.addUser(args.username, args.password, args.warehouseId);
1007
          result.setSuccessIsSet(true);
1008
        } catch (HelperServiceException se) {
1009
          result.se = se;
1010
        } catch (Throwable th) {
1011
          LOGGER.error("Internal error processing addUser", th);
1012
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addUser");
1013
          oprot.writeMessageBegin(new TMessage("addUser", TMessageType.EXCEPTION, seqid));
1014
          x.write(oprot);
1015
          oprot.writeMessageEnd();
1016
          oprot.getTransport().flush();
1017
          return;
1018
        }
1019
        oprot.writeMessageBegin(new TMessage("addUser", TMessageType.REPLY, seqid));
1020
        result.write(oprot);
1021
        oprot.writeMessageEnd();
1022
        oprot.getTransport().flush();
1023
      }
1024
 
1025
    }
1026
 
1027
    private class deleteUser implements ProcessFunction {
1028
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1029
      {
1030
        deleteUser_args args = new deleteUser_args();
1031
        args.read(iprot);
1032
        iprot.readMessageEnd();
1033
        deleteUser_result result = new deleteUser_result();
1034
        try {
1035
          result.success = iface_.deleteUser(args.username);
1036
          result.setSuccessIsSet(true);
1037
        } catch (HelperServiceException se) {
1038
          result.se = se;
1039
        } catch (Throwable th) {
1040
          LOGGER.error("Internal error processing deleteUser", th);
1041
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1042
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
1043
          x.write(oprot);
1044
          oprot.writeMessageEnd();
1045
          oprot.getTransport().flush();
1046
          return;
1047
        }
1048
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
1049
        result.write(oprot);
1050
        oprot.writeMessageEnd();
1051
        oprot.getTransport().flush();
1052
      }
1053
 
1054
    }
1055
 
1056
    private class authenticateUser implements ProcessFunction {
1057
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1058
      {
1059
        authenticateUser_args args = new authenticateUser_args();
1060
        args.read(iprot);
1061
        iprot.readMessageEnd();
1062
        authenticateUser_result result = new authenticateUser_result();
1063
        try {
1064
          result.success = iface_.authenticateUser(args.username, args.password);
1065
          result.setSuccessIsSet(true);
1066
        } catch (HelperServiceException se) {
1067
          result.se = se;
1068
        } catch (Throwable th) {
1069
          LOGGER.error("Internal error processing authenticateUser", th);
1070
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1071
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1072
          x.write(oprot);
1073
          oprot.writeMessageEnd();
1074
          oprot.getTransport().flush();
1075
          return;
1076
        }
1077
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1078
        result.write(oprot);
1079
        oprot.writeMessageEnd();
1080
        oprot.getTransport().flush();
1081
      }
1082
 
1083
    }
1084
 
1085
    private class updatePassword implements ProcessFunction {
1086
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1087
      {
1088
        updatePassword_args args = new updatePassword_args();
1089
        args.read(iprot);
1090
        iprot.readMessageEnd();
1091
        updatePassword_result result = new updatePassword_result();
1092
        try {
1093
          result.success = iface_.updatePassword(args.username, args.oldPassword, args.newPassword);
1094
          result.setSuccessIsSet(true);
1095
        } catch (HelperServiceException se) {
1096
          result.se = se;
1097
        } catch (Throwable th) {
1098
          LOGGER.error("Internal error processing updatePassword", th);
1099
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
1100
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
1101
          x.write(oprot);
1102
          oprot.writeMessageEnd();
1103
          oprot.getTransport().flush();
1104
          return;
1105
        }
1106
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
1107
        result.write(oprot);
1108
        oprot.writeMessageEnd();
1109
        oprot.getTransport().flush();
1110
      }
1111
 
1112
    }
1113
 
750 chandransh 1114
    private class authenticateLogisticsUser implements ProcessFunction {
1115
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1116
      {
1117
        authenticateLogisticsUser_args args = new authenticateLogisticsUser_args();
1118
        args.read(iprot);
1119
        iprot.readMessageEnd();
1120
        authenticateLogisticsUser_result result = new authenticateLogisticsUser_result();
1121
        try {
1122
          result.success = iface_.authenticateLogisticsUser(args.username, args.password);
1123
        } catch (HelperServiceException hse) {
1124
          result.hse = hse;
1125
        } catch (Throwable th) {
1126
          LOGGER.error("Internal error processing authenticateLogisticsUser", th);
1127
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateLogisticsUser");
1128
          oprot.writeMessageBegin(new TMessage("authenticateLogisticsUser", TMessageType.EXCEPTION, seqid));
1129
          x.write(oprot);
1130
          oprot.writeMessageEnd();
1131
          oprot.getTransport().flush();
1132
          return;
1133
        }
1134
        oprot.writeMessageBegin(new TMessage("authenticateLogisticsUser", TMessageType.REPLY, seqid));
1135
        result.write(oprot);
1136
        oprot.writeMessageEnd();
1137
        oprot.getTransport().flush();
1138
      }
1139
 
1140
    }
1141
 
1611 ankur.sing 1142
    private class authenticateStatisticsUser implements ProcessFunction {
1143
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1144
      {
1145
        authenticateStatisticsUser_args args = new authenticateStatisticsUser_args();
1146
        args.read(iprot);
1147
        iprot.readMessageEnd();
1148
        authenticateStatisticsUser_result result = new authenticateStatisticsUser_result();
1149
        try {
1150
          result.success = iface_.authenticateStatisticsUser(args.username, args.password);
1151
        } catch (HelperServiceException hse) {
1152
          result.hse = hse;
1153
        } catch (Throwable th) {
1154
          LOGGER.error("Internal error processing authenticateStatisticsUser", th);
1155
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateStatisticsUser");
1156
          oprot.writeMessageBegin(new TMessage("authenticateStatisticsUser", TMessageType.EXCEPTION, seqid));
1157
          x.write(oprot);
1158
          oprot.writeMessageEnd();
1159
          oprot.getTransport().flush();
1160
          return;
1161
        }
1162
        oprot.writeMessageBegin(new TMessage("authenticateStatisticsUser", TMessageType.REPLY, seqid));
1163
        result.write(oprot);
1164
        oprot.writeMessageEnd();
1165
        oprot.getTransport().flush();
1166
      }
1167
 
1168
    }
1169
 
352 ashish 1170
  }
1171
 
764 rajveer 1172
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1173
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1174
 
1175
 
1176
 
1177
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1178
    public enum _Fields implements TFieldIdEnum {
1179
;
1180
 
1181
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1182
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1183
 
1184
      static {
1185
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1186
          byId.put((int)field._thriftId, field);
1187
          byName.put(field.getFieldName(), field);
1188
        }
1189
      }
1190
 
1191
      /**
1192
       * Find the _Fields constant that matches fieldId, or null if its not found.
1193
       */
1194
      public static _Fields findByThriftId(int fieldId) {
1195
        return byId.get(fieldId);
1196
      }
1197
 
1198
      /**
1199
       * Find the _Fields constant that matches fieldId, throwing an exception
1200
       * if it is not found.
1201
       */
1202
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1203
        _Fields fields = findByThriftId(fieldId);
1204
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1205
        return fields;
1206
      }
1207
 
1208
      /**
1209
       * Find the _Fields constant that matches name, or null if its not found.
1210
       */
1211
      public static _Fields findByName(String name) {
1212
        return byName.get(name);
1213
      }
1214
 
1215
      private final short _thriftId;
1216
      private final String _fieldName;
1217
 
1218
      _Fields(short thriftId, String fieldName) {
1219
        _thriftId = thriftId;
1220
        _fieldName = fieldName;
1221
      }
1222
 
1223
      public short getThriftFieldId() {
1224
        return _thriftId;
1225
      }
1226
 
1227
      public String getFieldName() {
1228
        return _fieldName;
1229
      }
1230
    }
1231
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1232
    }});
1233
 
1234
    static {
1235
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
1236
    }
1237
 
1238
    public closeSession_args() {
1239
    }
1240
 
1241
    /**
1242
     * Performs a deep copy on <i>other</i>.
1243
     */
1244
    public closeSession_args(closeSession_args other) {
1245
    }
1246
 
1247
    public closeSession_args deepCopy() {
1248
      return new closeSession_args(this);
1249
    }
1250
 
1251
    @Deprecated
1252
    public closeSession_args clone() {
1253
      return new closeSession_args(this);
1254
    }
1255
 
1256
    public void setFieldValue(_Fields field, Object value) {
1257
      switch (field) {
1258
      }
1259
    }
1260
 
1261
    public void setFieldValue(int fieldID, Object value) {
1262
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1263
    }
1264
 
1265
    public Object getFieldValue(_Fields field) {
1266
      switch (field) {
1267
      }
1268
      throw new IllegalStateException();
1269
    }
1270
 
1271
    public Object getFieldValue(int fieldId) {
1272
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1273
    }
1274
 
1275
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1276
    public boolean isSet(_Fields field) {
1277
      switch (field) {
1278
      }
1279
      throw new IllegalStateException();
1280
    }
1281
 
1282
    public boolean isSet(int fieldID) {
1283
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1284
    }
1285
 
1286
    @Override
1287
    public boolean equals(Object that) {
1288
      if (that == null)
1289
        return false;
1290
      if (that instanceof closeSession_args)
1291
        return this.equals((closeSession_args)that);
1292
      return false;
1293
    }
1294
 
1295
    public boolean equals(closeSession_args that) {
1296
      if (that == null)
1297
        return false;
1298
 
1299
      return true;
1300
    }
1301
 
1302
    @Override
1303
    public int hashCode() {
1304
      return 0;
1305
    }
1306
 
1307
    public int compareTo(closeSession_args other) {
1308
      if (!getClass().equals(other.getClass())) {
1309
        return getClass().getName().compareTo(other.getClass().getName());
1310
      }
1311
 
1312
      int lastComparison = 0;
1313
      closeSession_args typedOther = (closeSession_args)other;
1314
 
1315
      return 0;
1316
    }
1317
 
1318
    public void read(TProtocol iprot) throws TException {
1319
      TField field;
1320
      iprot.readStructBegin();
1321
      while (true)
1322
      {
1323
        field = iprot.readFieldBegin();
1324
        if (field.type == TType.STOP) { 
1325
          break;
1326
        }
1327
        _Fields fieldId = _Fields.findByThriftId(field.id);
1328
        if (fieldId == null) {
1329
          TProtocolUtil.skip(iprot, field.type);
1330
        } else {
1331
          switch (fieldId) {
1332
          }
1333
          iprot.readFieldEnd();
1334
        }
1335
      }
1336
      iprot.readStructEnd();
1337
      validate();
1338
    }
1339
 
1340
    public void write(TProtocol oprot) throws TException {
1341
      validate();
1342
 
1343
      oprot.writeStructBegin(STRUCT_DESC);
1344
      oprot.writeFieldStop();
1345
      oprot.writeStructEnd();
1346
    }
1347
 
1348
    @Override
1349
    public String toString() {
1350
      StringBuilder sb = new StringBuilder("closeSession_args(");
1351
      boolean first = true;
1352
 
1353
      sb.append(")");
1354
      return sb.toString();
1355
    }
1356
 
1357
    public void validate() throws TException {
1358
      // check for required fields
1359
    }
1360
 
1361
  }
1362
 
1363
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
1364
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
1365
 
1366
 
1367
 
1368
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1369
    public enum _Fields implements TFieldIdEnum {
1370
;
1371
 
1372
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1373
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1374
 
1375
      static {
1376
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1377
          byId.put((int)field._thriftId, field);
1378
          byName.put(field.getFieldName(), field);
1379
        }
1380
      }
1381
 
1382
      /**
1383
       * Find the _Fields constant that matches fieldId, or null if its not found.
1384
       */
1385
      public static _Fields findByThriftId(int fieldId) {
1386
        return byId.get(fieldId);
1387
      }
1388
 
1389
      /**
1390
       * Find the _Fields constant that matches fieldId, throwing an exception
1391
       * if it is not found.
1392
       */
1393
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1394
        _Fields fields = findByThriftId(fieldId);
1395
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1396
        return fields;
1397
      }
1398
 
1399
      /**
1400
       * Find the _Fields constant that matches name, or null if its not found.
1401
       */
1402
      public static _Fields findByName(String name) {
1403
        return byName.get(name);
1404
      }
1405
 
1406
      private final short _thriftId;
1407
      private final String _fieldName;
1408
 
1409
      _Fields(short thriftId, String fieldName) {
1410
        _thriftId = thriftId;
1411
        _fieldName = fieldName;
1412
      }
1413
 
1414
      public short getThriftFieldId() {
1415
        return _thriftId;
1416
      }
1417
 
1418
      public String getFieldName() {
1419
        return _fieldName;
1420
      }
1421
    }
1422
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1423
    }});
1424
 
1425
    static {
1426
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
1427
    }
1428
 
1429
    public closeSession_result() {
1430
    }
1431
 
1432
    /**
1433
     * Performs a deep copy on <i>other</i>.
1434
     */
1435
    public closeSession_result(closeSession_result other) {
1436
    }
1437
 
1438
    public closeSession_result deepCopy() {
1439
      return new closeSession_result(this);
1440
    }
1441
 
1442
    @Deprecated
1443
    public closeSession_result clone() {
1444
      return new closeSession_result(this);
1445
    }
1446
 
1447
    public void setFieldValue(_Fields field, Object value) {
1448
      switch (field) {
1449
      }
1450
    }
1451
 
1452
    public void setFieldValue(int fieldID, Object value) {
1453
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1454
    }
1455
 
1456
    public Object getFieldValue(_Fields field) {
1457
      switch (field) {
1458
      }
1459
      throw new IllegalStateException();
1460
    }
1461
 
1462
    public Object getFieldValue(int fieldId) {
1463
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1464
    }
1465
 
1466
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1467
    public boolean isSet(_Fields field) {
1468
      switch (field) {
1469
      }
1470
      throw new IllegalStateException();
1471
    }
1472
 
1473
    public boolean isSet(int fieldID) {
1474
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1475
    }
1476
 
1477
    @Override
1478
    public boolean equals(Object that) {
1479
      if (that == null)
1480
        return false;
1481
      if (that instanceof closeSession_result)
1482
        return this.equals((closeSession_result)that);
1483
      return false;
1484
    }
1485
 
1486
    public boolean equals(closeSession_result that) {
1487
      if (that == null)
1488
        return false;
1489
 
1490
      return true;
1491
    }
1492
 
1493
    @Override
1494
    public int hashCode() {
1495
      return 0;
1496
    }
1497
 
1498
    public int compareTo(closeSession_result other) {
1499
      if (!getClass().equals(other.getClass())) {
1500
        return getClass().getName().compareTo(other.getClass().getName());
1501
      }
1502
 
1503
      int lastComparison = 0;
1504
      closeSession_result typedOther = (closeSession_result)other;
1505
 
1506
      return 0;
1507
    }
1508
 
1509
    public void read(TProtocol iprot) throws TException {
1510
      TField field;
1511
      iprot.readStructBegin();
1512
      while (true)
1513
      {
1514
        field = iprot.readFieldBegin();
1515
        if (field.type == TType.STOP) { 
1516
          break;
1517
        }
1518
        _Fields fieldId = _Fields.findByThriftId(field.id);
1519
        if (fieldId == null) {
1520
          TProtocolUtil.skip(iprot, field.type);
1521
        } else {
1522
          switch (fieldId) {
1523
          }
1524
          iprot.readFieldEnd();
1525
        }
1526
      }
1527
      iprot.readStructEnd();
1528
      validate();
1529
    }
1530
 
1531
    public void write(TProtocol oprot) throws TException {
1532
      oprot.writeStructBegin(STRUCT_DESC);
1533
 
1534
      oprot.writeFieldStop();
1535
      oprot.writeStructEnd();
1536
    }
1537
 
1538
    @Override
1539
    public String toString() {
1540
      StringBuilder sb = new StringBuilder("closeSession_result(");
1541
      boolean first = true;
1542
 
1543
      sb.append(")");
1544
      return sb.toString();
1545
    }
1546
 
1547
    public void validate() throws TException {
1548
      // check for required fields
1549
    }
1550
 
1551
  }
1552
 
1395 varun.gupt 1553
  public static class saveUserEmailForSending_args implements TBase<saveUserEmailForSending_args._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserEmailForSending_args>   {
1554
    private static final TStruct STRUCT_DESC = new TStruct("saveUserEmailForSending_args");
1555
 
1556
    private static final TField EMAIL_TO_FIELD_DESC = new TField("emailTo", TType.STRING, (short)1);
1557
    private static final TField EMAIL_FROM_FIELD_DESC = new TField("emailFrom", TType.STRING, (short)2);
1558
    private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)3);
1559
    private static final TField BODY_FIELD_DESC = new TField("body", TType.STRING, (short)4);
1560
    private static final TField SOURCE_FIELD_DESC = new TField("source", TType.STRING, (short)5);
1561
    private static final TField EMAIL_TYPE_FIELD_DESC = new TField("emailType", TType.STRING, (short)6);
1562
 
1563
    private String emailTo;
1564
    private String emailFrom;
1565
    private String subject;
1566
    private String body;
1567
    private String source;
1568
    private String emailType;
1569
 
1570
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1571
    public enum _Fields implements TFieldIdEnum {
1572
      EMAIL_TO((short)1, "emailTo"),
1573
      EMAIL_FROM((short)2, "emailFrom"),
1574
      SUBJECT((short)3, "subject"),
1575
      BODY((short)4, "body"),
1576
      SOURCE((short)5, "source"),
1577
      EMAIL_TYPE((short)6, "emailType");
1578
 
1579
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1580
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1581
 
1582
      static {
1583
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1584
          byId.put((int)field._thriftId, field);
1585
          byName.put(field.getFieldName(), field);
1586
        }
1587
      }
1588
 
1589
      /**
1590
       * Find the _Fields constant that matches fieldId, or null if its not found.
1591
       */
1592
      public static _Fields findByThriftId(int fieldId) {
1593
        return byId.get(fieldId);
1594
      }
1595
 
1596
      /**
1597
       * Find the _Fields constant that matches fieldId, throwing an exception
1598
       * if it is not found.
1599
       */
1600
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1601
        _Fields fields = findByThriftId(fieldId);
1602
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1603
        return fields;
1604
      }
1605
 
1606
      /**
1607
       * Find the _Fields constant that matches name, or null if its not found.
1608
       */
1609
      public static _Fields findByName(String name) {
1610
        return byName.get(name);
1611
      }
1612
 
1613
      private final short _thriftId;
1614
      private final String _fieldName;
1615
 
1616
      _Fields(short thriftId, String fieldName) {
1617
        _thriftId = thriftId;
1618
        _fieldName = fieldName;
1619
      }
1620
 
1621
      public short getThriftFieldId() {
1622
        return _thriftId;
1623
      }
1624
 
1625
      public String getFieldName() {
1626
        return _fieldName;
1627
      }
1628
    }
1629
 
1630
    // isset id assignments
1631
 
1632
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1633
      put(_Fields.EMAIL_TO, new FieldMetaData("emailTo", TFieldRequirementType.DEFAULT, 
1634
          new FieldValueMetaData(TType.STRING)));
1635
      put(_Fields.EMAIL_FROM, new FieldMetaData("emailFrom", TFieldRequirementType.DEFAULT, 
1636
          new FieldValueMetaData(TType.STRING)));
1637
      put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT, 
1638
          new FieldValueMetaData(TType.STRING)));
1639
      put(_Fields.BODY, new FieldMetaData("body", TFieldRequirementType.DEFAULT, 
1640
          new FieldValueMetaData(TType.STRING)));
1641
      put(_Fields.SOURCE, new FieldMetaData("source", TFieldRequirementType.DEFAULT, 
1642
          new FieldValueMetaData(TType.STRING)));
1643
      put(_Fields.EMAIL_TYPE, new FieldMetaData("emailType", TFieldRequirementType.DEFAULT, 
1644
          new FieldValueMetaData(TType.STRING)));
1645
    }});
1646
 
1647
    static {
1648
      FieldMetaData.addStructMetaDataMap(saveUserEmailForSending_args.class, metaDataMap);
1649
    }
1650
 
1651
    public saveUserEmailForSending_args() {
1652
    }
1653
 
1654
    public saveUserEmailForSending_args(
1655
      String emailTo,
1656
      String emailFrom,
1657
      String subject,
1658
      String body,
1659
      String source,
1660
      String emailType)
1661
    {
1662
      this();
1663
      this.emailTo = emailTo;
1664
      this.emailFrom = emailFrom;
1665
      this.subject = subject;
1666
      this.body = body;
1667
      this.source = source;
1668
      this.emailType = emailType;
1669
    }
1670
 
1671
    /**
1672
     * Performs a deep copy on <i>other</i>.
1673
     */
1674
    public saveUserEmailForSending_args(saveUserEmailForSending_args other) {
1675
      if (other.isSetEmailTo()) {
1676
        this.emailTo = other.emailTo;
1677
      }
1678
      if (other.isSetEmailFrom()) {
1679
        this.emailFrom = other.emailFrom;
1680
      }
1681
      if (other.isSetSubject()) {
1682
        this.subject = other.subject;
1683
      }
1684
      if (other.isSetBody()) {
1685
        this.body = other.body;
1686
      }
1687
      if (other.isSetSource()) {
1688
        this.source = other.source;
1689
      }
1690
      if (other.isSetEmailType()) {
1691
        this.emailType = other.emailType;
1692
      }
1693
    }
1694
 
1695
    public saveUserEmailForSending_args deepCopy() {
1696
      return new saveUserEmailForSending_args(this);
1697
    }
1698
 
1699
    @Deprecated
1700
    public saveUserEmailForSending_args clone() {
1701
      return new saveUserEmailForSending_args(this);
1702
    }
1703
 
1704
    public String getEmailTo() {
1705
      return this.emailTo;
1706
    }
1707
 
1708
    public saveUserEmailForSending_args setEmailTo(String emailTo) {
1709
      this.emailTo = emailTo;
1710
      return this;
1711
    }
1712
 
1713
    public void unsetEmailTo() {
1714
      this.emailTo = null;
1715
    }
1716
 
1717
    /** Returns true if field emailTo is set (has been asigned a value) and false otherwise */
1718
    public boolean isSetEmailTo() {
1719
      return this.emailTo != null;
1720
    }
1721
 
1722
    public void setEmailToIsSet(boolean value) {
1723
      if (!value) {
1724
        this.emailTo = null;
1725
      }
1726
    }
1727
 
1728
    public String getEmailFrom() {
1729
      return this.emailFrom;
1730
    }
1731
 
1732
    public saveUserEmailForSending_args setEmailFrom(String emailFrom) {
1733
      this.emailFrom = emailFrom;
1734
      return this;
1735
    }
1736
 
1737
    public void unsetEmailFrom() {
1738
      this.emailFrom = null;
1739
    }
1740
 
1741
    /** Returns true if field emailFrom is set (has been asigned a value) and false otherwise */
1742
    public boolean isSetEmailFrom() {
1743
      return this.emailFrom != null;
1744
    }
1745
 
1746
    public void setEmailFromIsSet(boolean value) {
1747
      if (!value) {
1748
        this.emailFrom = null;
1749
      }
1750
    }
1751
 
1752
    public String getSubject() {
1753
      return this.subject;
1754
    }
1755
 
1756
    public saveUserEmailForSending_args setSubject(String subject) {
1757
      this.subject = subject;
1758
      return this;
1759
    }
1760
 
1761
    public void unsetSubject() {
1762
      this.subject = null;
1763
    }
1764
 
1765
    /** Returns true if field subject is set (has been asigned a value) and false otherwise */
1766
    public boolean isSetSubject() {
1767
      return this.subject != null;
1768
    }
1769
 
1770
    public void setSubjectIsSet(boolean value) {
1771
      if (!value) {
1772
        this.subject = null;
1773
      }
1774
    }
1775
 
1776
    public String getBody() {
1777
      return this.body;
1778
    }
1779
 
1780
    public saveUserEmailForSending_args setBody(String body) {
1781
      this.body = body;
1782
      return this;
1783
    }
1784
 
1785
    public void unsetBody() {
1786
      this.body = null;
1787
    }
1788
 
1789
    /** Returns true if field body is set (has been asigned a value) and false otherwise */
1790
    public boolean isSetBody() {
1791
      return this.body != null;
1792
    }
1793
 
1794
    public void setBodyIsSet(boolean value) {
1795
      if (!value) {
1796
        this.body = null;
1797
      }
1798
    }
1799
 
1800
    public String getSource() {
1801
      return this.source;
1802
    }
1803
 
1804
    public saveUserEmailForSending_args setSource(String source) {
1805
      this.source = source;
1806
      return this;
1807
    }
1808
 
1809
    public void unsetSource() {
1810
      this.source = null;
1811
    }
1812
 
1813
    /** Returns true if field source is set (has been asigned a value) and false otherwise */
1814
    public boolean isSetSource() {
1815
      return this.source != null;
1816
    }
1817
 
1818
    public void setSourceIsSet(boolean value) {
1819
      if (!value) {
1820
        this.source = null;
1821
      }
1822
    }
1823
 
1824
    public String getEmailType() {
1825
      return this.emailType;
1826
    }
1827
 
1828
    public saveUserEmailForSending_args setEmailType(String emailType) {
1829
      this.emailType = emailType;
1830
      return this;
1831
    }
1832
 
1833
    public void unsetEmailType() {
1834
      this.emailType = null;
1835
    }
1836
 
1837
    /** Returns true if field emailType is set (has been asigned a value) and false otherwise */
1838
    public boolean isSetEmailType() {
1839
      return this.emailType != null;
1840
    }
1841
 
1842
    public void setEmailTypeIsSet(boolean value) {
1843
      if (!value) {
1844
        this.emailType = null;
1845
      }
1846
    }
1847
 
1848
    public void setFieldValue(_Fields field, Object value) {
1849
      switch (field) {
1850
      case EMAIL_TO:
1851
        if (value == null) {
1852
          unsetEmailTo();
1853
        } else {
1854
          setEmailTo((String)value);
1855
        }
1856
        break;
1857
 
1858
      case EMAIL_FROM:
1859
        if (value == null) {
1860
          unsetEmailFrom();
1861
        } else {
1862
          setEmailFrom((String)value);
1863
        }
1864
        break;
1865
 
1866
      case SUBJECT:
1867
        if (value == null) {
1868
          unsetSubject();
1869
        } else {
1870
          setSubject((String)value);
1871
        }
1872
        break;
1873
 
1874
      case BODY:
1875
        if (value == null) {
1876
          unsetBody();
1877
        } else {
1878
          setBody((String)value);
1879
        }
1880
        break;
1881
 
1882
      case SOURCE:
1883
        if (value == null) {
1884
          unsetSource();
1885
        } else {
1886
          setSource((String)value);
1887
        }
1888
        break;
1889
 
1890
      case EMAIL_TYPE:
1891
        if (value == null) {
1892
          unsetEmailType();
1893
        } else {
1894
          setEmailType((String)value);
1895
        }
1896
        break;
1897
 
1898
      }
1899
    }
1900
 
1901
    public void setFieldValue(int fieldID, Object value) {
1902
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1903
    }
1904
 
1905
    public Object getFieldValue(_Fields field) {
1906
      switch (field) {
1907
      case EMAIL_TO:
1908
        return getEmailTo();
1909
 
1910
      case EMAIL_FROM:
1911
        return getEmailFrom();
1912
 
1913
      case SUBJECT:
1914
        return getSubject();
1915
 
1916
      case BODY:
1917
        return getBody();
1918
 
1919
      case SOURCE:
1920
        return getSource();
1921
 
1922
      case EMAIL_TYPE:
1923
        return getEmailType();
1924
 
1925
      }
1926
      throw new IllegalStateException();
1927
    }
1928
 
1929
    public Object getFieldValue(int fieldId) {
1930
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1931
    }
1932
 
1933
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1934
    public boolean isSet(_Fields field) {
1935
      switch (field) {
1936
      case EMAIL_TO:
1937
        return isSetEmailTo();
1938
      case EMAIL_FROM:
1939
        return isSetEmailFrom();
1940
      case SUBJECT:
1941
        return isSetSubject();
1942
      case BODY:
1943
        return isSetBody();
1944
      case SOURCE:
1945
        return isSetSource();
1946
      case EMAIL_TYPE:
1947
        return isSetEmailType();
1948
      }
1949
      throw new IllegalStateException();
1950
    }
1951
 
1952
    public boolean isSet(int fieldID) {
1953
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1954
    }
1955
 
1956
    @Override
1957
    public boolean equals(Object that) {
1958
      if (that == null)
1959
        return false;
1960
      if (that instanceof saveUserEmailForSending_args)
1961
        return this.equals((saveUserEmailForSending_args)that);
1962
      return false;
1963
    }
1964
 
1965
    public boolean equals(saveUserEmailForSending_args that) {
1966
      if (that == null)
1967
        return false;
1968
 
1969
      boolean this_present_emailTo = true && this.isSetEmailTo();
1970
      boolean that_present_emailTo = true && that.isSetEmailTo();
1971
      if (this_present_emailTo || that_present_emailTo) {
1972
        if (!(this_present_emailTo && that_present_emailTo))
1973
          return false;
1974
        if (!this.emailTo.equals(that.emailTo))
1975
          return false;
1976
      }
1977
 
1978
      boolean this_present_emailFrom = true && this.isSetEmailFrom();
1979
      boolean that_present_emailFrom = true && that.isSetEmailFrom();
1980
      if (this_present_emailFrom || that_present_emailFrom) {
1981
        if (!(this_present_emailFrom && that_present_emailFrom))
1982
          return false;
1983
        if (!this.emailFrom.equals(that.emailFrom))
1984
          return false;
1985
      }
1986
 
1987
      boolean this_present_subject = true && this.isSetSubject();
1988
      boolean that_present_subject = true && that.isSetSubject();
1989
      if (this_present_subject || that_present_subject) {
1990
        if (!(this_present_subject && that_present_subject))
1991
          return false;
1992
        if (!this.subject.equals(that.subject))
1993
          return false;
1994
      }
1995
 
1996
      boolean this_present_body = true && this.isSetBody();
1997
      boolean that_present_body = true && that.isSetBody();
1998
      if (this_present_body || that_present_body) {
1999
        if (!(this_present_body && that_present_body))
2000
          return false;
2001
        if (!this.body.equals(that.body))
2002
          return false;
2003
      }
2004
 
2005
      boolean this_present_source = true && this.isSetSource();
2006
      boolean that_present_source = true && that.isSetSource();
2007
      if (this_present_source || that_present_source) {
2008
        if (!(this_present_source && that_present_source))
2009
          return false;
2010
        if (!this.source.equals(that.source))
2011
          return false;
2012
      }
2013
 
2014
      boolean this_present_emailType = true && this.isSetEmailType();
2015
      boolean that_present_emailType = true && that.isSetEmailType();
2016
      if (this_present_emailType || that_present_emailType) {
2017
        if (!(this_present_emailType && that_present_emailType))
2018
          return false;
2019
        if (!this.emailType.equals(that.emailType))
2020
          return false;
2021
      }
2022
 
2023
      return true;
2024
    }
2025
 
2026
    @Override
2027
    public int hashCode() {
2028
      return 0;
2029
    }
2030
 
2031
    public int compareTo(saveUserEmailForSending_args other) {
2032
      if (!getClass().equals(other.getClass())) {
2033
        return getClass().getName().compareTo(other.getClass().getName());
2034
      }
2035
 
2036
      int lastComparison = 0;
2037
      saveUserEmailForSending_args typedOther = (saveUserEmailForSending_args)other;
2038
 
2039
      lastComparison = Boolean.valueOf(isSetEmailTo()).compareTo(isSetEmailTo());
2040
      if (lastComparison != 0) {
2041
        return lastComparison;
2042
      }
2043
      lastComparison = TBaseHelper.compareTo(emailTo, typedOther.emailTo);
2044
      if (lastComparison != 0) {
2045
        return lastComparison;
2046
      }
2047
      lastComparison = Boolean.valueOf(isSetEmailFrom()).compareTo(isSetEmailFrom());
2048
      if (lastComparison != 0) {
2049
        return lastComparison;
2050
      }
2051
      lastComparison = TBaseHelper.compareTo(emailFrom, typedOther.emailFrom);
2052
      if (lastComparison != 0) {
2053
        return lastComparison;
2054
      }
2055
      lastComparison = Boolean.valueOf(isSetSubject()).compareTo(isSetSubject());
2056
      if (lastComparison != 0) {
2057
        return lastComparison;
2058
      }
2059
      lastComparison = TBaseHelper.compareTo(subject, typedOther.subject);
2060
      if (lastComparison != 0) {
2061
        return lastComparison;
2062
      }
2063
      lastComparison = Boolean.valueOf(isSetBody()).compareTo(isSetBody());
2064
      if (lastComparison != 0) {
2065
        return lastComparison;
2066
      }
2067
      lastComparison = TBaseHelper.compareTo(body, typedOther.body);
2068
      if (lastComparison != 0) {
2069
        return lastComparison;
2070
      }
2071
      lastComparison = Boolean.valueOf(isSetSource()).compareTo(isSetSource());
2072
      if (lastComparison != 0) {
2073
        return lastComparison;
2074
      }
2075
      lastComparison = TBaseHelper.compareTo(source, typedOther.source);
2076
      if (lastComparison != 0) {
2077
        return lastComparison;
2078
      }
2079
      lastComparison = Boolean.valueOf(isSetEmailType()).compareTo(isSetEmailType());
2080
      if (lastComparison != 0) {
2081
        return lastComparison;
2082
      }
2083
      lastComparison = TBaseHelper.compareTo(emailType, typedOther.emailType);
2084
      if (lastComparison != 0) {
2085
        return lastComparison;
2086
      }
2087
      return 0;
2088
    }
2089
 
2090
    public void read(TProtocol iprot) throws TException {
2091
      TField field;
2092
      iprot.readStructBegin();
2093
      while (true)
2094
      {
2095
        field = iprot.readFieldBegin();
2096
        if (field.type == TType.STOP) { 
2097
          break;
2098
        }
2099
        _Fields fieldId = _Fields.findByThriftId(field.id);
2100
        if (fieldId == null) {
2101
          TProtocolUtil.skip(iprot, field.type);
2102
        } else {
2103
          switch (fieldId) {
2104
            case EMAIL_TO:
2105
              if (field.type == TType.STRING) {
2106
                this.emailTo = iprot.readString();
2107
              } else { 
2108
                TProtocolUtil.skip(iprot, field.type);
2109
              }
2110
              break;
2111
            case EMAIL_FROM:
2112
              if (field.type == TType.STRING) {
2113
                this.emailFrom = iprot.readString();
2114
              } else { 
2115
                TProtocolUtil.skip(iprot, field.type);
2116
              }
2117
              break;
2118
            case SUBJECT:
2119
              if (field.type == TType.STRING) {
2120
                this.subject = iprot.readString();
2121
              } else { 
2122
                TProtocolUtil.skip(iprot, field.type);
2123
              }
2124
              break;
2125
            case BODY:
2126
              if (field.type == TType.STRING) {
2127
                this.body = iprot.readString();
2128
              } else { 
2129
                TProtocolUtil.skip(iprot, field.type);
2130
              }
2131
              break;
2132
            case SOURCE:
2133
              if (field.type == TType.STRING) {
2134
                this.source = iprot.readString();
2135
              } else { 
2136
                TProtocolUtil.skip(iprot, field.type);
2137
              }
2138
              break;
2139
            case EMAIL_TYPE:
2140
              if (field.type == TType.STRING) {
2141
                this.emailType = iprot.readString();
2142
              } else { 
2143
                TProtocolUtil.skip(iprot, field.type);
2144
              }
2145
              break;
2146
          }
2147
          iprot.readFieldEnd();
2148
        }
2149
      }
2150
      iprot.readStructEnd();
2151
      validate();
2152
    }
2153
 
2154
    public void write(TProtocol oprot) throws TException {
2155
      validate();
2156
 
2157
      oprot.writeStructBegin(STRUCT_DESC);
2158
      if (this.emailTo != null) {
2159
        oprot.writeFieldBegin(EMAIL_TO_FIELD_DESC);
2160
        oprot.writeString(this.emailTo);
2161
        oprot.writeFieldEnd();
2162
      }
2163
      if (this.emailFrom != null) {
2164
        oprot.writeFieldBegin(EMAIL_FROM_FIELD_DESC);
2165
        oprot.writeString(this.emailFrom);
2166
        oprot.writeFieldEnd();
2167
      }
2168
      if (this.subject != null) {
2169
        oprot.writeFieldBegin(SUBJECT_FIELD_DESC);
2170
        oprot.writeString(this.subject);
2171
        oprot.writeFieldEnd();
2172
      }
2173
      if (this.body != null) {
2174
        oprot.writeFieldBegin(BODY_FIELD_DESC);
2175
        oprot.writeString(this.body);
2176
        oprot.writeFieldEnd();
2177
      }
2178
      if (this.source != null) {
2179
        oprot.writeFieldBegin(SOURCE_FIELD_DESC);
2180
        oprot.writeString(this.source);
2181
        oprot.writeFieldEnd();
2182
      }
2183
      if (this.emailType != null) {
2184
        oprot.writeFieldBegin(EMAIL_TYPE_FIELD_DESC);
2185
        oprot.writeString(this.emailType);
2186
        oprot.writeFieldEnd();
2187
      }
2188
      oprot.writeFieldStop();
2189
      oprot.writeStructEnd();
2190
    }
2191
 
2192
    @Override
2193
    public String toString() {
2194
      StringBuilder sb = new StringBuilder("saveUserEmailForSending_args(");
2195
      boolean first = true;
2196
 
2197
      sb.append("emailTo:");
2198
      if (this.emailTo == null) {
2199
        sb.append("null");
2200
      } else {
2201
        sb.append(this.emailTo);
2202
      }
2203
      first = false;
2204
      if (!first) sb.append(", ");
2205
      sb.append("emailFrom:");
2206
      if (this.emailFrom == null) {
2207
        sb.append("null");
2208
      } else {
2209
        sb.append(this.emailFrom);
2210
      }
2211
      first = false;
2212
      if (!first) sb.append(", ");
2213
      sb.append("subject:");
2214
      if (this.subject == null) {
2215
        sb.append("null");
2216
      } else {
2217
        sb.append(this.subject);
2218
      }
2219
      first = false;
2220
      if (!first) sb.append(", ");
2221
      sb.append("body:");
2222
      if (this.body == null) {
2223
        sb.append("null");
2224
      } else {
2225
        sb.append(this.body);
2226
      }
2227
      first = false;
2228
      if (!first) sb.append(", ");
2229
      sb.append("source:");
2230
      if (this.source == null) {
2231
        sb.append("null");
2232
      } else {
2233
        sb.append(this.source);
2234
      }
2235
      first = false;
2236
      if (!first) sb.append(", ");
2237
      sb.append("emailType:");
2238
      if (this.emailType == null) {
2239
        sb.append("null");
2240
      } else {
2241
        sb.append(this.emailType);
2242
      }
2243
      first = false;
2244
      sb.append(")");
2245
      return sb.toString();
2246
    }
2247
 
2248
    public void validate() throws TException {
2249
      // check for required fields
2250
    }
2251
 
2252
  }
2253
 
2254
  public static class saveUserEmailForSending_result implements TBase<saveUserEmailForSending_result._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserEmailForSending_result>   {
2255
    private static final TStruct STRUCT_DESC = new TStruct("saveUserEmailForSending_result");
2256
 
2257
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
2258
 
2259
    private HelperServiceException se;
2260
 
2261
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2262
    public enum _Fields implements TFieldIdEnum {
2263
      SE((short)1, "se");
2264
 
2265
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2266
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2267
 
2268
      static {
2269
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2270
          byId.put((int)field._thriftId, field);
2271
          byName.put(field.getFieldName(), field);
2272
        }
2273
      }
2274
 
2275
      /**
2276
       * Find the _Fields constant that matches fieldId, or null if its not found.
2277
       */
2278
      public static _Fields findByThriftId(int fieldId) {
2279
        return byId.get(fieldId);
2280
      }
2281
 
2282
      /**
2283
       * Find the _Fields constant that matches fieldId, throwing an exception
2284
       * if it is not found.
2285
       */
2286
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2287
        _Fields fields = findByThriftId(fieldId);
2288
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2289
        return fields;
2290
      }
2291
 
2292
      /**
2293
       * Find the _Fields constant that matches name, or null if its not found.
2294
       */
2295
      public static _Fields findByName(String name) {
2296
        return byName.get(name);
2297
      }
2298
 
2299
      private final short _thriftId;
2300
      private final String _fieldName;
2301
 
2302
      _Fields(short thriftId, String fieldName) {
2303
        _thriftId = thriftId;
2304
        _fieldName = fieldName;
2305
      }
2306
 
2307
      public short getThriftFieldId() {
2308
        return _thriftId;
2309
      }
2310
 
2311
      public String getFieldName() {
2312
        return _fieldName;
2313
      }
2314
    }
2315
 
2316
    // isset id assignments
2317
 
2318
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2319
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
2320
          new FieldValueMetaData(TType.STRUCT)));
2321
    }});
2322
 
2323
    static {
2324
      FieldMetaData.addStructMetaDataMap(saveUserEmailForSending_result.class, metaDataMap);
2325
    }
2326
 
2327
    public saveUserEmailForSending_result() {
2328
    }
2329
 
2330
    public saveUserEmailForSending_result(
2331
      HelperServiceException se)
2332
    {
2333
      this();
2334
      this.se = se;
2335
    }
2336
 
2337
    /**
2338
     * Performs a deep copy on <i>other</i>.
2339
     */
2340
    public saveUserEmailForSending_result(saveUserEmailForSending_result other) {
2341
      if (other.isSetSe()) {
2342
        this.se = new HelperServiceException(other.se);
2343
      }
2344
    }
2345
 
2346
    public saveUserEmailForSending_result deepCopy() {
2347
      return new saveUserEmailForSending_result(this);
2348
    }
2349
 
2350
    @Deprecated
2351
    public saveUserEmailForSending_result clone() {
2352
      return new saveUserEmailForSending_result(this);
2353
    }
2354
 
2355
    public HelperServiceException getSe() {
2356
      return this.se;
2357
    }
2358
 
2359
    public saveUserEmailForSending_result setSe(HelperServiceException se) {
2360
      this.se = se;
2361
      return this;
2362
    }
2363
 
2364
    public void unsetSe() {
2365
      this.se = null;
2366
    }
2367
 
2368
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
2369
    public boolean isSetSe() {
2370
      return this.se != null;
2371
    }
2372
 
2373
    public void setSeIsSet(boolean value) {
2374
      if (!value) {
2375
        this.se = null;
2376
      }
2377
    }
2378
 
2379
    public void setFieldValue(_Fields field, Object value) {
2380
      switch (field) {
2381
      case SE:
2382
        if (value == null) {
2383
          unsetSe();
2384
        } else {
2385
          setSe((HelperServiceException)value);
2386
        }
2387
        break;
2388
 
2389
      }
2390
    }
2391
 
2392
    public void setFieldValue(int fieldID, Object value) {
2393
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2394
    }
2395
 
2396
    public Object getFieldValue(_Fields field) {
2397
      switch (field) {
2398
      case SE:
2399
        return getSe();
2400
 
2401
      }
2402
      throw new IllegalStateException();
2403
    }
2404
 
2405
    public Object getFieldValue(int fieldId) {
2406
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2407
    }
2408
 
2409
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2410
    public boolean isSet(_Fields field) {
2411
      switch (field) {
2412
      case SE:
2413
        return isSetSe();
2414
      }
2415
      throw new IllegalStateException();
2416
    }
2417
 
2418
    public boolean isSet(int fieldID) {
2419
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2420
    }
2421
 
2422
    @Override
2423
    public boolean equals(Object that) {
2424
      if (that == null)
2425
        return false;
2426
      if (that instanceof saveUserEmailForSending_result)
2427
        return this.equals((saveUserEmailForSending_result)that);
2428
      return false;
2429
    }
2430
 
2431
    public boolean equals(saveUserEmailForSending_result that) {
2432
      if (that == null)
2433
        return false;
2434
 
2435
      boolean this_present_se = true && this.isSetSe();
2436
      boolean that_present_se = true && that.isSetSe();
2437
      if (this_present_se || that_present_se) {
2438
        if (!(this_present_se && that_present_se))
2439
          return false;
2440
        if (!this.se.equals(that.se))
2441
          return false;
2442
      }
2443
 
2444
      return true;
2445
    }
2446
 
2447
    @Override
2448
    public int hashCode() {
2449
      return 0;
2450
    }
2451
 
2452
    public int compareTo(saveUserEmailForSending_result other) {
2453
      if (!getClass().equals(other.getClass())) {
2454
        return getClass().getName().compareTo(other.getClass().getName());
2455
      }
2456
 
2457
      int lastComparison = 0;
2458
      saveUserEmailForSending_result typedOther = (saveUserEmailForSending_result)other;
2459
 
2460
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
2461
      if (lastComparison != 0) {
2462
        return lastComparison;
2463
      }
2464
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
2465
      if (lastComparison != 0) {
2466
        return lastComparison;
2467
      }
2468
      return 0;
2469
    }
2470
 
2471
    public void read(TProtocol iprot) throws TException {
2472
      TField field;
2473
      iprot.readStructBegin();
2474
      while (true)
2475
      {
2476
        field = iprot.readFieldBegin();
2477
        if (field.type == TType.STOP) { 
2478
          break;
2479
        }
2480
        _Fields fieldId = _Fields.findByThriftId(field.id);
2481
        if (fieldId == null) {
2482
          TProtocolUtil.skip(iprot, field.type);
2483
        } else {
2484
          switch (fieldId) {
2485
            case SE:
2486
              if (field.type == TType.STRUCT) {
2487
                this.se = new HelperServiceException();
2488
                this.se.read(iprot);
2489
              } else { 
2490
                TProtocolUtil.skip(iprot, field.type);
2491
              }
2492
              break;
2493
          }
2494
          iprot.readFieldEnd();
2495
        }
2496
      }
2497
      iprot.readStructEnd();
2498
      validate();
2499
    }
2500
 
2501
    public void write(TProtocol oprot) throws TException {
2502
      oprot.writeStructBegin(STRUCT_DESC);
2503
 
2504
      if (this.isSetSe()) {
2505
        oprot.writeFieldBegin(SE_FIELD_DESC);
2506
        this.se.write(oprot);
2507
        oprot.writeFieldEnd();
2508
      }
2509
      oprot.writeFieldStop();
2510
      oprot.writeStructEnd();
2511
    }
2512
 
2513
    @Override
2514
    public String toString() {
2515
      StringBuilder sb = new StringBuilder("saveUserEmailForSending_result(");
2516
      boolean first = true;
2517
 
2518
      sb.append("se:");
2519
      if (this.se == null) {
2520
        sb.append("null");
2521
      } else {
2522
        sb.append(this.se);
2523
      }
2524
      first = false;
2525
      sb.append(")");
2526
      return sb.toString();
2527
    }
2528
 
2529
    public void validate() throws TException {
2530
      // check for required fields
2531
    }
2532
 
2533
  }
2534
 
1422 varun.gupt 2535
  public static class getEmailsToBeSent_args implements TBase<getEmailsToBeSent_args._Fields>, java.io.Serializable, Cloneable, Comparable<getEmailsToBeSent_args>   {
2536
    private static final TStruct STRUCT_DESC = new TStruct("getEmailsToBeSent_args");
2537
 
2538
    private static final TField EMAIL_TYPE_FIELD_DESC = new TField("emailType", TType.STRING, (short)1);
2539
 
2540
    private String emailType;
2541
 
2542
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2543
    public enum _Fields implements TFieldIdEnum {
2544
      EMAIL_TYPE((short)1, "emailType");
2545
 
2546
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2547
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2548
 
2549
      static {
2550
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2551
          byId.put((int)field._thriftId, field);
2552
          byName.put(field.getFieldName(), field);
2553
        }
2554
      }
2555
 
2556
      /**
2557
       * Find the _Fields constant that matches fieldId, or null if its not found.
2558
       */
2559
      public static _Fields findByThriftId(int fieldId) {
2560
        return byId.get(fieldId);
2561
      }
2562
 
2563
      /**
2564
       * Find the _Fields constant that matches fieldId, throwing an exception
2565
       * if it is not found.
2566
       */
2567
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2568
        _Fields fields = findByThriftId(fieldId);
2569
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2570
        return fields;
2571
      }
2572
 
2573
      /**
2574
       * Find the _Fields constant that matches name, or null if its not found.
2575
       */
2576
      public static _Fields findByName(String name) {
2577
        return byName.get(name);
2578
      }
2579
 
2580
      private final short _thriftId;
2581
      private final String _fieldName;
2582
 
2583
      _Fields(short thriftId, String fieldName) {
2584
        _thriftId = thriftId;
2585
        _fieldName = fieldName;
2586
      }
2587
 
2588
      public short getThriftFieldId() {
2589
        return _thriftId;
2590
      }
2591
 
2592
      public String getFieldName() {
2593
        return _fieldName;
2594
      }
2595
    }
2596
 
2597
    // isset id assignments
2598
 
2599
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2600
      put(_Fields.EMAIL_TYPE, new FieldMetaData("emailType", TFieldRequirementType.DEFAULT, 
2601
          new FieldValueMetaData(TType.STRING)));
2602
    }});
2603
 
2604
    static {
2605
      FieldMetaData.addStructMetaDataMap(getEmailsToBeSent_args.class, metaDataMap);
2606
    }
2607
 
2608
    public getEmailsToBeSent_args() {
2609
    }
2610
 
2611
    public getEmailsToBeSent_args(
2612
      String emailType)
2613
    {
2614
      this();
2615
      this.emailType = emailType;
2616
    }
2617
 
2618
    /**
2619
     * Performs a deep copy on <i>other</i>.
2620
     */
2621
    public getEmailsToBeSent_args(getEmailsToBeSent_args other) {
2622
      if (other.isSetEmailType()) {
2623
        this.emailType = other.emailType;
2624
      }
2625
    }
2626
 
2627
    public getEmailsToBeSent_args deepCopy() {
2628
      return new getEmailsToBeSent_args(this);
2629
    }
2630
 
2631
    @Deprecated
2632
    public getEmailsToBeSent_args clone() {
2633
      return new getEmailsToBeSent_args(this);
2634
    }
2635
 
2636
    public String getEmailType() {
2637
      return this.emailType;
2638
    }
2639
 
2640
    public getEmailsToBeSent_args setEmailType(String emailType) {
2641
      this.emailType = emailType;
2642
      return this;
2643
    }
2644
 
2645
    public void unsetEmailType() {
2646
      this.emailType = null;
2647
    }
2648
 
2649
    /** Returns true if field emailType is set (has been asigned a value) and false otherwise */
2650
    public boolean isSetEmailType() {
2651
      return this.emailType != null;
2652
    }
2653
 
2654
    public void setEmailTypeIsSet(boolean value) {
2655
      if (!value) {
2656
        this.emailType = null;
2657
      }
2658
    }
2659
 
2660
    public void setFieldValue(_Fields field, Object value) {
2661
      switch (field) {
2662
      case EMAIL_TYPE:
2663
        if (value == null) {
2664
          unsetEmailType();
2665
        } else {
2666
          setEmailType((String)value);
2667
        }
2668
        break;
2669
 
2670
      }
2671
    }
2672
 
2673
    public void setFieldValue(int fieldID, Object value) {
2674
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2675
    }
2676
 
2677
    public Object getFieldValue(_Fields field) {
2678
      switch (field) {
2679
      case EMAIL_TYPE:
2680
        return getEmailType();
2681
 
2682
      }
2683
      throw new IllegalStateException();
2684
    }
2685
 
2686
    public Object getFieldValue(int fieldId) {
2687
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2688
    }
2689
 
2690
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2691
    public boolean isSet(_Fields field) {
2692
      switch (field) {
2693
      case EMAIL_TYPE:
2694
        return isSetEmailType();
2695
      }
2696
      throw new IllegalStateException();
2697
    }
2698
 
2699
    public boolean isSet(int fieldID) {
2700
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2701
    }
2702
 
2703
    @Override
2704
    public boolean equals(Object that) {
2705
      if (that == null)
2706
        return false;
2707
      if (that instanceof getEmailsToBeSent_args)
2708
        return this.equals((getEmailsToBeSent_args)that);
2709
      return false;
2710
    }
2711
 
2712
    public boolean equals(getEmailsToBeSent_args that) {
2713
      if (that == null)
2714
        return false;
2715
 
2716
      boolean this_present_emailType = true && this.isSetEmailType();
2717
      boolean that_present_emailType = true && that.isSetEmailType();
2718
      if (this_present_emailType || that_present_emailType) {
2719
        if (!(this_present_emailType && that_present_emailType))
2720
          return false;
2721
        if (!this.emailType.equals(that.emailType))
2722
          return false;
2723
      }
2724
 
2725
      return true;
2726
    }
2727
 
2728
    @Override
2729
    public int hashCode() {
2730
      return 0;
2731
    }
2732
 
2733
    public int compareTo(getEmailsToBeSent_args other) {
2734
      if (!getClass().equals(other.getClass())) {
2735
        return getClass().getName().compareTo(other.getClass().getName());
2736
      }
2737
 
2738
      int lastComparison = 0;
2739
      getEmailsToBeSent_args typedOther = (getEmailsToBeSent_args)other;
2740
 
2741
      lastComparison = Boolean.valueOf(isSetEmailType()).compareTo(isSetEmailType());
2742
      if (lastComparison != 0) {
2743
        return lastComparison;
2744
      }
2745
      lastComparison = TBaseHelper.compareTo(emailType, typedOther.emailType);
2746
      if (lastComparison != 0) {
2747
        return lastComparison;
2748
      }
2749
      return 0;
2750
    }
2751
 
2752
    public void read(TProtocol iprot) throws TException {
2753
      TField field;
2754
      iprot.readStructBegin();
2755
      while (true)
2756
      {
2757
        field = iprot.readFieldBegin();
2758
        if (field.type == TType.STOP) { 
2759
          break;
2760
        }
2761
        _Fields fieldId = _Fields.findByThriftId(field.id);
2762
        if (fieldId == null) {
2763
          TProtocolUtil.skip(iprot, field.type);
2764
        } else {
2765
          switch (fieldId) {
2766
            case EMAIL_TYPE:
2767
              if (field.type == TType.STRING) {
2768
                this.emailType = iprot.readString();
2769
              } else { 
2770
                TProtocolUtil.skip(iprot, field.type);
2771
              }
2772
              break;
2773
          }
2774
          iprot.readFieldEnd();
2775
        }
2776
      }
2777
      iprot.readStructEnd();
2778
      validate();
2779
    }
2780
 
2781
    public void write(TProtocol oprot) throws TException {
2782
      validate();
2783
 
2784
      oprot.writeStructBegin(STRUCT_DESC);
2785
      if (this.emailType != null) {
2786
        oprot.writeFieldBegin(EMAIL_TYPE_FIELD_DESC);
2787
        oprot.writeString(this.emailType);
2788
        oprot.writeFieldEnd();
2789
      }
2790
      oprot.writeFieldStop();
2791
      oprot.writeStructEnd();
2792
    }
2793
 
2794
    @Override
2795
    public String toString() {
2796
      StringBuilder sb = new StringBuilder("getEmailsToBeSent_args(");
2797
      boolean first = true;
2798
 
2799
      sb.append("emailType:");
2800
      if (this.emailType == null) {
2801
        sb.append("null");
2802
      } else {
2803
        sb.append(this.emailType);
2804
      }
2805
      first = false;
2806
      sb.append(")");
2807
      return sb.toString();
2808
    }
2809
 
2810
    public void validate() throws TException {
2811
      // check for required fields
2812
    }
2813
 
2814
  }
2815
 
2816
  public static class getEmailsToBeSent_result implements TBase<getEmailsToBeSent_result._Fields>, java.io.Serializable, Cloneable, Comparable<getEmailsToBeSent_result>   {
2817
    private static final TStruct STRUCT_DESC = new TStruct("getEmailsToBeSent_result");
2818
 
2819
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
2820
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
2821
 
2822
    private List<UserEmail> success;
2823
    private HelperServiceException se;
2824
 
2825
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2826
    public enum _Fields implements TFieldIdEnum {
2827
      SUCCESS((short)0, "success"),
2828
      SE((short)1, "se");
2829
 
2830
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2831
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2832
 
2833
      static {
2834
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2835
          byId.put((int)field._thriftId, field);
2836
          byName.put(field.getFieldName(), field);
2837
        }
2838
      }
2839
 
2840
      /**
2841
       * Find the _Fields constant that matches fieldId, or null if its not found.
2842
       */
2843
      public static _Fields findByThriftId(int fieldId) {
2844
        return byId.get(fieldId);
2845
      }
2846
 
2847
      /**
2848
       * Find the _Fields constant that matches fieldId, throwing an exception
2849
       * if it is not found.
2850
       */
2851
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2852
        _Fields fields = findByThriftId(fieldId);
2853
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2854
        return fields;
2855
      }
2856
 
2857
      /**
2858
       * Find the _Fields constant that matches name, or null if its not found.
2859
       */
2860
      public static _Fields findByName(String name) {
2861
        return byName.get(name);
2862
      }
2863
 
2864
      private final short _thriftId;
2865
      private final String _fieldName;
2866
 
2867
      _Fields(short thriftId, String fieldName) {
2868
        _thriftId = thriftId;
2869
        _fieldName = fieldName;
2870
      }
2871
 
2872
      public short getThriftFieldId() {
2873
        return _thriftId;
2874
      }
2875
 
2876
      public String getFieldName() {
2877
        return _fieldName;
2878
      }
2879
    }
2880
 
2881
    // isset id assignments
2882
 
2883
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2884
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2885
          new ListMetaData(TType.LIST, 
2886
              new StructMetaData(TType.STRUCT, UserEmail.class))));
2887
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
2888
          new FieldValueMetaData(TType.STRUCT)));
2889
    }});
2890
 
2891
    static {
2892
      FieldMetaData.addStructMetaDataMap(getEmailsToBeSent_result.class, metaDataMap);
2893
    }
2894
 
2895
    public getEmailsToBeSent_result() {
2896
    }
2897
 
2898
    public getEmailsToBeSent_result(
2899
      List<UserEmail> success,
2900
      HelperServiceException se)
2901
    {
2902
      this();
2903
      this.success = success;
2904
      this.se = se;
2905
    }
2906
 
2907
    /**
2908
     * Performs a deep copy on <i>other</i>.
2909
     */
2910
    public getEmailsToBeSent_result(getEmailsToBeSent_result other) {
2911
      if (other.isSetSuccess()) {
2912
        List<UserEmail> __this__success = new ArrayList<UserEmail>();
2913
        for (UserEmail other_element : other.success) {
2914
          __this__success.add(new UserEmail(other_element));
2915
        }
2916
        this.success = __this__success;
2917
      }
2918
      if (other.isSetSe()) {
2919
        this.se = new HelperServiceException(other.se);
2920
      }
2921
    }
2922
 
2923
    public getEmailsToBeSent_result deepCopy() {
2924
      return new getEmailsToBeSent_result(this);
2925
    }
2926
 
2927
    @Deprecated
2928
    public getEmailsToBeSent_result clone() {
2929
      return new getEmailsToBeSent_result(this);
2930
    }
2931
 
2932
    public int getSuccessSize() {
2933
      return (this.success == null) ? 0 : this.success.size();
2934
    }
2935
 
2936
    public java.util.Iterator<UserEmail> getSuccessIterator() {
2937
      return (this.success == null) ? null : this.success.iterator();
2938
    }
2939
 
2940
    public void addToSuccess(UserEmail elem) {
2941
      if (this.success == null) {
2942
        this.success = new ArrayList<UserEmail>();
2943
      }
2944
      this.success.add(elem);
2945
    }
2946
 
2947
    public List<UserEmail> getSuccess() {
2948
      return this.success;
2949
    }
2950
 
2951
    public getEmailsToBeSent_result setSuccess(List<UserEmail> success) {
2952
      this.success = success;
2953
      return this;
2954
    }
2955
 
2956
    public void unsetSuccess() {
2957
      this.success = null;
2958
    }
2959
 
2960
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2961
    public boolean isSetSuccess() {
2962
      return this.success != null;
2963
    }
2964
 
2965
    public void setSuccessIsSet(boolean value) {
2966
      if (!value) {
2967
        this.success = null;
2968
      }
2969
    }
2970
 
2971
    public HelperServiceException getSe() {
2972
      return this.se;
2973
    }
2974
 
2975
    public getEmailsToBeSent_result setSe(HelperServiceException se) {
2976
      this.se = se;
2977
      return this;
2978
    }
2979
 
2980
    public void unsetSe() {
2981
      this.se = null;
2982
    }
2983
 
2984
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
2985
    public boolean isSetSe() {
2986
      return this.se != null;
2987
    }
2988
 
2989
    public void setSeIsSet(boolean value) {
2990
      if (!value) {
2991
        this.se = null;
2992
      }
2993
    }
2994
 
2995
    public void setFieldValue(_Fields field, Object value) {
2996
      switch (field) {
2997
      case SUCCESS:
2998
        if (value == null) {
2999
          unsetSuccess();
3000
        } else {
3001
          setSuccess((List<UserEmail>)value);
3002
        }
3003
        break;
3004
 
3005
      case SE:
3006
        if (value == null) {
3007
          unsetSe();
3008
        } else {
3009
          setSe((HelperServiceException)value);
3010
        }
3011
        break;
3012
 
3013
      }
3014
    }
3015
 
3016
    public void setFieldValue(int fieldID, Object value) {
3017
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3018
    }
3019
 
3020
    public Object getFieldValue(_Fields field) {
3021
      switch (field) {
3022
      case SUCCESS:
3023
        return getSuccess();
3024
 
3025
      case SE:
3026
        return getSe();
3027
 
3028
      }
3029
      throw new IllegalStateException();
3030
    }
3031
 
3032
    public Object getFieldValue(int fieldId) {
3033
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3034
    }
3035
 
3036
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3037
    public boolean isSet(_Fields field) {
3038
      switch (field) {
3039
      case SUCCESS:
3040
        return isSetSuccess();
3041
      case SE:
3042
        return isSetSe();
3043
      }
3044
      throw new IllegalStateException();
3045
    }
3046
 
3047
    public boolean isSet(int fieldID) {
3048
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3049
    }
3050
 
3051
    @Override
3052
    public boolean equals(Object that) {
3053
      if (that == null)
3054
        return false;
3055
      if (that instanceof getEmailsToBeSent_result)
3056
        return this.equals((getEmailsToBeSent_result)that);
3057
      return false;
3058
    }
3059
 
3060
    public boolean equals(getEmailsToBeSent_result that) {
3061
      if (that == null)
3062
        return false;
3063
 
3064
      boolean this_present_success = true && this.isSetSuccess();
3065
      boolean that_present_success = true && that.isSetSuccess();
3066
      if (this_present_success || that_present_success) {
3067
        if (!(this_present_success && that_present_success))
3068
          return false;
3069
        if (!this.success.equals(that.success))
3070
          return false;
3071
      }
3072
 
3073
      boolean this_present_se = true && this.isSetSe();
3074
      boolean that_present_se = true && that.isSetSe();
3075
      if (this_present_se || that_present_se) {
3076
        if (!(this_present_se && that_present_se))
3077
          return false;
3078
        if (!this.se.equals(that.se))
3079
          return false;
3080
      }
3081
 
3082
      return true;
3083
    }
3084
 
3085
    @Override
3086
    public int hashCode() {
3087
      return 0;
3088
    }
3089
 
3090
    public int compareTo(getEmailsToBeSent_result other) {
3091
      if (!getClass().equals(other.getClass())) {
3092
        return getClass().getName().compareTo(other.getClass().getName());
3093
      }
3094
 
3095
      int lastComparison = 0;
3096
      getEmailsToBeSent_result typedOther = (getEmailsToBeSent_result)other;
3097
 
3098
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3099
      if (lastComparison != 0) {
3100
        return lastComparison;
3101
      }
3102
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3103
      if (lastComparison != 0) {
3104
        return lastComparison;
3105
      }
3106
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
3107
      if (lastComparison != 0) {
3108
        return lastComparison;
3109
      }
3110
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
3111
      if (lastComparison != 0) {
3112
        return lastComparison;
3113
      }
3114
      return 0;
3115
    }
3116
 
3117
    public void read(TProtocol iprot) throws TException {
3118
      TField field;
3119
      iprot.readStructBegin();
3120
      while (true)
3121
      {
3122
        field = iprot.readFieldBegin();
3123
        if (field.type == TType.STOP) { 
3124
          break;
3125
        }
3126
        _Fields fieldId = _Fields.findByThriftId(field.id);
3127
        if (fieldId == null) {
3128
          TProtocolUtil.skip(iprot, field.type);
3129
        } else {
3130
          switch (fieldId) {
3131
            case SUCCESS:
3132
              if (field.type == TType.LIST) {
3133
                {
3134
                  TList _list8 = iprot.readListBegin();
3135
                  this.success = new ArrayList<UserEmail>(_list8.size);
3136
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
3137
                  {
3138
                    UserEmail _elem10;
3139
                    _elem10 = new UserEmail();
3140
                    _elem10.read(iprot);
3141
                    this.success.add(_elem10);
3142
                  }
3143
                  iprot.readListEnd();
3144
                }
3145
              } else { 
3146
                TProtocolUtil.skip(iprot, field.type);
3147
              }
3148
              break;
3149
            case SE:
3150
              if (field.type == TType.STRUCT) {
3151
                this.se = new HelperServiceException();
3152
                this.se.read(iprot);
3153
              } else { 
3154
                TProtocolUtil.skip(iprot, field.type);
3155
              }
3156
              break;
3157
          }
3158
          iprot.readFieldEnd();
3159
        }
3160
      }
3161
      iprot.readStructEnd();
3162
      validate();
3163
    }
3164
 
3165
    public void write(TProtocol oprot) throws TException {
3166
      oprot.writeStructBegin(STRUCT_DESC);
3167
 
3168
      if (this.isSetSuccess()) {
3169
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3170
        {
3171
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
3172
          for (UserEmail _iter11 : this.success)
3173
          {
3174
            _iter11.write(oprot);
3175
          }
3176
          oprot.writeListEnd();
3177
        }
3178
        oprot.writeFieldEnd();
3179
      } else if (this.isSetSe()) {
3180
        oprot.writeFieldBegin(SE_FIELD_DESC);
3181
        this.se.write(oprot);
3182
        oprot.writeFieldEnd();
3183
      }
3184
      oprot.writeFieldStop();
3185
      oprot.writeStructEnd();
3186
    }
3187
 
3188
    @Override
3189
    public String toString() {
3190
      StringBuilder sb = new StringBuilder("getEmailsToBeSent_result(");
3191
      boolean first = true;
3192
 
3193
      sb.append("success:");
3194
      if (this.success == null) {
3195
        sb.append("null");
3196
      } else {
3197
        sb.append(this.success);
3198
      }
3199
      first = false;
3200
      if (!first) sb.append(", ");
3201
      sb.append("se:");
3202
      if (this.se == null) {
3203
        sb.append("null");
3204
      } else {
3205
        sb.append(this.se);
3206
      }
3207
      first = false;
3208
      sb.append(")");
3209
      return sb.toString();
3210
    }
3211
 
3212
    public void validate() throws TException {
3213
      // check for required fields
3214
    }
3215
 
3216
  }
3217
 
3218
  public static class markEmailAsSent_args implements TBase<markEmailAsSent_args._Fields>, java.io.Serializable, Cloneable, Comparable<markEmailAsSent_args>   {
3219
    private static final TStruct STRUCT_DESC = new TStruct("markEmailAsSent_args");
3220
 
3221
    private static final TField EMAIL_ID_FIELD_DESC = new TField("emailId", TType.I64, (short)1);
3222
 
3223
    private long emailId;
3224
 
3225
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3226
    public enum _Fields implements TFieldIdEnum {
3227
      EMAIL_ID((short)1, "emailId");
3228
 
3229
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3230
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3231
 
3232
      static {
3233
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3234
          byId.put((int)field._thriftId, field);
3235
          byName.put(field.getFieldName(), field);
3236
        }
3237
      }
3238
 
3239
      /**
3240
       * Find the _Fields constant that matches fieldId, or null if its not found.
3241
       */
3242
      public static _Fields findByThriftId(int fieldId) {
3243
        return byId.get(fieldId);
3244
      }
3245
 
3246
      /**
3247
       * Find the _Fields constant that matches fieldId, throwing an exception
3248
       * if it is not found.
3249
       */
3250
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3251
        _Fields fields = findByThriftId(fieldId);
3252
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3253
        return fields;
3254
      }
3255
 
3256
      /**
3257
       * Find the _Fields constant that matches name, or null if its not found.
3258
       */
3259
      public static _Fields findByName(String name) {
3260
        return byName.get(name);
3261
      }
3262
 
3263
      private final short _thriftId;
3264
      private final String _fieldName;
3265
 
3266
      _Fields(short thriftId, String fieldName) {
3267
        _thriftId = thriftId;
3268
        _fieldName = fieldName;
3269
      }
3270
 
3271
      public short getThriftFieldId() {
3272
        return _thriftId;
3273
      }
3274
 
3275
      public String getFieldName() {
3276
        return _fieldName;
3277
      }
3278
    }
3279
 
3280
    // isset id assignments
3281
    private static final int __EMAILID_ISSET_ID = 0;
3282
    private BitSet __isset_bit_vector = new BitSet(1);
3283
 
3284
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3285
      put(_Fields.EMAIL_ID, new FieldMetaData("emailId", TFieldRequirementType.DEFAULT, 
3286
          new FieldValueMetaData(TType.I64)));
3287
    }});
3288
 
3289
    static {
3290
      FieldMetaData.addStructMetaDataMap(markEmailAsSent_args.class, metaDataMap);
3291
    }
3292
 
3293
    public markEmailAsSent_args() {
3294
    }
3295
 
3296
    public markEmailAsSent_args(
3297
      long emailId)
3298
    {
3299
      this();
3300
      this.emailId = emailId;
3301
      setEmailIdIsSet(true);
3302
    }
3303
 
3304
    /**
3305
     * Performs a deep copy on <i>other</i>.
3306
     */
3307
    public markEmailAsSent_args(markEmailAsSent_args other) {
3308
      __isset_bit_vector.clear();
3309
      __isset_bit_vector.or(other.__isset_bit_vector);
3310
      this.emailId = other.emailId;
3311
    }
3312
 
3313
    public markEmailAsSent_args deepCopy() {
3314
      return new markEmailAsSent_args(this);
3315
    }
3316
 
3317
    @Deprecated
3318
    public markEmailAsSent_args clone() {
3319
      return new markEmailAsSent_args(this);
3320
    }
3321
 
3322
    public long getEmailId() {
3323
      return this.emailId;
3324
    }
3325
 
3326
    public markEmailAsSent_args setEmailId(long emailId) {
3327
      this.emailId = emailId;
3328
      setEmailIdIsSet(true);
3329
      return this;
3330
    }
3331
 
3332
    public void unsetEmailId() {
3333
      __isset_bit_vector.clear(__EMAILID_ISSET_ID);
3334
    }
3335
 
3336
    /** Returns true if field emailId is set (has been asigned a value) and false otherwise */
3337
    public boolean isSetEmailId() {
3338
      return __isset_bit_vector.get(__EMAILID_ISSET_ID);
3339
    }
3340
 
3341
    public void setEmailIdIsSet(boolean value) {
3342
      __isset_bit_vector.set(__EMAILID_ISSET_ID, value);
3343
    }
3344
 
3345
    public void setFieldValue(_Fields field, Object value) {
3346
      switch (field) {
3347
      case EMAIL_ID:
3348
        if (value == null) {
3349
          unsetEmailId();
3350
        } else {
3351
          setEmailId((Long)value);
3352
        }
3353
        break;
3354
 
3355
      }
3356
    }
3357
 
3358
    public void setFieldValue(int fieldID, Object value) {
3359
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3360
    }
3361
 
3362
    public Object getFieldValue(_Fields field) {
3363
      switch (field) {
3364
      case EMAIL_ID:
3365
        return new Long(getEmailId());
3366
 
3367
      }
3368
      throw new IllegalStateException();
3369
    }
3370
 
3371
    public Object getFieldValue(int fieldId) {
3372
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3373
    }
3374
 
3375
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3376
    public boolean isSet(_Fields field) {
3377
      switch (field) {
3378
      case EMAIL_ID:
3379
        return isSetEmailId();
3380
      }
3381
      throw new IllegalStateException();
3382
    }
3383
 
3384
    public boolean isSet(int fieldID) {
3385
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3386
    }
3387
 
3388
    @Override
3389
    public boolean equals(Object that) {
3390
      if (that == null)
3391
        return false;
3392
      if (that instanceof markEmailAsSent_args)
3393
        return this.equals((markEmailAsSent_args)that);
3394
      return false;
3395
    }
3396
 
3397
    public boolean equals(markEmailAsSent_args that) {
3398
      if (that == null)
3399
        return false;
3400
 
3401
      boolean this_present_emailId = true;
3402
      boolean that_present_emailId = true;
3403
      if (this_present_emailId || that_present_emailId) {
3404
        if (!(this_present_emailId && that_present_emailId))
3405
          return false;
3406
        if (this.emailId != that.emailId)
3407
          return false;
3408
      }
3409
 
3410
      return true;
3411
    }
3412
 
3413
    @Override
3414
    public int hashCode() {
3415
      return 0;
3416
    }
3417
 
3418
    public int compareTo(markEmailAsSent_args other) {
3419
      if (!getClass().equals(other.getClass())) {
3420
        return getClass().getName().compareTo(other.getClass().getName());
3421
      }
3422
 
3423
      int lastComparison = 0;
3424
      markEmailAsSent_args typedOther = (markEmailAsSent_args)other;
3425
 
3426
      lastComparison = Boolean.valueOf(isSetEmailId()).compareTo(isSetEmailId());
3427
      if (lastComparison != 0) {
3428
        return lastComparison;
3429
      }
3430
      lastComparison = TBaseHelper.compareTo(emailId, typedOther.emailId);
3431
      if (lastComparison != 0) {
3432
        return lastComparison;
3433
      }
3434
      return 0;
3435
    }
3436
 
3437
    public void read(TProtocol iprot) throws TException {
3438
      TField field;
3439
      iprot.readStructBegin();
3440
      while (true)
3441
      {
3442
        field = iprot.readFieldBegin();
3443
        if (field.type == TType.STOP) { 
3444
          break;
3445
        }
3446
        _Fields fieldId = _Fields.findByThriftId(field.id);
3447
        if (fieldId == null) {
3448
          TProtocolUtil.skip(iprot, field.type);
3449
        } else {
3450
          switch (fieldId) {
3451
            case EMAIL_ID:
3452
              if (field.type == TType.I64) {
3453
                this.emailId = iprot.readI64();
3454
                setEmailIdIsSet(true);
3455
              } else { 
3456
                TProtocolUtil.skip(iprot, field.type);
3457
              }
3458
              break;
3459
          }
3460
          iprot.readFieldEnd();
3461
        }
3462
      }
3463
      iprot.readStructEnd();
3464
      validate();
3465
    }
3466
 
3467
    public void write(TProtocol oprot) throws TException {
3468
      validate();
3469
 
3470
      oprot.writeStructBegin(STRUCT_DESC);
3471
      oprot.writeFieldBegin(EMAIL_ID_FIELD_DESC);
3472
      oprot.writeI64(this.emailId);
3473
      oprot.writeFieldEnd();
3474
      oprot.writeFieldStop();
3475
      oprot.writeStructEnd();
3476
    }
3477
 
3478
    @Override
3479
    public String toString() {
3480
      StringBuilder sb = new StringBuilder("markEmailAsSent_args(");
3481
      boolean first = true;
3482
 
3483
      sb.append("emailId:");
3484
      sb.append(this.emailId);
3485
      first = false;
3486
      sb.append(")");
3487
      return sb.toString();
3488
    }
3489
 
3490
    public void validate() throws TException {
3491
      // check for required fields
3492
    }
3493
 
3494
  }
3495
 
3496
  public static class markEmailAsSent_result implements TBase<markEmailAsSent_result._Fields>, java.io.Serializable, Cloneable, Comparable<markEmailAsSent_result>   {
3497
    private static final TStruct STRUCT_DESC = new TStruct("markEmailAsSent_result");
3498
 
3499
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
3500
 
3501
    private HelperServiceException se;
3502
 
3503
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3504
    public enum _Fields implements TFieldIdEnum {
3505
      SE((short)1, "se");
3506
 
3507
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3508
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3509
 
3510
      static {
3511
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3512
          byId.put((int)field._thriftId, field);
3513
          byName.put(field.getFieldName(), field);
3514
        }
3515
      }
3516
 
3517
      /**
3518
       * Find the _Fields constant that matches fieldId, or null if its not found.
3519
       */
3520
      public static _Fields findByThriftId(int fieldId) {
3521
        return byId.get(fieldId);
3522
      }
3523
 
3524
      /**
3525
       * Find the _Fields constant that matches fieldId, throwing an exception
3526
       * if it is not found.
3527
       */
3528
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3529
        _Fields fields = findByThriftId(fieldId);
3530
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3531
        return fields;
3532
      }
3533
 
3534
      /**
3535
       * Find the _Fields constant that matches name, or null if its not found.
3536
       */
3537
      public static _Fields findByName(String name) {
3538
        return byName.get(name);
3539
      }
3540
 
3541
      private final short _thriftId;
3542
      private final String _fieldName;
3543
 
3544
      _Fields(short thriftId, String fieldName) {
3545
        _thriftId = thriftId;
3546
        _fieldName = fieldName;
3547
      }
3548
 
3549
      public short getThriftFieldId() {
3550
        return _thriftId;
3551
      }
3552
 
3553
      public String getFieldName() {
3554
        return _fieldName;
3555
      }
3556
    }
3557
 
3558
    // isset id assignments
3559
 
3560
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3561
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
3562
          new FieldValueMetaData(TType.STRUCT)));
3563
    }});
3564
 
3565
    static {
3566
      FieldMetaData.addStructMetaDataMap(markEmailAsSent_result.class, metaDataMap);
3567
    }
3568
 
3569
    public markEmailAsSent_result() {
3570
    }
3571
 
3572
    public markEmailAsSent_result(
3573
      HelperServiceException se)
3574
    {
3575
      this();
3576
      this.se = se;
3577
    }
3578
 
3579
    /**
3580
     * Performs a deep copy on <i>other</i>.
3581
     */
3582
    public markEmailAsSent_result(markEmailAsSent_result other) {
3583
      if (other.isSetSe()) {
3584
        this.se = new HelperServiceException(other.se);
3585
      }
3586
    }
3587
 
3588
    public markEmailAsSent_result deepCopy() {
3589
      return new markEmailAsSent_result(this);
3590
    }
3591
 
3592
    @Deprecated
3593
    public markEmailAsSent_result clone() {
3594
      return new markEmailAsSent_result(this);
3595
    }
3596
 
3597
    public HelperServiceException getSe() {
3598
      return this.se;
3599
    }
3600
 
3601
    public markEmailAsSent_result setSe(HelperServiceException se) {
3602
      this.se = se;
3603
      return this;
3604
    }
3605
 
3606
    public void unsetSe() {
3607
      this.se = null;
3608
    }
3609
 
3610
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
3611
    public boolean isSetSe() {
3612
      return this.se != null;
3613
    }
3614
 
3615
    public void setSeIsSet(boolean value) {
3616
      if (!value) {
3617
        this.se = null;
3618
      }
3619
    }
3620
 
3621
    public void setFieldValue(_Fields field, Object value) {
3622
      switch (field) {
3623
      case SE:
3624
        if (value == null) {
3625
          unsetSe();
3626
        } else {
3627
          setSe((HelperServiceException)value);
3628
        }
3629
        break;
3630
 
3631
      }
3632
    }
3633
 
3634
    public void setFieldValue(int fieldID, Object value) {
3635
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3636
    }
3637
 
3638
    public Object getFieldValue(_Fields field) {
3639
      switch (field) {
3640
      case SE:
3641
        return getSe();
3642
 
3643
      }
3644
      throw new IllegalStateException();
3645
    }
3646
 
3647
    public Object getFieldValue(int fieldId) {
3648
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3649
    }
3650
 
3651
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3652
    public boolean isSet(_Fields field) {
3653
      switch (field) {
3654
      case SE:
3655
        return isSetSe();
3656
      }
3657
      throw new IllegalStateException();
3658
    }
3659
 
3660
    public boolean isSet(int fieldID) {
3661
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3662
    }
3663
 
3664
    @Override
3665
    public boolean equals(Object that) {
3666
      if (that == null)
3667
        return false;
3668
      if (that instanceof markEmailAsSent_result)
3669
        return this.equals((markEmailAsSent_result)that);
3670
      return false;
3671
    }
3672
 
3673
    public boolean equals(markEmailAsSent_result that) {
3674
      if (that == null)
3675
        return false;
3676
 
3677
      boolean this_present_se = true && this.isSetSe();
3678
      boolean that_present_se = true && that.isSetSe();
3679
      if (this_present_se || that_present_se) {
3680
        if (!(this_present_se && that_present_se))
3681
          return false;
3682
        if (!this.se.equals(that.se))
3683
          return false;
3684
      }
3685
 
3686
      return true;
3687
    }
3688
 
3689
    @Override
3690
    public int hashCode() {
3691
      return 0;
3692
    }
3693
 
3694
    public int compareTo(markEmailAsSent_result other) {
3695
      if (!getClass().equals(other.getClass())) {
3696
        return getClass().getName().compareTo(other.getClass().getName());
3697
      }
3698
 
3699
      int lastComparison = 0;
3700
      markEmailAsSent_result typedOther = (markEmailAsSent_result)other;
3701
 
3702
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
3703
      if (lastComparison != 0) {
3704
        return lastComparison;
3705
      }
3706
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
3707
      if (lastComparison != 0) {
3708
        return lastComparison;
3709
      }
3710
      return 0;
3711
    }
3712
 
3713
    public void read(TProtocol iprot) throws TException {
3714
      TField field;
3715
      iprot.readStructBegin();
3716
      while (true)
3717
      {
3718
        field = iprot.readFieldBegin();
3719
        if (field.type == TType.STOP) { 
3720
          break;
3721
        }
3722
        _Fields fieldId = _Fields.findByThriftId(field.id);
3723
        if (fieldId == null) {
3724
          TProtocolUtil.skip(iprot, field.type);
3725
        } else {
3726
          switch (fieldId) {
3727
            case SE:
3728
              if (field.type == TType.STRUCT) {
3729
                this.se = new HelperServiceException();
3730
                this.se.read(iprot);
3731
              } else { 
3732
                TProtocolUtil.skip(iprot, field.type);
3733
              }
3734
              break;
3735
          }
3736
          iprot.readFieldEnd();
3737
        }
3738
      }
3739
      iprot.readStructEnd();
3740
      validate();
3741
    }
3742
 
3743
    public void write(TProtocol oprot) throws TException {
3744
      oprot.writeStructBegin(STRUCT_DESC);
3745
 
3746
      if (this.isSetSe()) {
3747
        oprot.writeFieldBegin(SE_FIELD_DESC);
3748
        this.se.write(oprot);
3749
        oprot.writeFieldEnd();
3750
      }
3751
      oprot.writeFieldStop();
3752
      oprot.writeStructEnd();
3753
    }
3754
 
3755
    @Override
3756
    public String toString() {
3757
      StringBuilder sb = new StringBuilder("markEmailAsSent_result(");
3758
      boolean first = true;
3759
 
3760
      sb.append("se:");
3761
      if (this.se == null) {
3762
        sb.append("null");
3763
      } else {
3764
        sb.append(this.se);
3765
      }
3766
      first = false;
3767
      sb.append(")");
3768
      return sb.toString();
3769
    }
3770
 
3771
    public void validate() throws TException {
3772
      // check for required fields
3773
    }
3774
 
3775
  }
3776
 
352 ashish 3777
  public static class sendMail_args implements TBase<sendMail_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendMail_args>   {
3778
    private static final TStruct STRUCT_DESC = new TStruct("sendMail_args");
3779
 
3780
    private static final TField MAIL_FIELD_DESC = new TField("mail", TType.STRUCT, (short)1);
3781
 
3782
    private Mail mail;
3783
 
3784
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3785
    public enum _Fields implements TFieldIdEnum {
3786
      MAIL((short)1, "mail");
3787
 
3788
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3789
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3790
 
3791
      static {
3792
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3793
          byId.put((int)field._thriftId, field);
3794
          byName.put(field.getFieldName(), field);
3795
        }
3796
      }
3797
 
3798
      /**
3799
       * Find the _Fields constant that matches fieldId, or null if its not found.
3800
       */
3801
      public static _Fields findByThriftId(int fieldId) {
3802
        return byId.get(fieldId);
3803
      }
3804
 
3805
      /**
3806
       * Find the _Fields constant that matches fieldId, throwing an exception
3807
       * if it is not found.
3808
       */
3809
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3810
        _Fields fields = findByThriftId(fieldId);
3811
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3812
        return fields;
3813
      }
3814
 
3815
      /**
3816
       * Find the _Fields constant that matches name, or null if its not found.
3817
       */
3818
      public static _Fields findByName(String name) {
3819
        return byName.get(name);
3820
      }
3821
 
3822
      private final short _thriftId;
3823
      private final String _fieldName;
3824
 
3825
      _Fields(short thriftId, String fieldName) {
3826
        _thriftId = thriftId;
3827
        _fieldName = fieldName;
3828
      }
3829
 
3830
      public short getThriftFieldId() {
3831
        return _thriftId;
3832
      }
3833
 
3834
      public String getFieldName() {
3835
        return _fieldName;
3836
      }
3837
    }
3838
 
3839
    // isset id assignments
3840
 
3841
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3842
      put(_Fields.MAIL, new FieldMetaData("mail", TFieldRequirementType.DEFAULT, 
3843
          new StructMetaData(TType.STRUCT, Mail.class)));
3844
    }});
3845
 
3846
    static {
3847
      FieldMetaData.addStructMetaDataMap(sendMail_args.class, metaDataMap);
3848
    }
3849
 
3850
    public sendMail_args() {
3851
    }
3852
 
3853
    public sendMail_args(
3854
      Mail mail)
3855
    {
3856
      this();
3857
      this.mail = mail;
3858
    }
3859
 
3860
    /**
3861
     * Performs a deep copy on <i>other</i>.
3862
     */
3863
    public sendMail_args(sendMail_args other) {
3864
      if (other.isSetMail()) {
3865
        this.mail = new Mail(other.mail);
3866
      }
3867
    }
3868
 
3869
    public sendMail_args deepCopy() {
3870
      return new sendMail_args(this);
3871
    }
3872
 
3873
    @Deprecated
3874
    public sendMail_args clone() {
3875
      return new sendMail_args(this);
3876
    }
3877
 
3878
    public Mail getMail() {
3879
      return this.mail;
3880
    }
3881
 
3882
    public sendMail_args setMail(Mail mail) {
3883
      this.mail = mail;
3884
      return this;
3885
    }
3886
 
3887
    public void unsetMail() {
3888
      this.mail = null;
3889
    }
3890
 
3891
    /** Returns true if field mail is set (has been asigned a value) and false otherwise */
3892
    public boolean isSetMail() {
3893
      return this.mail != null;
3894
    }
3895
 
3896
    public void setMailIsSet(boolean value) {
3897
      if (!value) {
3898
        this.mail = null;
3899
      }
3900
    }
3901
 
3902
    public void setFieldValue(_Fields field, Object value) {
3903
      switch (field) {
3904
      case MAIL:
3905
        if (value == null) {
3906
          unsetMail();
3907
        } else {
3908
          setMail((Mail)value);
3909
        }
3910
        break;
3911
 
3912
      }
3913
    }
3914
 
3915
    public void setFieldValue(int fieldID, Object value) {
3916
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3917
    }
3918
 
3919
    public Object getFieldValue(_Fields field) {
3920
      switch (field) {
3921
      case MAIL:
3922
        return getMail();
3923
 
3924
      }
3925
      throw new IllegalStateException();
3926
    }
3927
 
3928
    public Object getFieldValue(int fieldId) {
3929
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3930
    }
3931
 
3932
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3933
    public boolean isSet(_Fields field) {
3934
      switch (field) {
3935
      case MAIL:
3936
        return isSetMail();
3937
      }
3938
      throw new IllegalStateException();
3939
    }
3940
 
3941
    public boolean isSet(int fieldID) {
3942
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3943
    }
3944
 
3945
    @Override
3946
    public boolean equals(Object that) {
3947
      if (that == null)
3948
        return false;
3949
      if (that instanceof sendMail_args)
3950
        return this.equals((sendMail_args)that);
3951
      return false;
3952
    }
3953
 
3954
    public boolean equals(sendMail_args that) {
3955
      if (that == null)
3956
        return false;
3957
 
3958
      boolean this_present_mail = true && this.isSetMail();
3959
      boolean that_present_mail = true && that.isSetMail();
3960
      if (this_present_mail || that_present_mail) {
3961
        if (!(this_present_mail && that_present_mail))
3962
          return false;
3963
        if (!this.mail.equals(that.mail))
3964
          return false;
3965
      }
3966
 
3967
      return true;
3968
    }
3969
 
3970
    @Override
3971
    public int hashCode() {
3972
      return 0;
3973
    }
3974
 
3975
    public int compareTo(sendMail_args other) {
3976
      if (!getClass().equals(other.getClass())) {
3977
        return getClass().getName().compareTo(other.getClass().getName());
3978
      }
3979
 
3980
      int lastComparison = 0;
3981
      sendMail_args typedOther = (sendMail_args)other;
3982
 
3983
      lastComparison = Boolean.valueOf(isSetMail()).compareTo(isSetMail());
3984
      if (lastComparison != 0) {
3985
        return lastComparison;
3986
      }
3987
      lastComparison = TBaseHelper.compareTo(mail, typedOther.mail);
3988
      if (lastComparison != 0) {
3989
        return lastComparison;
3990
      }
3991
      return 0;
3992
    }
3993
 
3994
    public void read(TProtocol iprot) throws TException {
3995
      TField field;
3996
      iprot.readStructBegin();
3997
      while (true)
3998
      {
3999
        field = iprot.readFieldBegin();
4000
        if (field.type == TType.STOP) { 
4001
          break;
4002
        }
4003
        _Fields fieldId = _Fields.findByThriftId(field.id);
4004
        if (fieldId == null) {
4005
          TProtocolUtil.skip(iprot, field.type);
4006
        } else {
4007
          switch (fieldId) {
4008
            case MAIL:
4009
              if (field.type == TType.STRUCT) {
4010
                this.mail = new Mail();
4011
                this.mail.read(iprot);
4012
              } else { 
4013
                TProtocolUtil.skip(iprot, field.type);
4014
              }
4015
              break;
4016
          }
4017
          iprot.readFieldEnd();
4018
        }
4019
      }
4020
      iprot.readStructEnd();
4021
      validate();
4022
    }
4023
 
4024
    public void write(TProtocol oprot) throws TException {
4025
      validate();
4026
 
4027
      oprot.writeStructBegin(STRUCT_DESC);
4028
      if (this.mail != null) {
4029
        oprot.writeFieldBegin(MAIL_FIELD_DESC);
4030
        this.mail.write(oprot);
4031
        oprot.writeFieldEnd();
4032
      }
4033
      oprot.writeFieldStop();
4034
      oprot.writeStructEnd();
4035
    }
4036
 
4037
    @Override
4038
    public String toString() {
4039
      StringBuilder sb = new StringBuilder("sendMail_args(");
4040
      boolean first = true;
4041
 
4042
      sb.append("mail:");
4043
      if (this.mail == null) {
4044
        sb.append("null");
4045
      } else {
4046
        sb.append(this.mail);
4047
      }
4048
      first = false;
4049
      sb.append(")");
4050
      return sb.toString();
4051
    }
4052
 
4053
    public void validate() throws TException {
4054
      // check for required fields
4055
    }
4056
 
4057
  }
4058
 
4059
  public static class sendMail_result implements TBase<sendMail_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendMail_result>   {
4060
    private static final TStruct STRUCT_DESC = new TStruct("sendMail_result");
4061
 
4062
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
4063
 
4064
    private HelperServiceException se;
4065
 
4066
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4067
    public enum _Fields implements TFieldIdEnum {
4068
      SE((short)1, "se");
4069
 
4070
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4071
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4072
 
4073
      static {
4074
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4075
          byId.put((int)field._thriftId, field);
4076
          byName.put(field.getFieldName(), field);
4077
        }
4078
      }
4079
 
4080
      /**
4081
       * Find the _Fields constant that matches fieldId, or null if its not found.
4082
       */
4083
      public static _Fields findByThriftId(int fieldId) {
4084
        return byId.get(fieldId);
4085
      }
4086
 
4087
      /**
4088
       * Find the _Fields constant that matches fieldId, throwing an exception
4089
       * if it is not found.
4090
       */
4091
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4092
        _Fields fields = findByThriftId(fieldId);
4093
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4094
        return fields;
4095
      }
4096
 
4097
      /**
4098
       * Find the _Fields constant that matches name, or null if its not found.
4099
       */
4100
      public static _Fields findByName(String name) {
4101
        return byName.get(name);
4102
      }
4103
 
4104
      private final short _thriftId;
4105
      private final String _fieldName;
4106
 
4107
      _Fields(short thriftId, String fieldName) {
4108
        _thriftId = thriftId;
4109
        _fieldName = fieldName;
4110
      }
4111
 
4112
      public short getThriftFieldId() {
4113
        return _thriftId;
4114
      }
4115
 
4116
      public String getFieldName() {
4117
        return _fieldName;
4118
      }
4119
    }
4120
 
4121
    // isset id assignments
4122
 
4123
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4124
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
4125
          new FieldValueMetaData(TType.STRUCT)));
4126
    }});
4127
 
4128
    static {
4129
      FieldMetaData.addStructMetaDataMap(sendMail_result.class, metaDataMap);
4130
    }
4131
 
4132
    public sendMail_result() {
4133
    }
4134
 
4135
    public sendMail_result(
4136
      HelperServiceException se)
4137
    {
4138
      this();
4139
      this.se = se;
4140
    }
4141
 
4142
    /**
4143
     * Performs a deep copy on <i>other</i>.
4144
     */
4145
    public sendMail_result(sendMail_result other) {
4146
      if (other.isSetSe()) {
4147
        this.se = new HelperServiceException(other.se);
4148
      }
4149
    }
4150
 
4151
    public sendMail_result deepCopy() {
4152
      return new sendMail_result(this);
4153
    }
4154
 
4155
    @Deprecated
4156
    public sendMail_result clone() {
4157
      return new sendMail_result(this);
4158
    }
4159
 
4160
    public HelperServiceException getSe() {
4161
      return this.se;
4162
    }
4163
 
4164
    public sendMail_result setSe(HelperServiceException se) {
4165
      this.se = se;
4166
      return this;
4167
    }
4168
 
4169
    public void unsetSe() {
4170
      this.se = null;
4171
    }
4172
 
4173
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
4174
    public boolean isSetSe() {
4175
      return this.se != null;
4176
    }
4177
 
4178
    public void setSeIsSet(boolean value) {
4179
      if (!value) {
4180
        this.se = null;
4181
      }
4182
    }
4183
 
4184
    public void setFieldValue(_Fields field, Object value) {
4185
      switch (field) {
4186
      case SE:
4187
        if (value == null) {
4188
          unsetSe();
4189
        } else {
4190
          setSe((HelperServiceException)value);
4191
        }
4192
        break;
4193
 
4194
      }
4195
    }
4196
 
4197
    public void setFieldValue(int fieldID, Object value) {
4198
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4199
    }
4200
 
4201
    public Object getFieldValue(_Fields field) {
4202
      switch (field) {
4203
      case SE:
4204
        return getSe();
4205
 
4206
      }
4207
      throw new IllegalStateException();
4208
    }
4209
 
4210
    public Object getFieldValue(int fieldId) {
4211
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4212
    }
4213
 
4214
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4215
    public boolean isSet(_Fields field) {
4216
      switch (field) {
4217
      case SE:
4218
        return isSetSe();
4219
      }
4220
      throw new IllegalStateException();
4221
    }
4222
 
4223
    public boolean isSet(int fieldID) {
4224
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4225
    }
4226
 
4227
    @Override
4228
    public boolean equals(Object that) {
4229
      if (that == null)
4230
        return false;
4231
      if (that instanceof sendMail_result)
4232
        return this.equals((sendMail_result)that);
4233
      return false;
4234
    }
4235
 
4236
    public boolean equals(sendMail_result that) {
4237
      if (that == null)
4238
        return false;
4239
 
4240
      boolean this_present_se = true && this.isSetSe();
4241
      boolean that_present_se = true && that.isSetSe();
4242
      if (this_present_se || that_present_se) {
4243
        if (!(this_present_se && that_present_se))
4244
          return false;
4245
        if (!this.se.equals(that.se))
4246
          return false;
4247
      }
4248
 
4249
      return true;
4250
    }
4251
 
4252
    @Override
4253
    public int hashCode() {
4254
      return 0;
4255
    }
4256
 
4257
    public int compareTo(sendMail_result other) {
4258
      if (!getClass().equals(other.getClass())) {
4259
        return getClass().getName().compareTo(other.getClass().getName());
4260
      }
4261
 
4262
      int lastComparison = 0;
4263
      sendMail_result typedOther = (sendMail_result)other;
4264
 
4265
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
4266
      if (lastComparison != 0) {
4267
        return lastComparison;
4268
      }
4269
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
4270
      if (lastComparison != 0) {
4271
        return lastComparison;
4272
      }
4273
      return 0;
4274
    }
4275
 
4276
    public void read(TProtocol iprot) throws TException {
4277
      TField field;
4278
      iprot.readStructBegin();
4279
      while (true)
4280
      {
4281
        field = iprot.readFieldBegin();
4282
        if (field.type == TType.STOP) { 
4283
          break;
4284
        }
4285
        _Fields fieldId = _Fields.findByThriftId(field.id);
4286
        if (fieldId == null) {
4287
          TProtocolUtil.skip(iprot, field.type);
4288
        } else {
4289
          switch (fieldId) {
4290
            case SE:
4291
              if (field.type == TType.STRUCT) {
4292
                this.se = new HelperServiceException();
4293
                this.se.read(iprot);
4294
              } else { 
4295
                TProtocolUtil.skip(iprot, field.type);
4296
              }
4297
              break;
4298
          }
4299
          iprot.readFieldEnd();
4300
        }
4301
      }
4302
      iprot.readStructEnd();
4303
      validate();
4304
    }
4305
 
4306
    public void write(TProtocol oprot) throws TException {
4307
      oprot.writeStructBegin(STRUCT_DESC);
4308
 
4309
      if (this.isSetSe()) {
4310
        oprot.writeFieldBegin(SE_FIELD_DESC);
4311
        this.se.write(oprot);
4312
        oprot.writeFieldEnd();
4313
      }
4314
      oprot.writeFieldStop();
4315
      oprot.writeStructEnd();
4316
    }
4317
 
4318
    @Override
4319
    public String toString() {
4320
      StringBuilder sb = new StringBuilder("sendMail_result(");
4321
      boolean first = true;
4322
 
4323
      sb.append("se:");
4324
      if (this.se == null) {
4325
        sb.append("null");
4326
      } else {
4327
        sb.append(this.se);
4328
      }
4329
      first = false;
4330
      sb.append(")");
4331
      return sb.toString();
4332
    }
4333
 
4334
    public void validate() throws TException {
4335
      // check for required fields
4336
    }
4337
 
4338
  }
4339
 
4340
  public static class sendText_args implements TBase<sendText_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendText_args>   {
4341
    private static final TStruct STRUCT_DESC = new TStruct("sendText_args");
4342
 
4343
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRUCT, (short)1);
4344
 
4345
    private TextMessage message;
4346
 
4347
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4348
    public enum _Fields implements TFieldIdEnum {
4349
      MESSAGE((short)1, "message");
4350
 
4351
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4352
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4353
 
4354
      static {
4355
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4356
          byId.put((int)field._thriftId, field);
4357
          byName.put(field.getFieldName(), field);
4358
        }
4359
      }
4360
 
4361
      /**
4362
       * Find the _Fields constant that matches fieldId, or null if its not found.
4363
       */
4364
      public static _Fields findByThriftId(int fieldId) {
4365
        return byId.get(fieldId);
4366
      }
4367
 
4368
      /**
4369
       * Find the _Fields constant that matches fieldId, throwing an exception
4370
       * if it is not found.
4371
       */
4372
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4373
        _Fields fields = findByThriftId(fieldId);
4374
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4375
        return fields;
4376
      }
4377
 
4378
      /**
4379
       * Find the _Fields constant that matches name, or null if its not found.
4380
       */
4381
      public static _Fields findByName(String name) {
4382
        return byName.get(name);
4383
      }
4384
 
4385
      private final short _thriftId;
4386
      private final String _fieldName;
4387
 
4388
      _Fields(short thriftId, String fieldName) {
4389
        _thriftId = thriftId;
4390
        _fieldName = fieldName;
4391
      }
4392
 
4393
      public short getThriftFieldId() {
4394
        return _thriftId;
4395
      }
4396
 
4397
      public String getFieldName() {
4398
        return _fieldName;
4399
      }
4400
    }
4401
 
4402
    // isset id assignments
4403
 
4404
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4405
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
4406
          new StructMetaData(TType.STRUCT, TextMessage.class)));
4407
    }});
4408
 
4409
    static {
4410
      FieldMetaData.addStructMetaDataMap(sendText_args.class, metaDataMap);
4411
    }
4412
 
4413
    public sendText_args() {
4414
    }
4415
 
4416
    public sendText_args(
4417
      TextMessage message)
4418
    {
4419
      this();
4420
      this.message = message;
4421
    }
4422
 
4423
    /**
4424
     * Performs a deep copy on <i>other</i>.
4425
     */
4426
    public sendText_args(sendText_args other) {
4427
      if (other.isSetMessage()) {
4428
        this.message = new TextMessage(other.message);
4429
      }
4430
    }
4431
 
4432
    public sendText_args deepCopy() {
4433
      return new sendText_args(this);
4434
    }
4435
 
4436
    @Deprecated
4437
    public sendText_args clone() {
4438
      return new sendText_args(this);
4439
    }
4440
 
4441
    public TextMessage getMessage() {
4442
      return this.message;
4443
    }
4444
 
4445
    public sendText_args setMessage(TextMessage message) {
4446
      this.message = message;
4447
      return this;
4448
    }
4449
 
4450
    public void unsetMessage() {
4451
      this.message = null;
4452
    }
4453
 
4454
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
4455
    public boolean isSetMessage() {
4456
      return this.message != null;
4457
    }
4458
 
4459
    public void setMessageIsSet(boolean value) {
4460
      if (!value) {
4461
        this.message = null;
4462
      }
4463
    }
4464
 
4465
    public void setFieldValue(_Fields field, Object value) {
4466
      switch (field) {
4467
      case MESSAGE:
4468
        if (value == null) {
4469
          unsetMessage();
4470
        } else {
4471
          setMessage((TextMessage)value);
4472
        }
4473
        break;
4474
 
4475
      }
4476
    }
4477
 
4478
    public void setFieldValue(int fieldID, Object value) {
4479
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4480
    }
4481
 
4482
    public Object getFieldValue(_Fields field) {
4483
      switch (field) {
4484
      case MESSAGE:
4485
        return getMessage();
4486
 
4487
      }
4488
      throw new IllegalStateException();
4489
    }
4490
 
4491
    public Object getFieldValue(int fieldId) {
4492
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4493
    }
4494
 
4495
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4496
    public boolean isSet(_Fields field) {
4497
      switch (field) {
4498
      case MESSAGE:
4499
        return isSetMessage();
4500
      }
4501
      throw new IllegalStateException();
4502
    }
4503
 
4504
    public boolean isSet(int fieldID) {
4505
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4506
    }
4507
 
4508
    @Override
4509
    public boolean equals(Object that) {
4510
      if (that == null)
4511
        return false;
4512
      if (that instanceof sendText_args)
4513
        return this.equals((sendText_args)that);
4514
      return false;
4515
    }
4516
 
4517
    public boolean equals(sendText_args that) {
4518
      if (that == null)
4519
        return false;
4520
 
4521
      boolean this_present_message = true && this.isSetMessage();
4522
      boolean that_present_message = true && that.isSetMessage();
4523
      if (this_present_message || that_present_message) {
4524
        if (!(this_present_message && that_present_message))
4525
          return false;
4526
        if (!this.message.equals(that.message))
4527
          return false;
4528
      }
4529
 
4530
      return true;
4531
    }
4532
 
4533
    @Override
4534
    public int hashCode() {
4535
      return 0;
4536
    }
4537
 
4538
    public int compareTo(sendText_args other) {
4539
      if (!getClass().equals(other.getClass())) {
4540
        return getClass().getName().compareTo(other.getClass().getName());
4541
      }
4542
 
4543
      int lastComparison = 0;
4544
      sendText_args typedOther = (sendText_args)other;
4545
 
4546
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
4547
      if (lastComparison != 0) {
4548
        return lastComparison;
4549
      }
4550
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
4551
      if (lastComparison != 0) {
4552
        return lastComparison;
4553
      }
4554
      return 0;
4555
    }
4556
 
4557
    public void read(TProtocol iprot) throws TException {
4558
      TField field;
4559
      iprot.readStructBegin();
4560
      while (true)
4561
      {
4562
        field = iprot.readFieldBegin();
4563
        if (field.type == TType.STOP) { 
4564
          break;
4565
        }
4566
        _Fields fieldId = _Fields.findByThriftId(field.id);
4567
        if (fieldId == null) {
4568
          TProtocolUtil.skip(iprot, field.type);
4569
        } else {
4570
          switch (fieldId) {
4571
            case MESSAGE:
4572
              if (field.type == TType.STRUCT) {
4573
                this.message = new TextMessage();
4574
                this.message.read(iprot);
4575
              } else { 
4576
                TProtocolUtil.skip(iprot, field.type);
4577
              }
4578
              break;
4579
          }
4580
          iprot.readFieldEnd();
4581
        }
4582
      }
4583
      iprot.readStructEnd();
4584
      validate();
4585
    }
4586
 
4587
    public void write(TProtocol oprot) throws TException {
4588
      validate();
4589
 
4590
      oprot.writeStructBegin(STRUCT_DESC);
4591
      if (this.message != null) {
4592
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
4593
        this.message.write(oprot);
4594
        oprot.writeFieldEnd();
4595
      }
4596
      oprot.writeFieldStop();
4597
      oprot.writeStructEnd();
4598
    }
4599
 
4600
    @Override
4601
    public String toString() {
4602
      StringBuilder sb = new StringBuilder("sendText_args(");
4603
      boolean first = true;
4604
 
4605
      sb.append("message:");
4606
      if (this.message == null) {
4607
        sb.append("null");
4608
      } else {
4609
        sb.append(this.message);
4610
      }
4611
      first = false;
4612
      sb.append(")");
4613
      return sb.toString();
4614
    }
4615
 
4616
    public void validate() throws TException {
4617
      // check for required fields
4618
    }
4619
 
4620
  }
4621
 
4622
  public static class sendText_result implements TBase<sendText_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendText_result>   {
4623
    private static final TStruct STRUCT_DESC = new TStruct("sendText_result");
4624
 
4625
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
4626
 
4627
    private HelperServiceException se;
4628
 
4629
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4630
    public enum _Fields implements TFieldIdEnum {
4631
      SE((short)1, "se");
4632
 
4633
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4634
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4635
 
4636
      static {
4637
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4638
          byId.put((int)field._thriftId, field);
4639
          byName.put(field.getFieldName(), field);
4640
        }
4641
      }
4642
 
4643
      /**
4644
       * Find the _Fields constant that matches fieldId, or null if its not found.
4645
       */
4646
      public static _Fields findByThriftId(int fieldId) {
4647
        return byId.get(fieldId);
4648
      }
4649
 
4650
      /**
4651
       * Find the _Fields constant that matches fieldId, throwing an exception
4652
       * if it is not found.
4653
       */
4654
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4655
        _Fields fields = findByThriftId(fieldId);
4656
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4657
        return fields;
4658
      }
4659
 
4660
      /**
4661
       * Find the _Fields constant that matches name, or null if its not found.
4662
       */
4663
      public static _Fields findByName(String name) {
4664
        return byName.get(name);
4665
      }
4666
 
4667
      private final short _thriftId;
4668
      private final String _fieldName;
4669
 
4670
      _Fields(short thriftId, String fieldName) {
4671
        _thriftId = thriftId;
4672
        _fieldName = fieldName;
4673
      }
4674
 
4675
      public short getThriftFieldId() {
4676
        return _thriftId;
4677
      }
4678
 
4679
      public String getFieldName() {
4680
        return _fieldName;
4681
      }
4682
    }
4683
 
4684
    // isset id assignments
4685
 
4686
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4687
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
4688
          new FieldValueMetaData(TType.STRUCT)));
4689
    }});
4690
 
4691
    static {
4692
      FieldMetaData.addStructMetaDataMap(sendText_result.class, metaDataMap);
4693
    }
4694
 
4695
    public sendText_result() {
4696
    }
4697
 
4698
    public sendText_result(
4699
      HelperServiceException se)
4700
    {
4701
      this();
4702
      this.se = se;
4703
    }
4704
 
4705
    /**
4706
     * Performs a deep copy on <i>other</i>.
4707
     */
4708
    public sendText_result(sendText_result other) {
4709
      if (other.isSetSe()) {
4710
        this.se = new HelperServiceException(other.se);
4711
      }
4712
    }
4713
 
4714
    public sendText_result deepCopy() {
4715
      return new sendText_result(this);
4716
    }
4717
 
4718
    @Deprecated
4719
    public sendText_result clone() {
4720
      return new sendText_result(this);
4721
    }
4722
 
4723
    public HelperServiceException getSe() {
4724
      return this.se;
4725
    }
4726
 
4727
    public sendText_result setSe(HelperServiceException se) {
4728
      this.se = se;
4729
      return this;
4730
    }
4731
 
4732
    public void unsetSe() {
4733
      this.se = null;
4734
    }
4735
 
4736
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
4737
    public boolean isSetSe() {
4738
      return this.se != null;
4739
    }
4740
 
4741
    public void setSeIsSet(boolean value) {
4742
      if (!value) {
4743
        this.se = null;
4744
      }
4745
    }
4746
 
4747
    public void setFieldValue(_Fields field, Object value) {
4748
      switch (field) {
4749
      case SE:
4750
        if (value == null) {
4751
          unsetSe();
4752
        } else {
4753
          setSe((HelperServiceException)value);
4754
        }
4755
        break;
4756
 
4757
      }
4758
    }
4759
 
4760
    public void setFieldValue(int fieldID, Object value) {
4761
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4762
    }
4763
 
4764
    public Object getFieldValue(_Fields field) {
4765
      switch (field) {
4766
      case SE:
4767
        return getSe();
4768
 
4769
      }
4770
      throw new IllegalStateException();
4771
    }
4772
 
4773
    public Object getFieldValue(int fieldId) {
4774
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4775
    }
4776
 
4777
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4778
    public boolean isSet(_Fields field) {
4779
      switch (field) {
4780
      case SE:
4781
        return isSetSe();
4782
      }
4783
      throw new IllegalStateException();
4784
    }
4785
 
4786
    public boolean isSet(int fieldID) {
4787
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4788
    }
4789
 
4790
    @Override
4791
    public boolean equals(Object that) {
4792
      if (that == null)
4793
        return false;
4794
      if (that instanceof sendText_result)
4795
        return this.equals((sendText_result)that);
4796
      return false;
4797
    }
4798
 
4799
    public boolean equals(sendText_result that) {
4800
      if (that == null)
4801
        return false;
4802
 
4803
      boolean this_present_se = true && this.isSetSe();
4804
      boolean that_present_se = true && that.isSetSe();
4805
      if (this_present_se || that_present_se) {
4806
        if (!(this_present_se && that_present_se))
4807
          return false;
4808
        if (!this.se.equals(that.se))
4809
          return false;
4810
      }
4811
 
4812
      return true;
4813
    }
4814
 
4815
    @Override
4816
    public int hashCode() {
4817
      return 0;
4818
    }
4819
 
4820
    public int compareTo(sendText_result other) {
4821
      if (!getClass().equals(other.getClass())) {
4822
        return getClass().getName().compareTo(other.getClass().getName());
4823
      }
4824
 
4825
      int lastComparison = 0;
4826
      sendText_result typedOther = (sendText_result)other;
4827
 
4828
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
4829
      if (lastComparison != 0) {
4830
        return lastComparison;
4831
      }
4832
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
4833
      if (lastComparison != 0) {
4834
        return lastComparison;
4835
      }
4836
      return 0;
4837
    }
4838
 
4839
    public void read(TProtocol iprot) throws TException {
4840
      TField field;
4841
      iprot.readStructBegin();
4842
      while (true)
4843
      {
4844
        field = iprot.readFieldBegin();
4845
        if (field.type == TType.STOP) { 
4846
          break;
4847
        }
4848
        _Fields fieldId = _Fields.findByThriftId(field.id);
4849
        if (fieldId == null) {
4850
          TProtocolUtil.skip(iprot, field.type);
4851
        } else {
4852
          switch (fieldId) {
4853
            case SE:
4854
              if (field.type == TType.STRUCT) {
4855
                this.se = new HelperServiceException();
4856
                this.se.read(iprot);
4857
              } else { 
4858
                TProtocolUtil.skip(iprot, field.type);
4859
              }
4860
              break;
4861
          }
4862
          iprot.readFieldEnd();
4863
        }
4864
      }
4865
      iprot.readStructEnd();
4866
      validate();
4867
    }
4868
 
4869
    public void write(TProtocol oprot) throws TException {
4870
      oprot.writeStructBegin(STRUCT_DESC);
4871
 
4872
      if (this.isSetSe()) {
4873
        oprot.writeFieldBegin(SE_FIELD_DESC);
4874
        this.se.write(oprot);
4875
        oprot.writeFieldEnd();
4876
      }
4877
      oprot.writeFieldStop();
4878
      oprot.writeStructEnd();
4879
    }
4880
 
4881
    @Override
4882
    public String toString() {
4883
      StringBuilder sb = new StringBuilder("sendText_result(");
4884
      boolean first = true;
4885
 
4886
      sb.append("se:");
4887
      if (this.se == null) {
4888
        sb.append("null");
4889
      } else {
4890
        sb.append(this.se);
4891
      }
4892
      first = false;
4893
      sb.append(")");
4894
      return sb.toString();
4895
    }
4896
 
4897
    public void validate() throws TException {
4898
      // check for required fields
4899
    }
4900
 
4901
  }
4902
 
4903
  public static class addMessage_args implements TBase<addMessage_args._Fields>, java.io.Serializable, Cloneable, Comparable<addMessage_args>   {
4904
    private static final TStruct STRUCT_DESC = new TStruct("addMessage_args");
4905
 
4906
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRUCT, (short)1);
4907
 
4908
    private Message message;
4909
 
4910
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4911
    public enum _Fields implements TFieldIdEnum {
4912
      MESSAGE((short)1, "message");
4913
 
4914
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4915
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4916
 
4917
      static {
4918
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4919
          byId.put((int)field._thriftId, field);
4920
          byName.put(field.getFieldName(), field);
4921
        }
4922
      }
4923
 
4924
      /**
4925
       * Find the _Fields constant that matches fieldId, or null if its not found.
4926
       */
4927
      public static _Fields findByThriftId(int fieldId) {
4928
        return byId.get(fieldId);
4929
      }
4930
 
4931
      /**
4932
       * Find the _Fields constant that matches fieldId, throwing an exception
4933
       * if it is not found.
4934
       */
4935
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4936
        _Fields fields = findByThriftId(fieldId);
4937
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4938
        return fields;
4939
      }
4940
 
4941
      /**
4942
       * Find the _Fields constant that matches name, or null if its not found.
4943
       */
4944
      public static _Fields findByName(String name) {
4945
        return byName.get(name);
4946
      }
4947
 
4948
      private final short _thriftId;
4949
      private final String _fieldName;
4950
 
4951
      _Fields(short thriftId, String fieldName) {
4952
        _thriftId = thriftId;
4953
        _fieldName = fieldName;
4954
      }
4955
 
4956
      public short getThriftFieldId() {
4957
        return _thriftId;
4958
      }
4959
 
4960
      public String getFieldName() {
4961
        return _fieldName;
4962
      }
4963
    }
4964
 
4965
    // isset id assignments
4966
 
4967
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4968
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
4969
          new StructMetaData(TType.STRUCT, Message.class)));
4970
    }});
4971
 
4972
    static {
4973
      FieldMetaData.addStructMetaDataMap(addMessage_args.class, metaDataMap);
4974
    }
4975
 
4976
    public addMessage_args() {
4977
    }
4978
 
4979
    public addMessage_args(
4980
      Message message)
4981
    {
4982
      this();
4983
      this.message = message;
4984
    }
4985
 
4986
    /**
4987
     * Performs a deep copy on <i>other</i>.
4988
     */
4989
    public addMessage_args(addMessage_args other) {
4990
      if (other.isSetMessage()) {
4991
        this.message = new Message(other.message);
4992
      }
4993
    }
4994
 
4995
    public addMessage_args deepCopy() {
4996
      return new addMessage_args(this);
4997
    }
4998
 
4999
    @Deprecated
5000
    public addMessage_args clone() {
5001
      return new addMessage_args(this);
5002
    }
5003
 
5004
    public Message getMessage() {
5005
      return this.message;
5006
    }
5007
 
5008
    public addMessage_args setMessage(Message message) {
5009
      this.message = message;
5010
      return this;
5011
    }
5012
 
5013
    public void unsetMessage() {
5014
      this.message = null;
5015
    }
5016
 
5017
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
5018
    public boolean isSetMessage() {
5019
      return this.message != null;
5020
    }
5021
 
5022
    public void setMessageIsSet(boolean value) {
5023
      if (!value) {
5024
        this.message = null;
5025
      }
5026
    }
5027
 
5028
    public void setFieldValue(_Fields field, Object value) {
5029
      switch (field) {
5030
      case MESSAGE:
5031
        if (value == null) {
5032
          unsetMessage();
5033
        } else {
5034
          setMessage((Message)value);
5035
        }
5036
        break;
5037
 
5038
      }
5039
    }
5040
 
5041
    public void setFieldValue(int fieldID, Object value) {
5042
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5043
    }
5044
 
5045
    public Object getFieldValue(_Fields field) {
5046
      switch (field) {
5047
      case MESSAGE:
5048
        return getMessage();
5049
 
5050
      }
5051
      throw new IllegalStateException();
5052
    }
5053
 
5054
    public Object getFieldValue(int fieldId) {
5055
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5056
    }
5057
 
5058
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5059
    public boolean isSet(_Fields field) {
5060
      switch (field) {
5061
      case MESSAGE:
5062
        return isSetMessage();
5063
      }
5064
      throw new IllegalStateException();
5065
    }
5066
 
5067
    public boolean isSet(int fieldID) {
5068
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5069
    }
5070
 
5071
    @Override
5072
    public boolean equals(Object that) {
5073
      if (that == null)
5074
        return false;
5075
      if (that instanceof addMessage_args)
5076
        return this.equals((addMessage_args)that);
5077
      return false;
5078
    }
5079
 
5080
    public boolean equals(addMessage_args that) {
5081
      if (that == null)
5082
        return false;
5083
 
5084
      boolean this_present_message = true && this.isSetMessage();
5085
      boolean that_present_message = true && that.isSetMessage();
5086
      if (this_present_message || that_present_message) {
5087
        if (!(this_present_message && that_present_message))
5088
          return false;
5089
        if (!this.message.equals(that.message))
5090
          return false;
5091
      }
5092
 
5093
      return true;
5094
    }
5095
 
5096
    @Override
5097
    public int hashCode() {
5098
      return 0;
5099
    }
5100
 
5101
    public int compareTo(addMessage_args other) {
5102
      if (!getClass().equals(other.getClass())) {
5103
        return getClass().getName().compareTo(other.getClass().getName());
5104
      }
5105
 
5106
      int lastComparison = 0;
5107
      addMessage_args typedOther = (addMessage_args)other;
5108
 
5109
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
5110
      if (lastComparison != 0) {
5111
        return lastComparison;
5112
      }
5113
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
5114
      if (lastComparison != 0) {
5115
        return lastComparison;
5116
      }
5117
      return 0;
5118
    }
5119
 
5120
    public void read(TProtocol iprot) throws TException {
5121
      TField field;
5122
      iprot.readStructBegin();
5123
      while (true)
5124
      {
5125
        field = iprot.readFieldBegin();
5126
        if (field.type == TType.STOP) { 
5127
          break;
5128
        }
5129
        _Fields fieldId = _Fields.findByThriftId(field.id);
5130
        if (fieldId == null) {
5131
          TProtocolUtil.skip(iprot, field.type);
5132
        } else {
5133
          switch (fieldId) {
5134
            case MESSAGE:
5135
              if (field.type == TType.STRUCT) {
5136
                this.message = new Message();
5137
                this.message.read(iprot);
5138
              } else { 
5139
                TProtocolUtil.skip(iprot, field.type);
5140
              }
5141
              break;
5142
          }
5143
          iprot.readFieldEnd();
5144
        }
5145
      }
5146
      iprot.readStructEnd();
5147
      validate();
5148
    }
5149
 
5150
    public void write(TProtocol oprot) throws TException {
5151
      validate();
5152
 
5153
      oprot.writeStructBegin(STRUCT_DESC);
5154
      if (this.message != null) {
5155
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
5156
        this.message.write(oprot);
5157
        oprot.writeFieldEnd();
5158
      }
5159
      oprot.writeFieldStop();
5160
      oprot.writeStructEnd();
5161
    }
5162
 
5163
    @Override
5164
    public String toString() {
5165
      StringBuilder sb = new StringBuilder("addMessage_args(");
5166
      boolean first = true;
5167
 
5168
      sb.append("message:");
5169
      if (this.message == null) {
5170
        sb.append("null");
5171
      } else {
5172
        sb.append(this.message);
5173
      }
5174
      first = false;
5175
      sb.append(")");
5176
      return sb.toString();
5177
    }
5178
 
5179
    public void validate() throws TException {
5180
      // check for required fields
5181
    }
5182
 
5183
  }
5184
 
5185
  public static class addMessage_result implements TBase<addMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<addMessage_result>   {
5186
    private static final TStruct STRUCT_DESC = new TStruct("addMessage_result");
5187
 
5188
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
5189
 
5190
    private HelperServiceException se;
5191
 
5192
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5193
    public enum _Fields implements TFieldIdEnum {
5194
      SE((short)1, "se");
5195
 
5196
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5197
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5198
 
5199
      static {
5200
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5201
          byId.put((int)field._thriftId, field);
5202
          byName.put(field.getFieldName(), field);
5203
        }
5204
      }
5205
 
5206
      /**
5207
       * Find the _Fields constant that matches fieldId, or null if its not found.
5208
       */
5209
      public static _Fields findByThriftId(int fieldId) {
5210
        return byId.get(fieldId);
5211
      }
5212
 
5213
      /**
5214
       * Find the _Fields constant that matches fieldId, throwing an exception
5215
       * if it is not found.
5216
       */
5217
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5218
        _Fields fields = findByThriftId(fieldId);
5219
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5220
        return fields;
5221
      }
5222
 
5223
      /**
5224
       * Find the _Fields constant that matches name, or null if its not found.
5225
       */
5226
      public static _Fields findByName(String name) {
5227
        return byName.get(name);
5228
      }
5229
 
5230
      private final short _thriftId;
5231
      private final String _fieldName;
5232
 
5233
      _Fields(short thriftId, String fieldName) {
5234
        _thriftId = thriftId;
5235
        _fieldName = fieldName;
5236
      }
5237
 
5238
      public short getThriftFieldId() {
5239
        return _thriftId;
5240
      }
5241
 
5242
      public String getFieldName() {
5243
        return _fieldName;
5244
      }
5245
    }
5246
 
5247
    // isset id assignments
5248
 
5249
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5250
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
5251
          new FieldValueMetaData(TType.STRUCT)));
5252
    }});
5253
 
5254
    static {
5255
      FieldMetaData.addStructMetaDataMap(addMessage_result.class, metaDataMap);
5256
    }
5257
 
5258
    public addMessage_result() {
5259
    }
5260
 
5261
    public addMessage_result(
5262
      HelperServiceException se)
5263
    {
5264
      this();
5265
      this.se = se;
5266
    }
5267
 
5268
    /**
5269
     * Performs a deep copy on <i>other</i>.
5270
     */
5271
    public addMessage_result(addMessage_result other) {
5272
      if (other.isSetSe()) {
5273
        this.se = new HelperServiceException(other.se);
5274
      }
5275
    }
5276
 
5277
    public addMessage_result deepCopy() {
5278
      return new addMessage_result(this);
5279
    }
5280
 
5281
    @Deprecated
5282
    public addMessage_result clone() {
5283
      return new addMessage_result(this);
5284
    }
5285
 
5286
    public HelperServiceException getSe() {
5287
      return this.se;
5288
    }
5289
 
5290
    public addMessage_result setSe(HelperServiceException se) {
5291
      this.se = se;
5292
      return this;
5293
    }
5294
 
5295
    public void unsetSe() {
5296
      this.se = null;
5297
    }
5298
 
5299
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
5300
    public boolean isSetSe() {
5301
      return this.se != null;
5302
    }
5303
 
5304
    public void setSeIsSet(boolean value) {
5305
      if (!value) {
5306
        this.se = null;
5307
      }
5308
    }
5309
 
5310
    public void setFieldValue(_Fields field, Object value) {
5311
      switch (field) {
5312
      case SE:
5313
        if (value == null) {
5314
          unsetSe();
5315
        } else {
5316
          setSe((HelperServiceException)value);
5317
        }
5318
        break;
5319
 
5320
      }
5321
    }
5322
 
5323
    public void setFieldValue(int fieldID, Object value) {
5324
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5325
    }
5326
 
5327
    public Object getFieldValue(_Fields field) {
5328
      switch (field) {
5329
      case SE:
5330
        return getSe();
5331
 
5332
      }
5333
      throw new IllegalStateException();
5334
    }
5335
 
5336
    public Object getFieldValue(int fieldId) {
5337
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5338
    }
5339
 
5340
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5341
    public boolean isSet(_Fields field) {
5342
      switch (field) {
5343
      case SE:
5344
        return isSetSe();
5345
      }
5346
      throw new IllegalStateException();
5347
    }
5348
 
5349
    public boolean isSet(int fieldID) {
5350
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5351
    }
5352
 
5353
    @Override
5354
    public boolean equals(Object that) {
5355
      if (that == null)
5356
        return false;
5357
      if (that instanceof addMessage_result)
5358
        return this.equals((addMessage_result)that);
5359
      return false;
5360
    }
5361
 
5362
    public boolean equals(addMessage_result that) {
5363
      if (that == null)
5364
        return false;
5365
 
5366
      boolean this_present_se = true && this.isSetSe();
5367
      boolean that_present_se = true && that.isSetSe();
5368
      if (this_present_se || that_present_se) {
5369
        if (!(this_present_se && that_present_se))
5370
          return false;
5371
        if (!this.se.equals(that.se))
5372
          return false;
5373
      }
5374
 
5375
      return true;
5376
    }
5377
 
5378
    @Override
5379
    public int hashCode() {
5380
      return 0;
5381
    }
5382
 
5383
    public int compareTo(addMessage_result other) {
5384
      if (!getClass().equals(other.getClass())) {
5385
        return getClass().getName().compareTo(other.getClass().getName());
5386
      }
5387
 
5388
      int lastComparison = 0;
5389
      addMessage_result typedOther = (addMessage_result)other;
5390
 
5391
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
5392
      if (lastComparison != 0) {
5393
        return lastComparison;
5394
      }
5395
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
5396
      if (lastComparison != 0) {
5397
        return lastComparison;
5398
      }
5399
      return 0;
5400
    }
5401
 
5402
    public void read(TProtocol iprot) throws TException {
5403
      TField field;
5404
      iprot.readStructBegin();
5405
      while (true)
5406
      {
5407
        field = iprot.readFieldBegin();
5408
        if (field.type == TType.STOP) { 
5409
          break;
5410
        }
5411
        _Fields fieldId = _Fields.findByThriftId(field.id);
5412
        if (fieldId == null) {
5413
          TProtocolUtil.skip(iprot, field.type);
5414
        } else {
5415
          switch (fieldId) {
5416
            case SE:
5417
              if (field.type == TType.STRUCT) {
5418
                this.se = new HelperServiceException();
5419
                this.se.read(iprot);
5420
              } else { 
5421
                TProtocolUtil.skip(iprot, field.type);
5422
              }
5423
              break;
5424
          }
5425
          iprot.readFieldEnd();
5426
        }
5427
      }
5428
      iprot.readStructEnd();
5429
      validate();
5430
    }
5431
 
5432
    public void write(TProtocol oprot) throws TException {
5433
      oprot.writeStructBegin(STRUCT_DESC);
5434
 
5435
      if (this.isSetSe()) {
5436
        oprot.writeFieldBegin(SE_FIELD_DESC);
5437
        this.se.write(oprot);
5438
        oprot.writeFieldEnd();
5439
      }
5440
      oprot.writeFieldStop();
5441
      oprot.writeStructEnd();
5442
    }
5443
 
5444
    @Override
5445
    public String toString() {
5446
      StringBuilder sb = new StringBuilder("addMessage_result(");
5447
      boolean first = true;
5448
 
5449
      sb.append("se:");
5450
      if (this.se == null) {
5451
        sb.append("null");
5452
      } else {
5453
        sb.append(this.se);
5454
      }
5455
      first = false;
5456
      sb.append(")");
5457
      return sb.toString();
5458
    }
5459
 
5460
    public void validate() throws TException {
5461
      // check for required fields
5462
    }
5463
 
5464
  }
5465
 
5466
  public static class updateMessage_args implements TBase<updateMessage_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMessage_args>   {
5467
    private static final TStruct STRUCT_DESC = new TStruct("updateMessage_args");
5468
 
5469
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
5470
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)2);
5471
 
5472
    private long id;
5473
    private String message;
5474
 
5475
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5476
    public enum _Fields implements TFieldIdEnum {
5477
      ID((short)1, "id"),
5478
      MESSAGE((short)2, "message");
5479
 
5480
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5481
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5482
 
5483
      static {
5484
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5485
          byId.put((int)field._thriftId, field);
5486
          byName.put(field.getFieldName(), field);
5487
        }
5488
      }
5489
 
5490
      /**
5491
       * Find the _Fields constant that matches fieldId, or null if its not found.
5492
       */
5493
      public static _Fields findByThriftId(int fieldId) {
5494
        return byId.get(fieldId);
5495
      }
5496
 
5497
      /**
5498
       * Find the _Fields constant that matches fieldId, throwing an exception
5499
       * if it is not found.
5500
       */
5501
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5502
        _Fields fields = findByThriftId(fieldId);
5503
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5504
        return fields;
5505
      }
5506
 
5507
      /**
5508
       * Find the _Fields constant that matches name, or null if its not found.
5509
       */
5510
      public static _Fields findByName(String name) {
5511
        return byName.get(name);
5512
      }
5513
 
5514
      private final short _thriftId;
5515
      private final String _fieldName;
5516
 
5517
      _Fields(short thriftId, String fieldName) {
5518
        _thriftId = thriftId;
5519
        _fieldName = fieldName;
5520
      }
5521
 
5522
      public short getThriftFieldId() {
5523
        return _thriftId;
5524
      }
5525
 
5526
      public String getFieldName() {
5527
        return _fieldName;
5528
      }
5529
    }
5530
 
5531
    // isset id assignments
5532
    private static final int __ID_ISSET_ID = 0;
5533
    private BitSet __isset_bit_vector = new BitSet(1);
5534
 
5535
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5536
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
5537
          new FieldValueMetaData(TType.I64)));
5538
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
5539
          new FieldValueMetaData(TType.STRING)));
5540
    }});
5541
 
5542
    static {
5543
      FieldMetaData.addStructMetaDataMap(updateMessage_args.class, metaDataMap);
5544
    }
5545
 
5546
    public updateMessage_args() {
5547
    }
5548
 
5549
    public updateMessage_args(
5550
      long id,
5551
      String message)
5552
    {
5553
      this();
5554
      this.id = id;
5555
      setIdIsSet(true);
5556
      this.message = message;
5557
    }
5558
 
5559
    /**
5560
     * Performs a deep copy on <i>other</i>.
5561
     */
5562
    public updateMessage_args(updateMessage_args other) {
5563
      __isset_bit_vector.clear();
5564
      __isset_bit_vector.or(other.__isset_bit_vector);
5565
      this.id = other.id;
5566
      if (other.isSetMessage()) {
5567
        this.message = other.message;
5568
      }
5569
    }
5570
 
5571
    public updateMessage_args deepCopy() {
5572
      return new updateMessage_args(this);
5573
    }
5574
 
5575
    @Deprecated
5576
    public updateMessage_args clone() {
5577
      return new updateMessage_args(this);
5578
    }
5579
 
5580
    public long getId() {
5581
      return this.id;
5582
    }
5583
 
5584
    public updateMessage_args setId(long id) {
5585
      this.id = id;
5586
      setIdIsSet(true);
5587
      return this;
5588
    }
5589
 
5590
    public void unsetId() {
5591
      __isset_bit_vector.clear(__ID_ISSET_ID);
5592
    }
5593
 
5594
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
5595
    public boolean isSetId() {
5596
      return __isset_bit_vector.get(__ID_ISSET_ID);
5597
    }
5598
 
5599
    public void setIdIsSet(boolean value) {
5600
      __isset_bit_vector.set(__ID_ISSET_ID, value);
5601
    }
5602
 
5603
    public String getMessage() {
5604
      return this.message;
5605
    }
5606
 
5607
    public updateMessage_args setMessage(String message) {
5608
      this.message = message;
5609
      return this;
5610
    }
5611
 
5612
    public void unsetMessage() {
5613
      this.message = null;
5614
    }
5615
 
5616
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
5617
    public boolean isSetMessage() {
5618
      return this.message != null;
5619
    }
5620
 
5621
    public void setMessageIsSet(boolean value) {
5622
      if (!value) {
5623
        this.message = null;
5624
      }
5625
    }
5626
 
5627
    public void setFieldValue(_Fields field, Object value) {
5628
      switch (field) {
5629
      case ID:
5630
        if (value == null) {
5631
          unsetId();
5632
        } else {
5633
          setId((Long)value);
5634
        }
5635
        break;
5636
 
5637
      case MESSAGE:
5638
        if (value == null) {
5639
          unsetMessage();
5640
        } else {
5641
          setMessage((String)value);
5642
        }
5643
        break;
5644
 
5645
      }
5646
    }
5647
 
5648
    public void setFieldValue(int fieldID, Object value) {
5649
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5650
    }
5651
 
5652
    public Object getFieldValue(_Fields field) {
5653
      switch (field) {
5654
      case ID:
5655
        return new Long(getId());
5656
 
5657
      case MESSAGE:
5658
        return getMessage();
5659
 
5660
      }
5661
      throw new IllegalStateException();
5662
    }
5663
 
5664
    public Object getFieldValue(int fieldId) {
5665
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5666
    }
5667
 
5668
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5669
    public boolean isSet(_Fields field) {
5670
      switch (field) {
5671
      case ID:
5672
        return isSetId();
5673
      case MESSAGE:
5674
        return isSetMessage();
5675
      }
5676
      throw new IllegalStateException();
5677
    }
5678
 
5679
    public boolean isSet(int fieldID) {
5680
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5681
    }
5682
 
5683
    @Override
5684
    public boolean equals(Object that) {
5685
      if (that == null)
5686
        return false;
5687
      if (that instanceof updateMessage_args)
5688
        return this.equals((updateMessage_args)that);
5689
      return false;
5690
    }
5691
 
5692
    public boolean equals(updateMessage_args that) {
5693
      if (that == null)
5694
        return false;
5695
 
5696
      boolean this_present_id = true;
5697
      boolean that_present_id = true;
5698
      if (this_present_id || that_present_id) {
5699
        if (!(this_present_id && that_present_id))
5700
          return false;
5701
        if (this.id != that.id)
5702
          return false;
5703
      }
5704
 
5705
      boolean this_present_message = true && this.isSetMessage();
5706
      boolean that_present_message = true && that.isSetMessage();
5707
      if (this_present_message || that_present_message) {
5708
        if (!(this_present_message && that_present_message))
5709
          return false;
5710
        if (!this.message.equals(that.message))
5711
          return false;
5712
      }
5713
 
5714
      return true;
5715
    }
5716
 
5717
    @Override
5718
    public int hashCode() {
5719
      return 0;
5720
    }
5721
 
5722
    public int compareTo(updateMessage_args other) {
5723
      if (!getClass().equals(other.getClass())) {
5724
        return getClass().getName().compareTo(other.getClass().getName());
5725
      }
5726
 
5727
      int lastComparison = 0;
5728
      updateMessage_args typedOther = (updateMessage_args)other;
5729
 
5730
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
5731
      if (lastComparison != 0) {
5732
        return lastComparison;
5733
      }
5734
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
5735
      if (lastComparison != 0) {
5736
        return lastComparison;
5737
      }
5738
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
5739
      if (lastComparison != 0) {
5740
        return lastComparison;
5741
      }
5742
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
5743
      if (lastComparison != 0) {
5744
        return lastComparison;
5745
      }
5746
      return 0;
5747
    }
5748
 
5749
    public void read(TProtocol iprot) throws TException {
5750
      TField field;
5751
      iprot.readStructBegin();
5752
      while (true)
5753
      {
5754
        field = iprot.readFieldBegin();
5755
        if (field.type == TType.STOP) { 
5756
          break;
5757
        }
5758
        _Fields fieldId = _Fields.findByThriftId(field.id);
5759
        if (fieldId == null) {
5760
          TProtocolUtil.skip(iprot, field.type);
5761
        } else {
5762
          switch (fieldId) {
5763
            case ID:
5764
              if (field.type == TType.I64) {
5765
                this.id = iprot.readI64();
5766
                setIdIsSet(true);
5767
              } else { 
5768
                TProtocolUtil.skip(iprot, field.type);
5769
              }
5770
              break;
5771
            case MESSAGE:
5772
              if (field.type == TType.STRING) {
5773
                this.message = iprot.readString();
5774
              } else { 
5775
                TProtocolUtil.skip(iprot, field.type);
5776
              }
5777
              break;
5778
          }
5779
          iprot.readFieldEnd();
5780
        }
5781
      }
5782
      iprot.readStructEnd();
5783
      validate();
5784
    }
5785
 
5786
    public void write(TProtocol oprot) throws TException {
5787
      validate();
5788
 
5789
      oprot.writeStructBegin(STRUCT_DESC);
5790
      oprot.writeFieldBegin(ID_FIELD_DESC);
5791
      oprot.writeI64(this.id);
5792
      oprot.writeFieldEnd();
5793
      if (this.message != null) {
5794
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
5795
        oprot.writeString(this.message);
5796
        oprot.writeFieldEnd();
5797
      }
5798
      oprot.writeFieldStop();
5799
      oprot.writeStructEnd();
5800
    }
5801
 
5802
    @Override
5803
    public String toString() {
5804
      StringBuilder sb = new StringBuilder("updateMessage_args(");
5805
      boolean first = true;
5806
 
5807
      sb.append("id:");
5808
      sb.append(this.id);
5809
      first = false;
5810
      if (!first) sb.append(", ");
5811
      sb.append("message:");
5812
      if (this.message == null) {
5813
        sb.append("null");
5814
      } else {
5815
        sb.append(this.message);
5816
      }
5817
      first = false;
5818
      sb.append(")");
5819
      return sb.toString();
5820
    }
5821
 
5822
    public void validate() throws TException {
5823
      // check for required fields
5824
    }
5825
 
5826
  }
5827
 
5828
  public static class updateMessage_result implements TBase<updateMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMessage_result>   {
5829
    private static final TStruct STRUCT_DESC = new TStruct("updateMessage_result");
5830
 
5831
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
5832
 
5833
    private HelperServiceException se;
5834
 
5835
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5836
    public enum _Fields implements TFieldIdEnum {
5837
      SE((short)1, "se");
5838
 
5839
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5840
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5841
 
5842
      static {
5843
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5844
          byId.put((int)field._thriftId, field);
5845
          byName.put(field.getFieldName(), field);
5846
        }
5847
      }
5848
 
5849
      /**
5850
       * Find the _Fields constant that matches fieldId, or null if its not found.
5851
       */
5852
      public static _Fields findByThriftId(int fieldId) {
5853
        return byId.get(fieldId);
5854
      }
5855
 
5856
      /**
5857
       * Find the _Fields constant that matches fieldId, throwing an exception
5858
       * if it is not found.
5859
       */
5860
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5861
        _Fields fields = findByThriftId(fieldId);
5862
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5863
        return fields;
5864
      }
5865
 
5866
      /**
5867
       * Find the _Fields constant that matches name, or null if its not found.
5868
       */
5869
      public static _Fields findByName(String name) {
5870
        return byName.get(name);
5871
      }
5872
 
5873
      private final short _thriftId;
5874
      private final String _fieldName;
5875
 
5876
      _Fields(short thriftId, String fieldName) {
5877
        _thriftId = thriftId;
5878
        _fieldName = fieldName;
5879
      }
5880
 
5881
      public short getThriftFieldId() {
5882
        return _thriftId;
5883
      }
5884
 
5885
      public String getFieldName() {
5886
        return _fieldName;
5887
      }
5888
    }
5889
 
5890
    // isset id assignments
5891
 
5892
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5893
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
5894
          new FieldValueMetaData(TType.STRUCT)));
5895
    }});
5896
 
5897
    static {
5898
      FieldMetaData.addStructMetaDataMap(updateMessage_result.class, metaDataMap);
5899
    }
5900
 
5901
    public updateMessage_result() {
5902
    }
5903
 
5904
    public updateMessage_result(
5905
      HelperServiceException se)
5906
    {
5907
      this();
5908
      this.se = se;
5909
    }
5910
 
5911
    /**
5912
     * Performs a deep copy on <i>other</i>.
5913
     */
5914
    public updateMessage_result(updateMessage_result other) {
5915
      if (other.isSetSe()) {
5916
        this.se = new HelperServiceException(other.se);
5917
      }
5918
    }
5919
 
5920
    public updateMessage_result deepCopy() {
5921
      return new updateMessage_result(this);
5922
    }
5923
 
5924
    @Deprecated
5925
    public updateMessage_result clone() {
5926
      return new updateMessage_result(this);
5927
    }
5928
 
5929
    public HelperServiceException getSe() {
5930
      return this.se;
5931
    }
5932
 
5933
    public updateMessage_result setSe(HelperServiceException se) {
5934
      this.se = se;
5935
      return this;
5936
    }
5937
 
5938
    public void unsetSe() {
5939
      this.se = null;
5940
    }
5941
 
5942
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
5943
    public boolean isSetSe() {
5944
      return this.se != null;
5945
    }
5946
 
5947
    public void setSeIsSet(boolean value) {
5948
      if (!value) {
5949
        this.se = null;
5950
      }
5951
    }
5952
 
5953
    public void setFieldValue(_Fields field, Object value) {
5954
      switch (field) {
5955
      case SE:
5956
        if (value == null) {
5957
          unsetSe();
5958
        } else {
5959
          setSe((HelperServiceException)value);
5960
        }
5961
        break;
5962
 
5963
      }
5964
    }
5965
 
5966
    public void setFieldValue(int fieldID, Object value) {
5967
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5968
    }
5969
 
5970
    public Object getFieldValue(_Fields field) {
5971
      switch (field) {
5972
      case SE:
5973
        return getSe();
5974
 
5975
      }
5976
      throw new IllegalStateException();
5977
    }
5978
 
5979
    public Object getFieldValue(int fieldId) {
5980
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5981
    }
5982
 
5983
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5984
    public boolean isSet(_Fields field) {
5985
      switch (field) {
5986
      case SE:
5987
        return isSetSe();
5988
      }
5989
      throw new IllegalStateException();
5990
    }
5991
 
5992
    public boolean isSet(int fieldID) {
5993
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5994
    }
5995
 
5996
    @Override
5997
    public boolean equals(Object that) {
5998
      if (that == null)
5999
        return false;
6000
      if (that instanceof updateMessage_result)
6001
        return this.equals((updateMessage_result)that);
6002
      return false;
6003
    }
6004
 
6005
    public boolean equals(updateMessage_result that) {
6006
      if (that == null)
6007
        return false;
6008
 
6009
      boolean this_present_se = true && this.isSetSe();
6010
      boolean that_present_se = true && that.isSetSe();
6011
      if (this_present_se || that_present_se) {
6012
        if (!(this_present_se && that_present_se))
6013
          return false;
6014
        if (!this.se.equals(that.se))
6015
          return false;
6016
      }
6017
 
6018
      return true;
6019
    }
6020
 
6021
    @Override
6022
    public int hashCode() {
6023
      return 0;
6024
    }
6025
 
6026
    public int compareTo(updateMessage_result other) {
6027
      if (!getClass().equals(other.getClass())) {
6028
        return getClass().getName().compareTo(other.getClass().getName());
6029
      }
6030
 
6031
      int lastComparison = 0;
6032
      updateMessage_result typedOther = (updateMessage_result)other;
6033
 
6034
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
6035
      if (lastComparison != 0) {
6036
        return lastComparison;
6037
      }
6038
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
6039
      if (lastComparison != 0) {
6040
        return lastComparison;
6041
      }
6042
      return 0;
6043
    }
6044
 
6045
    public void read(TProtocol iprot) throws TException {
6046
      TField field;
6047
      iprot.readStructBegin();
6048
      while (true)
6049
      {
6050
        field = iprot.readFieldBegin();
6051
        if (field.type == TType.STOP) { 
6052
          break;
6053
        }
6054
        _Fields fieldId = _Fields.findByThriftId(field.id);
6055
        if (fieldId == null) {
6056
          TProtocolUtil.skip(iprot, field.type);
6057
        } else {
6058
          switch (fieldId) {
6059
            case SE:
6060
              if (field.type == TType.STRUCT) {
6061
                this.se = new HelperServiceException();
6062
                this.se.read(iprot);
6063
              } else { 
6064
                TProtocolUtil.skip(iprot, field.type);
6065
              }
6066
              break;
6067
          }
6068
          iprot.readFieldEnd();
6069
        }
6070
      }
6071
      iprot.readStructEnd();
6072
      validate();
6073
    }
6074
 
6075
    public void write(TProtocol oprot) throws TException {
6076
      oprot.writeStructBegin(STRUCT_DESC);
6077
 
6078
      if (this.isSetSe()) {
6079
        oprot.writeFieldBegin(SE_FIELD_DESC);
6080
        this.se.write(oprot);
6081
        oprot.writeFieldEnd();
6082
      }
6083
      oprot.writeFieldStop();
6084
      oprot.writeStructEnd();
6085
    }
6086
 
6087
    @Override
6088
    public String toString() {
6089
      StringBuilder sb = new StringBuilder("updateMessage_result(");
6090
      boolean first = true;
6091
 
6092
      sb.append("se:");
6093
      if (this.se == null) {
6094
        sb.append("null");
6095
      } else {
6096
        sb.append(this.se);
6097
      }
6098
      first = false;
6099
      sb.append(")");
6100
      return sb.toString();
6101
    }
6102
 
6103
    public void validate() throws TException {
6104
      // check for required fields
6105
    }
6106
 
6107
  }
6108
 
6109
  public static class getMessage_args implements TBase<getMessage_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMessage_args>   {
6110
    private static final TStruct STRUCT_DESC = new TStruct("getMessage_args");
6111
 
6112
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
6113
 
6114
    private long id;
6115
 
6116
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6117
    public enum _Fields implements TFieldIdEnum {
6118
      ID((short)1, "id");
6119
 
6120
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6121
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6122
 
6123
      static {
6124
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6125
          byId.put((int)field._thriftId, field);
6126
          byName.put(field.getFieldName(), field);
6127
        }
6128
      }
6129
 
6130
      /**
6131
       * Find the _Fields constant that matches fieldId, or null if its not found.
6132
       */
6133
      public static _Fields findByThriftId(int fieldId) {
6134
        return byId.get(fieldId);
6135
      }
6136
 
6137
      /**
6138
       * Find the _Fields constant that matches fieldId, throwing an exception
6139
       * if it is not found.
6140
       */
6141
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6142
        _Fields fields = findByThriftId(fieldId);
6143
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6144
        return fields;
6145
      }
6146
 
6147
      /**
6148
       * Find the _Fields constant that matches name, or null if its not found.
6149
       */
6150
      public static _Fields findByName(String name) {
6151
        return byName.get(name);
6152
      }
6153
 
6154
      private final short _thriftId;
6155
      private final String _fieldName;
6156
 
6157
      _Fields(short thriftId, String fieldName) {
6158
        _thriftId = thriftId;
6159
        _fieldName = fieldName;
6160
      }
6161
 
6162
      public short getThriftFieldId() {
6163
        return _thriftId;
6164
      }
6165
 
6166
      public String getFieldName() {
6167
        return _fieldName;
6168
      }
6169
    }
6170
 
6171
    // isset id assignments
6172
    private static final int __ID_ISSET_ID = 0;
6173
    private BitSet __isset_bit_vector = new BitSet(1);
6174
 
6175
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6176
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
6177
          new FieldValueMetaData(TType.I64)));
6178
    }});
6179
 
6180
    static {
6181
      FieldMetaData.addStructMetaDataMap(getMessage_args.class, metaDataMap);
6182
    }
6183
 
6184
    public getMessage_args() {
6185
    }
6186
 
6187
    public getMessage_args(
6188
      long id)
6189
    {
6190
      this();
6191
      this.id = id;
6192
      setIdIsSet(true);
6193
    }
6194
 
6195
    /**
6196
     * Performs a deep copy on <i>other</i>.
6197
     */
6198
    public getMessage_args(getMessage_args other) {
6199
      __isset_bit_vector.clear();
6200
      __isset_bit_vector.or(other.__isset_bit_vector);
6201
      this.id = other.id;
6202
    }
6203
 
6204
    public getMessage_args deepCopy() {
6205
      return new getMessage_args(this);
6206
    }
6207
 
6208
    @Deprecated
6209
    public getMessage_args clone() {
6210
      return new getMessage_args(this);
6211
    }
6212
 
6213
    public long getId() {
6214
      return this.id;
6215
    }
6216
 
6217
    public getMessage_args setId(long id) {
6218
      this.id = id;
6219
      setIdIsSet(true);
6220
      return this;
6221
    }
6222
 
6223
    public void unsetId() {
6224
      __isset_bit_vector.clear(__ID_ISSET_ID);
6225
    }
6226
 
6227
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
6228
    public boolean isSetId() {
6229
      return __isset_bit_vector.get(__ID_ISSET_ID);
6230
    }
6231
 
6232
    public void setIdIsSet(boolean value) {
6233
      __isset_bit_vector.set(__ID_ISSET_ID, value);
6234
    }
6235
 
6236
    public void setFieldValue(_Fields field, Object value) {
6237
      switch (field) {
6238
      case ID:
6239
        if (value == null) {
6240
          unsetId();
6241
        } else {
6242
          setId((Long)value);
6243
        }
6244
        break;
6245
 
6246
      }
6247
    }
6248
 
6249
    public void setFieldValue(int fieldID, Object value) {
6250
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6251
    }
6252
 
6253
    public Object getFieldValue(_Fields field) {
6254
      switch (field) {
6255
      case ID:
6256
        return new Long(getId());
6257
 
6258
      }
6259
      throw new IllegalStateException();
6260
    }
6261
 
6262
    public Object getFieldValue(int fieldId) {
6263
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6264
    }
6265
 
6266
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6267
    public boolean isSet(_Fields field) {
6268
      switch (field) {
6269
      case ID:
6270
        return isSetId();
6271
      }
6272
      throw new IllegalStateException();
6273
    }
6274
 
6275
    public boolean isSet(int fieldID) {
6276
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6277
    }
6278
 
6279
    @Override
6280
    public boolean equals(Object that) {
6281
      if (that == null)
6282
        return false;
6283
      if (that instanceof getMessage_args)
6284
        return this.equals((getMessage_args)that);
6285
      return false;
6286
    }
6287
 
6288
    public boolean equals(getMessage_args that) {
6289
      if (that == null)
6290
        return false;
6291
 
6292
      boolean this_present_id = true;
6293
      boolean that_present_id = true;
6294
      if (this_present_id || that_present_id) {
6295
        if (!(this_present_id && that_present_id))
6296
          return false;
6297
        if (this.id != that.id)
6298
          return false;
6299
      }
6300
 
6301
      return true;
6302
    }
6303
 
6304
    @Override
6305
    public int hashCode() {
6306
      return 0;
6307
    }
6308
 
6309
    public int compareTo(getMessage_args other) {
6310
      if (!getClass().equals(other.getClass())) {
6311
        return getClass().getName().compareTo(other.getClass().getName());
6312
      }
6313
 
6314
      int lastComparison = 0;
6315
      getMessage_args typedOther = (getMessage_args)other;
6316
 
6317
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
6318
      if (lastComparison != 0) {
6319
        return lastComparison;
6320
      }
6321
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
6322
      if (lastComparison != 0) {
6323
        return lastComparison;
6324
      }
6325
      return 0;
6326
    }
6327
 
6328
    public void read(TProtocol iprot) throws TException {
6329
      TField field;
6330
      iprot.readStructBegin();
6331
      while (true)
6332
      {
6333
        field = iprot.readFieldBegin();
6334
        if (field.type == TType.STOP) { 
6335
          break;
6336
        }
6337
        _Fields fieldId = _Fields.findByThriftId(field.id);
6338
        if (fieldId == null) {
6339
          TProtocolUtil.skip(iprot, field.type);
6340
        } else {
6341
          switch (fieldId) {
6342
            case ID:
6343
              if (field.type == TType.I64) {
6344
                this.id = iprot.readI64();
6345
                setIdIsSet(true);
6346
              } else { 
6347
                TProtocolUtil.skip(iprot, field.type);
6348
              }
6349
              break;
6350
          }
6351
          iprot.readFieldEnd();
6352
        }
6353
      }
6354
      iprot.readStructEnd();
6355
      validate();
6356
    }
6357
 
6358
    public void write(TProtocol oprot) throws TException {
6359
      validate();
6360
 
6361
      oprot.writeStructBegin(STRUCT_DESC);
6362
      oprot.writeFieldBegin(ID_FIELD_DESC);
6363
      oprot.writeI64(this.id);
6364
      oprot.writeFieldEnd();
6365
      oprot.writeFieldStop();
6366
      oprot.writeStructEnd();
6367
    }
6368
 
6369
    @Override
6370
    public String toString() {
6371
      StringBuilder sb = new StringBuilder("getMessage_args(");
6372
      boolean first = true;
6373
 
6374
      sb.append("id:");
6375
      sb.append(this.id);
6376
      first = false;
6377
      sb.append(")");
6378
      return sb.toString();
6379
    }
6380
 
6381
    public void validate() throws TException {
6382
      // check for required fields
6383
    }
6384
 
6385
  }
6386
 
6387
  public static class getMessage_result implements TBase<getMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMessage_result>   {
6388
    private static final TStruct STRUCT_DESC = new TStruct("getMessage_result");
6389
 
6390
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
6391
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
6392
 
6393
    private Message success;
6394
    private HelperServiceException se;
6395
 
6396
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6397
    public enum _Fields implements TFieldIdEnum {
6398
      SUCCESS((short)0, "success"),
6399
      SE((short)1, "se");
6400
 
6401
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6402
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6403
 
6404
      static {
6405
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6406
          byId.put((int)field._thriftId, field);
6407
          byName.put(field.getFieldName(), field);
6408
        }
6409
      }
6410
 
6411
      /**
6412
       * Find the _Fields constant that matches fieldId, or null if its not found.
6413
       */
6414
      public static _Fields findByThriftId(int fieldId) {
6415
        return byId.get(fieldId);
6416
      }
6417
 
6418
      /**
6419
       * Find the _Fields constant that matches fieldId, throwing an exception
6420
       * if it is not found.
6421
       */
6422
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6423
        _Fields fields = findByThriftId(fieldId);
6424
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6425
        return fields;
6426
      }
6427
 
6428
      /**
6429
       * Find the _Fields constant that matches name, or null if its not found.
6430
       */
6431
      public static _Fields findByName(String name) {
6432
        return byName.get(name);
6433
      }
6434
 
6435
      private final short _thriftId;
6436
      private final String _fieldName;
6437
 
6438
      _Fields(short thriftId, String fieldName) {
6439
        _thriftId = thriftId;
6440
        _fieldName = fieldName;
6441
      }
6442
 
6443
      public short getThriftFieldId() {
6444
        return _thriftId;
6445
      }
6446
 
6447
      public String getFieldName() {
6448
        return _fieldName;
6449
      }
6450
    }
6451
 
6452
    // isset id assignments
6453
 
6454
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6455
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6456
          new StructMetaData(TType.STRUCT, Message.class)));
6457
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
6458
          new FieldValueMetaData(TType.STRUCT)));
6459
    }});
6460
 
6461
    static {
6462
      FieldMetaData.addStructMetaDataMap(getMessage_result.class, metaDataMap);
6463
    }
6464
 
6465
    public getMessage_result() {
6466
    }
6467
 
6468
    public getMessage_result(
6469
      Message success,
6470
      HelperServiceException se)
6471
    {
6472
      this();
6473
      this.success = success;
6474
      this.se = se;
6475
    }
6476
 
6477
    /**
6478
     * Performs a deep copy on <i>other</i>.
6479
     */
6480
    public getMessage_result(getMessage_result other) {
6481
      if (other.isSetSuccess()) {
6482
        this.success = new Message(other.success);
6483
      }
6484
      if (other.isSetSe()) {
6485
        this.se = new HelperServiceException(other.se);
6486
      }
6487
    }
6488
 
6489
    public getMessage_result deepCopy() {
6490
      return new getMessage_result(this);
6491
    }
6492
 
6493
    @Deprecated
6494
    public getMessage_result clone() {
6495
      return new getMessage_result(this);
6496
    }
6497
 
6498
    public Message getSuccess() {
6499
      return this.success;
6500
    }
6501
 
6502
    public getMessage_result setSuccess(Message success) {
6503
      this.success = success;
6504
      return this;
6505
    }
6506
 
6507
    public void unsetSuccess() {
6508
      this.success = null;
6509
    }
6510
 
6511
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6512
    public boolean isSetSuccess() {
6513
      return this.success != null;
6514
    }
6515
 
6516
    public void setSuccessIsSet(boolean value) {
6517
      if (!value) {
6518
        this.success = null;
6519
      }
6520
    }
6521
 
6522
    public HelperServiceException getSe() {
6523
      return this.se;
6524
    }
6525
 
6526
    public getMessage_result setSe(HelperServiceException se) {
6527
      this.se = se;
6528
      return this;
6529
    }
6530
 
6531
    public void unsetSe() {
6532
      this.se = null;
6533
    }
6534
 
6535
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
6536
    public boolean isSetSe() {
6537
      return this.se != null;
6538
    }
6539
 
6540
    public void setSeIsSet(boolean value) {
6541
      if (!value) {
6542
        this.se = null;
6543
      }
6544
    }
6545
 
6546
    public void setFieldValue(_Fields field, Object value) {
6547
      switch (field) {
6548
      case SUCCESS:
6549
        if (value == null) {
6550
          unsetSuccess();
6551
        } else {
6552
          setSuccess((Message)value);
6553
        }
6554
        break;
6555
 
6556
      case SE:
6557
        if (value == null) {
6558
          unsetSe();
6559
        } else {
6560
          setSe((HelperServiceException)value);
6561
        }
6562
        break;
6563
 
6564
      }
6565
    }
6566
 
6567
    public void setFieldValue(int fieldID, Object value) {
6568
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6569
    }
6570
 
6571
    public Object getFieldValue(_Fields field) {
6572
      switch (field) {
6573
      case SUCCESS:
6574
        return getSuccess();
6575
 
6576
      case SE:
6577
        return getSe();
6578
 
6579
      }
6580
      throw new IllegalStateException();
6581
    }
6582
 
6583
    public Object getFieldValue(int fieldId) {
6584
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6585
    }
6586
 
6587
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6588
    public boolean isSet(_Fields field) {
6589
      switch (field) {
6590
      case SUCCESS:
6591
        return isSetSuccess();
6592
      case SE:
6593
        return isSetSe();
6594
      }
6595
      throw new IllegalStateException();
6596
    }
6597
 
6598
    public boolean isSet(int fieldID) {
6599
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6600
    }
6601
 
6602
    @Override
6603
    public boolean equals(Object that) {
6604
      if (that == null)
6605
        return false;
6606
      if (that instanceof getMessage_result)
6607
        return this.equals((getMessage_result)that);
6608
      return false;
6609
    }
6610
 
6611
    public boolean equals(getMessage_result that) {
6612
      if (that == null)
6613
        return false;
6614
 
6615
      boolean this_present_success = true && this.isSetSuccess();
6616
      boolean that_present_success = true && that.isSetSuccess();
6617
      if (this_present_success || that_present_success) {
6618
        if (!(this_present_success && that_present_success))
6619
          return false;
6620
        if (!this.success.equals(that.success))
6621
          return false;
6622
      }
6623
 
6624
      boolean this_present_se = true && this.isSetSe();
6625
      boolean that_present_se = true && that.isSetSe();
6626
      if (this_present_se || that_present_se) {
6627
        if (!(this_present_se && that_present_se))
6628
          return false;
6629
        if (!this.se.equals(that.se))
6630
          return false;
6631
      }
6632
 
6633
      return true;
6634
    }
6635
 
6636
    @Override
6637
    public int hashCode() {
6638
      return 0;
6639
    }
6640
 
6641
    public int compareTo(getMessage_result other) {
6642
      if (!getClass().equals(other.getClass())) {
6643
        return getClass().getName().compareTo(other.getClass().getName());
6644
      }
6645
 
6646
      int lastComparison = 0;
6647
      getMessage_result typedOther = (getMessage_result)other;
6648
 
6649
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6650
      if (lastComparison != 0) {
6651
        return lastComparison;
6652
      }
6653
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6654
      if (lastComparison != 0) {
6655
        return lastComparison;
6656
      }
6657
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
6658
      if (lastComparison != 0) {
6659
        return lastComparison;
6660
      }
6661
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
6662
      if (lastComparison != 0) {
6663
        return lastComparison;
6664
      }
6665
      return 0;
6666
    }
6667
 
6668
    public void read(TProtocol iprot) throws TException {
6669
      TField field;
6670
      iprot.readStructBegin();
6671
      while (true)
6672
      {
6673
        field = iprot.readFieldBegin();
6674
        if (field.type == TType.STOP) { 
6675
          break;
6676
        }
6677
        _Fields fieldId = _Fields.findByThriftId(field.id);
6678
        if (fieldId == null) {
6679
          TProtocolUtil.skip(iprot, field.type);
6680
        } else {
6681
          switch (fieldId) {
6682
            case SUCCESS:
6683
              if (field.type == TType.STRUCT) {
6684
                this.success = new Message();
6685
                this.success.read(iprot);
6686
              } else { 
6687
                TProtocolUtil.skip(iprot, field.type);
6688
              }
6689
              break;
6690
            case SE:
6691
              if (field.type == TType.STRUCT) {
6692
                this.se = new HelperServiceException();
6693
                this.se.read(iprot);
6694
              } else { 
6695
                TProtocolUtil.skip(iprot, field.type);
6696
              }
6697
              break;
6698
          }
6699
          iprot.readFieldEnd();
6700
        }
6701
      }
6702
      iprot.readStructEnd();
6703
      validate();
6704
    }
6705
 
6706
    public void write(TProtocol oprot) throws TException {
6707
      oprot.writeStructBegin(STRUCT_DESC);
6708
 
6709
      if (this.isSetSuccess()) {
6710
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6711
        this.success.write(oprot);
6712
        oprot.writeFieldEnd();
6713
      } else if (this.isSetSe()) {
6714
        oprot.writeFieldBegin(SE_FIELD_DESC);
6715
        this.se.write(oprot);
6716
        oprot.writeFieldEnd();
6717
      }
6718
      oprot.writeFieldStop();
6719
      oprot.writeStructEnd();
6720
    }
6721
 
6722
    @Override
6723
    public String toString() {
6724
      StringBuilder sb = new StringBuilder("getMessage_result(");
6725
      boolean first = true;
6726
 
6727
      sb.append("success:");
6728
      if (this.success == null) {
6729
        sb.append("null");
6730
      } else {
6731
        sb.append(this.success);
6732
      }
6733
      first = false;
6734
      if (!first) sb.append(", ");
6735
      sb.append("se:");
6736
      if (this.se == null) {
6737
        sb.append("null");
6738
      } else {
6739
        sb.append(this.se);
6740
      }
6741
      first = false;
6742
      sb.append(")");
6743
      return sb.toString();
6744
    }
6745
 
6746
    public void validate() throws TException {
6747
      // check for required fields
6748
    }
6749
 
6750
  }
6751
 
6752
  public static class getSubstitutedMessage_args implements TBase<getSubstitutedMessage_args._Fields>, java.io.Serializable, Cloneable   {
6753
    private static final TStruct STRUCT_DESC = new TStruct("getSubstitutedMessage_args");
6754
 
6755
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
6756
    private static final TField PARAMS_FIELD_DESC = new TField("params", TType.MAP, (short)2);
6757
 
6758
    private long id;
6759
    private Map<String,String> params;
6760
 
6761
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6762
    public enum _Fields implements TFieldIdEnum {
6763
      ID((short)1, "id"),
6764
      PARAMS((short)2, "params");
6765
 
6766
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6767
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6768
 
6769
      static {
6770
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6771
          byId.put((int)field._thriftId, field);
6772
          byName.put(field.getFieldName(), field);
6773
        }
6774
      }
6775
 
6776
      /**
6777
       * Find the _Fields constant that matches fieldId, or null if its not found.
6778
       */
6779
      public static _Fields findByThriftId(int fieldId) {
6780
        return byId.get(fieldId);
6781
      }
6782
 
6783
      /**
6784
       * Find the _Fields constant that matches fieldId, throwing an exception
6785
       * if it is not found.
6786
       */
6787
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6788
        _Fields fields = findByThriftId(fieldId);
6789
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6790
        return fields;
6791
      }
6792
 
6793
      /**
6794
       * Find the _Fields constant that matches name, or null if its not found.
6795
       */
6796
      public static _Fields findByName(String name) {
6797
        return byName.get(name);
6798
      }
6799
 
6800
      private final short _thriftId;
6801
      private final String _fieldName;
6802
 
6803
      _Fields(short thriftId, String fieldName) {
6804
        _thriftId = thriftId;
6805
        _fieldName = fieldName;
6806
      }
6807
 
6808
      public short getThriftFieldId() {
6809
        return _thriftId;
6810
      }
6811
 
6812
      public String getFieldName() {
6813
        return _fieldName;
6814
      }
6815
    }
6816
 
6817
    // isset id assignments
6818
    private static final int __ID_ISSET_ID = 0;
6819
    private BitSet __isset_bit_vector = new BitSet(1);
6820
 
6821
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6822
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
6823
          new FieldValueMetaData(TType.I64)));
6824
      put(_Fields.PARAMS, new FieldMetaData("params", TFieldRequirementType.DEFAULT, 
6825
          new MapMetaData(TType.MAP, 
6826
              new FieldValueMetaData(TType.STRING), 
6827
              new FieldValueMetaData(TType.STRING))));
6828
    }});
6829
 
6830
    static {
6831
      FieldMetaData.addStructMetaDataMap(getSubstitutedMessage_args.class, metaDataMap);
6832
    }
6833
 
6834
    public getSubstitutedMessage_args() {
6835
    }
6836
 
6837
    public getSubstitutedMessage_args(
6838
      long id,
6839
      Map<String,String> params)
6840
    {
6841
      this();
6842
      this.id = id;
6843
      setIdIsSet(true);
6844
      this.params = params;
6845
    }
6846
 
6847
    /**
6848
     * Performs a deep copy on <i>other</i>.
6849
     */
6850
    public getSubstitutedMessage_args(getSubstitutedMessage_args other) {
6851
      __isset_bit_vector.clear();
6852
      __isset_bit_vector.or(other.__isset_bit_vector);
6853
      this.id = other.id;
6854
      if (other.isSetParams()) {
6855
        Map<String,String> __this__params = new HashMap<String,String>();
6856
        for (Map.Entry<String, String> other_element : other.params.entrySet()) {
6857
 
6858
          String other_element_key = other_element.getKey();
6859
          String other_element_value = other_element.getValue();
6860
 
6861
          String __this__params_copy_key = other_element_key;
6862
 
6863
          String __this__params_copy_value = other_element_value;
6864
 
6865
          __this__params.put(__this__params_copy_key, __this__params_copy_value);
6866
        }
6867
        this.params = __this__params;
6868
      }
6869
    }
6870
 
6871
    public getSubstitutedMessage_args deepCopy() {
6872
      return new getSubstitutedMessage_args(this);
6873
    }
6874
 
6875
    @Deprecated
6876
    public getSubstitutedMessage_args clone() {
6877
      return new getSubstitutedMessage_args(this);
6878
    }
6879
 
6880
    public long getId() {
6881
      return this.id;
6882
    }
6883
 
6884
    public getSubstitutedMessage_args setId(long id) {
6885
      this.id = id;
6886
      setIdIsSet(true);
6887
      return this;
6888
    }
6889
 
6890
    public void unsetId() {
6891
      __isset_bit_vector.clear(__ID_ISSET_ID);
6892
    }
6893
 
6894
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
6895
    public boolean isSetId() {
6896
      return __isset_bit_vector.get(__ID_ISSET_ID);
6897
    }
6898
 
6899
    public void setIdIsSet(boolean value) {
6900
      __isset_bit_vector.set(__ID_ISSET_ID, value);
6901
    }
6902
 
6903
    public int getParamsSize() {
6904
      return (this.params == null) ? 0 : this.params.size();
6905
    }
6906
 
6907
    public void putToParams(String key, String val) {
6908
      if (this.params == null) {
6909
        this.params = new HashMap<String,String>();
6910
      }
6911
      this.params.put(key, val);
6912
    }
6913
 
6914
    public Map<String,String> getParams() {
6915
      return this.params;
6916
    }
6917
 
6918
    public getSubstitutedMessage_args setParams(Map<String,String> params) {
6919
      this.params = params;
6920
      return this;
6921
    }
6922
 
6923
    public void unsetParams() {
6924
      this.params = null;
6925
    }
6926
 
6927
    /** Returns true if field params is set (has been asigned a value) and false otherwise */
6928
    public boolean isSetParams() {
6929
      return this.params != null;
6930
    }
6931
 
6932
    public void setParamsIsSet(boolean value) {
6933
      if (!value) {
6934
        this.params = null;
6935
      }
6936
    }
6937
 
6938
    public void setFieldValue(_Fields field, Object value) {
6939
      switch (field) {
6940
      case ID:
6941
        if (value == null) {
6942
          unsetId();
6943
        } else {
6944
          setId((Long)value);
6945
        }
6946
        break;
6947
 
6948
      case PARAMS:
6949
        if (value == null) {
6950
          unsetParams();
6951
        } else {
6952
          setParams((Map<String,String>)value);
6953
        }
6954
        break;
6955
 
6956
      }
6957
    }
6958
 
6959
    public void setFieldValue(int fieldID, Object value) {
6960
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6961
    }
6962
 
6963
    public Object getFieldValue(_Fields field) {
6964
      switch (field) {
6965
      case ID:
6966
        return new Long(getId());
6967
 
6968
      case PARAMS:
6969
        return getParams();
6970
 
6971
      }
6972
      throw new IllegalStateException();
6973
    }
6974
 
6975
    public Object getFieldValue(int fieldId) {
6976
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6977
    }
6978
 
6979
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6980
    public boolean isSet(_Fields field) {
6981
      switch (field) {
6982
      case ID:
6983
        return isSetId();
6984
      case PARAMS:
6985
        return isSetParams();
6986
      }
6987
      throw new IllegalStateException();
6988
    }
6989
 
6990
    public boolean isSet(int fieldID) {
6991
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6992
    }
6993
 
6994
    @Override
6995
    public boolean equals(Object that) {
6996
      if (that == null)
6997
        return false;
6998
      if (that instanceof getSubstitutedMessage_args)
6999
        return this.equals((getSubstitutedMessage_args)that);
7000
      return false;
7001
    }
7002
 
7003
    public boolean equals(getSubstitutedMessage_args that) {
7004
      if (that == null)
7005
        return false;
7006
 
7007
      boolean this_present_id = true;
7008
      boolean that_present_id = true;
7009
      if (this_present_id || that_present_id) {
7010
        if (!(this_present_id && that_present_id))
7011
          return false;
7012
        if (this.id != that.id)
7013
          return false;
7014
      }
7015
 
7016
      boolean this_present_params = true && this.isSetParams();
7017
      boolean that_present_params = true && that.isSetParams();
7018
      if (this_present_params || that_present_params) {
7019
        if (!(this_present_params && that_present_params))
7020
          return false;
7021
        if (!this.params.equals(that.params))
7022
          return false;
7023
      }
7024
 
7025
      return true;
7026
    }
7027
 
7028
    @Override
7029
    public int hashCode() {
7030
      return 0;
7031
    }
7032
 
7033
    public void read(TProtocol iprot) throws TException {
7034
      TField field;
7035
      iprot.readStructBegin();
7036
      while (true)
7037
      {
7038
        field = iprot.readFieldBegin();
7039
        if (field.type == TType.STOP) { 
7040
          break;
7041
        }
7042
        _Fields fieldId = _Fields.findByThriftId(field.id);
7043
        if (fieldId == null) {
7044
          TProtocolUtil.skip(iprot, field.type);
7045
        } else {
7046
          switch (fieldId) {
7047
            case ID:
7048
              if (field.type == TType.I64) {
7049
                this.id = iprot.readI64();
7050
                setIdIsSet(true);
7051
              } else { 
7052
                TProtocolUtil.skip(iprot, field.type);
7053
              }
7054
              break;
7055
            case PARAMS:
7056
              if (field.type == TType.MAP) {
7057
                {
1422 varun.gupt 7058
                  TMap _map12 = iprot.readMapBegin();
7059
                  this.params = new HashMap<String,String>(2*_map12.size);
7060
                  for (int _i13 = 0; _i13 < _map12.size; ++_i13)
352 ashish 7061
                  {
1422 varun.gupt 7062
                    String _key14;
7063
                    String _val15;
7064
                    _key14 = iprot.readString();
7065
                    _val15 = iprot.readString();
7066
                    this.params.put(_key14, _val15);
352 ashish 7067
                  }
7068
                  iprot.readMapEnd();
7069
                }
7070
              } else { 
7071
                TProtocolUtil.skip(iprot, field.type);
7072
              }
7073
              break;
7074
          }
7075
          iprot.readFieldEnd();
7076
        }
7077
      }
7078
      iprot.readStructEnd();
7079
      validate();
7080
    }
7081
 
7082
    public void write(TProtocol oprot) throws TException {
7083
      validate();
7084
 
7085
      oprot.writeStructBegin(STRUCT_DESC);
7086
      oprot.writeFieldBegin(ID_FIELD_DESC);
7087
      oprot.writeI64(this.id);
7088
      oprot.writeFieldEnd();
7089
      if (this.params != null) {
7090
        oprot.writeFieldBegin(PARAMS_FIELD_DESC);
7091
        {
7092
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.params.size()));
1422 varun.gupt 7093
          for (Map.Entry<String, String> _iter16 : this.params.entrySet())
352 ashish 7094
          {
1422 varun.gupt 7095
            oprot.writeString(_iter16.getKey());
7096
            oprot.writeString(_iter16.getValue());
352 ashish 7097
          }
7098
          oprot.writeMapEnd();
7099
        }
7100
        oprot.writeFieldEnd();
7101
      }
7102
      oprot.writeFieldStop();
7103
      oprot.writeStructEnd();
7104
    }
7105
 
7106
    @Override
7107
    public String toString() {
7108
      StringBuilder sb = new StringBuilder("getSubstitutedMessage_args(");
7109
      boolean first = true;
7110
 
7111
      sb.append("id:");
7112
      sb.append(this.id);
7113
      first = false;
7114
      if (!first) sb.append(", ");
7115
      sb.append("params:");
7116
      if (this.params == null) {
7117
        sb.append("null");
7118
      } else {
7119
        sb.append(this.params);
7120
      }
7121
      first = false;
7122
      sb.append(")");
7123
      return sb.toString();
7124
    }
7125
 
7126
    public void validate() throws TException {
7127
      // check for required fields
7128
    }
7129
 
7130
  }
7131
 
7132
  public static class getSubstitutedMessage_result implements TBase<getSubstitutedMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSubstitutedMessage_result>   {
7133
    private static final TStruct STRUCT_DESC = new TStruct("getSubstitutedMessage_result");
7134
 
7135
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
7136
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
7137
 
7138
    private Message success;
7139
    private HelperServiceException se;
7140
 
7141
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7142
    public enum _Fields implements TFieldIdEnum {
7143
      SUCCESS((short)0, "success"),
7144
      SE((short)1, "se");
7145
 
7146
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7147
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7148
 
7149
      static {
7150
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7151
          byId.put((int)field._thriftId, field);
7152
          byName.put(field.getFieldName(), field);
7153
        }
7154
      }
7155
 
7156
      /**
7157
       * Find the _Fields constant that matches fieldId, or null if its not found.
7158
       */
7159
      public static _Fields findByThriftId(int fieldId) {
7160
        return byId.get(fieldId);
7161
      }
7162
 
7163
      /**
7164
       * Find the _Fields constant that matches fieldId, throwing an exception
7165
       * if it is not found.
7166
       */
7167
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7168
        _Fields fields = findByThriftId(fieldId);
7169
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7170
        return fields;
7171
      }
7172
 
7173
      /**
7174
       * Find the _Fields constant that matches name, or null if its not found.
7175
       */
7176
      public static _Fields findByName(String name) {
7177
        return byName.get(name);
7178
      }
7179
 
7180
      private final short _thriftId;
7181
      private final String _fieldName;
7182
 
7183
      _Fields(short thriftId, String fieldName) {
7184
        _thriftId = thriftId;
7185
        _fieldName = fieldName;
7186
      }
7187
 
7188
      public short getThriftFieldId() {
7189
        return _thriftId;
7190
      }
7191
 
7192
      public String getFieldName() {
7193
        return _fieldName;
7194
      }
7195
    }
7196
 
7197
    // isset id assignments
7198
 
7199
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7200
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7201
          new StructMetaData(TType.STRUCT, Message.class)));
7202
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
7203
          new FieldValueMetaData(TType.STRUCT)));
7204
    }});
7205
 
7206
    static {
7207
      FieldMetaData.addStructMetaDataMap(getSubstitutedMessage_result.class, metaDataMap);
7208
    }
7209
 
7210
    public getSubstitutedMessage_result() {
7211
    }
7212
 
7213
    public getSubstitutedMessage_result(
7214
      Message success,
7215
      HelperServiceException se)
7216
    {
7217
      this();
7218
      this.success = success;
7219
      this.se = se;
7220
    }
7221
 
7222
    /**
7223
     * Performs a deep copy on <i>other</i>.
7224
     */
7225
    public getSubstitutedMessage_result(getSubstitutedMessage_result other) {
7226
      if (other.isSetSuccess()) {
7227
        this.success = new Message(other.success);
7228
      }
7229
      if (other.isSetSe()) {
7230
        this.se = new HelperServiceException(other.se);
7231
      }
7232
    }
7233
 
7234
    public getSubstitutedMessage_result deepCopy() {
7235
      return new getSubstitutedMessage_result(this);
7236
    }
7237
 
7238
    @Deprecated
7239
    public getSubstitutedMessage_result clone() {
7240
      return new getSubstitutedMessage_result(this);
7241
    }
7242
 
7243
    public Message getSuccess() {
7244
      return this.success;
7245
    }
7246
 
7247
    public getSubstitutedMessage_result setSuccess(Message success) {
7248
      this.success = success;
7249
      return this;
7250
    }
7251
 
7252
    public void unsetSuccess() {
7253
      this.success = null;
7254
    }
7255
 
7256
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7257
    public boolean isSetSuccess() {
7258
      return this.success != null;
7259
    }
7260
 
7261
    public void setSuccessIsSet(boolean value) {
7262
      if (!value) {
7263
        this.success = null;
7264
      }
7265
    }
7266
 
7267
    public HelperServiceException getSe() {
7268
      return this.se;
7269
    }
7270
 
7271
    public getSubstitutedMessage_result setSe(HelperServiceException se) {
7272
      this.se = se;
7273
      return this;
7274
    }
7275
 
7276
    public void unsetSe() {
7277
      this.se = null;
7278
    }
7279
 
7280
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
7281
    public boolean isSetSe() {
7282
      return this.se != null;
7283
    }
7284
 
7285
    public void setSeIsSet(boolean value) {
7286
      if (!value) {
7287
        this.se = null;
7288
      }
7289
    }
7290
 
7291
    public void setFieldValue(_Fields field, Object value) {
7292
      switch (field) {
7293
      case SUCCESS:
7294
        if (value == null) {
7295
          unsetSuccess();
7296
        } else {
7297
          setSuccess((Message)value);
7298
        }
7299
        break;
7300
 
7301
      case SE:
7302
        if (value == null) {
7303
          unsetSe();
7304
        } else {
7305
          setSe((HelperServiceException)value);
7306
        }
7307
        break;
7308
 
7309
      }
7310
    }
7311
 
7312
    public void setFieldValue(int fieldID, Object value) {
7313
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7314
    }
7315
 
7316
    public Object getFieldValue(_Fields field) {
7317
      switch (field) {
7318
      case SUCCESS:
7319
        return getSuccess();
7320
 
7321
      case SE:
7322
        return getSe();
7323
 
7324
      }
7325
      throw new IllegalStateException();
7326
    }
7327
 
7328
    public Object getFieldValue(int fieldId) {
7329
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7330
    }
7331
 
7332
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7333
    public boolean isSet(_Fields field) {
7334
      switch (field) {
7335
      case SUCCESS:
7336
        return isSetSuccess();
7337
      case SE:
7338
        return isSetSe();
7339
      }
7340
      throw new IllegalStateException();
7341
    }
7342
 
7343
    public boolean isSet(int fieldID) {
7344
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7345
    }
7346
 
7347
    @Override
7348
    public boolean equals(Object that) {
7349
      if (that == null)
7350
        return false;
7351
      if (that instanceof getSubstitutedMessage_result)
7352
        return this.equals((getSubstitutedMessage_result)that);
7353
      return false;
7354
    }
7355
 
7356
    public boolean equals(getSubstitutedMessage_result that) {
7357
      if (that == null)
7358
        return false;
7359
 
7360
      boolean this_present_success = true && this.isSetSuccess();
7361
      boolean that_present_success = true && that.isSetSuccess();
7362
      if (this_present_success || that_present_success) {
7363
        if (!(this_present_success && that_present_success))
7364
          return false;
7365
        if (!this.success.equals(that.success))
7366
          return false;
7367
      }
7368
 
7369
      boolean this_present_se = true && this.isSetSe();
7370
      boolean that_present_se = true && that.isSetSe();
7371
      if (this_present_se || that_present_se) {
7372
        if (!(this_present_se && that_present_se))
7373
          return false;
7374
        if (!this.se.equals(that.se))
7375
          return false;
7376
      }
7377
 
7378
      return true;
7379
    }
7380
 
7381
    @Override
7382
    public int hashCode() {
7383
      return 0;
7384
    }
7385
 
7386
    public int compareTo(getSubstitutedMessage_result other) {
7387
      if (!getClass().equals(other.getClass())) {
7388
        return getClass().getName().compareTo(other.getClass().getName());
7389
      }
7390
 
7391
      int lastComparison = 0;
7392
      getSubstitutedMessage_result typedOther = (getSubstitutedMessage_result)other;
7393
 
7394
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7395
      if (lastComparison != 0) {
7396
        return lastComparison;
7397
      }
7398
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7399
      if (lastComparison != 0) {
7400
        return lastComparison;
7401
      }
7402
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
7403
      if (lastComparison != 0) {
7404
        return lastComparison;
7405
      }
7406
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
7407
      if (lastComparison != 0) {
7408
        return lastComparison;
7409
      }
7410
      return 0;
7411
    }
7412
 
7413
    public void read(TProtocol iprot) throws TException {
7414
      TField field;
7415
      iprot.readStructBegin();
7416
      while (true)
7417
      {
7418
        field = iprot.readFieldBegin();
7419
        if (field.type == TType.STOP) { 
7420
          break;
7421
        }
7422
        _Fields fieldId = _Fields.findByThriftId(field.id);
7423
        if (fieldId == null) {
7424
          TProtocolUtil.skip(iprot, field.type);
7425
        } else {
7426
          switch (fieldId) {
7427
            case SUCCESS:
7428
              if (field.type == TType.STRUCT) {
7429
                this.success = new Message();
7430
                this.success.read(iprot);
7431
              } else { 
7432
                TProtocolUtil.skip(iprot, field.type);
7433
              }
7434
              break;
7435
            case SE:
7436
              if (field.type == TType.STRUCT) {
7437
                this.se = new HelperServiceException();
7438
                this.se.read(iprot);
7439
              } else { 
7440
                TProtocolUtil.skip(iprot, field.type);
7441
              }
7442
              break;
7443
          }
7444
          iprot.readFieldEnd();
7445
        }
7446
      }
7447
      iprot.readStructEnd();
7448
      validate();
7449
    }
7450
 
7451
    public void write(TProtocol oprot) throws TException {
7452
      oprot.writeStructBegin(STRUCT_DESC);
7453
 
7454
      if (this.isSetSuccess()) {
7455
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7456
        this.success.write(oprot);
7457
        oprot.writeFieldEnd();
7458
      } else if (this.isSetSe()) {
7459
        oprot.writeFieldBegin(SE_FIELD_DESC);
7460
        this.se.write(oprot);
7461
        oprot.writeFieldEnd();
7462
      }
7463
      oprot.writeFieldStop();
7464
      oprot.writeStructEnd();
7465
    }
7466
 
7467
    @Override
7468
    public String toString() {
7469
      StringBuilder sb = new StringBuilder("getSubstitutedMessage_result(");
7470
      boolean first = true;
7471
 
7472
      sb.append("success:");
7473
      if (this.success == null) {
7474
        sb.append("null");
7475
      } else {
7476
        sb.append(this.success);
7477
      }
7478
      first = false;
7479
      if (!first) sb.append(", ");
7480
      sb.append("se:");
7481
      if (this.se == null) {
7482
        sb.append("null");
7483
      } else {
7484
        sb.append(this.se);
7485
      }
7486
      first = false;
7487
      sb.append(")");
7488
      return sb.toString();
7489
    }
7490
 
7491
    public void validate() throws TException {
7492
      // check for required fields
7493
    }
7494
 
7495
  }
7496
 
495 rajveer 7497
  public static class addUser_args implements TBase<addUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addUser_args>   {
7498
    private static final TStruct STRUCT_DESC = new TStruct("addUser_args");
7499
 
7500
    private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
7501
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
7502
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)3);
7503
 
7504
    private String username;
7505
    private String password;
7506
    private long warehouseId;
7507
 
7508
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7509
    public enum _Fields implements TFieldIdEnum {
7510
      USERNAME((short)1, "username"),
7511
      PASSWORD((short)2, "password"),
7512
      WAREHOUSE_ID((short)3, "warehouseId");
7513
 
7514
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7515
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7516
 
7517
      static {
7518
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7519
          byId.put((int)field._thriftId, field);
7520
          byName.put(field.getFieldName(), field);
7521
        }
7522
      }
7523
 
7524
      /**
7525
       * Find the _Fields constant that matches fieldId, or null if its not found.
7526
       */
7527
      public static _Fields findByThriftId(int fieldId) {
7528
        return byId.get(fieldId);
7529
      }
7530
 
7531
      /**
7532
       * Find the _Fields constant that matches fieldId, throwing an exception
7533
       * if it is not found.
7534
       */
7535
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7536
        _Fields fields = findByThriftId(fieldId);
7537
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7538
        return fields;
7539
      }
7540
 
7541
      /**
7542
       * Find the _Fields constant that matches name, or null if its not found.
7543
       */
7544
      public static _Fields findByName(String name) {
7545
        return byName.get(name);
7546
      }
7547
 
7548
      private final short _thriftId;
7549
      private final String _fieldName;
7550
 
7551
      _Fields(short thriftId, String fieldName) {
7552
        _thriftId = thriftId;
7553
        _fieldName = fieldName;
7554
      }
7555
 
7556
      public short getThriftFieldId() {
7557
        return _thriftId;
7558
      }
7559
 
7560
      public String getFieldName() {
7561
        return _fieldName;
7562
      }
7563
    }
7564
 
7565
    // isset id assignments
7566
    private static final int __WAREHOUSEID_ISSET_ID = 0;
7567
    private BitSet __isset_bit_vector = new BitSet(1);
7568
 
7569
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7570
      put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
7571
          new FieldValueMetaData(TType.STRING)));
7572
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
7573
          new FieldValueMetaData(TType.STRING)));
7574
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
7575
          new FieldValueMetaData(TType.I64)));
7576
    }});
7577
 
7578
    static {
7579
      FieldMetaData.addStructMetaDataMap(addUser_args.class, metaDataMap);
7580
    }
7581
 
7582
    public addUser_args() {
7583
    }
7584
 
7585
    public addUser_args(
7586
      String username,
7587
      String password,
7588
      long warehouseId)
7589
    {
7590
      this();
7591
      this.username = username;
7592
      this.password = password;
7593
      this.warehouseId = warehouseId;
7594
      setWarehouseIdIsSet(true);
7595
    }
7596
 
7597
    /**
7598
     * Performs a deep copy on <i>other</i>.
7599
     */
7600
    public addUser_args(addUser_args other) {
7601
      __isset_bit_vector.clear();
7602
      __isset_bit_vector.or(other.__isset_bit_vector);
7603
      if (other.isSetUsername()) {
7604
        this.username = other.username;
7605
      }
7606
      if (other.isSetPassword()) {
7607
        this.password = other.password;
7608
      }
7609
      this.warehouseId = other.warehouseId;
7610
    }
7611
 
7612
    public addUser_args deepCopy() {
7613
      return new addUser_args(this);
7614
    }
7615
 
7616
    @Deprecated
7617
    public addUser_args clone() {
7618
      return new addUser_args(this);
7619
    }
7620
 
7621
    public String getUsername() {
7622
      return this.username;
7623
    }
7624
 
7625
    public addUser_args setUsername(String username) {
7626
      this.username = username;
7627
      return this;
7628
    }
7629
 
7630
    public void unsetUsername() {
7631
      this.username = null;
7632
    }
7633
 
7634
    /** Returns true if field username is set (has been asigned a value) and false otherwise */
7635
    public boolean isSetUsername() {
7636
      return this.username != null;
7637
    }
7638
 
7639
    public void setUsernameIsSet(boolean value) {
7640
      if (!value) {
7641
        this.username = null;
7642
      }
7643
    }
7644
 
7645
    public String getPassword() {
7646
      return this.password;
7647
    }
7648
 
7649
    public addUser_args setPassword(String password) {
7650
      this.password = password;
7651
      return this;
7652
    }
7653
 
7654
    public void unsetPassword() {
7655
      this.password = null;
7656
    }
7657
 
7658
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
7659
    public boolean isSetPassword() {
7660
      return this.password != null;
7661
    }
7662
 
7663
    public void setPasswordIsSet(boolean value) {
7664
      if (!value) {
7665
        this.password = null;
7666
      }
7667
    }
7668
 
7669
    public long getWarehouseId() {
7670
      return this.warehouseId;
7671
    }
7672
 
7673
    public addUser_args setWarehouseId(long warehouseId) {
7674
      this.warehouseId = warehouseId;
7675
      setWarehouseIdIsSet(true);
7676
      return this;
7677
    }
7678
 
7679
    public void unsetWarehouseId() {
7680
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
7681
    }
7682
 
7683
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
7684
    public boolean isSetWarehouseId() {
7685
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
7686
    }
7687
 
7688
    public void setWarehouseIdIsSet(boolean value) {
7689
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
7690
    }
7691
 
7692
    public void setFieldValue(_Fields field, Object value) {
7693
      switch (field) {
7694
      case USERNAME:
7695
        if (value == null) {
7696
          unsetUsername();
7697
        } else {
7698
          setUsername((String)value);
7699
        }
7700
        break;
7701
 
7702
      case PASSWORD:
7703
        if (value == null) {
7704
          unsetPassword();
7705
        } else {
7706
          setPassword((String)value);
7707
        }
7708
        break;
7709
 
7710
      case WAREHOUSE_ID:
7711
        if (value == null) {
7712
          unsetWarehouseId();
7713
        } else {
7714
          setWarehouseId((Long)value);
7715
        }
7716
        break;
7717
 
7718
      }
7719
    }
7720
 
7721
    public void setFieldValue(int fieldID, Object value) {
7722
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7723
    }
7724
 
7725
    public Object getFieldValue(_Fields field) {
7726
      switch (field) {
7727
      case USERNAME:
7728
        return getUsername();
7729
 
7730
      case PASSWORD:
7731
        return getPassword();
7732
 
7733
      case WAREHOUSE_ID:
7734
        return new Long(getWarehouseId());
7735
 
7736
      }
7737
      throw new IllegalStateException();
7738
    }
7739
 
7740
    public Object getFieldValue(int fieldId) {
7741
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7742
    }
7743
 
7744
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7745
    public boolean isSet(_Fields field) {
7746
      switch (field) {
7747
      case USERNAME:
7748
        return isSetUsername();
7749
      case PASSWORD:
7750
        return isSetPassword();
7751
      case WAREHOUSE_ID:
7752
        return isSetWarehouseId();
7753
      }
7754
      throw new IllegalStateException();
7755
    }
7756
 
7757
    public boolean isSet(int fieldID) {
7758
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7759
    }
7760
 
7761
    @Override
7762
    public boolean equals(Object that) {
7763
      if (that == null)
7764
        return false;
7765
      if (that instanceof addUser_args)
7766
        return this.equals((addUser_args)that);
7767
      return false;
7768
    }
7769
 
7770
    public boolean equals(addUser_args that) {
7771
      if (that == null)
7772
        return false;
7773
 
7774
      boolean this_present_username = true && this.isSetUsername();
7775
      boolean that_present_username = true && that.isSetUsername();
7776
      if (this_present_username || that_present_username) {
7777
        if (!(this_present_username && that_present_username))
7778
          return false;
7779
        if (!this.username.equals(that.username))
7780
          return false;
7781
      }
7782
 
7783
      boolean this_present_password = true && this.isSetPassword();
7784
      boolean that_present_password = true && that.isSetPassword();
7785
      if (this_present_password || that_present_password) {
7786
        if (!(this_present_password && that_present_password))
7787
          return false;
7788
        if (!this.password.equals(that.password))
7789
          return false;
7790
      }
7791
 
7792
      boolean this_present_warehouseId = true;
7793
      boolean that_present_warehouseId = true;
7794
      if (this_present_warehouseId || that_present_warehouseId) {
7795
        if (!(this_present_warehouseId && that_present_warehouseId))
7796
          return false;
7797
        if (this.warehouseId != that.warehouseId)
7798
          return false;
7799
      }
7800
 
7801
      return true;
7802
    }
7803
 
7804
    @Override
7805
    public int hashCode() {
7806
      return 0;
7807
    }
7808
 
7809
    public int compareTo(addUser_args other) {
7810
      if (!getClass().equals(other.getClass())) {
7811
        return getClass().getName().compareTo(other.getClass().getName());
7812
      }
7813
 
7814
      int lastComparison = 0;
7815
      addUser_args typedOther = (addUser_args)other;
7816
 
7817
      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(isSetUsername());
7818
      if (lastComparison != 0) {
7819
        return lastComparison;
7820
      }
7821
      lastComparison = TBaseHelper.compareTo(username, typedOther.username);
7822
      if (lastComparison != 0) {
7823
        return lastComparison;
7824
      }
7825
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
7826
      if (lastComparison != 0) {
7827
        return lastComparison;
7828
      }
7829
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
7830
      if (lastComparison != 0) {
7831
        return lastComparison;
7832
      }
7833
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
7834
      if (lastComparison != 0) {
7835
        return lastComparison;
7836
      }
7837
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
7838
      if (lastComparison != 0) {
7839
        return lastComparison;
7840
      }
7841
      return 0;
7842
    }
7843
 
7844
    public void read(TProtocol iprot) throws TException {
7845
      TField field;
7846
      iprot.readStructBegin();
7847
      while (true)
7848
      {
7849
        field = iprot.readFieldBegin();
7850
        if (field.type == TType.STOP) { 
7851
          break;
7852
        }
7853
        _Fields fieldId = _Fields.findByThriftId(field.id);
7854
        if (fieldId == null) {
7855
          TProtocolUtil.skip(iprot, field.type);
7856
        } else {
7857
          switch (fieldId) {
7858
            case USERNAME:
7859
              if (field.type == TType.STRING) {
7860
                this.username = iprot.readString();
7861
              } else { 
7862
                TProtocolUtil.skip(iprot, field.type);
7863
              }
7864
              break;
7865
            case PASSWORD:
7866
              if (field.type == TType.STRING) {
7867
                this.password = iprot.readString();
7868
              } else { 
7869
                TProtocolUtil.skip(iprot, field.type);
7870
              }
7871
              break;
7872
            case WAREHOUSE_ID:
7873
              if (field.type == TType.I64) {
7874
                this.warehouseId = iprot.readI64();
7875
                setWarehouseIdIsSet(true);
7876
              } else { 
7877
                TProtocolUtil.skip(iprot, field.type);
7878
              }
7879
              break;
7880
          }
7881
          iprot.readFieldEnd();
7882
        }
7883
      }
7884
      iprot.readStructEnd();
7885
      validate();
7886
    }
7887
 
7888
    public void write(TProtocol oprot) throws TException {
7889
      validate();
7890
 
7891
      oprot.writeStructBegin(STRUCT_DESC);
7892
      if (this.username != null) {
7893
        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
7894
        oprot.writeString(this.username);
7895
        oprot.writeFieldEnd();
7896
      }
7897
      if (this.password != null) {
7898
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7899
        oprot.writeString(this.password);
7900
        oprot.writeFieldEnd();
7901
      }
7902
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7903
      oprot.writeI64(this.warehouseId);
7904
      oprot.writeFieldEnd();
7905
      oprot.writeFieldStop();
7906
      oprot.writeStructEnd();
7907
    }
7908
 
7909
    @Override
7910
    public String toString() {
7911
      StringBuilder sb = new StringBuilder("addUser_args(");
7912
      boolean first = true;
7913
 
7914
      sb.append("username:");
7915
      if (this.username == null) {
7916
        sb.append("null");
7917
      } else {
7918
        sb.append(this.username);
7919
      }
7920
      first = false;
7921
      if (!first) sb.append(", ");
7922
      sb.append("password:");
7923
      if (this.password == null) {
7924
        sb.append("null");
7925
      } else {
7926
        sb.append(this.password);
7927
      }
7928
      first = false;
7929
      if (!first) sb.append(", ");
7930
      sb.append("warehouseId:");
7931
      sb.append(this.warehouseId);
7932
      first = false;
7933
      sb.append(")");
7934
      return sb.toString();
7935
    }
7936
 
7937
    public void validate() throws TException {
7938
      // check for required fields
7939
    }
7940
 
7941
  }
7942
 
7943
  public static class addUser_result implements TBase<addUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addUser_result>   {
7944
    private static final TStruct STRUCT_DESC = new TStruct("addUser_result");
7945
 
7946
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7947
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
7948
 
7949
    private boolean success;
7950
    private HelperServiceException se;
7951
 
7952
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7953
    public enum _Fields implements TFieldIdEnum {
7954
      SUCCESS((short)0, "success"),
7955
      SE((short)1, "se");
7956
 
7957
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7958
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7959
 
7960
      static {
7961
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7962
          byId.put((int)field._thriftId, field);
7963
          byName.put(field.getFieldName(), field);
7964
        }
7965
      }
7966
 
7967
      /**
7968
       * Find the _Fields constant that matches fieldId, or null if its not found.
7969
       */
7970
      public static _Fields findByThriftId(int fieldId) {
7971
        return byId.get(fieldId);
7972
      }
7973
 
7974
      /**
7975
       * Find the _Fields constant that matches fieldId, throwing an exception
7976
       * if it is not found.
7977
       */
7978
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7979
        _Fields fields = findByThriftId(fieldId);
7980
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7981
        return fields;
7982
      }
7983
 
7984
      /**
7985
       * Find the _Fields constant that matches name, or null if its not found.
7986
       */
7987
      public static _Fields findByName(String name) {
7988
        return byName.get(name);
7989
      }
7990
 
7991
      private final short _thriftId;
7992
      private final String _fieldName;
7993
 
7994
      _Fields(short thriftId, String fieldName) {
7995
        _thriftId = thriftId;
7996
        _fieldName = fieldName;
7997
      }
7998
 
7999
      public short getThriftFieldId() {
8000
        return _thriftId;
8001
      }
8002
 
8003
      public String getFieldName() {
8004
        return _fieldName;
8005
      }
8006
    }
8007
 
8008
    // isset id assignments
8009
    private static final int __SUCCESS_ISSET_ID = 0;
8010
    private BitSet __isset_bit_vector = new BitSet(1);
8011
 
8012
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8013
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8014
          new FieldValueMetaData(TType.BOOL)));
8015
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
8016
          new FieldValueMetaData(TType.STRUCT)));
8017
    }});
8018
 
8019
    static {
8020
      FieldMetaData.addStructMetaDataMap(addUser_result.class, metaDataMap);
8021
    }
8022
 
8023
    public addUser_result() {
8024
    }
8025
 
8026
    public addUser_result(
8027
      boolean success,
8028
      HelperServiceException se)
8029
    {
8030
      this();
8031
      this.success = success;
8032
      setSuccessIsSet(true);
8033
      this.se = se;
8034
    }
8035
 
8036
    /**
8037
     * Performs a deep copy on <i>other</i>.
8038
     */
8039
    public addUser_result(addUser_result other) {
8040
      __isset_bit_vector.clear();
8041
      __isset_bit_vector.or(other.__isset_bit_vector);
8042
      this.success = other.success;
8043
      if (other.isSetSe()) {
8044
        this.se = new HelperServiceException(other.se);
8045
      }
8046
    }
8047
 
8048
    public addUser_result deepCopy() {
8049
      return new addUser_result(this);
8050
    }
8051
 
8052
    @Deprecated
8053
    public addUser_result clone() {
8054
      return new addUser_result(this);
8055
    }
8056
 
8057
    public boolean isSuccess() {
8058
      return this.success;
8059
    }
8060
 
8061
    public addUser_result setSuccess(boolean success) {
8062
      this.success = success;
8063
      setSuccessIsSet(true);
8064
      return this;
8065
    }
8066
 
8067
    public void unsetSuccess() {
8068
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8069
    }
8070
 
8071
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8072
    public boolean isSetSuccess() {
8073
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8074
    }
8075
 
8076
    public void setSuccessIsSet(boolean value) {
8077
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8078
    }
8079
 
8080
    public HelperServiceException getSe() {
8081
      return this.se;
8082
    }
8083
 
8084
    public addUser_result setSe(HelperServiceException se) {
8085
      this.se = se;
8086
      return this;
8087
    }
8088
 
8089
    public void unsetSe() {
8090
      this.se = null;
8091
    }
8092
 
8093
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
8094
    public boolean isSetSe() {
8095
      return this.se != null;
8096
    }
8097
 
8098
    public void setSeIsSet(boolean value) {
8099
      if (!value) {
8100
        this.se = null;
8101
      }
8102
    }
8103
 
8104
    public void setFieldValue(_Fields field, Object value) {
8105
      switch (field) {
8106
      case SUCCESS:
8107
        if (value == null) {
8108
          unsetSuccess();
8109
        } else {
8110
          setSuccess((Boolean)value);
8111
        }
8112
        break;
8113
 
8114
      case SE:
8115
        if (value == null) {
8116
          unsetSe();
8117
        } else {
8118
          setSe((HelperServiceException)value);
8119
        }
8120
        break;
8121
 
8122
      }
8123
    }
8124
 
8125
    public void setFieldValue(int fieldID, Object value) {
8126
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8127
    }
8128
 
8129
    public Object getFieldValue(_Fields field) {
8130
      switch (field) {
8131
      case SUCCESS:
8132
        return new Boolean(isSuccess());
8133
 
8134
      case SE:
8135
        return getSe();
8136
 
8137
      }
8138
      throw new IllegalStateException();
8139
    }
8140
 
8141
    public Object getFieldValue(int fieldId) {
8142
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8143
    }
8144
 
8145
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8146
    public boolean isSet(_Fields field) {
8147
      switch (field) {
8148
      case SUCCESS:
8149
        return isSetSuccess();
8150
      case SE:
8151
        return isSetSe();
8152
      }
8153
      throw new IllegalStateException();
8154
    }
8155
 
8156
    public boolean isSet(int fieldID) {
8157
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8158
    }
8159
 
8160
    @Override
8161
    public boolean equals(Object that) {
8162
      if (that == null)
8163
        return false;
8164
      if (that instanceof addUser_result)
8165
        return this.equals((addUser_result)that);
8166
      return false;
8167
    }
8168
 
8169
    public boolean equals(addUser_result that) {
8170
      if (that == null)
8171
        return false;
8172
 
8173
      boolean this_present_success = true;
8174
      boolean that_present_success = true;
8175
      if (this_present_success || that_present_success) {
8176
        if (!(this_present_success && that_present_success))
8177
          return false;
8178
        if (this.success != that.success)
8179
          return false;
8180
      }
8181
 
8182
      boolean this_present_se = true && this.isSetSe();
8183
      boolean that_present_se = true && that.isSetSe();
8184
      if (this_present_se || that_present_se) {
8185
        if (!(this_present_se && that_present_se))
8186
          return false;
8187
        if (!this.se.equals(that.se))
8188
          return false;
8189
      }
8190
 
8191
      return true;
8192
    }
8193
 
8194
    @Override
8195
    public int hashCode() {
8196
      return 0;
8197
    }
8198
 
8199
    public int compareTo(addUser_result other) {
8200
      if (!getClass().equals(other.getClass())) {
8201
        return getClass().getName().compareTo(other.getClass().getName());
8202
      }
8203
 
8204
      int lastComparison = 0;
8205
      addUser_result typedOther = (addUser_result)other;
8206
 
8207
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8208
      if (lastComparison != 0) {
8209
        return lastComparison;
8210
      }
8211
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8212
      if (lastComparison != 0) {
8213
        return lastComparison;
8214
      }
8215
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
8216
      if (lastComparison != 0) {
8217
        return lastComparison;
8218
      }
8219
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
8220
      if (lastComparison != 0) {
8221
        return lastComparison;
8222
      }
8223
      return 0;
8224
    }
8225
 
8226
    public void read(TProtocol iprot) throws TException {
8227
      TField field;
8228
      iprot.readStructBegin();
8229
      while (true)
8230
      {
8231
        field = iprot.readFieldBegin();
8232
        if (field.type == TType.STOP) { 
8233
          break;
8234
        }
8235
        _Fields fieldId = _Fields.findByThriftId(field.id);
8236
        if (fieldId == null) {
8237
          TProtocolUtil.skip(iprot, field.type);
8238
        } else {
8239
          switch (fieldId) {
8240
            case SUCCESS:
8241
              if (field.type == TType.BOOL) {
8242
                this.success = iprot.readBool();
8243
                setSuccessIsSet(true);
8244
              } else { 
8245
                TProtocolUtil.skip(iprot, field.type);
8246
              }
8247
              break;
8248
            case SE:
8249
              if (field.type == TType.STRUCT) {
8250
                this.se = new HelperServiceException();
8251
                this.se.read(iprot);
8252
              } else { 
8253
                TProtocolUtil.skip(iprot, field.type);
8254
              }
8255
              break;
8256
          }
8257
          iprot.readFieldEnd();
8258
        }
8259
      }
8260
      iprot.readStructEnd();
8261
      validate();
8262
    }
8263
 
8264
    public void write(TProtocol oprot) throws TException {
8265
      oprot.writeStructBegin(STRUCT_DESC);
8266
 
8267
      if (this.isSetSuccess()) {
8268
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8269
        oprot.writeBool(this.success);
8270
        oprot.writeFieldEnd();
8271
      } else if (this.isSetSe()) {
8272
        oprot.writeFieldBegin(SE_FIELD_DESC);
8273
        this.se.write(oprot);
8274
        oprot.writeFieldEnd();
8275
      }
8276
      oprot.writeFieldStop();
8277
      oprot.writeStructEnd();
8278
    }
8279
 
8280
    @Override
8281
    public String toString() {
8282
      StringBuilder sb = new StringBuilder("addUser_result(");
8283
      boolean first = true;
8284
 
8285
      sb.append("success:");
8286
      sb.append(this.success);
8287
      first = false;
8288
      if (!first) sb.append(", ");
8289
      sb.append("se:");
8290
      if (this.se == null) {
8291
        sb.append("null");
8292
      } else {
8293
        sb.append(this.se);
8294
      }
8295
      first = false;
8296
      sb.append(")");
8297
      return sb.toString();
8298
    }
8299
 
8300
    public void validate() throws TException {
8301
      // check for required fields
8302
    }
8303
 
8304
  }
8305
 
8306
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
8307
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
8308
 
8309
    private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
8310
 
8311
    private String username;
8312
 
8313
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8314
    public enum _Fields implements TFieldIdEnum {
8315
      USERNAME((short)1, "username");
8316
 
8317
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8318
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8319
 
8320
      static {
8321
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8322
          byId.put((int)field._thriftId, field);
8323
          byName.put(field.getFieldName(), field);
8324
        }
8325
      }
8326
 
8327
      /**
8328
       * Find the _Fields constant that matches fieldId, or null if its not found.
8329
       */
8330
      public static _Fields findByThriftId(int fieldId) {
8331
        return byId.get(fieldId);
8332
      }
8333
 
8334
      /**
8335
       * Find the _Fields constant that matches fieldId, throwing an exception
8336
       * if it is not found.
8337
       */
8338
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8339
        _Fields fields = findByThriftId(fieldId);
8340
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8341
        return fields;
8342
      }
8343
 
8344
      /**
8345
       * Find the _Fields constant that matches name, or null if its not found.
8346
       */
8347
      public static _Fields findByName(String name) {
8348
        return byName.get(name);
8349
      }
8350
 
8351
      private final short _thriftId;
8352
      private final String _fieldName;
8353
 
8354
      _Fields(short thriftId, String fieldName) {
8355
        _thriftId = thriftId;
8356
        _fieldName = fieldName;
8357
      }
8358
 
8359
      public short getThriftFieldId() {
8360
        return _thriftId;
8361
      }
8362
 
8363
      public String getFieldName() {
8364
        return _fieldName;
8365
      }
8366
    }
8367
 
8368
    // isset id assignments
8369
 
8370
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8371
      put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
8372
          new FieldValueMetaData(TType.STRING)));
8373
    }});
8374
 
8375
    static {
8376
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
8377
    }
8378
 
8379
    public deleteUser_args() {
8380
    }
8381
 
8382
    public deleteUser_args(
8383
      String username)
8384
    {
8385
      this();
8386
      this.username = username;
8387
    }
8388
 
8389
    /**
8390
     * Performs a deep copy on <i>other</i>.
8391
     */
8392
    public deleteUser_args(deleteUser_args other) {
8393
      if (other.isSetUsername()) {
8394
        this.username = other.username;
8395
      }
8396
    }
8397
 
8398
    public deleteUser_args deepCopy() {
8399
      return new deleteUser_args(this);
8400
    }
8401
 
8402
    @Deprecated
8403
    public deleteUser_args clone() {
8404
      return new deleteUser_args(this);
8405
    }
8406
 
8407
    public String getUsername() {
8408
      return this.username;
8409
    }
8410
 
8411
    public deleteUser_args setUsername(String username) {
8412
      this.username = username;
8413
      return this;
8414
    }
8415
 
8416
    public void unsetUsername() {
8417
      this.username = null;
8418
    }
8419
 
8420
    /** Returns true if field username is set (has been asigned a value) and false otherwise */
8421
    public boolean isSetUsername() {
8422
      return this.username != null;
8423
    }
8424
 
8425
    public void setUsernameIsSet(boolean value) {
8426
      if (!value) {
8427
        this.username = null;
8428
      }
8429
    }
8430
 
8431
    public void setFieldValue(_Fields field, Object value) {
8432
      switch (field) {
8433
      case USERNAME:
8434
        if (value == null) {
8435
          unsetUsername();
8436
        } else {
8437
          setUsername((String)value);
8438
        }
8439
        break;
8440
 
8441
      }
8442
    }
8443
 
8444
    public void setFieldValue(int fieldID, Object value) {
8445
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8446
    }
8447
 
8448
    public Object getFieldValue(_Fields field) {
8449
      switch (field) {
8450
      case USERNAME:
8451
        return getUsername();
8452
 
8453
      }
8454
      throw new IllegalStateException();
8455
    }
8456
 
8457
    public Object getFieldValue(int fieldId) {
8458
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8459
    }
8460
 
8461
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8462
    public boolean isSet(_Fields field) {
8463
      switch (field) {
8464
      case USERNAME:
8465
        return isSetUsername();
8466
      }
8467
      throw new IllegalStateException();
8468
    }
8469
 
8470
    public boolean isSet(int fieldID) {
8471
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8472
    }
8473
 
8474
    @Override
8475
    public boolean equals(Object that) {
8476
      if (that == null)
8477
        return false;
8478
      if (that instanceof deleteUser_args)
8479
        return this.equals((deleteUser_args)that);
8480
      return false;
8481
    }
8482
 
8483
    public boolean equals(deleteUser_args that) {
8484
      if (that == null)
8485
        return false;
8486
 
8487
      boolean this_present_username = true && this.isSetUsername();
8488
      boolean that_present_username = true && that.isSetUsername();
8489
      if (this_present_username || that_present_username) {
8490
        if (!(this_present_username && that_present_username))
8491
          return false;
8492
        if (!this.username.equals(that.username))
8493
          return false;
8494
      }
8495
 
8496
      return true;
8497
    }
8498
 
8499
    @Override
8500
    public int hashCode() {
8501
      return 0;
8502
    }
8503
 
8504
    public int compareTo(deleteUser_args other) {
8505
      if (!getClass().equals(other.getClass())) {
8506
        return getClass().getName().compareTo(other.getClass().getName());
8507
      }
8508
 
8509
      int lastComparison = 0;
8510
      deleteUser_args typedOther = (deleteUser_args)other;
8511
 
8512
      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(isSetUsername());
8513
      if (lastComparison != 0) {
8514
        return lastComparison;
8515
      }
8516
      lastComparison = TBaseHelper.compareTo(username, typedOther.username);
8517
      if (lastComparison != 0) {
8518
        return lastComparison;
8519
      }
8520
      return 0;
8521
    }
8522
 
8523
    public void read(TProtocol iprot) throws TException {
8524
      TField field;
8525
      iprot.readStructBegin();
8526
      while (true)
8527
      {
8528
        field = iprot.readFieldBegin();
8529
        if (field.type == TType.STOP) { 
8530
          break;
8531
        }
8532
        _Fields fieldId = _Fields.findByThriftId(field.id);
8533
        if (fieldId == null) {
8534
          TProtocolUtil.skip(iprot, field.type);
8535
        } else {
8536
          switch (fieldId) {
8537
            case USERNAME:
8538
              if (field.type == TType.STRING) {
8539
                this.username = iprot.readString();
8540
              } else { 
8541
                TProtocolUtil.skip(iprot, field.type);
8542
              }
8543
              break;
8544
          }
8545
          iprot.readFieldEnd();
8546
        }
8547
      }
8548
      iprot.readStructEnd();
8549
      validate();
8550
    }
8551
 
8552
    public void write(TProtocol oprot) throws TException {
8553
      validate();
8554
 
8555
      oprot.writeStructBegin(STRUCT_DESC);
8556
      if (this.username != null) {
8557
        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
8558
        oprot.writeString(this.username);
8559
        oprot.writeFieldEnd();
8560
      }
8561
      oprot.writeFieldStop();
8562
      oprot.writeStructEnd();
8563
    }
8564
 
8565
    @Override
8566
    public String toString() {
8567
      StringBuilder sb = new StringBuilder("deleteUser_args(");
8568
      boolean first = true;
8569
 
8570
      sb.append("username:");
8571
      if (this.username == null) {
8572
        sb.append("null");
8573
      } else {
8574
        sb.append(this.username);
8575
      }
8576
      first = false;
8577
      sb.append(")");
8578
      return sb.toString();
8579
    }
8580
 
8581
    public void validate() throws TException {
8582
      // check for required fields
8583
    }
8584
 
8585
  }
8586
 
8587
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
8588
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
8589
 
8590
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8591
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
8592
 
8593
    private boolean success;
8594
    private HelperServiceException se;
8595
 
8596
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8597
    public enum _Fields implements TFieldIdEnum {
8598
      SUCCESS((short)0, "success"),
8599
      SE((short)1, "se");
8600
 
8601
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8602
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8603
 
8604
      static {
8605
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8606
          byId.put((int)field._thriftId, field);
8607
          byName.put(field.getFieldName(), field);
8608
        }
8609
      }
8610
 
8611
      /**
8612
       * Find the _Fields constant that matches fieldId, or null if its not found.
8613
       */
8614
      public static _Fields findByThriftId(int fieldId) {
8615
        return byId.get(fieldId);
8616
      }
8617
 
8618
      /**
8619
       * Find the _Fields constant that matches fieldId, throwing an exception
8620
       * if it is not found.
8621
       */
8622
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8623
        _Fields fields = findByThriftId(fieldId);
8624
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8625
        return fields;
8626
      }
8627
 
8628
      /**
8629
       * Find the _Fields constant that matches name, or null if its not found.
8630
       */
8631
      public static _Fields findByName(String name) {
8632
        return byName.get(name);
8633
      }
8634
 
8635
      private final short _thriftId;
8636
      private final String _fieldName;
8637
 
8638
      _Fields(short thriftId, String fieldName) {
8639
        _thriftId = thriftId;
8640
        _fieldName = fieldName;
8641
      }
8642
 
8643
      public short getThriftFieldId() {
8644
        return _thriftId;
8645
      }
8646
 
8647
      public String getFieldName() {
8648
        return _fieldName;
8649
      }
8650
    }
8651
 
8652
    // isset id assignments
8653
    private static final int __SUCCESS_ISSET_ID = 0;
8654
    private BitSet __isset_bit_vector = new BitSet(1);
8655
 
8656
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8657
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8658
          new FieldValueMetaData(TType.BOOL)));
8659
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
8660
          new FieldValueMetaData(TType.STRUCT)));
8661
    }});
8662
 
8663
    static {
8664
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
8665
    }
8666
 
8667
    public deleteUser_result() {
8668
    }
8669
 
8670
    public deleteUser_result(
8671
      boolean success,
8672
      HelperServiceException se)
8673
    {
8674
      this();
8675
      this.success = success;
8676
      setSuccessIsSet(true);
8677
      this.se = se;
8678
    }
8679
 
8680
    /**
8681
     * Performs a deep copy on <i>other</i>.
8682
     */
8683
    public deleteUser_result(deleteUser_result other) {
8684
      __isset_bit_vector.clear();
8685
      __isset_bit_vector.or(other.__isset_bit_vector);
8686
      this.success = other.success;
8687
      if (other.isSetSe()) {
8688
        this.se = new HelperServiceException(other.se);
8689
      }
8690
    }
8691
 
8692
    public deleteUser_result deepCopy() {
8693
      return new deleteUser_result(this);
8694
    }
8695
 
8696
    @Deprecated
8697
    public deleteUser_result clone() {
8698
      return new deleteUser_result(this);
8699
    }
8700
 
8701
    public boolean isSuccess() {
8702
      return this.success;
8703
    }
8704
 
8705
    public deleteUser_result setSuccess(boolean success) {
8706
      this.success = success;
8707
      setSuccessIsSet(true);
8708
      return this;
8709
    }
8710
 
8711
    public void unsetSuccess() {
8712
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8713
    }
8714
 
8715
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8716
    public boolean isSetSuccess() {
8717
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8718
    }
8719
 
8720
    public void setSuccessIsSet(boolean value) {
8721
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8722
    }
8723
 
8724
    public HelperServiceException getSe() {
8725
      return this.se;
8726
    }
8727
 
8728
    public deleteUser_result setSe(HelperServiceException se) {
8729
      this.se = se;
8730
      return this;
8731
    }
8732
 
8733
    public void unsetSe() {
8734
      this.se = null;
8735
    }
8736
 
8737
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
8738
    public boolean isSetSe() {
8739
      return this.se != null;
8740
    }
8741
 
8742
    public void setSeIsSet(boolean value) {
8743
      if (!value) {
8744
        this.se = null;
8745
      }
8746
    }
8747
 
8748
    public void setFieldValue(_Fields field, Object value) {
8749
      switch (field) {
8750
      case SUCCESS:
8751
        if (value == null) {
8752
          unsetSuccess();
8753
        } else {
8754
          setSuccess((Boolean)value);
8755
        }
8756
        break;
8757
 
8758
      case SE:
8759
        if (value == null) {
8760
          unsetSe();
8761
        } else {
8762
          setSe((HelperServiceException)value);
8763
        }
8764
        break;
8765
 
8766
      }
8767
    }
8768
 
8769
    public void setFieldValue(int fieldID, Object value) {
8770
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8771
    }
8772
 
8773
    public Object getFieldValue(_Fields field) {
8774
      switch (field) {
8775
      case SUCCESS:
8776
        return new Boolean(isSuccess());
8777
 
8778
      case SE:
8779
        return getSe();
8780
 
8781
      }
8782
      throw new IllegalStateException();
8783
    }
8784
 
8785
    public Object getFieldValue(int fieldId) {
8786
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8787
    }
8788
 
8789
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8790
    public boolean isSet(_Fields field) {
8791
      switch (field) {
8792
      case SUCCESS:
8793
        return isSetSuccess();
8794
      case SE:
8795
        return isSetSe();
8796
      }
8797
      throw new IllegalStateException();
8798
    }
8799
 
8800
    public boolean isSet(int fieldID) {
8801
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8802
    }
8803
 
8804
    @Override
8805
    public boolean equals(Object that) {
8806
      if (that == null)
8807
        return false;
8808
      if (that instanceof deleteUser_result)
8809
        return this.equals((deleteUser_result)that);
8810
      return false;
8811
    }
8812
 
8813
    public boolean equals(deleteUser_result that) {
8814
      if (that == null)
8815
        return false;
8816
 
8817
      boolean this_present_success = true;
8818
      boolean that_present_success = true;
8819
      if (this_present_success || that_present_success) {
8820
        if (!(this_present_success && that_present_success))
8821
          return false;
8822
        if (this.success != that.success)
8823
          return false;
8824
      }
8825
 
8826
      boolean this_present_se = true && this.isSetSe();
8827
      boolean that_present_se = true && that.isSetSe();
8828
      if (this_present_se || that_present_se) {
8829
        if (!(this_present_se && that_present_se))
8830
          return false;
8831
        if (!this.se.equals(that.se))
8832
          return false;
8833
      }
8834
 
8835
      return true;
8836
    }
8837
 
8838
    @Override
8839
    public int hashCode() {
8840
      return 0;
8841
    }
8842
 
8843
    public int compareTo(deleteUser_result other) {
8844
      if (!getClass().equals(other.getClass())) {
8845
        return getClass().getName().compareTo(other.getClass().getName());
8846
      }
8847
 
8848
      int lastComparison = 0;
8849
      deleteUser_result typedOther = (deleteUser_result)other;
8850
 
8851
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8852
      if (lastComparison != 0) {
8853
        return lastComparison;
8854
      }
8855
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8856
      if (lastComparison != 0) {
8857
        return lastComparison;
8858
      }
8859
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
8860
      if (lastComparison != 0) {
8861
        return lastComparison;
8862
      }
8863
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
8864
      if (lastComparison != 0) {
8865
        return lastComparison;
8866
      }
8867
      return 0;
8868
    }
8869
 
8870
    public void read(TProtocol iprot) throws TException {
8871
      TField field;
8872
      iprot.readStructBegin();
8873
      while (true)
8874
      {
8875
        field = iprot.readFieldBegin();
8876
        if (field.type == TType.STOP) { 
8877
          break;
8878
        }
8879
        _Fields fieldId = _Fields.findByThriftId(field.id);
8880
        if (fieldId == null) {
8881
          TProtocolUtil.skip(iprot, field.type);
8882
        } else {
8883
          switch (fieldId) {
8884
            case SUCCESS:
8885
              if (field.type == TType.BOOL) {
8886
                this.success = iprot.readBool();
8887
                setSuccessIsSet(true);
8888
              } else { 
8889
                TProtocolUtil.skip(iprot, field.type);
8890
              }
8891
              break;
8892
            case SE:
8893
              if (field.type == TType.STRUCT) {
8894
                this.se = new HelperServiceException();
8895
                this.se.read(iprot);
8896
              } else { 
8897
                TProtocolUtil.skip(iprot, field.type);
8898
              }
8899
              break;
8900
          }
8901
          iprot.readFieldEnd();
8902
        }
8903
      }
8904
      iprot.readStructEnd();
8905
      validate();
8906
    }
8907
 
8908
    public void write(TProtocol oprot) throws TException {
8909
      oprot.writeStructBegin(STRUCT_DESC);
8910
 
8911
      if (this.isSetSuccess()) {
8912
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8913
        oprot.writeBool(this.success);
8914
        oprot.writeFieldEnd();
8915
      } else if (this.isSetSe()) {
8916
        oprot.writeFieldBegin(SE_FIELD_DESC);
8917
        this.se.write(oprot);
8918
        oprot.writeFieldEnd();
8919
      }
8920
      oprot.writeFieldStop();
8921
      oprot.writeStructEnd();
8922
    }
8923
 
8924
    @Override
8925
    public String toString() {
8926
      StringBuilder sb = new StringBuilder("deleteUser_result(");
8927
      boolean first = true;
8928
 
8929
      sb.append("success:");
8930
      sb.append(this.success);
8931
      first = false;
8932
      if (!first) sb.append(", ");
8933
      sb.append("se:");
8934
      if (this.se == null) {
8935
        sb.append("null");
8936
      } else {
8937
        sb.append(this.se);
8938
      }
8939
      first = false;
8940
      sb.append(")");
8941
      return sb.toString();
8942
    }
8943
 
8944
    public void validate() throws TException {
8945
      // check for required fields
8946
    }
8947
 
8948
  }
8949
 
8950
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
8951
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
8952
 
8953
    private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
8954
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
8955
 
8956
    private String username;
8957
    private String password;
8958
 
8959
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8960
    public enum _Fields implements TFieldIdEnum {
8961
      USERNAME((short)1, "username"),
8962
      PASSWORD((short)2, "password");
8963
 
8964
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8965
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8966
 
8967
      static {
8968
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8969
          byId.put((int)field._thriftId, field);
8970
          byName.put(field.getFieldName(), field);
8971
        }
8972
      }
8973
 
8974
      /**
8975
       * Find the _Fields constant that matches fieldId, or null if its not found.
8976
       */
8977
      public static _Fields findByThriftId(int fieldId) {
8978
        return byId.get(fieldId);
8979
      }
8980
 
8981
      /**
8982
       * Find the _Fields constant that matches fieldId, throwing an exception
8983
       * if it is not found.
8984
       */
8985
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8986
        _Fields fields = findByThriftId(fieldId);
8987
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8988
        return fields;
8989
      }
8990
 
8991
      /**
8992
       * Find the _Fields constant that matches name, or null if its not found.
8993
       */
8994
      public static _Fields findByName(String name) {
8995
        return byName.get(name);
8996
      }
8997
 
8998
      private final short _thriftId;
8999
      private final String _fieldName;
9000
 
9001
      _Fields(short thriftId, String fieldName) {
9002
        _thriftId = thriftId;
9003
        _fieldName = fieldName;
9004
      }
9005
 
9006
      public short getThriftFieldId() {
9007
        return _thriftId;
9008
      }
9009
 
9010
      public String getFieldName() {
9011
        return _fieldName;
9012
      }
9013
    }
9014
 
9015
    // isset id assignments
9016
 
9017
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9018
      put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
9019
          new FieldValueMetaData(TType.STRING)));
9020
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
9021
          new FieldValueMetaData(TType.STRING)));
9022
    }});
9023
 
9024
    static {
9025
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
9026
    }
9027
 
9028
    public authenticateUser_args() {
9029
    }
9030
 
9031
    public authenticateUser_args(
9032
      String username,
9033
      String password)
9034
    {
9035
      this();
9036
      this.username = username;
9037
      this.password = password;
9038
    }
9039
 
9040
    /**
9041
     * Performs a deep copy on <i>other</i>.
9042
     */
9043
    public authenticateUser_args(authenticateUser_args other) {
9044
      if (other.isSetUsername()) {
9045
        this.username = other.username;
9046
      }
9047
      if (other.isSetPassword()) {
9048
        this.password = other.password;
9049
      }
9050
    }
9051
 
9052
    public authenticateUser_args deepCopy() {
9053
      return new authenticateUser_args(this);
9054
    }
9055
 
9056
    @Deprecated
9057
    public authenticateUser_args clone() {
9058
      return new authenticateUser_args(this);
9059
    }
9060
 
9061
    public String getUsername() {
9062
      return this.username;
9063
    }
9064
 
9065
    public authenticateUser_args setUsername(String username) {
9066
      this.username = username;
9067
      return this;
9068
    }
9069
 
9070
    public void unsetUsername() {
9071
      this.username = null;
9072
    }
9073
 
9074
    /** Returns true if field username is set (has been asigned a value) and false otherwise */
9075
    public boolean isSetUsername() {
9076
      return this.username != null;
9077
    }
9078
 
9079
    public void setUsernameIsSet(boolean value) {
9080
      if (!value) {
9081
        this.username = null;
9082
      }
9083
    }
9084
 
9085
    public String getPassword() {
9086
      return this.password;
9087
    }
9088
 
9089
    public authenticateUser_args setPassword(String password) {
9090
      this.password = password;
9091
      return this;
9092
    }
9093
 
9094
    public void unsetPassword() {
9095
      this.password = null;
9096
    }
9097
 
9098
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
9099
    public boolean isSetPassword() {
9100
      return this.password != null;
9101
    }
9102
 
9103
    public void setPasswordIsSet(boolean value) {
9104
      if (!value) {
9105
        this.password = null;
9106
      }
9107
    }
9108
 
9109
    public void setFieldValue(_Fields field, Object value) {
9110
      switch (field) {
9111
      case USERNAME:
9112
        if (value == null) {
9113
          unsetUsername();
9114
        } else {
9115
          setUsername((String)value);
9116
        }
9117
        break;
9118
 
9119
      case PASSWORD:
9120
        if (value == null) {
9121
          unsetPassword();
9122
        } else {
9123
          setPassword((String)value);
9124
        }
9125
        break;
9126
 
9127
      }
9128
    }
9129
 
9130
    public void setFieldValue(int fieldID, Object value) {
9131
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9132
    }
9133
 
9134
    public Object getFieldValue(_Fields field) {
9135
      switch (field) {
9136
      case USERNAME:
9137
        return getUsername();
9138
 
9139
      case PASSWORD:
9140
        return getPassword();
9141
 
9142
      }
9143
      throw new IllegalStateException();
9144
    }
9145
 
9146
    public Object getFieldValue(int fieldId) {
9147
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9148
    }
9149
 
9150
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9151
    public boolean isSet(_Fields field) {
9152
      switch (field) {
9153
      case USERNAME:
9154
        return isSetUsername();
9155
      case PASSWORD:
9156
        return isSetPassword();
9157
      }
9158
      throw new IllegalStateException();
9159
    }
9160
 
9161
    public boolean isSet(int fieldID) {
9162
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9163
    }
9164
 
9165
    @Override
9166
    public boolean equals(Object that) {
9167
      if (that == null)
9168
        return false;
9169
      if (that instanceof authenticateUser_args)
9170
        return this.equals((authenticateUser_args)that);
9171
      return false;
9172
    }
9173
 
9174
    public boolean equals(authenticateUser_args that) {
9175
      if (that == null)
9176
        return false;
9177
 
9178
      boolean this_present_username = true && this.isSetUsername();
9179
      boolean that_present_username = true && that.isSetUsername();
9180
      if (this_present_username || that_present_username) {
9181
        if (!(this_present_username && that_present_username))
9182
          return false;
9183
        if (!this.username.equals(that.username))
9184
          return false;
9185
      }
9186
 
9187
      boolean this_present_password = true && this.isSetPassword();
9188
      boolean that_present_password = true && that.isSetPassword();
9189
      if (this_present_password || that_present_password) {
9190
        if (!(this_present_password && that_present_password))
9191
          return false;
9192
        if (!this.password.equals(that.password))
9193
          return false;
9194
      }
9195
 
9196
      return true;
9197
    }
9198
 
9199
    @Override
9200
    public int hashCode() {
9201
      return 0;
9202
    }
9203
 
9204
    public int compareTo(authenticateUser_args other) {
9205
      if (!getClass().equals(other.getClass())) {
9206
        return getClass().getName().compareTo(other.getClass().getName());
9207
      }
9208
 
9209
      int lastComparison = 0;
9210
      authenticateUser_args typedOther = (authenticateUser_args)other;
9211
 
9212
      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(isSetUsername());
9213
      if (lastComparison != 0) {
9214
        return lastComparison;
9215
      }
9216
      lastComparison = TBaseHelper.compareTo(username, typedOther.username);
9217
      if (lastComparison != 0) {
9218
        return lastComparison;
9219
      }
9220
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
9221
      if (lastComparison != 0) {
9222
        return lastComparison;
9223
      }
9224
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
9225
      if (lastComparison != 0) {
9226
        return lastComparison;
9227
      }
9228
      return 0;
9229
    }
9230
 
9231
    public void read(TProtocol iprot) throws TException {
9232
      TField field;
9233
      iprot.readStructBegin();
9234
      while (true)
9235
      {
9236
        field = iprot.readFieldBegin();
9237
        if (field.type == TType.STOP) { 
9238
          break;
9239
        }
9240
        _Fields fieldId = _Fields.findByThriftId(field.id);
9241
        if (fieldId == null) {
9242
          TProtocolUtil.skip(iprot, field.type);
9243
        } else {
9244
          switch (fieldId) {
9245
            case USERNAME:
9246
              if (field.type == TType.STRING) {
9247
                this.username = iprot.readString();
9248
              } else { 
9249
                TProtocolUtil.skip(iprot, field.type);
9250
              }
9251
              break;
9252
            case PASSWORD:
9253
              if (field.type == TType.STRING) {
9254
                this.password = iprot.readString();
9255
              } else { 
9256
                TProtocolUtil.skip(iprot, field.type);
9257
              }
9258
              break;
9259
          }
9260
          iprot.readFieldEnd();
9261
        }
9262
      }
9263
      iprot.readStructEnd();
9264
      validate();
9265
    }
9266
 
9267
    public void write(TProtocol oprot) throws TException {
9268
      validate();
9269
 
9270
      oprot.writeStructBegin(STRUCT_DESC);
9271
      if (this.username != null) {
9272
        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
9273
        oprot.writeString(this.username);
9274
        oprot.writeFieldEnd();
9275
      }
9276
      if (this.password != null) {
9277
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
9278
        oprot.writeString(this.password);
9279
        oprot.writeFieldEnd();
9280
      }
9281
      oprot.writeFieldStop();
9282
      oprot.writeStructEnd();
9283
    }
9284
 
9285
    @Override
9286
    public String toString() {
9287
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
9288
      boolean first = true;
9289
 
9290
      sb.append("username:");
9291
      if (this.username == null) {
9292
        sb.append("null");
9293
      } else {
9294
        sb.append(this.username);
9295
      }
9296
      first = false;
9297
      if (!first) sb.append(", ");
9298
      sb.append("password:");
9299
      if (this.password == null) {
9300
        sb.append("null");
9301
      } else {
9302
        sb.append(this.password);
9303
      }
9304
      first = false;
9305
      sb.append(")");
9306
      return sb.toString();
9307
    }
9308
 
9309
    public void validate() throws TException {
9310
      // check for required fields
9311
    }
9312
 
9313
  }
9314
 
9315
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
9316
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
9317
 
9318
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
9319
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
9320
 
9321
    private long success;
9322
    private HelperServiceException se;
9323
 
9324
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9325
    public enum _Fields implements TFieldIdEnum {
9326
      SUCCESS((short)0, "success"),
9327
      SE((short)1, "se");
9328
 
9329
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9330
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9331
 
9332
      static {
9333
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9334
          byId.put((int)field._thriftId, field);
9335
          byName.put(field.getFieldName(), field);
9336
        }
9337
      }
9338
 
9339
      /**
9340
       * Find the _Fields constant that matches fieldId, or null if its not found.
9341
       */
9342
      public static _Fields findByThriftId(int fieldId) {
9343
        return byId.get(fieldId);
9344
      }
9345
 
9346
      /**
9347
       * Find the _Fields constant that matches fieldId, throwing an exception
9348
       * if it is not found.
9349
       */
9350
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9351
        _Fields fields = findByThriftId(fieldId);
9352
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9353
        return fields;
9354
      }
9355
 
9356
      /**
9357
       * Find the _Fields constant that matches name, or null if its not found.
9358
       */
9359
      public static _Fields findByName(String name) {
9360
        return byName.get(name);
9361
      }
9362
 
9363
      private final short _thriftId;
9364
      private final String _fieldName;
9365
 
9366
      _Fields(short thriftId, String fieldName) {
9367
        _thriftId = thriftId;
9368
        _fieldName = fieldName;
9369
      }
9370
 
9371
      public short getThriftFieldId() {
9372
        return _thriftId;
9373
      }
9374
 
9375
      public String getFieldName() {
9376
        return _fieldName;
9377
      }
9378
    }
9379
 
9380
    // isset id assignments
9381
    private static final int __SUCCESS_ISSET_ID = 0;
9382
    private BitSet __isset_bit_vector = new BitSet(1);
9383
 
9384
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9385
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9386
          new FieldValueMetaData(TType.I64)));
9387
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
9388
          new FieldValueMetaData(TType.STRUCT)));
9389
    }});
9390
 
9391
    static {
9392
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
9393
    }
9394
 
9395
    public authenticateUser_result() {
9396
    }
9397
 
9398
    public authenticateUser_result(
9399
      long success,
9400
      HelperServiceException se)
9401
    {
9402
      this();
9403
      this.success = success;
9404
      setSuccessIsSet(true);
9405
      this.se = se;
9406
    }
9407
 
9408
    /**
9409
     * Performs a deep copy on <i>other</i>.
9410
     */
9411
    public authenticateUser_result(authenticateUser_result other) {
9412
      __isset_bit_vector.clear();
9413
      __isset_bit_vector.or(other.__isset_bit_vector);
9414
      this.success = other.success;
9415
      if (other.isSetSe()) {
9416
        this.se = new HelperServiceException(other.se);
9417
      }
9418
    }
9419
 
9420
    public authenticateUser_result deepCopy() {
9421
      return new authenticateUser_result(this);
9422
    }
9423
 
9424
    @Deprecated
9425
    public authenticateUser_result clone() {
9426
      return new authenticateUser_result(this);
9427
    }
9428
 
9429
    public long getSuccess() {
9430
      return this.success;
9431
    }
9432
 
9433
    public authenticateUser_result setSuccess(long success) {
9434
      this.success = success;
9435
      setSuccessIsSet(true);
9436
      return this;
9437
    }
9438
 
9439
    public void unsetSuccess() {
9440
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9441
    }
9442
 
9443
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9444
    public boolean isSetSuccess() {
9445
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9446
    }
9447
 
9448
    public void setSuccessIsSet(boolean value) {
9449
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9450
    }
9451
 
9452
    public HelperServiceException getSe() {
9453
      return this.se;
9454
    }
9455
 
9456
    public authenticateUser_result setSe(HelperServiceException se) {
9457
      this.se = se;
9458
      return this;
9459
    }
9460
 
9461
    public void unsetSe() {
9462
      this.se = null;
9463
    }
9464
 
9465
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
9466
    public boolean isSetSe() {
9467
      return this.se != null;
9468
    }
9469
 
9470
    public void setSeIsSet(boolean value) {
9471
      if (!value) {
9472
        this.se = null;
9473
      }
9474
    }
9475
 
9476
    public void setFieldValue(_Fields field, Object value) {
9477
      switch (field) {
9478
      case SUCCESS:
9479
        if (value == null) {
9480
          unsetSuccess();
9481
        } else {
9482
          setSuccess((Long)value);
9483
        }
9484
        break;
9485
 
9486
      case SE:
9487
        if (value == null) {
9488
          unsetSe();
9489
        } else {
9490
          setSe((HelperServiceException)value);
9491
        }
9492
        break;
9493
 
9494
      }
9495
    }
9496
 
9497
    public void setFieldValue(int fieldID, Object value) {
9498
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9499
    }
9500
 
9501
    public Object getFieldValue(_Fields field) {
9502
      switch (field) {
9503
      case SUCCESS:
9504
        return new Long(getSuccess());
9505
 
9506
      case SE:
9507
        return getSe();
9508
 
9509
      }
9510
      throw new IllegalStateException();
9511
    }
9512
 
9513
    public Object getFieldValue(int fieldId) {
9514
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9515
    }
9516
 
9517
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9518
    public boolean isSet(_Fields field) {
9519
      switch (field) {
9520
      case SUCCESS:
9521
        return isSetSuccess();
9522
      case SE:
9523
        return isSetSe();
9524
      }
9525
      throw new IllegalStateException();
9526
    }
9527
 
9528
    public boolean isSet(int fieldID) {
9529
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9530
    }
9531
 
9532
    @Override
9533
    public boolean equals(Object that) {
9534
      if (that == null)
9535
        return false;
9536
      if (that instanceof authenticateUser_result)
9537
        return this.equals((authenticateUser_result)that);
9538
      return false;
9539
    }
9540
 
9541
    public boolean equals(authenticateUser_result that) {
9542
      if (that == null)
9543
        return false;
9544
 
9545
      boolean this_present_success = true;
9546
      boolean that_present_success = true;
9547
      if (this_present_success || that_present_success) {
9548
        if (!(this_present_success && that_present_success))
9549
          return false;
9550
        if (this.success != that.success)
9551
          return false;
9552
      }
9553
 
9554
      boolean this_present_se = true && this.isSetSe();
9555
      boolean that_present_se = true && that.isSetSe();
9556
      if (this_present_se || that_present_se) {
9557
        if (!(this_present_se && that_present_se))
9558
          return false;
9559
        if (!this.se.equals(that.se))
9560
          return false;
9561
      }
9562
 
9563
      return true;
9564
    }
9565
 
9566
    @Override
9567
    public int hashCode() {
9568
      return 0;
9569
    }
9570
 
9571
    public int compareTo(authenticateUser_result other) {
9572
      if (!getClass().equals(other.getClass())) {
9573
        return getClass().getName().compareTo(other.getClass().getName());
9574
      }
9575
 
9576
      int lastComparison = 0;
9577
      authenticateUser_result typedOther = (authenticateUser_result)other;
9578
 
9579
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9580
      if (lastComparison != 0) {
9581
        return lastComparison;
9582
      }
9583
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9584
      if (lastComparison != 0) {
9585
        return lastComparison;
9586
      }
9587
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
9588
      if (lastComparison != 0) {
9589
        return lastComparison;
9590
      }
9591
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
9592
      if (lastComparison != 0) {
9593
        return lastComparison;
9594
      }
9595
      return 0;
9596
    }
9597
 
9598
    public void read(TProtocol iprot) throws TException {
9599
      TField field;
9600
      iprot.readStructBegin();
9601
      while (true)
9602
      {
9603
        field = iprot.readFieldBegin();
9604
        if (field.type == TType.STOP) { 
9605
          break;
9606
        }
9607
        _Fields fieldId = _Fields.findByThriftId(field.id);
9608
        if (fieldId == null) {
9609
          TProtocolUtil.skip(iprot, field.type);
9610
        } else {
9611
          switch (fieldId) {
9612
            case SUCCESS:
9613
              if (field.type == TType.I64) {
9614
                this.success = iprot.readI64();
9615
                setSuccessIsSet(true);
9616
              } else { 
9617
                TProtocolUtil.skip(iprot, field.type);
9618
              }
9619
              break;
9620
            case SE:
9621
              if (field.type == TType.STRUCT) {
9622
                this.se = new HelperServiceException();
9623
                this.se.read(iprot);
9624
              } else { 
9625
                TProtocolUtil.skip(iprot, field.type);
9626
              }
9627
              break;
9628
          }
9629
          iprot.readFieldEnd();
9630
        }
9631
      }
9632
      iprot.readStructEnd();
9633
      validate();
9634
    }
9635
 
9636
    public void write(TProtocol oprot) throws TException {
9637
      oprot.writeStructBegin(STRUCT_DESC);
9638
 
9639
      if (this.isSetSuccess()) {
9640
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9641
        oprot.writeI64(this.success);
9642
        oprot.writeFieldEnd();
9643
      } else if (this.isSetSe()) {
9644
        oprot.writeFieldBegin(SE_FIELD_DESC);
9645
        this.se.write(oprot);
9646
        oprot.writeFieldEnd();
9647
      }
9648
      oprot.writeFieldStop();
9649
      oprot.writeStructEnd();
9650
    }
9651
 
9652
    @Override
9653
    public String toString() {
9654
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
9655
      boolean first = true;
9656
 
9657
      sb.append("success:");
9658
      sb.append(this.success);
9659
      first = false;
9660
      if (!first) sb.append(", ");
9661
      sb.append("se:");
9662
      if (this.se == null) {
9663
        sb.append("null");
9664
      } else {
9665
        sb.append(this.se);
9666
      }
9667
      first = false;
9668
      sb.append(")");
9669
      return sb.toString();
9670
    }
9671
 
9672
    public void validate() throws TException {
9673
      // check for required fields
9674
    }
9675
 
9676
  }
9677
 
9678
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
9679
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
9680
 
9681
    private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
9682
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
9683
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
9684
 
9685
    private String username;
9686
    private String oldPassword;
9687
    private String newPassword;
9688
 
9689
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9690
    public enum _Fields implements TFieldIdEnum {
9691
      USERNAME((short)1, "username"),
9692
      OLD_PASSWORD((short)2, "oldPassword"),
9693
      NEW_PASSWORD((short)3, "newPassword");
9694
 
9695
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9696
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9697
 
9698
      static {
9699
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9700
          byId.put((int)field._thriftId, field);
9701
          byName.put(field.getFieldName(), field);
9702
        }
9703
      }
9704
 
9705
      /**
9706
       * Find the _Fields constant that matches fieldId, or null if its not found.
9707
       */
9708
      public static _Fields findByThriftId(int fieldId) {
9709
        return byId.get(fieldId);
9710
      }
9711
 
9712
      /**
9713
       * Find the _Fields constant that matches fieldId, throwing an exception
9714
       * if it is not found.
9715
       */
9716
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9717
        _Fields fields = findByThriftId(fieldId);
9718
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9719
        return fields;
9720
      }
9721
 
9722
      /**
9723
       * Find the _Fields constant that matches name, or null if its not found.
9724
       */
9725
      public static _Fields findByName(String name) {
9726
        return byName.get(name);
9727
      }
9728
 
9729
      private final short _thriftId;
9730
      private final String _fieldName;
9731
 
9732
      _Fields(short thriftId, String fieldName) {
9733
        _thriftId = thriftId;
9734
        _fieldName = fieldName;
9735
      }
9736
 
9737
      public short getThriftFieldId() {
9738
        return _thriftId;
9739
      }
9740
 
9741
      public String getFieldName() {
9742
        return _fieldName;
9743
      }
9744
    }
9745
 
9746
    // isset id assignments
9747
 
9748
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9749
      put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
9750
          new FieldValueMetaData(TType.STRING)));
9751
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
9752
          new FieldValueMetaData(TType.STRING)));
9753
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
9754
          new FieldValueMetaData(TType.STRING)));
9755
    }});
9756
 
9757
    static {
9758
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
9759
    }
9760
 
9761
    public updatePassword_args() {
9762
    }
9763
 
9764
    public updatePassword_args(
9765
      String username,
9766
      String oldPassword,
9767
      String newPassword)
9768
    {
9769
      this();
9770
      this.username = username;
9771
      this.oldPassword = oldPassword;
9772
      this.newPassword = newPassword;
9773
    }
9774
 
9775
    /**
9776
     * Performs a deep copy on <i>other</i>.
9777
     */
9778
    public updatePassword_args(updatePassword_args other) {
9779
      if (other.isSetUsername()) {
9780
        this.username = other.username;
9781
      }
9782
      if (other.isSetOldPassword()) {
9783
        this.oldPassword = other.oldPassword;
9784
      }
9785
      if (other.isSetNewPassword()) {
9786
        this.newPassword = other.newPassword;
9787
      }
9788
    }
9789
 
9790
    public updatePassword_args deepCopy() {
9791
      return new updatePassword_args(this);
9792
    }
9793
 
9794
    @Deprecated
9795
    public updatePassword_args clone() {
9796
      return new updatePassword_args(this);
9797
    }
9798
 
9799
    public String getUsername() {
9800
      return this.username;
9801
    }
9802
 
9803
    public updatePassword_args setUsername(String username) {
9804
      this.username = username;
9805
      return this;
9806
    }
9807
 
9808
    public void unsetUsername() {
9809
      this.username = null;
9810
    }
9811
 
9812
    /** Returns true if field username is set (has been asigned a value) and false otherwise */
9813
    public boolean isSetUsername() {
9814
      return this.username != null;
9815
    }
9816
 
9817
    public void setUsernameIsSet(boolean value) {
9818
      if (!value) {
9819
        this.username = null;
9820
      }
9821
    }
9822
 
9823
    public String getOldPassword() {
9824
      return this.oldPassword;
9825
    }
9826
 
9827
    public updatePassword_args setOldPassword(String oldPassword) {
9828
      this.oldPassword = oldPassword;
9829
      return this;
9830
    }
9831
 
9832
    public void unsetOldPassword() {
9833
      this.oldPassword = null;
9834
    }
9835
 
9836
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
9837
    public boolean isSetOldPassword() {
9838
      return this.oldPassword != null;
9839
    }
9840
 
9841
    public void setOldPasswordIsSet(boolean value) {
9842
      if (!value) {
9843
        this.oldPassword = null;
9844
      }
9845
    }
9846
 
9847
    public String getNewPassword() {
9848
      return this.newPassword;
9849
    }
9850
 
9851
    public updatePassword_args setNewPassword(String newPassword) {
9852
      this.newPassword = newPassword;
9853
      return this;
9854
    }
9855
 
9856
    public void unsetNewPassword() {
9857
      this.newPassword = null;
9858
    }
9859
 
9860
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
9861
    public boolean isSetNewPassword() {
9862
      return this.newPassword != null;
9863
    }
9864
 
9865
    public void setNewPasswordIsSet(boolean value) {
9866
      if (!value) {
9867
        this.newPassword = null;
9868
      }
9869
    }
9870
 
9871
    public void setFieldValue(_Fields field, Object value) {
9872
      switch (field) {
9873
      case USERNAME:
9874
        if (value == null) {
9875
          unsetUsername();
9876
        } else {
9877
          setUsername((String)value);
9878
        }
9879
        break;
9880
 
9881
      case OLD_PASSWORD:
9882
        if (value == null) {
9883
          unsetOldPassword();
9884
        } else {
9885
          setOldPassword((String)value);
9886
        }
9887
        break;
9888
 
9889
      case NEW_PASSWORD:
9890
        if (value == null) {
9891
          unsetNewPassword();
9892
        } else {
9893
          setNewPassword((String)value);
9894
        }
9895
        break;
9896
 
9897
      }
9898
    }
9899
 
9900
    public void setFieldValue(int fieldID, Object value) {
9901
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9902
    }
9903
 
9904
    public Object getFieldValue(_Fields field) {
9905
      switch (field) {
9906
      case USERNAME:
9907
        return getUsername();
9908
 
9909
      case OLD_PASSWORD:
9910
        return getOldPassword();
9911
 
9912
      case NEW_PASSWORD:
9913
        return getNewPassword();
9914
 
9915
      }
9916
      throw new IllegalStateException();
9917
    }
9918
 
9919
    public Object getFieldValue(int fieldId) {
9920
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9921
    }
9922
 
9923
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9924
    public boolean isSet(_Fields field) {
9925
      switch (field) {
9926
      case USERNAME:
9927
        return isSetUsername();
9928
      case OLD_PASSWORD:
9929
        return isSetOldPassword();
9930
      case NEW_PASSWORD:
9931
        return isSetNewPassword();
9932
      }
9933
      throw new IllegalStateException();
9934
    }
9935
 
9936
    public boolean isSet(int fieldID) {
9937
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9938
    }
9939
 
9940
    @Override
9941
    public boolean equals(Object that) {
9942
      if (that == null)
9943
        return false;
9944
      if (that instanceof updatePassword_args)
9945
        return this.equals((updatePassword_args)that);
9946
      return false;
9947
    }
9948
 
9949
    public boolean equals(updatePassword_args that) {
9950
      if (that == null)
9951
        return false;
9952
 
9953
      boolean this_present_username = true && this.isSetUsername();
9954
      boolean that_present_username = true && that.isSetUsername();
9955
      if (this_present_username || that_present_username) {
9956
        if (!(this_present_username && that_present_username))
9957
          return false;
9958
        if (!this.username.equals(that.username))
9959
          return false;
9960
      }
9961
 
9962
      boolean this_present_oldPassword = true && this.isSetOldPassword();
9963
      boolean that_present_oldPassword = true && that.isSetOldPassword();
9964
      if (this_present_oldPassword || that_present_oldPassword) {
9965
        if (!(this_present_oldPassword && that_present_oldPassword))
9966
          return false;
9967
        if (!this.oldPassword.equals(that.oldPassword))
9968
          return false;
9969
      }
9970
 
9971
      boolean this_present_newPassword = true && this.isSetNewPassword();
9972
      boolean that_present_newPassword = true && that.isSetNewPassword();
9973
      if (this_present_newPassword || that_present_newPassword) {
9974
        if (!(this_present_newPassword && that_present_newPassword))
9975
          return false;
9976
        if (!this.newPassword.equals(that.newPassword))
9977
          return false;
9978
      }
9979
 
9980
      return true;
9981
    }
9982
 
9983
    @Override
9984
    public int hashCode() {
9985
      return 0;
9986
    }
9987
 
9988
    public int compareTo(updatePassword_args other) {
9989
      if (!getClass().equals(other.getClass())) {
9990
        return getClass().getName().compareTo(other.getClass().getName());
9991
      }
9992
 
9993
      int lastComparison = 0;
9994
      updatePassword_args typedOther = (updatePassword_args)other;
9995
 
9996
      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(isSetUsername());
9997
      if (lastComparison != 0) {
9998
        return lastComparison;
9999
      }
10000
      lastComparison = TBaseHelper.compareTo(username, typedOther.username);
10001
      if (lastComparison != 0) {
10002
        return lastComparison;
10003
      }
10004
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
10005
      if (lastComparison != 0) {
10006
        return lastComparison;
10007
      }
10008
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
10009
      if (lastComparison != 0) {
10010
        return lastComparison;
10011
      }
10012
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
10013
      if (lastComparison != 0) {
10014
        return lastComparison;
10015
      }
10016
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
10017
      if (lastComparison != 0) {
10018
        return lastComparison;
10019
      }
10020
      return 0;
10021
    }
10022
 
10023
    public void read(TProtocol iprot) throws TException {
10024
      TField field;
10025
      iprot.readStructBegin();
10026
      while (true)
10027
      {
10028
        field = iprot.readFieldBegin();
10029
        if (field.type == TType.STOP) { 
10030
          break;
10031
        }
10032
        _Fields fieldId = _Fields.findByThriftId(field.id);
10033
        if (fieldId == null) {
10034
          TProtocolUtil.skip(iprot, field.type);
10035
        } else {
10036
          switch (fieldId) {
10037
            case USERNAME:
10038
              if (field.type == TType.STRING) {
10039
                this.username = iprot.readString();
10040
              } else { 
10041
                TProtocolUtil.skip(iprot, field.type);
10042
              }
10043
              break;
10044
            case OLD_PASSWORD:
10045
              if (field.type == TType.STRING) {
10046
                this.oldPassword = iprot.readString();
10047
              } else { 
10048
                TProtocolUtil.skip(iprot, field.type);
10049
              }
10050
              break;
10051
            case NEW_PASSWORD:
10052
              if (field.type == TType.STRING) {
10053
                this.newPassword = iprot.readString();
10054
              } else { 
10055
                TProtocolUtil.skip(iprot, field.type);
10056
              }
10057
              break;
10058
          }
10059
          iprot.readFieldEnd();
10060
        }
10061
      }
10062
      iprot.readStructEnd();
10063
      validate();
10064
    }
10065
 
10066
    public void write(TProtocol oprot) throws TException {
10067
      validate();
10068
 
10069
      oprot.writeStructBegin(STRUCT_DESC);
10070
      if (this.username != null) {
10071
        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
10072
        oprot.writeString(this.username);
10073
        oprot.writeFieldEnd();
10074
      }
10075
      if (this.oldPassword != null) {
10076
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
10077
        oprot.writeString(this.oldPassword);
10078
        oprot.writeFieldEnd();
10079
      }
10080
      if (this.newPassword != null) {
10081
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
10082
        oprot.writeString(this.newPassword);
10083
        oprot.writeFieldEnd();
10084
      }
10085
      oprot.writeFieldStop();
10086
      oprot.writeStructEnd();
10087
    }
10088
 
10089
    @Override
10090
    public String toString() {
10091
      StringBuilder sb = new StringBuilder("updatePassword_args(");
10092
      boolean first = true;
10093
 
10094
      sb.append("username:");
10095
      if (this.username == null) {
10096
        sb.append("null");
10097
      } else {
10098
        sb.append(this.username);
10099
      }
10100
      first = false;
10101
      if (!first) sb.append(", ");
10102
      sb.append("oldPassword:");
10103
      if (this.oldPassword == null) {
10104
        sb.append("null");
10105
      } else {
10106
        sb.append(this.oldPassword);
10107
      }
10108
      first = false;
10109
      if (!first) sb.append(", ");
10110
      sb.append("newPassword:");
10111
      if (this.newPassword == null) {
10112
        sb.append("null");
10113
      } else {
10114
        sb.append(this.newPassword);
10115
      }
10116
      first = false;
10117
      sb.append(")");
10118
      return sb.toString();
10119
    }
10120
 
10121
    public void validate() throws TException {
10122
      // check for required fields
10123
    }
10124
 
10125
  }
10126
 
10127
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
10128
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
10129
 
10130
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10131
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
10132
 
10133
    private boolean success;
10134
    private HelperServiceException se;
10135
 
10136
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10137
    public enum _Fields implements TFieldIdEnum {
10138
      SUCCESS((short)0, "success"),
10139
      SE((short)1, "se");
10140
 
10141
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10142
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10143
 
10144
      static {
10145
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10146
          byId.put((int)field._thriftId, field);
10147
          byName.put(field.getFieldName(), field);
10148
        }
10149
      }
10150
 
10151
      /**
10152
       * Find the _Fields constant that matches fieldId, or null if its not found.
10153
       */
10154
      public static _Fields findByThriftId(int fieldId) {
10155
        return byId.get(fieldId);
10156
      }
10157
 
10158
      /**
10159
       * Find the _Fields constant that matches fieldId, throwing an exception
10160
       * if it is not found.
10161
       */
10162
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10163
        _Fields fields = findByThriftId(fieldId);
10164
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10165
        return fields;
10166
      }
10167
 
10168
      /**
10169
       * Find the _Fields constant that matches name, or null if its not found.
10170
       */
10171
      public static _Fields findByName(String name) {
10172
        return byName.get(name);
10173
      }
10174
 
10175
      private final short _thriftId;
10176
      private final String _fieldName;
10177
 
10178
      _Fields(short thriftId, String fieldName) {
10179
        _thriftId = thriftId;
10180
        _fieldName = fieldName;
10181
      }
10182
 
10183
      public short getThriftFieldId() {
10184
        return _thriftId;
10185
      }
10186
 
10187
      public String getFieldName() {
10188
        return _fieldName;
10189
      }
10190
    }
10191
 
10192
    // isset id assignments
10193
    private static final int __SUCCESS_ISSET_ID = 0;
10194
    private BitSet __isset_bit_vector = new BitSet(1);
10195
 
10196
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10197
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10198
          new FieldValueMetaData(TType.BOOL)));
10199
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
10200
          new FieldValueMetaData(TType.STRUCT)));
10201
    }});
10202
 
10203
    static {
10204
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
10205
    }
10206
 
10207
    public updatePassword_result() {
10208
    }
10209
 
10210
    public updatePassword_result(
10211
      boolean success,
10212
      HelperServiceException se)
10213
    {
10214
      this();
10215
      this.success = success;
10216
      setSuccessIsSet(true);
10217
      this.se = se;
10218
    }
10219
 
10220
    /**
10221
     * Performs a deep copy on <i>other</i>.
10222
     */
10223
    public updatePassword_result(updatePassword_result other) {
10224
      __isset_bit_vector.clear();
10225
      __isset_bit_vector.or(other.__isset_bit_vector);
10226
      this.success = other.success;
10227
      if (other.isSetSe()) {
10228
        this.se = new HelperServiceException(other.se);
10229
      }
10230
    }
10231
 
10232
    public updatePassword_result deepCopy() {
10233
      return new updatePassword_result(this);
10234
    }
10235
 
10236
    @Deprecated
10237
    public updatePassword_result clone() {
10238
      return new updatePassword_result(this);
10239
    }
10240
 
10241
    public boolean isSuccess() {
10242
      return this.success;
10243
    }
10244
 
10245
    public updatePassword_result setSuccess(boolean success) {
10246
      this.success = success;
10247
      setSuccessIsSet(true);
10248
      return this;
10249
    }
10250
 
10251
    public void unsetSuccess() {
10252
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10253
    }
10254
 
10255
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10256
    public boolean isSetSuccess() {
10257
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10258
    }
10259
 
10260
    public void setSuccessIsSet(boolean value) {
10261
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10262
    }
10263
 
10264
    public HelperServiceException getSe() {
10265
      return this.se;
10266
    }
10267
 
10268
    public updatePassword_result setSe(HelperServiceException se) {
10269
      this.se = se;
10270
      return this;
10271
    }
10272
 
10273
    public void unsetSe() {
10274
      this.se = null;
10275
    }
10276
 
10277
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
10278
    public boolean isSetSe() {
10279
      return this.se != null;
10280
    }
10281
 
10282
    public void setSeIsSet(boolean value) {
10283
      if (!value) {
10284
        this.se = null;
10285
      }
10286
    }
10287
 
10288
    public void setFieldValue(_Fields field, Object value) {
10289
      switch (field) {
10290
      case SUCCESS:
10291
        if (value == null) {
10292
          unsetSuccess();
10293
        } else {
10294
          setSuccess((Boolean)value);
10295
        }
10296
        break;
10297
 
10298
      case SE:
10299
        if (value == null) {
10300
          unsetSe();
10301
        } else {
10302
          setSe((HelperServiceException)value);
10303
        }
10304
        break;
10305
 
10306
      }
10307
    }
10308
 
10309
    public void setFieldValue(int fieldID, Object value) {
10310
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10311
    }
10312
 
10313
    public Object getFieldValue(_Fields field) {
10314
      switch (field) {
10315
      case SUCCESS:
10316
        return new Boolean(isSuccess());
10317
 
10318
      case SE:
10319
        return getSe();
10320
 
10321
      }
10322
      throw new IllegalStateException();
10323
    }
10324
 
10325
    public Object getFieldValue(int fieldId) {
10326
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10327
    }
10328
 
10329
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10330
    public boolean isSet(_Fields field) {
10331
      switch (field) {
10332
      case SUCCESS:
10333
        return isSetSuccess();
10334
      case SE:
10335
        return isSetSe();
10336
      }
10337
      throw new IllegalStateException();
10338
    }
10339
 
10340
    public boolean isSet(int fieldID) {
10341
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10342
    }
10343
 
10344
    @Override
10345
    public boolean equals(Object that) {
10346
      if (that == null)
10347
        return false;
10348
      if (that instanceof updatePassword_result)
10349
        return this.equals((updatePassword_result)that);
10350
      return false;
10351
    }
10352
 
10353
    public boolean equals(updatePassword_result that) {
10354
      if (that == null)
10355
        return false;
10356
 
10357
      boolean this_present_success = true;
10358
      boolean that_present_success = true;
10359
      if (this_present_success || that_present_success) {
10360
        if (!(this_present_success && that_present_success))
10361
          return false;
10362
        if (this.success != that.success)
10363
          return false;
10364
      }
10365
 
10366
      boolean this_present_se = true && this.isSetSe();
10367
      boolean that_present_se = true && that.isSetSe();
10368
      if (this_present_se || that_present_se) {
10369
        if (!(this_present_se && that_present_se))
10370
          return false;
10371
        if (!this.se.equals(that.se))
10372
          return false;
10373
      }
10374
 
10375
      return true;
10376
    }
10377
 
10378
    @Override
10379
    public int hashCode() {
10380
      return 0;
10381
    }
10382
 
10383
    public int compareTo(updatePassword_result other) {
10384
      if (!getClass().equals(other.getClass())) {
10385
        return getClass().getName().compareTo(other.getClass().getName());
10386
      }
10387
 
10388
      int lastComparison = 0;
10389
      updatePassword_result typedOther = (updatePassword_result)other;
10390
 
10391
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10392
      if (lastComparison != 0) {
10393
        return lastComparison;
10394
      }
10395
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10396
      if (lastComparison != 0) {
10397
        return lastComparison;
10398
      }
10399
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
10400
      if (lastComparison != 0) {
10401
        return lastComparison;
10402
      }
10403
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
10404
      if (lastComparison != 0) {
10405
        return lastComparison;
10406
      }
10407
      return 0;
10408
    }
10409
 
10410
    public void read(TProtocol iprot) throws TException {
10411
      TField field;
10412
      iprot.readStructBegin();
10413
      while (true)
10414
      {
10415
        field = iprot.readFieldBegin();
10416
        if (field.type == TType.STOP) { 
10417
          break;
10418
        }
10419
        _Fields fieldId = _Fields.findByThriftId(field.id);
10420
        if (fieldId == null) {
10421
          TProtocolUtil.skip(iprot, field.type);
10422
        } else {
10423
          switch (fieldId) {
10424
            case SUCCESS:
10425
              if (field.type == TType.BOOL) {
10426
                this.success = iprot.readBool();
10427
                setSuccessIsSet(true);
10428
              } else { 
10429
                TProtocolUtil.skip(iprot, field.type);
10430
              }
10431
              break;
10432
            case SE:
10433
              if (field.type == TType.STRUCT) {
10434
                this.se = new HelperServiceException();
10435
                this.se.read(iprot);
10436
              } else { 
10437
                TProtocolUtil.skip(iprot, field.type);
10438
              }
10439
              break;
10440
          }
10441
          iprot.readFieldEnd();
10442
        }
10443
      }
10444
      iprot.readStructEnd();
10445
      validate();
10446
    }
10447
 
10448
    public void write(TProtocol oprot) throws TException {
10449
      oprot.writeStructBegin(STRUCT_DESC);
10450
 
10451
      if (this.isSetSuccess()) {
10452
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10453
        oprot.writeBool(this.success);
10454
        oprot.writeFieldEnd();
10455
      } else if (this.isSetSe()) {
10456
        oprot.writeFieldBegin(SE_FIELD_DESC);
10457
        this.se.write(oprot);
10458
        oprot.writeFieldEnd();
10459
      }
10460
      oprot.writeFieldStop();
10461
      oprot.writeStructEnd();
10462
    }
10463
 
10464
    @Override
10465
    public String toString() {
10466
      StringBuilder sb = new StringBuilder("updatePassword_result(");
10467
      boolean first = true;
10468
 
10469
      sb.append("success:");
10470
      sb.append(this.success);
10471
      first = false;
10472
      if (!first) sb.append(", ");
10473
      sb.append("se:");
10474
      if (this.se == null) {
10475
        sb.append("null");
10476
      } else {
10477
        sb.append(this.se);
10478
      }
10479
      first = false;
10480
      sb.append(")");
10481
      return sb.toString();
10482
    }
10483
 
10484
    public void validate() throws TException {
10485
      // check for required fields
10486
    }
10487
 
10488
  }
10489
 
750 chandransh 10490
  public static class authenticateLogisticsUser_args implements TBase<authenticateLogisticsUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateLogisticsUser_args>   {
10491
    private static final TStruct STRUCT_DESC = new TStruct("authenticateLogisticsUser_args");
10492
 
10493
    private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
10494
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
10495
 
10496
    private String username;
10497
    private String password;
10498
 
10499
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10500
    public enum _Fields implements TFieldIdEnum {
10501
      USERNAME((short)1, "username"),
10502
      PASSWORD((short)2, "password");
10503
 
10504
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10505
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10506
 
10507
      static {
10508
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10509
          byId.put((int)field._thriftId, field);
10510
          byName.put(field.getFieldName(), field);
10511
        }
10512
      }
10513
 
10514
      /**
10515
       * Find the _Fields constant that matches fieldId, or null if its not found.
10516
       */
10517
      public static _Fields findByThriftId(int fieldId) {
10518
        return byId.get(fieldId);
10519
      }
10520
 
10521
      /**
10522
       * Find the _Fields constant that matches fieldId, throwing an exception
10523
       * if it is not found.
10524
       */
10525
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10526
        _Fields fields = findByThriftId(fieldId);
10527
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10528
        return fields;
10529
      }
10530
 
10531
      /**
10532
       * Find the _Fields constant that matches name, or null if its not found.
10533
       */
10534
      public static _Fields findByName(String name) {
10535
        return byName.get(name);
10536
      }
10537
 
10538
      private final short _thriftId;
10539
      private final String _fieldName;
10540
 
10541
      _Fields(short thriftId, String fieldName) {
10542
        _thriftId = thriftId;
10543
        _fieldName = fieldName;
10544
      }
10545
 
10546
      public short getThriftFieldId() {
10547
        return _thriftId;
10548
      }
10549
 
10550
      public String getFieldName() {
10551
        return _fieldName;
10552
      }
10553
    }
10554
 
10555
    // isset id assignments
10556
 
10557
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10558
      put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
10559
          new FieldValueMetaData(TType.STRING)));
10560
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
10561
          new FieldValueMetaData(TType.STRING)));
10562
    }});
10563
 
10564
    static {
10565
      FieldMetaData.addStructMetaDataMap(authenticateLogisticsUser_args.class, metaDataMap);
10566
    }
10567
 
10568
    public authenticateLogisticsUser_args() {
10569
    }
10570
 
10571
    public authenticateLogisticsUser_args(
10572
      String username,
10573
      String password)
10574
    {
10575
      this();
10576
      this.username = username;
10577
      this.password = password;
10578
    }
10579
 
10580
    /**
10581
     * Performs a deep copy on <i>other</i>.
10582
     */
10583
    public authenticateLogisticsUser_args(authenticateLogisticsUser_args other) {
10584
      if (other.isSetUsername()) {
10585
        this.username = other.username;
10586
      }
10587
      if (other.isSetPassword()) {
10588
        this.password = other.password;
10589
      }
10590
    }
10591
 
10592
    public authenticateLogisticsUser_args deepCopy() {
10593
      return new authenticateLogisticsUser_args(this);
10594
    }
10595
 
10596
    @Deprecated
10597
    public authenticateLogisticsUser_args clone() {
10598
      return new authenticateLogisticsUser_args(this);
10599
    }
10600
 
10601
    public String getUsername() {
10602
      return this.username;
10603
    }
10604
 
10605
    public authenticateLogisticsUser_args setUsername(String username) {
10606
      this.username = username;
10607
      return this;
10608
    }
10609
 
10610
    public void unsetUsername() {
10611
      this.username = null;
10612
    }
10613
 
10614
    /** Returns true if field username is set (has been asigned a value) and false otherwise */
10615
    public boolean isSetUsername() {
10616
      return this.username != null;
10617
    }
10618
 
10619
    public void setUsernameIsSet(boolean value) {
10620
      if (!value) {
10621
        this.username = null;
10622
      }
10623
    }
10624
 
10625
    public String getPassword() {
10626
      return this.password;
10627
    }
10628
 
10629
    public authenticateLogisticsUser_args setPassword(String password) {
10630
      this.password = password;
10631
      return this;
10632
    }
10633
 
10634
    public void unsetPassword() {
10635
      this.password = null;
10636
    }
10637
 
10638
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
10639
    public boolean isSetPassword() {
10640
      return this.password != null;
10641
    }
10642
 
10643
    public void setPasswordIsSet(boolean value) {
10644
      if (!value) {
10645
        this.password = null;
10646
      }
10647
    }
10648
 
10649
    public void setFieldValue(_Fields field, Object value) {
10650
      switch (field) {
10651
      case USERNAME:
10652
        if (value == null) {
10653
          unsetUsername();
10654
        } else {
10655
          setUsername((String)value);
10656
        }
10657
        break;
10658
 
10659
      case PASSWORD:
10660
        if (value == null) {
10661
          unsetPassword();
10662
        } else {
10663
          setPassword((String)value);
10664
        }
10665
        break;
10666
 
10667
      }
10668
    }
10669
 
10670
    public void setFieldValue(int fieldID, Object value) {
10671
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10672
    }
10673
 
10674
    public Object getFieldValue(_Fields field) {
10675
      switch (field) {
10676
      case USERNAME:
10677
        return getUsername();
10678
 
10679
      case PASSWORD:
10680
        return getPassword();
10681
 
10682
      }
10683
      throw new IllegalStateException();
10684
    }
10685
 
10686
    public Object getFieldValue(int fieldId) {
10687
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10688
    }
10689
 
10690
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10691
    public boolean isSet(_Fields field) {
10692
      switch (field) {
10693
      case USERNAME:
10694
        return isSetUsername();
10695
      case PASSWORD:
10696
        return isSetPassword();
10697
      }
10698
      throw new IllegalStateException();
10699
    }
10700
 
10701
    public boolean isSet(int fieldID) {
10702
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10703
    }
10704
 
10705
    @Override
10706
    public boolean equals(Object that) {
10707
      if (that == null)
10708
        return false;
10709
      if (that instanceof authenticateLogisticsUser_args)
10710
        return this.equals((authenticateLogisticsUser_args)that);
10711
      return false;
10712
    }
10713
 
10714
    public boolean equals(authenticateLogisticsUser_args that) {
10715
      if (that == null)
10716
        return false;
10717
 
10718
      boolean this_present_username = true && this.isSetUsername();
10719
      boolean that_present_username = true && that.isSetUsername();
10720
      if (this_present_username || that_present_username) {
10721
        if (!(this_present_username && that_present_username))
10722
          return false;
10723
        if (!this.username.equals(that.username))
10724
          return false;
10725
      }
10726
 
10727
      boolean this_present_password = true && this.isSetPassword();
10728
      boolean that_present_password = true && that.isSetPassword();
10729
      if (this_present_password || that_present_password) {
10730
        if (!(this_present_password && that_present_password))
10731
          return false;
10732
        if (!this.password.equals(that.password))
10733
          return false;
10734
      }
10735
 
10736
      return true;
10737
    }
10738
 
10739
    @Override
10740
    public int hashCode() {
10741
      return 0;
10742
    }
10743
 
10744
    public int compareTo(authenticateLogisticsUser_args other) {
10745
      if (!getClass().equals(other.getClass())) {
10746
        return getClass().getName().compareTo(other.getClass().getName());
10747
      }
10748
 
10749
      int lastComparison = 0;
10750
      authenticateLogisticsUser_args typedOther = (authenticateLogisticsUser_args)other;
10751
 
10752
      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(isSetUsername());
10753
      if (lastComparison != 0) {
10754
        return lastComparison;
10755
      }
10756
      lastComparison = TBaseHelper.compareTo(username, typedOther.username);
10757
      if (lastComparison != 0) {
10758
        return lastComparison;
10759
      }
10760
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
10761
      if (lastComparison != 0) {
10762
        return lastComparison;
10763
      }
10764
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
10765
      if (lastComparison != 0) {
10766
        return lastComparison;
10767
      }
10768
      return 0;
10769
    }
10770
 
10771
    public void read(TProtocol iprot) throws TException {
10772
      TField field;
10773
      iprot.readStructBegin();
10774
      while (true)
10775
      {
10776
        field = iprot.readFieldBegin();
10777
        if (field.type == TType.STOP) { 
10778
          break;
10779
        }
10780
        _Fields fieldId = _Fields.findByThriftId(field.id);
10781
        if (fieldId == null) {
10782
          TProtocolUtil.skip(iprot, field.type);
10783
        } else {
10784
          switch (fieldId) {
10785
            case USERNAME:
10786
              if (field.type == TType.STRING) {
10787
                this.username = iprot.readString();
10788
              } else { 
10789
                TProtocolUtil.skip(iprot, field.type);
10790
              }
10791
              break;
10792
            case PASSWORD:
10793
              if (field.type == TType.STRING) {
10794
                this.password = iprot.readString();
10795
              } else { 
10796
                TProtocolUtil.skip(iprot, field.type);
10797
              }
10798
              break;
10799
          }
10800
          iprot.readFieldEnd();
10801
        }
10802
      }
10803
      iprot.readStructEnd();
10804
      validate();
10805
    }
10806
 
10807
    public void write(TProtocol oprot) throws TException {
10808
      validate();
10809
 
10810
      oprot.writeStructBegin(STRUCT_DESC);
10811
      if (this.username != null) {
10812
        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
10813
        oprot.writeString(this.username);
10814
        oprot.writeFieldEnd();
10815
      }
10816
      if (this.password != null) {
10817
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
10818
        oprot.writeString(this.password);
10819
        oprot.writeFieldEnd();
10820
      }
10821
      oprot.writeFieldStop();
10822
      oprot.writeStructEnd();
10823
    }
10824
 
10825
    @Override
10826
    public String toString() {
10827
      StringBuilder sb = new StringBuilder("authenticateLogisticsUser_args(");
10828
      boolean first = true;
10829
 
10830
      sb.append("username:");
10831
      if (this.username == null) {
10832
        sb.append("null");
10833
      } else {
10834
        sb.append(this.username);
10835
      }
10836
      first = false;
10837
      if (!first) sb.append(", ");
10838
      sb.append("password:");
10839
      if (this.password == null) {
10840
        sb.append("null");
10841
      } else {
10842
        sb.append(this.password);
10843
      }
10844
      first = false;
10845
      sb.append(")");
10846
      return sb.toString();
10847
    }
10848
 
10849
    public void validate() throws TException {
10850
      // check for required fields
10851
    }
10852
 
10853
  }
10854
 
10855
  public static class authenticateLogisticsUser_result implements TBase<authenticateLogisticsUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateLogisticsUser_result>   {
10856
    private static final TStruct STRUCT_DESC = new TStruct("authenticateLogisticsUser_result");
10857
 
10858
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
10859
    private static final TField HSE_FIELD_DESC = new TField("hse", TType.STRUCT, (short)1);
10860
 
10861
    private LogisticsUser success;
10862
    private HelperServiceException hse;
10863
 
10864
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10865
    public enum _Fields implements TFieldIdEnum {
10866
      SUCCESS((short)0, "success"),
10867
      HSE((short)1, "hse");
10868
 
10869
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10870
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10871
 
10872
      static {
10873
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10874
          byId.put((int)field._thriftId, field);
10875
          byName.put(field.getFieldName(), field);
10876
        }
10877
      }
10878
 
10879
      /**
10880
       * Find the _Fields constant that matches fieldId, or null if its not found.
10881
       */
10882
      public static _Fields findByThriftId(int fieldId) {
10883
        return byId.get(fieldId);
10884
      }
10885
 
10886
      /**
10887
       * Find the _Fields constant that matches fieldId, throwing an exception
10888
       * if it is not found.
10889
       */
10890
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10891
        _Fields fields = findByThriftId(fieldId);
10892
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10893
        return fields;
10894
      }
10895
 
10896
      /**
10897
       * Find the _Fields constant that matches name, or null if its not found.
10898
       */
10899
      public static _Fields findByName(String name) {
10900
        return byName.get(name);
10901
      }
10902
 
10903
      private final short _thriftId;
10904
      private final String _fieldName;
10905
 
10906
      _Fields(short thriftId, String fieldName) {
10907
        _thriftId = thriftId;
10908
        _fieldName = fieldName;
10909
      }
10910
 
10911
      public short getThriftFieldId() {
10912
        return _thriftId;
10913
      }
10914
 
10915
      public String getFieldName() {
10916
        return _fieldName;
10917
      }
10918
    }
10919
 
10920
    // isset id assignments
10921
 
10922
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10923
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10924
          new StructMetaData(TType.STRUCT, LogisticsUser.class)));
10925
      put(_Fields.HSE, new FieldMetaData("hse", TFieldRequirementType.DEFAULT, 
10926
          new FieldValueMetaData(TType.STRUCT)));
10927
    }});
10928
 
10929
    static {
10930
      FieldMetaData.addStructMetaDataMap(authenticateLogisticsUser_result.class, metaDataMap);
10931
    }
10932
 
10933
    public authenticateLogisticsUser_result() {
10934
    }
10935
 
10936
    public authenticateLogisticsUser_result(
10937
      LogisticsUser success,
10938
      HelperServiceException hse)
10939
    {
10940
      this();
10941
      this.success = success;
10942
      this.hse = hse;
10943
    }
10944
 
10945
    /**
10946
     * Performs a deep copy on <i>other</i>.
10947
     */
10948
    public authenticateLogisticsUser_result(authenticateLogisticsUser_result other) {
10949
      if (other.isSetSuccess()) {
10950
        this.success = new LogisticsUser(other.success);
10951
      }
10952
      if (other.isSetHse()) {
10953
        this.hse = new HelperServiceException(other.hse);
10954
      }
10955
    }
10956
 
10957
    public authenticateLogisticsUser_result deepCopy() {
10958
      return new authenticateLogisticsUser_result(this);
10959
    }
10960
 
10961
    @Deprecated
10962
    public authenticateLogisticsUser_result clone() {
10963
      return new authenticateLogisticsUser_result(this);
10964
    }
10965
 
10966
    public LogisticsUser getSuccess() {
10967
      return this.success;
10968
    }
10969
 
10970
    public authenticateLogisticsUser_result setSuccess(LogisticsUser success) {
10971
      this.success = success;
10972
      return this;
10973
    }
10974
 
10975
    public void unsetSuccess() {
10976
      this.success = null;
10977
    }
10978
 
10979
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10980
    public boolean isSetSuccess() {
10981
      return this.success != null;
10982
    }
10983
 
10984
    public void setSuccessIsSet(boolean value) {
10985
      if (!value) {
10986
        this.success = null;
10987
      }
10988
    }
10989
 
10990
    public HelperServiceException getHse() {
10991
      return this.hse;
10992
    }
10993
 
10994
    public authenticateLogisticsUser_result setHse(HelperServiceException hse) {
10995
      this.hse = hse;
10996
      return this;
10997
    }
10998
 
10999
    public void unsetHse() {
11000
      this.hse = null;
11001
    }
11002
 
11003
    /** Returns true if field hse is set (has been asigned a value) and false otherwise */
11004
    public boolean isSetHse() {
11005
      return this.hse != null;
11006
    }
11007
 
11008
    public void setHseIsSet(boolean value) {
11009
      if (!value) {
11010
        this.hse = null;
11011
      }
11012
    }
11013
 
11014
    public void setFieldValue(_Fields field, Object value) {
11015
      switch (field) {
11016
      case SUCCESS:
11017
        if (value == null) {
11018
          unsetSuccess();
11019
        } else {
11020
          setSuccess((LogisticsUser)value);
11021
        }
11022
        break;
11023
 
11024
      case HSE:
11025
        if (value == null) {
11026
          unsetHse();
11027
        } else {
11028
          setHse((HelperServiceException)value);
11029
        }
11030
        break;
11031
 
11032
      }
11033
    }
11034
 
11035
    public void setFieldValue(int fieldID, Object value) {
11036
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11037
    }
11038
 
11039
    public Object getFieldValue(_Fields field) {
11040
      switch (field) {
11041
      case SUCCESS:
11042
        return getSuccess();
11043
 
11044
      case HSE:
11045
        return getHse();
11046
 
11047
      }
11048
      throw new IllegalStateException();
11049
    }
11050
 
11051
    public Object getFieldValue(int fieldId) {
11052
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11053
    }
11054
 
11055
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11056
    public boolean isSet(_Fields field) {
11057
      switch (field) {
11058
      case SUCCESS:
11059
        return isSetSuccess();
11060
      case HSE:
11061
        return isSetHse();
11062
      }
11063
      throw new IllegalStateException();
11064
    }
11065
 
11066
    public boolean isSet(int fieldID) {
11067
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11068
    }
11069
 
11070
    @Override
11071
    public boolean equals(Object that) {
11072
      if (that == null)
11073
        return false;
11074
      if (that instanceof authenticateLogisticsUser_result)
11075
        return this.equals((authenticateLogisticsUser_result)that);
11076
      return false;
11077
    }
11078
 
11079
    public boolean equals(authenticateLogisticsUser_result that) {
11080
      if (that == null)
11081
        return false;
11082
 
11083
      boolean this_present_success = true && this.isSetSuccess();
11084
      boolean that_present_success = true && that.isSetSuccess();
11085
      if (this_present_success || that_present_success) {
11086
        if (!(this_present_success && that_present_success))
11087
          return false;
11088
        if (!this.success.equals(that.success))
11089
          return false;
11090
      }
11091
 
11092
      boolean this_present_hse = true && this.isSetHse();
11093
      boolean that_present_hse = true && that.isSetHse();
11094
      if (this_present_hse || that_present_hse) {
11095
        if (!(this_present_hse && that_present_hse))
11096
          return false;
11097
        if (!this.hse.equals(that.hse))
11098
          return false;
11099
      }
11100
 
11101
      return true;
11102
    }
11103
 
11104
    @Override
11105
    public int hashCode() {
11106
      return 0;
11107
    }
11108
 
11109
    public int compareTo(authenticateLogisticsUser_result other) {
11110
      if (!getClass().equals(other.getClass())) {
11111
        return getClass().getName().compareTo(other.getClass().getName());
11112
      }
11113
 
11114
      int lastComparison = 0;
11115
      authenticateLogisticsUser_result typedOther = (authenticateLogisticsUser_result)other;
11116
 
11117
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11118
      if (lastComparison != 0) {
11119
        return lastComparison;
11120
      }
11121
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11122
      if (lastComparison != 0) {
11123
        return lastComparison;
11124
      }
11125
      lastComparison = Boolean.valueOf(isSetHse()).compareTo(isSetHse());
11126
      if (lastComparison != 0) {
11127
        return lastComparison;
11128
      }
11129
      lastComparison = TBaseHelper.compareTo(hse, typedOther.hse);
11130
      if (lastComparison != 0) {
11131
        return lastComparison;
11132
      }
11133
      return 0;
11134
    }
11135
 
11136
    public void read(TProtocol iprot) throws TException {
11137
      TField field;
11138
      iprot.readStructBegin();
11139
      while (true)
11140
      {
11141
        field = iprot.readFieldBegin();
11142
        if (field.type == TType.STOP) { 
11143
          break;
11144
        }
11145
        _Fields fieldId = _Fields.findByThriftId(field.id);
11146
        if (fieldId == null) {
11147
          TProtocolUtil.skip(iprot, field.type);
11148
        } else {
11149
          switch (fieldId) {
11150
            case SUCCESS:
11151
              if (field.type == TType.STRUCT) {
11152
                this.success = new LogisticsUser();
11153
                this.success.read(iprot);
11154
              } else { 
11155
                TProtocolUtil.skip(iprot, field.type);
11156
              }
11157
              break;
11158
            case HSE:
11159
              if (field.type == TType.STRUCT) {
11160
                this.hse = new HelperServiceException();
11161
                this.hse.read(iprot);
11162
              } else { 
11163
                TProtocolUtil.skip(iprot, field.type);
11164
              }
11165
              break;
11166
          }
11167
          iprot.readFieldEnd();
11168
        }
11169
      }
11170
      iprot.readStructEnd();
11171
      validate();
11172
    }
11173
 
11174
    public void write(TProtocol oprot) throws TException {
11175
      oprot.writeStructBegin(STRUCT_DESC);
11176
 
11177
      if (this.isSetSuccess()) {
11178
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11179
        this.success.write(oprot);
11180
        oprot.writeFieldEnd();
11181
      } else if (this.isSetHse()) {
11182
        oprot.writeFieldBegin(HSE_FIELD_DESC);
11183
        this.hse.write(oprot);
11184
        oprot.writeFieldEnd();
11185
      }
11186
      oprot.writeFieldStop();
11187
      oprot.writeStructEnd();
11188
    }
11189
 
11190
    @Override
11191
    public String toString() {
11192
      StringBuilder sb = new StringBuilder("authenticateLogisticsUser_result(");
11193
      boolean first = true;
11194
 
11195
      sb.append("success:");
11196
      if (this.success == null) {
11197
        sb.append("null");
11198
      } else {
11199
        sb.append(this.success);
11200
      }
11201
      first = false;
11202
      if (!first) sb.append(", ");
11203
      sb.append("hse:");
11204
      if (this.hse == null) {
11205
        sb.append("null");
11206
      } else {
11207
        sb.append(this.hse);
11208
      }
11209
      first = false;
11210
      sb.append(")");
11211
      return sb.toString();
11212
    }
11213
 
11214
    public void validate() throws TException {
11215
      // check for required fields
11216
    }
11217
 
11218
  }
11219
 
1611 ankur.sing 11220
  public static class authenticateStatisticsUser_args implements TBase<authenticateStatisticsUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateStatisticsUser_args>   {
11221
    private static final TStruct STRUCT_DESC = new TStruct("authenticateStatisticsUser_args");
11222
 
11223
    private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
11224
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
11225
 
11226
    private String username;
11227
    private String password;
11228
 
11229
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11230
    public enum _Fields implements TFieldIdEnum {
11231
      USERNAME((short)1, "username"),
11232
      PASSWORD((short)2, "password");
11233
 
11234
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11235
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11236
 
11237
      static {
11238
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11239
          byId.put((int)field._thriftId, field);
11240
          byName.put(field.getFieldName(), field);
11241
        }
11242
      }
11243
 
11244
      /**
11245
       * Find the _Fields constant that matches fieldId, or null if its not found.
11246
       */
11247
      public static _Fields findByThriftId(int fieldId) {
11248
        return byId.get(fieldId);
11249
      }
11250
 
11251
      /**
11252
       * Find the _Fields constant that matches fieldId, throwing an exception
11253
       * if it is not found.
11254
       */
11255
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11256
        _Fields fields = findByThriftId(fieldId);
11257
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11258
        return fields;
11259
      }
11260
 
11261
      /**
11262
       * Find the _Fields constant that matches name, or null if its not found.
11263
       */
11264
      public static _Fields findByName(String name) {
11265
        return byName.get(name);
11266
      }
11267
 
11268
      private final short _thriftId;
11269
      private final String _fieldName;
11270
 
11271
      _Fields(short thriftId, String fieldName) {
11272
        _thriftId = thriftId;
11273
        _fieldName = fieldName;
11274
      }
11275
 
11276
      public short getThriftFieldId() {
11277
        return _thriftId;
11278
      }
11279
 
11280
      public String getFieldName() {
11281
        return _fieldName;
11282
      }
11283
    }
11284
 
11285
    // isset id assignments
11286
 
11287
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11288
      put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
11289
          new FieldValueMetaData(TType.STRING)));
11290
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
11291
          new FieldValueMetaData(TType.STRING)));
11292
    }});
11293
 
11294
    static {
11295
      FieldMetaData.addStructMetaDataMap(authenticateStatisticsUser_args.class, metaDataMap);
11296
    }
11297
 
11298
    public authenticateStatisticsUser_args() {
11299
    }
11300
 
11301
    public authenticateStatisticsUser_args(
11302
      String username,
11303
      String password)
11304
    {
11305
      this();
11306
      this.username = username;
11307
      this.password = password;
11308
    }
11309
 
11310
    /**
11311
     * Performs a deep copy on <i>other</i>.
11312
     */
11313
    public authenticateStatisticsUser_args(authenticateStatisticsUser_args other) {
11314
      if (other.isSetUsername()) {
11315
        this.username = other.username;
11316
      }
11317
      if (other.isSetPassword()) {
11318
        this.password = other.password;
11319
      }
11320
    }
11321
 
11322
    public authenticateStatisticsUser_args deepCopy() {
11323
      return new authenticateStatisticsUser_args(this);
11324
    }
11325
 
11326
    @Deprecated
11327
    public authenticateStatisticsUser_args clone() {
11328
      return new authenticateStatisticsUser_args(this);
11329
    }
11330
 
11331
    public String getUsername() {
11332
      return this.username;
11333
    }
11334
 
11335
    public authenticateStatisticsUser_args setUsername(String username) {
11336
      this.username = username;
11337
      return this;
11338
    }
11339
 
11340
    public void unsetUsername() {
11341
      this.username = null;
11342
    }
11343
 
11344
    /** Returns true if field username is set (has been asigned a value) and false otherwise */
11345
    public boolean isSetUsername() {
11346
      return this.username != null;
11347
    }
11348
 
11349
    public void setUsernameIsSet(boolean value) {
11350
      if (!value) {
11351
        this.username = null;
11352
      }
11353
    }
11354
 
11355
    public String getPassword() {
11356
      return this.password;
11357
    }
11358
 
11359
    public authenticateStatisticsUser_args setPassword(String password) {
11360
      this.password = password;
11361
      return this;
11362
    }
11363
 
11364
    public void unsetPassword() {
11365
      this.password = null;
11366
    }
11367
 
11368
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
11369
    public boolean isSetPassword() {
11370
      return this.password != null;
11371
    }
11372
 
11373
    public void setPasswordIsSet(boolean value) {
11374
      if (!value) {
11375
        this.password = null;
11376
      }
11377
    }
11378
 
11379
    public void setFieldValue(_Fields field, Object value) {
11380
      switch (field) {
11381
      case USERNAME:
11382
        if (value == null) {
11383
          unsetUsername();
11384
        } else {
11385
          setUsername((String)value);
11386
        }
11387
        break;
11388
 
11389
      case PASSWORD:
11390
        if (value == null) {
11391
          unsetPassword();
11392
        } else {
11393
          setPassword((String)value);
11394
        }
11395
        break;
11396
 
11397
      }
11398
    }
11399
 
11400
    public void setFieldValue(int fieldID, Object value) {
11401
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11402
    }
11403
 
11404
    public Object getFieldValue(_Fields field) {
11405
      switch (field) {
11406
      case USERNAME:
11407
        return getUsername();
11408
 
11409
      case PASSWORD:
11410
        return getPassword();
11411
 
11412
      }
11413
      throw new IllegalStateException();
11414
    }
11415
 
11416
    public Object getFieldValue(int fieldId) {
11417
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11418
    }
11419
 
11420
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11421
    public boolean isSet(_Fields field) {
11422
      switch (field) {
11423
      case USERNAME:
11424
        return isSetUsername();
11425
      case PASSWORD:
11426
        return isSetPassword();
11427
      }
11428
      throw new IllegalStateException();
11429
    }
11430
 
11431
    public boolean isSet(int fieldID) {
11432
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11433
    }
11434
 
11435
    @Override
11436
    public boolean equals(Object that) {
11437
      if (that == null)
11438
        return false;
11439
      if (that instanceof authenticateStatisticsUser_args)
11440
        return this.equals((authenticateStatisticsUser_args)that);
11441
      return false;
11442
    }
11443
 
11444
    public boolean equals(authenticateStatisticsUser_args that) {
11445
      if (that == null)
11446
        return false;
11447
 
11448
      boolean this_present_username = true && this.isSetUsername();
11449
      boolean that_present_username = true && that.isSetUsername();
11450
      if (this_present_username || that_present_username) {
11451
        if (!(this_present_username && that_present_username))
11452
          return false;
11453
        if (!this.username.equals(that.username))
11454
          return false;
11455
      }
11456
 
11457
      boolean this_present_password = true && this.isSetPassword();
11458
      boolean that_present_password = true && that.isSetPassword();
11459
      if (this_present_password || that_present_password) {
11460
        if (!(this_present_password && that_present_password))
11461
          return false;
11462
        if (!this.password.equals(that.password))
11463
          return false;
11464
      }
11465
 
11466
      return true;
11467
    }
11468
 
11469
    @Override
11470
    public int hashCode() {
11471
      return 0;
11472
    }
11473
 
11474
    public int compareTo(authenticateStatisticsUser_args other) {
11475
      if (!getClass().equals(other.getClass())) {
11476
        return getClass().getName().compareTo(other.getClass().getName());
11477
      }
11478
 
11479
      int lastComparison = 0;
11480
      authenticateStatisticsUser_args typedOther = (authenticateStatisticsUser_args)other;
11481
 
11482
      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(isSetUsername());
11483
      if (lastComparison != 0) {
11484
        return lastComparison;
11485
      }
11486
      lastComparison = TBaseHelper.compareTo(username, typedOther.username);
11487
      if (lastComparison != 0) {
11488
        return lastComparison;
11489
      }
11490
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
11491
      if (lastComparison != 0) {
11492
        return lastComparison;
11493
      }
11494
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
11495
      if (lastComparison != 0) {
11496
        return lastComparison;
11497
      }
11498
      return 0;
11499
    }
11500
 
11501
    public void read(TProtocol iprot) throws TException {
11502
      TField field;
11503
      iprot.readStructBegin();
11504
      while (true)
11505
      {
11506
        field = iprot.readFieldBegin();
11507
        if (field.type == TType.STOP) { 
11508
          break;
11509
        }
11510
        _Fields fieldId = _Fields.findByThriftId(field.id);
11511
        if (fieldId == null) {
11512
          TProtocolUtil.skip(iprot, field.type);
11513
        } else {
11514
          switch (fieldId) {
11515
            case USERNAME:
11516
              if (field.type == TType.STRING) {
11517
                this.username = iprot.readString();
11518
              } else { 
11519
                TProtocolUtil.skip(iprot, field.type);
11520
              }
11521
              break;
11522
            case PASSWORD:
11523
              if (field.type == TType.STRING) {
11524
                this.password = iprot.readString();
11525
              } else { 
11526
                TProtocolUtil.skip(iprot, field.type);
11527
              }
11528
              break;
11529
          }
11530
          iprot.readFieldEnd();
11531
        }
11532
      }
11533
      iprot.readStructEnd();
11534
      validate();
11535
    }
11536
 
11537
    public void write(TProtocol oprot) throws TException {
11538
      validate();
11539
 
11540
      oprot.writeStructBegin(STRUCT_DESC);
11541
      if (this.username != null) {
11542
        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
11543
        oprot.writeString(this.username);
11544
        oprot.writeFieldEnd();
11545
      }
11546
      if (this.password != null) {
11547
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
11548
        oprot.writeString(this.password);
11549
        oprot.writeFieldEnd();
11550
      }
11551
      oprot.writeFieldStop();
11552
      oprot.writeStructEnd();
11553
    }
11554
 
11555
    @Override
11556
    public String toString() {
11557
      StringBuilder sb = new StringBuilder("authenticateStatisticsUser_args(");
11558
      boolean first = true;
11559
 
11560
      sb.append("username:");
11561
      if (this.username == null) {
11562
        sb.append("null");
11563
      } else {
11564
        sb.append(this.username);
11565
      }
11566
      first = false;
11567
      if (!first) sb.append(", ");
11568
      sb.append("password:");
11569
      if (this.password == null) {
11570
        sb.append("null");
11571
      } else {
11572
        sb.append(this.password);
11573
      }
11574
      first = false;
11575
      sb.append(")");
11576
      return sb.toString();
11577
    }
11578
 
11579
    public void validate() throws TException {
11580
      // check for required fields
11581
    }
11582
 
11583
  }
11584
 
11585
  public static class authenticateStatisticsUser_result implements TBase<authenticateStatisticsUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateStatisticsUser_result>   {
11586
    private static final TStruct STRUCT_DESC = new TStruct("authenticateStatisticsUser_result");
11587
 
11588
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
11589
    private static final TField HSE_FIELD_DESC = new TField("hse", TType.STRUCT, (short)1);
11590
 
11591
    private StatisticsUser success;
11592
    private HelperServiceException hse;
11593
 
11594
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11595
    public enum _Fields implements TFieldIdEnum {
11596
      SUCCESS((short)0, "success"),
11597
      HSE((short)1, "hse");
11598
 
11599
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11600
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11601
 
11602
      static {
11603
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11604
          byId.put((int)field._thriftId, field);
11605
          byName.put(field.getFieldName(), field);
11606
        }
11607
      }
11608
 
11609
      /**
11610
       * Find the _Fields constant that matches fieldId, or null if its not found.
11611
       */
11612
      public static _Fields findByThriftId(int fieldId) {
11613
        return byId.get(fieldId);
11614
      }
11615
 
11616
      /**
11617
       * Find the _Fields constant that matches fieldId, throwing an exception
11618
       * if it is not found.
11619
       */
11620
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11621
        _Fields fields = findByThriftId(fieldId);
11622
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11623
        return fields;
11624
      }
11625
 
11626
      /**
11627
       * Find the _Fields constant that matches name, or null if its not found.
11628
       */
11629
      public static _Fields findByName(String name) {
11630
        return byName.get(name);
11631
      }
11632
 
11633
      private final short _thriftId;
11634
      private final String _fieldName;
11635
 
11636
      _Fields(short thriftId, String fieldName) {
11637
        _thriftId = thriftId;
11638
        _fieldName = fieldName;
11639
      }
11640
 
11641
      public short getThriftFieldId() {
11642
        return _thriftId;
11643
      }
11644
 
11645
      public String getFieldName() {
11646
        return _fieldName;
11647
      }
11648
    }
11649
 
11650
    // isset id assignments
11651
 
11652
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11653
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11654
          new StructMetaData(TType.STRUCT, StatisticsUser.class)));
11655
      put(_Fields.HSE, new FieldMetaData("hse", TFieldRequirementType.DEFAULT, 
11656
          new FieldValueMetaData(TType.STRUCT)));
11657
    }});
11658
 
11659
    static {
11660
      FieldMetaData.addStructMetaDataMap(authenticateStatisticsUser_result.class, metaDataMap);
11661
    }
11662
 
11663
    public authenticateStatisticsUser_result() {
11664
    }
11665
 
11666
    public authenticateStatisticsUser_result(
11667
      StatisticsUser success,
11668
      HelperServiceException hse)
11669
    {
11670
      this();
11671
      this.success = success;
11672
      this.hse = hse;
11673
    }
11674
 
11675
    /**
11676
     * Performs a deep copy on <i>other</i>.
11677
     */
11678
    public authenticateStatisticsUser_result(authenticateStatisticsUser_result other) {
11679
      if (other.isSetSuccess()) {
11680
        this.success = new StatisticsUser(other.success);
11681
      }
11682
      if (other.isSetHse()) {
11683
        this.hse = new HelperServiceException(other.hse);
11684
      }
11685
    }
11686
 
11687
    public authenticateStatisticsUser_result deepCopy() {
11688
      return new authenticateStatisticsUser_result(this);
11689
    }
11690
 
11691
    @Deprecated
11692
    public authenticateStatisticsUser_result clone() {
11693
      return new authenticateStatisticsUser_result(this);
11694
    }
11695
 
11696
    public StatisticsUser getSuccess() {
11697
      return this.success;
11698
    }
11699
 
11700
    public authenticateStatisticsUser_result setSuccess(StatisticsUser success) {
11701
      this.success = success;
11702
      return this;
11703
    }
11704
 
11705
    public void unsetSuccess() {
11706
      this.success = null;
11707
    }
11708
 
11709
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11710
    public boolean isSetSuccess() {
11711
      return this.success != null;
11712
    }
11713
 
11714
    public void setSuccessIsSet(boolean value) {
11715
      if (!value) {
11716
        this.success = null;
11717
      }
11718
    }
11719
 
11720
    public HelperServiceException getHse() {
11721
      return this.hse;
11722
    }
11723
 
11724
    public authenticateStatisticsUser_result setHse(HelperServiceException hse) {
11725
      this.hse = hse;
11726
      return this;
11727
    }
11728
 
11729
    public void unsetHse() {
11730
      this.hse = null;
11731
    }
11732
 
11733
    /** Returns true if field hse is set (has been asigned a value) and false otherwise */
11734
    public boolean isSetHse() {
11735
      return this.hse != null;
11736
    }
11737
 
11738
    public void setHseIsSet(boolean value) {
11739
      if (!value) {
11740
        this.hse = null;
11741
      }
11742
    }
11743
 
11744
    public void setFieldValue(_Fields field, Object value) {
11745
      switch (field) {
11746
      case SUCCESS:
11747
        if (value == null) {
11748
          unsetSuccess();
11749
        } else {
11750
          setSuccess((StatisticsUser)value);
11751
        }
11752
        break;
11753
 
11754
      case HSE:
11755
        if (value == null) {
11756
          unsetHse();
11757
        } else {
11758
          setHse((HelperServiceException)value);
11759
        }
11760
        break;
11761
 
11762
      }
11763
    }
11764
 
11765
    public void setFieldValue(int fieldID, Object value) {
11766
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11767
    }
11768
 
11769
    public Object getFieldValue(_Fields field) {
11770
      switch (field) {
11771
      case SUCCESS:
11772
        return getSuccess();
11773
 
11774
      case HSE:
11775
        return getHse();
11776
 
11777
      }
11778
      throw new IllegalStateException();
11779
    }
11780
 
11781
    public Object getFieldValue(int fieldId) {
11782
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11783
    }
11784
 
11785
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11786
    public boolean isSet(_Fields field) {
11787
      switch (field) {
11788
      case SUCCESS:
11789
        return isSetSuccess();
11790
      case HSE:
11791
        return isSetHse();
11792
      }
11793
      throw new IllegalStateException();
11794
    }
11795
 
11796
    public boolean isSet(int fieldID) {
11797
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11798
    }
11799
 
11800
    @Override
11801
    public boolean equals(Object that) {
11802
      if (that == null)
11803
        return false;
11804
      if (that instanceof authenticateStatisticsUser_result)
11805
        return this.equals((authenticateStatisticsUser_result)that);
11806
      return false;
11807
    }
11808
 
11809
    public boolean equals(authenticateStatisticsUser_result that) {
11810
      if (that == null)
11811
        return false;
11812
 
11813
      boolean this_present_success = true && this.isSetSuccess();
11814
      boolean that_present_success = true && that.isSetSuccess();
11815
      if (this_present_success || that_present_success) {
11816
        if (!(this_present_success && that_present_success))
11817
          return false;
11818
        if (!this.success.equals(that.success))
11819
          return false;
11820
      }
11821
 
11822
      boolean this_present_hse = true && this.isSetHse();
11823
      boolean that_present_hse = true && that.isSetHse();
11824
      if (this_present_hse || that_present_hse) {
11825
        if (!(this_present_hse && that_present_hse))
11826
          return false;
11827
        if (!this.hse.equals(that.hse))
11828
          return false;
11829
      }
11830
 
11831
      return true;
11832
    }
11833
 
11834
    @Override
11835
    public int hashCode() {
11836
      return 0;
11837
    }
11838
 
11839
    public int compareTo(authenticateStatisticsUser_result other) {
11840
      if (!getClass().equals(other.getClass())) {
11841
        return getClass().getName().compareTo(other.getClass().getName());
11842
      }
11843
 
11844
      int lastComparison = 0;
11845
      authenticateStatisticsUser_result typedOther = (authenticateStatisticsUser_result)other;
11846
 
11847
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11848
      if (lastComparison != 0) {
11849
        return lastComparison;
11850
      }
11851
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11852
      if (lastComparison != 0) {
11853
        return lastComparison;
11854
      }
11855
      lastComparison = Boolean.valueOf(isSetHse()).compareTo(isSetHse());
11856
      if (lastComparison != 0) {
11857
        return lastComparison;
11858
      }
11859
      lastComparison = TBaseHelper.compareTo(hse, typedOther.hse);
11860
      if (lastComparison != 0) {
11861
        return lastComparison;
11862
      }
11863
      return 0;
11864
    }
11865
 
11866
    public void read(TProtocol iprot) throws TException {
11867
      TField field;
11868
      iprot.readStructBegin();
11869
      while (true)
11870
      {
11871
        field = iprot.readFieldBegin();
11872
        if (field.type == TType.STOP) { 
11873
          break;
11874
        }
11875
        _Fields fieldId = _Fields.findByThriftId(field.id);
11876
        if (fieldId == null) {
11877
          TProtocolUtil.skip(iprot, field.type);
11878
        } else {
11879
          switch (fieldId) {
11880
            case SUCCESS:
11881
              if (field.type == TType.STRUCT) {
11882
                this.success = new StatisticsUser();
11883
                this.success.read(iprot);
11884
              } else { 
11885
                TProtocolUtil.skip(iprot, field.type);
11886
              }
11887
              break;
11888
            case HSE:
11889
              if (field.type == TType.STRUCT) {
11890
                this.hse = new HelperServiceException();
11891
                this.hse.read(iprot);
11892
              } else { 
11893
                TProtocolUtil.skip(iprot, field.type);
11894
              }
11895
              break;
11896
          }
11897
          iprot.readFieldEnd();
11898
        }
11899
      }
11900
      iprot.readStructEnd();
11901
      validate();
11902
    }
11903
 
11904
    public void write(TProtocol oprot) throws TException {
11905
      oprot.writeStructBegin(STRUCT_DESC);
11906
 
11907
      if (this.isSetSuccess()) {
11908
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11909
        this.success.write(oprot);
11910
        oprot.writeFieldEnd();
11911
      } else if (this.isSetHse()) {
11912
        oprot.writeFieldBegin(HSE_FIELD_DESC);
11913
        this.hse.write(oprot);
11914
        oprot.writeFieldEnd();
11915
      }
11916
      oprot.writeFieldStop();
11917
      oprot.writeStructEnd();
11918
    }
11919
 
11920
    @Override
11921
    public String toString() {
11922
      StringBuilder sb = new StringBuilder("authenticateStatisticsUser_result(");
11923
      boolean first = true;
11924
 
11925
      sb.append("success:");
11926
      if (this.success == null) {
11927
        sb.append("null");
11928
      } else {
11929
        sb.append(this.success);
11930
      }
11931
      first = false;
11932
      if (!first) sb.append(", ");
11933
      sb.append("hse:");
11934
      if (this.hse == null) {
11935
        sb.append("null");
11936
      } else {
11937
        sb.append(this.hse);
11938
      }
11939
      first = false;
11940
      sb.append(")");
11941
      return sb.toString();
11942
    }
11943
 
11944
    public void validate() throws TException {
11945
      // check for required fields
11946
    }
11947
 
11948
  }
11949
 
352 ashish 11950
}