Subversion Repositories SmartDukaan

Rev

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

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