Subversion Repositories SmartDukaan

Rev

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

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