Subversion Repositories SmartDukaan

Rev

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