Subversion Repositories SmartDukaan

Rev

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