Subversion Repositories SmartDukaan

Rev

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