Subversion Repositories SmartDukaan

Rev

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

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