Subversion Repositories SmartDukaan

Rev

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