Subversion Repositories SmartDukaan

Rev

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