Subversion Repositories SmartDukaan

Rev

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