Subversion Repositories SmartDukaan

Rev

Rev 2357 | Rev 2779 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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