Subversion Repositories SmartDukaan

Rev

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