Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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