Subversion Repositories SmartDukaan

Rev

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