Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
352 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.utils;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class HelperService {
27
 
28
  public interface Iface {
29
 
30
    public void sendMail(Mail mail) throws HelperServiceException, TException;
31
 
32
    public void sendText(TextMessage message) throws HelperServiceException, TException;
33
 
34
    public void addMessage(Message message) throws HelperServiceException, TException;
35
 
36
    public void updateMessage(long id, String message) throws HelperServiceException, TException;
37
 
38
    public Message getMessage(long id) throws HelperServiceException, TException;
39
 
40
    public Message getSubstitutedMessage(long id, Map<String,String> params) throws HelperServiceException, TException;
41
 
42
  }
43
 
44
  public static class Client implements Iface {
45
    public Client(TProtocol prot)
46
    {
47
      this(prot, prot);
48
    }
49
 
50
    public Client(TProtocol iprot, TProtocol oprot)
51
    {
52
      iprot_ = iprot;
53
      oprot_ = oprot;
54
    }
55
 
56
    protected TProtocol iprot_;
57
    protected TProtocol oprot_;
58
 
59
    protected int seqid_;
60
 
61
    public TProtocol getInputProtocol()
62
    {
63
      return this.iprot_;
64
    }
65
 
66
    public TProtocol getOutputProtocol()
67
    {
68
      return this.oprot_;
69
    }
70
 
71
    public void sendMail(Mail mail) throws HelperServiceException, TException
72
    {
73
      send_sendMail(mail);
74
      recv_sendMail();
75
    }
76
 
77
    public void send_sendMail(Mail mail) throws TException
78
    {
79
      oprot_.writeMessageBegin(new TMessage("sendMail", TMessageType.CALL, seqid_));
80
      sendMail_args args = new sendMail_args();
81
      args.mail = mail;
82
      args.write(oprot_);
83
      oprot_.writeMessageEnd();
84
      oprot_.getTransport().flush();
85
    }
86
 
87
    public void recv_sendMail() throws HelperServiceException, TException
88
    {
89
      TMessage msg = iprot_.readMessageBegin();
90
      if (msg.type == TMessageType.EXCEPTION) {
91
        TApplicationException x = TApplicationException.read(iprot_);
92
        iprot_.readMessageEnd();
93
        throw x;
94
      }
95
      sendMail_result result = new sendMail_result();
96
      result.read(iprot_);
97
      iprot_.readMessageEnd();
98
      if (result.se != null) {
99
        throw result.se;
100
      }
101
      return;
102
    }
103
 
104
    public void sendText(TextMessage message) throws HelperServiceException, TException
105
    {
106
      send_sendText(message);
107
      recv_sendText();
108
    }
109
 
110
    public void send_sendText(TextMessage message) throws TException
111
    {
112
      oprot_.writeMessageBegin(new TMessage("sendText", TMessageType.CALL, seqid_));
113
      sendText_args args = new sendText_args();
114
      args.message = message;
115
      args.write(oprot_);
116
      oprot_.writeMessageEnd();
117
      oprot_.getTransport().flush();
118
    }
119
 
120
    public void recv_sendText() throws HelperServiceException, TException
121
    {
122
      TMessage msg = iprot_.readMessageBegin();
123
      if (msg.type == TMessageType.EXCEPTION) {
124
        TApplicationException x = TApplicationException.read(iprot_);
125
        iprot_.readMessageEnd();
126
        throw x;
127
      }
128
      sendText_result result = new sendText_result();
129
      result.read(iprot_);
130
      iprot_.readMessageEnd();
131
      if (result.se != null) {
132
        throw result.se;
133
      }
134
      return;
135
    }
136
 
137
    public void addMessage(Message message) throws HelperServiceException, TException
138
    {
139
      send_addMessage(message);
140
      recv_addMessage();
141
    }
142
 
143
    public void send_addMessage(Message message) throws TException
144
    {
145
      oprot_.writeMessageBegin(new TMessage("addMessage", TMessageType.CALL, seqid_));
146
      addMessage_args args = new addMessage_args();
147
      args.message = message;
148
      args.write(oprot_);
149
      oprot_.writeMessageEnd();
150
      oprot_.getTransport().flush();
151
    }
152
 
153
    public void recv_addMessage() throws HelperServiceException, TException
154
    {
155
      TMessage msg = iprot_.readMessageBegin();
156
      if (msg.type == TMessageType.EXCEPTION) {
157
        TApplicationException x = TApplicationException.read(iprot_);
158
        iprot_.readMessageEnd();
159
        throw x;
160
      }
161
      addMessage_result result = new addMessage_result();
162
      result.read(iprot_);
163
      iprot_.readMessageEnd();
164
      if (result.se != null) {
165
        throw result.se;
166
      }
167
      return;
168
    }
169
 
170
    public void updateMessage(long id, String message) throws HelperServiceException, TException
171
    {
172
      send_updateMessage(id, message);
173
      recv_updateMessage();
174
    }
175
 
176
    public void send_updateMessage(long id, String message) throws TException
177
    {
178
      oprot_.writeMessageBegin(new TMessage("updateMessage", TMessageType.CALL, seqid_));
179
      updateMessage_args args = new updateMessage_args();
180
      args.id = id;
181
      args.message = message;
182
      args.write(oprot_);
183
      oprot_.writeMessageEnd();
184
      oprot_.getTransport().flush();
185
    }
186
 
187
    public void recv_updateMessage() throws HelperServiceException, TException
188
    {
189
      TMessage msg = iprot_.readMessageBegin();
190
      if (msg.type == TMessageType.EXCEPTION) {
191
        TApplicationException x = TApplicationException.read(iprot_);
192
        iprot_.readMessageEnd();
193
        throw x;
194
      }
195
      updateMessage_result result = new updateMessage_result();
196
      result.read(iprot_);
197
      iprot_.readMessageEnd();
198
      if (result.se != null) {
199
        throw result.se;
200
      }
201
      return;
202
    }
203
 
204
    public Message getMessage(long id) throws HelperServiceException, TException
205
    {
206
      send_getMessage(id);
207
      return recv_getMessage();
208
    }
209
 
210
    public void send_getMessage(long id) throws TException
211
    {
212
      oprot_.writeMessageBegin(new TMessage("getMessage", TMessageType.CALL, seqid_));
213
      getMessage_args args = new getMessage_args();
214
      args.id = id;
215
      args.write(oprot_);
216
      oprot_.writeMessageEnd();
217
      oprot_.getTransport().flush();
218
    }
219
 
220
    public Message recv_getMessage() throws HelperServiceException, TException
221
    {
222
      TMessage msg = iprot_.readMessageBegin();
223
      if (msg.type == TMessageType.EXCEPTION) {
224
        TApplicationException x = TApplicationException.read(iprot_);
225
        iprot_.readMessageEnd();
226
        throw x;
227
      }
228
      getMessage_result result = new getMessage_result();
229
      result.read(iprot_);
230
      iprot_.readMessageEnd();
231
      if (result.isSetSuccess()) {
232
        return result.success;
233
      }
234
      if (result.se != null) {
235
        throw result.se;
236
      }
237
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMessage failed: unknown result");
238
    }
239
 
240
    public Message getSubstitutedMessage(long id, Map<String,String> params) throws HelperServiceException, TException
241
    {
242
      send_getSubstitutedMessage(id, params);
243
      return recv_getSubstitutedMessage();
244
    }
245
 
246
    public void send_getSubstitutedMessage(long id, Map<String,String> params) throws TException
247
    {
248
      oprot_.writeMessageBegin(new TMessage("getSubstitutedMessage", TMessageType.CALL, seqid_));
249
      getSubstitutedMessage_args args = new getSubstitutedMessage_args();
250
      args.id = id;
251
      args.params = params;
252
      args.write(oprot_);
253
      oprot_.writeMessageEnd();
254
      oprot_.getTransport().flush();
255
    }
256
 
257
    public Message recv_getSubstitutedMessage() throws HelperServiceException, TException
258
    {
259
      TMessage msg = iprot_.readMessageBegin();
260
      if (msg.type == TMessageType.EXCEPTION) {
261
        TApplicationException x = TApplicationException.read(iprot_);
262
        iprot_.readMessageEnd();
263
        throw x;
264
      }
265
      getSubstitutedMessage_result result = new getSubstitutedMessage_result();
266
      result.read(iprot_);
267
      iprot_.readMessageEnd();
268
      if (result.isSetSuccess()) {
269
        return result.success;
270
      }
271
      if (result.se != null) {
272
        throw result.se;
273
      }
274
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSubstitutedMessage failed: unknown result");
275
    }
276
 
277
  }
278
  public static class Processor implements TProcessor {
279
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
280
    public Processor(Iface iface)
281
    {
282
      iface_ = iface;
283
      processMap_.put("sendMail", new sendMail());
284
      processMap_.put("sendText", new sendText());
285
      processMap_.put("addMessage", new addMessage());
286
      processMap_.put("updateMessage", new updateMessage());
287
      processMap_.put("getMessage", new getMessage());
288
      processMap_.put("getSubstitutedMessage", new getSubstitutedMessage());
289
    }
290
 
291
    protected static interface ProcessFunction {
292
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
293
    }
294
 
295
    private Iface iface_;
296
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
297
 
298
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
299
    {
300
      TMessage msg = iprot.readMessageBegin();
301
      ProcessFunction fn = processMap_.get(msg.name);
302
      if (fn == null) {
303
        TProtocolUtil.skip(iprot, TType.STRUCT);
304
        iprot.readMessageEnd();
305
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
306
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
307
        x.write(oprot);
308
        oprot.writeMessageEnd();
309
        oprot.getTransport().flush();
310
        return true;
311
      }
312
      fn.process(msg.seqid, iprot, oprot);
313
      return true;
314
    }
315
 
316
    private class sendMail implements ProcessFunction {
317
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
318
      {
319
        sendMail_args args = new sendMail_args();
320
        args.read(iprot);
321
        iprot.readMessageEnd();
322
        sendMail_result result = new sendMail_result();
323
        try {
324
          iface_.sendMail(args.mail);
325
        } catch (HelperServiceException se) {
326
          result.se = se;
327
        } catch (Throwable th) {
328
          LOGGER.error("Internal error processing sendMail", th);
329
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendMail");
330
          oprot.writeMessageBegin(new TMessage("sendMail", TMessageType.EXCEPTION, seqid));
331
          x.write(oprot);
332
          oprot.writeMessageEnd();
333
          oprot.getTransport().flush();
334
          return;
335
        }
336
        oprot.writeMessageBegin(new TMessage("sendMail", TMessageType.REPLY, seqid));
337
        result.write(oprot);
338
        oprot.writeMessageEnd();
339
        oprot.getTransport().flush();
340
      }
341
 
342
    }
343
 
344
    private class sendText implements ProcessFunction {
345
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
346
      {
347
        sendText_args args = new sendText_args();
348
        args.read(iprot);
349
        iprot.readMessageEnd();
350
        sendText_result result = new sendText_result();
351
        try {
352
          iface_.sendText(args.message);
353
        } catch (HelperServiceException se) {
354
          result.se = se;
355
        } catch (Throwable th) {
356
          LOGGER.error("Internal error processing sendText", th);
357
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing sendText");
358
          oprot.writeMessageBegin(new TMessage("sendText", TMessageType.EXCEPTION, seqid));
359
          x.write(oprot);
360
          oprot.writeMessageEnd();
361
          oprot.getTransport().flush();
362
          return;
363
        }
364
        oprot.writeMessageBegin(new TMessage("sendText", TMessageType.REPLY, seqid));
365
        result.write(oprot);
366
        oprot.writeMessageEnd();
367
        oprot.getTransport().flush();
368
      }
369
 
370
    }
371
 
372
    private class addMessage implements ProcessFunction {
373
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
374
      {
375
        addMessage_args args = new addMessage_args();
376
        args.read(iprot);
377
        iprot.readMessageEnd();
378
        addMessage_result result = new addMessage_result();
379
        try {
380
          iface_.addMessage(args.message);
381
        } catch (HelperServiceException se) {
382
          result.se = se;
383
        } catch (Throwable th) {
384
          LOGGER.error("Internal error processing addMessage", th);
385
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addMessage");
386
          oprot.writeMessageBegin(new TMessage("addMessage", TMessageType.EXCEPTION, seqid));
387
          x.write(oprot);
388
          oprot.writeMessageEnd();
389
          oprot.getTransport().flush();
390
          return;
391
        }
392
        oprot.writeMessageBegin(new TMessage("addMessage", TMessageType.REPLY, seqid));
393
        result.write(oprot);
394
        oprot.writeMessageEnd();
395
        oprot.getTransport().flush();
396
      }
397
 
398
    }
399
 
400
    private class updateMessage implements ProcessFunction {
401
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
402
      {
403
        updateMessage_args args = new updateMessage_args();
404
        args.read(iprot);
405
        iprot.readMessageEnd();
406
        updateMessage_result result = new updateMessage_result();
407
        try {
408
          iface_.updateMessage(args.id, args.message);
409
        } catch (HelperServiceException se) {
410
          result.se = se;
411
        } catch (Throwable th) {
412
          LOGGER.error("Internal error processing updateMessage", th);
413
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMessage");
414
          oprot.writeMessageBegin(new TMessage("updateMessage", TMessageType.EXCEPTION, seqid));
415
          x.write(oprot);
416
          oprot.writeMessageEnd();
417
          oprot.getTransport().flush();
418
          return;
419
        }
420
        oprot.writeMessageBegin(new TMessage("updateMessage", TMessageType.REPLY, seqid));
421
        result.write(oprot);
422
        oprot.writeMessageEnd();
423
        oprot.getTransport().flush();
424
      }
425
 
426
    }
427
 
428
    private class getMessage implements ProcessFunction {
429
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
430
      {
431
        getMessage_args args = new getMessage_args();
432
        args.read(iprot);
433
        iprot.readMessageEnd();
434
        getMessage_result result = new getMessage_result();
435
        try {
436
          result.success = iface_.getMessage(args.id);
437
        } catch (HelperServiceException se) {
438
          result.se = se;
439
        } catch (Throwable th) {
440
          LOGGER.error("Internal error processing getMessage", th);
441
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMessage");
442
          oprot.writeMessageBegin(new TMessage("getMessage", TMessageType.EXCEPTION, seqid));
443
          x.write(oprot);
444
          oprot.writeMessageEnd();
445
          oprot.getTransport().flush();
446
          return;
447
        }
448
        oprot.writeMessageBegin(new TMessage("getMessage", TMessageType.REPLY, seqid));
449
        result.write(oprot);
450
        oprot.writeMessageEnd();
451
        oprot.getTransport().flush();
452
      }
453
 
454
    }
455
 
456
    private class getSubstitutedMessage implements ProcessFunction {
457
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
458
      {
459
        getSubstitutedMessage_args args = new getSubstitutedMessage_args();
460
        args.read(iprot);
461
        iprot.readMessageEnd();
462
        getSubstitutedMessage_result result = new getSubstitutedMessage_result();
463
        try {
464
          result.success = iface_.getSubstitutedMessage(args.id, args.params);
465
        } catch (HelperServiceException se) {
466
          result.se = se;
467
        } catch (Throwable th) {
468
          LOGGER.error("Internal error processing getSubstitutedMessage", th);
469
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getSubstitutedMessage");
470
          oprot.writeMessageBegin(new TMessage("getSubstitutedMessage", TMessageType.EXCEPTION, seqid));
471
          x.write(oprot);
472
          oprot.writeMessageEnd();
473
          oprot.getTransport().flush();
474
          return;
475
        }
476
        oprot.writeMessageBegin(new TMessage("getSubstitutedMessage", TMessageType.REPLY, seqid));
477
        result.write(oprot);
478
        oprot.writeMessageEnd();
479
        oprot.getTransport().flush();
480
      }
481
 
482
    }
483
 
484
  }
485
 
486
  public static class sendMail_args implements TBase<sendMail_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendMail_args>   {
487
    private static final TStruct STRUCT_DESC = new TStruct("sendMail_args");
488
 
489
    private static final TField MAIL_FIELD_DESC = new TField("mail", TType.STRUCT, (short)1);
490
 
491
    private Mail mail;
492
 
493
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
494
    public enum _Fields implements TFieldIdEnum {
495
      MAIL((short)1, "mail");
496
 
497
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
498
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
499
 
500
      static {
501
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
502
          byId.put((int)field._thriftId, field);
503
          byName.put(field.getFieldName(), field);
504
        }
505
      }
506
 
507
      /**
508
       * Find the _Fields constant that matches fieldId, or null if its not found.
509
       */
510
      public static _Fields findByThriftId(int fieldId) {
511
        return byId.get(fieldId);
512
      }
513
 
514
      /**
515
       * Find the _Fields constant that matches fieldId, throwing an exception
516
       * if it is not found.
517
       */
518
      public static _Fields findByThriftIdOrThrow(int fieldId) {
519
        _Fields fields = findByThriftId(fieldId);
520
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
521
        return fields;
522
      }
523
 
524
      /**
525
       * Find the _Fields constant that matches name, or null if its not found.
526
       */
527
      public static _Fields findByName(String name) {
528
        return byName.get(name);
529
      }
530
 
531
      private final short _thriftId;
532
      private final String _fieldName;
533
 
534
      _Fields(short thriftId, String fieldName) {
535
        _thriftId = thriftId;
536
        _fieldName = fieldName;
537
      }
538
 
539
      public short getThriftFieldId() {
540
        return _thriftId;
541
      }
542
 
543
      public String getFieldName() {
544
        return _fieldName;
545
      }
546
    }
547
 
548
    // isset id assignments
549
 
550
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
551
      put(_Fields.MAIL, new FieldMetaData("mail", TFieldRequirementType.DEFAULT, 
552
          new StructMetaData(TType.STRUCT, Mail.class)));
553
    }});
554
 
555
    static {
556
      FieldMetaData.addStructMetaDataMap(sendMail_args.class, metaDataMap);
557
    }
558
 
559
    public sendMail_args() {
560
    }
561
 
562
    public sendMail_args(
563
      Mail mail)
564
    {
565
      this();
566
      this.mail = mail;
567
    }
568
 
569
    /**
570
     * Performs a deep copy on <i>other</i>.
571
     */
572
    public sendMail_args(sendMail_args other) {
573
      if (other.isSetMail()) {
574
        this.mail = new Mail(other.mail);
575
      }
576
    }
577
 
578
    public sendMail_args deepCopy() {
579
      return new sendMail_args(this);
580
    }
581
 
582
    @Deprecated
583
    public sendMail_args clone() {
584
      return new sendMail_args(this);
585
    }
586
 
587
    public Mail getMail() {
588
      return this.mail;
589
    }
590
 
591
    public sendMail_args setMail(Mail mail) {
592
      this.mail = mail;
593
      return this;
594
    }
595
 
596
    public void unsetMail() {
597
      this.mail = null;
598
    }
599
 
600
    /** Returns true if field mail is set (has been asigned a value) and false otherwise */
601
    public boolean isSetMail() {
602
      return this.mail != null;
603
    }
604
 
605
    public void setMailIsSet(boolean value) {
606
      if (!value) {
607
        this.mail = null;
608
      }
609
    }
610
 
611
    public void setFieldValue(_Fields field, Object value) {
612
      switch (field) {
613
      case MAIL:
614
        if (value == null) {
615
          unsetMail();
616
        } else {
617
          setMail((Mail)value);
618
        }
619
        break;
620
 
621
      }
622
    }
623
 
624
    public void setFieldValue(int fieldID, Object value) {
625
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
626
    }
627
 
628
    public Object getFieldValue(_Fields field) {
629
      switch (field) {
630
      case MAIL:
631
        return getMail();
632
 
633
      }
634
      throw new IllegalStateException();
635
    }
636
 
637
    public Object getFieldValue(int fieldId) {
638
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
639
    }
640
 
641
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
642
    public boolean isSet(_Fields field) {
643
      switch (field) {
644
      case MAIL:
645
        return isSetMail();
646
      }
647
      throw new IllegalStateException();
648
    }
649
 
650
    public boolean isSet(int fieldID) {
651
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
652
    }
653
 
654
    @Override
655
    public boolean equals(Object that) {
656
      if (that == null)
657
        return false;
658
      if (that instanceof sendMail_args)
659
        return this.equals((sendMail_args)that);
660
      return false;
661
    }
662
 
663
    public boolean equals(sendMail_args that) {
664
      if (that == null)
665
        return false;
666
 
667
      boolean this_present_mail = true && this.isSetMail();
668
      boolean that_present_mail = true && that.isSetMail();
669
      if (this_present_mail || that_present_mail) {
670
        if (!(this_present_mail && that_present_mail))
671
          return false;
672
        if (!this.mail.equals(that.mail))
673
          return false;
674
      }
675
 
676
      return true;
677
    }
678
 
679
    @Override
680
    public int hashCode() {
681
      return 0;
682
    }
683
 
684
    public int compareTo(sendMail_args other) {
685
      if (!getClass().equals(other.getClass())) {
686
        return getClass().getName().compareTo(other.getClass().getName());
687
      }
688
 
689
      int lastComparison = 0;
690
      sendMail_args typedOther = (sendMail_args)other;
691
 
692
      lastComparison = Boolean.valueOf(isSetMail()).compareTo(isSetMail());
693
      if (lastComparison != 0) {
694
        return lastComparison;
695
      }
696
      lastComparison = TBaseHelper.compareTo(mail, typedOther.mail);
697
      if (lastComparison != 0) {
698
        return lastComparison;
699
      }
700
      return 0;
701
    }
702
 
703
    public void read(TProtocol iprot) throws TException {
704
      TField field;
705
      iprot.readStructBegin();
706
      while (true)
707
      {
708
        field = iprot.readFieldBegin();
709
        if (field.type == TType.STOP) { 
710
          break;
711
        }
712
        _Fields fieldId = _Fields.findByThriftId(field.id);
713
        if (fieldId == null) {
714
          TProtocolUtil.skip(iprot, field.type);
715
        } else {
716
          switch (fieldId) {
717
            case MAIL:
718
              if (field.type == TType.STRUCT) {
719
                this.mail = new Mail();
720
                this.mail.read(iprot);
721
              } else { 
722
                TProtocolUtil.skip(iprot, field.type);
723
              }
724
              break;
725
          }
726
          iprot.readFieldEnd();
727
        }
728
      }
729
      iprot.readStructEnd();
730
      validate();
731
    }
732
 
733
    public void write(TProtocol oprot) throws TException {
734
      validate();
735
 
736
      oprot.writeStructBegin(STRUCT_DESC);
737
      if (this.mail != null) {
738
        oprot.writeFieldBegin(MAIL_FIELD_DESC);
739
        this.mail.write(oprot);
740
        oprot.writeFieldEnd();
741
      }
742
      oprot.writeFieldStop();
743
      oprot.writeStructEnd();
744
    }
745
 
746
    @Override
747
    public String toString() {
748
      StringBuilder sb = new StringBuilder("sendMail_args(");
749
      boolean first = true;
750
 
751
      sb.append("mail:");
752
      if (this.mail == null) {
753
        sb.append("null");
754
      } else {
755
        sb.append(this.mail);
756
      }
757
      first = false;
758
      sb.append(")");
759
      return sb.toString();
760
    }
761
 
762
    public void validate() throws TException {
763
      // check for required fields
764
    }
765
 
766
  }
767
 
768
  public static class sendMail_result implements TBase<sendMail_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendMail_result>   {
769
    private static final TStruct STRUCT_DESC = new TStruct("sendMail_result");
770
 
771
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
772
 
773
    private HelperServiceException se;
774
 
775
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
776
    public enum _Fields implements TFieldIdEnum {
777
      SE((short)1, "se");
778
 
779
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
780
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
781
 
782
      static {
783
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
784
          byId.put((int)field._thriftId, field);
785
          byName.put(field.getFieldName(), field);
786
        }
787
      }
788
 
789
      /**
790
       * Find the _Fields constant that matches fieldId, or null if its not found.
791
       */
792
      public static _Fields findByThriftId(int fieldId) {
793
        return byId.get(fieldId);
794
      }
795
 
796
      /**
797
       * Find the _Fields constant that matches fieldId, throwing an exception
798
       * if it is not found.
799
       */
800
      public static _Fields findByThriftIdOrThrow(int fieldId) {
801
        _Fields fields = findByThriftId(fieldId);
802
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
803
        return fields;
804
      }
805
 
806
      /**
807
       * Find the _Fields constant that matches name, or null if its not found.
808
       */
809
      public static _Fields findByName(String name) {
810
        return byName.get(name);
811
      }
812
 
813
      private final short _thriftId;
814
      private final String _fieldName;
815
 
816
      _Fields(short thriftId, String fieldName) {
817
        _thriftId = thriftId;
818
        _fieldName = fieldName;
819
      }
820
 
821
      public short getThriftFieldId() {
822
        return _thriftId;
823
      }
824
 
825
      public String getFieldName() {
826
        return _fieldName;
827
      }
828
    }
829
 
830
    // isset id assignments
831
 
832
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
833
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
834
          new FieldValueMetaData(TType.STRUCT)));
835
    }});
836
 
837
    static {
838
      FieldMetaData.addStructMetaDataMap(sendMail_result.class, metaDataMap);
839
    }
840
 
841
    public sendMail_result() {
842
    }
843
 
844
    public sendMail_result(
845
      HelperServiceException se)
846
    {
847
      this();
848
      this.se = se;
849
    }
850
 
851
    /**
852
     * Performs a deep copy on <i>other</i>.
853
     */
854
    public sendMail_result(sendMail_result other) {
855
      if (other.isSetSe()) {
856
        this.se = new HelperServiceException(other.se);
857
      }
858
    }
859
 
860
    public sendMail_result deepCopy() {
861
      return new sendMail_result(this);
862
    }
863
 
864
    @Deprecated
865
    public sendMail_result clone() {
866
      return new sendMail_result(this);
867
    }
868
 
869
    public HelperServiceException getSe() {
870
      return this.se;
871
    }
872
 
873
    public sendMail_result setSe(HelperServiceException se) {
874
      this.se = se;
875
      return this;
876
    }
877
 
878
    public void unsetSe() {
879
      this.se = null;
880
    }
881
 
882
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
883
    public boolean isSetSe() {
884
      return this.se != null;
885
    }
886
 
887
    public void setSeIsSet(boolean value) {
888
      if (!value) {
889
        this.se = null;
890
      }
891
    }
892
 
893
    public void setFieldValue(_Fields field, Object value) {
894
      switch (field) {
895
      case SE:
896
        if (value == null) {
897
          unsetSe();
898
        } else {
899
          setSe((HelperServiceException)value);
900
        }
901
        break;
902
 
903
      }
904
    }
905
 
906
    public void setFieldValue(int fieldID, Object value) {
907
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
908
    }
909
 
910
    public Object getFieldValue(_Fields field) {
911
      switch (field) {
912
      case SE:
913
        return getSe();
914
 
915
      }
916
      throw new IllegalStateException();
917
    }
918
 
919
    public Object getFieldValue(int fieldId) {
920
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
921
    }
922
 
923
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
924
    public boolean isSet(_Fields field) {
925
      switch (field) {
926
      case SE:
927
        return isSetSe();
928
      }
929
      throw new IllegalStateException();
930
    }
931
 
932
    public boolean isSet(int fieldID) {
933
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
934
    }
935
 
936
    @Override
937
    public boolean equals(Object that) {
938
      if (that == null)
939
        return false;
940
      if (that instanceof sendMail_result)
941
        return this.equals((sendMail_result)that);
942
      return false;
943
    }
944
 
945
    public boolean equals(sendMail_result that) {
946
      if (that == null)
947
        return false;
948
 
949
      boolean this_present_se = true && this.isSetSe();
950
      boolean that_present_se = true && that.isSetSe();
951
      if (this_present_se || that_present_se) {
952
        if (!(this_present_se && that_present_se))
953
          return false;
954
        if (!this.se.equals(that.se))
955
          return false;
956
      }
957
 
958
      return true;
959
    }
960
 
961
    @Override
962
    public int hashCode() {
963
      return 0;
964
    }
965
 
966
    public int compareTo(sendMail_result other) {
967
      if (!getClass().equals(other.getClass())) {
968
        return getClass().getName().compareTo(other.getClass().getName());
969
      }
970
 
971
      int lastComparison = 0;
972
      sendMail_result typedOther = (sendMail_result)other;
973
 
974
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
975
      if (lastComparison != 0) {
976
        return lastComparison;
977
      }
978
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
979
      if (lastComparison != 0) {
980
        return lastComparison;
981
      }
982
      return 0;
983
    }
984
 
985
    public void read(TProtocol iprot) throws TException {
986
      TField field;
987
      iprot.readStructBegin();
988
      while (true)
989
      {
990
        field = iprot.readFieldBegin();
991
        if (field.type == TType.STOP) { 
992
          break;
993
        }
994
        _Fields fieldId = _Fields.findByThriftId(field.id);
995
        if (fieldId == null) {
996
          TProtocolUtil.skip(iprot, field.type);
997
        } else {
998
          switch (fieldId) {
999
            case SE:
1000
              if (field.type == TType.STRUCT) {
1001
                this.se = new HelperServiceException();
1002
                this.se.read(iprot);
1003
              } else { 
1004
                TProtocolUtil.skip(iprot, field.type);
1005
              }
1006
              break;
1007
          }
1008
          iprot.readFieldEnd();
1009
        }
1010
      }
1011
      iprot.readStructEnd();
1012
      validate();
1013
    }
1014
 
1015
    public void write(TProtocol oprot) throws TException {
1016
      oprot.writeStructBegin(STRUCT_DESC);
1017
 
1018
      if (this.isSetSe()) {
1019
        oprot.writeFieldBegin(SE_FIELD_DESC);
1020
        this.se.write(oprot);
1021
        oprot.writeFieldEnd();
1022
      }
1023
      oprot.writeFieldStop();
1024
      oprot.writeStructEnd();
1025
    }
1026
 
1027
    @Override
1028
    public String toString() {
1029
      StringBuilder sb = new StringBuilder("sendMail_result(");
1030
      boolean first = true;
1031
 
1032
      sb.append("se:");
1033
      if (this.se == null) {
1034
        sb.append("null");
1035
      } else {
1036
        sb.append(this.se);
1037
      }
1038
      first = false;
1039
      sb.append(")");
1040
      return sb.toString();
1041
    }
1042
 
1043
    public void validate() throws TException {
1044
      // check for required fields
1045
    }
1046
 
1047
  }
1048
 
1049
  public static class sendText_args implements TBase<sendText_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendText_args>   {
1050
    private static final TStruct STRUCT_DESC = new TStruct("sendText_args");
1051
 
1052
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRUCT, (short)1);
1053
 
1054
    private TextMessage message;
1055
 
1056
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1057
    public enum _Fields implements TFieldIdEnum {
1058
      MESSAGE((short)1, "message");
1059
 
1060
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1061
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1062
 
1063
      static {
1064
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1065
          byId.put((int)field._thriftId, field);
1066
          byName.put(field.getFieldName(), field);
1067
        }
1068
      }
1069
 
1070
      /**
1071
       * Find the _Fields constant that matches fieldId, or null if its not found.
1072
       */
1073
      public static _Fields findByThriftId(int fieldId) {
1074
        return byId.get(fieldId);
1075
      }
1076
 
1077
      /**
1078
       * Find the _Fields constant that matches fieldId, throwing an exception
1079
       * if it is not found.
1080
       */
1081
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1082
        _Fields fields = findByThriftId(fieldId);
1083
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1084
        return fields;
1085
      }
1086
 
1087
      /**
1088
       * Find the _Fields constant that matches name, or null if its not found.
1089
       */
1090
      public static _Fields findByName(String name) {
1091
        return byName.get(name);
1092
      }
1093
 
1094
      private final short _thriftId;
1095
      private final String _fieldName;
1096
 
1097
      _Fields(short thriftId, String fieldName) {
1098
        _thriftId = thriftId;
1099
        _fieldName = fieldName;
1100
      }
1101
 
1102
      public short getThriftFieldId() {
1103
        return _thriftId;
1104
      }
1105
 
1106
      public String getFieldName() {
1107
        return _fieldName;
1108
      }
1109
    }
1110
 
1111
    // isset id assignments
1112
 
1113
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1114
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
1115
          new StructMetaData(TType.STRUCT, TextMessage.class)));
1116
    }});
1117
 
1118
    static {
1119
      FieldMetaData.addStructMetaDataMap(sendText_args.class, metaDataMap);
1120
    }
1121
 
1122
    public sendText_args() {
1123
    }
1124
 
1125
    public sendText_args(
1126
      TextMessage message)
1127
    {
1128
      this();
1129
      this.message = message;
1130
    }
1131
 
1132
    /**
1133
     * Performs a deep copy on <i>other</i>.
1134
     */
1135
    public sendText_args(sendText_args other) {
1136
      if (other.isSetMessage()) {
1137
        this.message = new TextMessage(other.message);
1138
      }
1139
    }
1140
 
1141
    public sendText_args deepCopy() {
1142
      return new sendText_args(this);
1143
    }
1144
 
1145
    @Deprecated
1146
    public sendText_args clone() {
1147
      return new sendText_args(this);
1148
    }
1149
 
1150
    public TextMessage getMessage() {
1151
      return this.message;
1152
    }
1153
 
1154
    public sendText_args setMessage(TextMessage message) {
1155
      this.message = message;
1156
      return this;
1157
    }
1158
 
1159
    public void unsetMessage() {
1160
      this.message = null;
1161
    }
1162
 
1163
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
1164
    public boolean isSetMessage() {
1165
      return this.message != null;
1166
    }
1167
 
1168
    public void setMessageIsSet(boolean value) {
1169
      if (!value) {
1170
        this.message = null;
1171
      }
1172
    }
1173
 
1174
    public void setFieldValue(_Fields field, Object value) {
1175
      switch (field) {
1176
      case MESSAGE:
1177
        if (value == null) {
1178
          unsetMessage();
1179
        } else {
1180
          setMessage((TextMessage)value);
1181
        }
1182
        break;
1183
 
1184
      }
1185
    }
1186
 
1187
    public void setFieldValue(int fieldID, Object value) {
1188
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1189
    }
1190
 
1191
    public Object getFieldValue(_Fields field) {
1192
      switch (field) {
1193
      case MESSAGE:
1194
        return getMessage();
1195
 
1196
      }
1197
      throw new IllegalStateException();
1198
    }
1199
 
1200
    public Object getFieldValue(int fieldId) {
1201
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1202
    }
1203
 
1204
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1205
    public boolean isSet(_Fields field) {
1206
      switch (field) {
1207
      case MESSAGE:
1208
        return isSetMessage();
1209
      }
1210
      throw new IllegalStateException();
1211
    }
1212
 
1213
    public boolean isSet(int fieldID) {
1214
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1215
    }
1216
 
1217
    @Override
1218
    public boolean equals(Object that) {
1219
      if (that == null)
1220
        return false;
1221
      if (that instanceof sendText_args)
1222
        return this.equals((sendText_args)that);
1223
      return false;
1224
    }
1225
 
1226
    public boolean equals(sendText_args that) {
1227
      if (that == null)
1228
        return false;
1229
 
1230
      boolean this_present_message = true && this.isSetMessage();
1231
      boolean that_present_message = true && that.isSetMessage();
1232
      if (this_present_message || that_present_message) {
1233
        if (!(this_present_message && that_present_message))
1234
          return false;
1235
        if (!this.message.equals(that.message))
1236
          return false;
1237
      }
1238
 
1239
      return true;
1240
    }
1241
 
1242
    @Override
1243
    public int hashCode() {
1244
      return 0;
1245
    }
1246
 
1247
    public int compareTo(sendText_args other) {
1248
      if (!getClass().equals(other.getClass())) {
1249
        return getClass().getName().compareTo(other.getClass().getName());
1250
      }
1251
 
1252
      int lastComparison = 0;
1253
      sendText_args typedOther = (sendText_args)other;
1254
 
1255
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
1256
      if (lastComparison != 0) {
1257
        return lastComparison;
1258
      }
1259
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
1260
      if (lastComparison != 0) {
1261
        return lastComparison;
1262
      }
1263
      return 0;
1264
    }
1265
 
1266
    public void read(TProtocol iprot) throws TException {
1267
      TField field;
1268
      iprot.readStructBegin();
1269
      while (true)
1270
      {
1271
        field = iprot.readFieldBegin();
1272
        if (field.type == TType.STOP) { 
1273
          break;
1274
        }
1275
        _Fields fieldId = _Fields.findByThriftId(field.id);
1276
        if (fieldId == null) {
1277
          TProtocolUtil.skip(iprot, field.type);
1278
        } else {
1279
          switch (fieldId) {
1280
            case MESSAGE:
1281
              if (field.type == TType.STRUCT) {
1282
                this.message = new TextMessage();
1283
                this.message.read(iprot);
1284
              } else { 
1285
                TProtocolUtil.skip(iprot, field.type);
1286
              }
1287
              break;
1288
          }
1289
          iprot.readFieldEnd();
1290
        }
1291
      }
1292
      iprot.readStructEnd();
1293
      validate();
1294
    }
1295
 
1296
    public void write(TProtocol oprot) throws TException {
1297
      validate();
1298
 
1299
      oprot.writeStructBegin(STRUCT_DESC);
1300
      if (this.message != null) {
1301
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
1302
        this.message.write(oprot);
1303
        oprot.writeFieldEnd();
1304
      }
1305
      oprot.writeFieldStop();
1306
      oprot.writeStructEnd();
1307
    }
1308
 
1309
    @Override
1310
    public String toString() {
1311
      StringBuilder sb = new StringBuilder("sendText_args(");
1312
      boolean first = true;
1313
 
1314
      sb.append("message:");
1315
      if (this.message == null) {
1316
        sb.append("null");
1317
      } else {
1318
        sb.append(this.message);
1319
      }
1320
      first = false;
1321
      sb.append(")");
1322
      return sb.toString();
1323
    }
1324
 
1325
    public void validate() throws TException {
1326
      // check for required fields
1327
    }
1328
 
1329
  }
1330
 
1331
  public static class sendText_result implements TBase<sendText_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendText_result>   {
1332
    private static final TStruct STRUCT_DESC = new TStruct("sendText_result");
1333
 
1334
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
1335
 
1336
    private HelperServiceException se;
1337
 
1338
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1339
    public enum _Fields implements TFieldIdEnum {
1340
      SE((short)1, "se");
1341
 
1342
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1343
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1344
 
1345
      static {
1346
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1347
          byId.put((int)field._thriftId, field);
1348
          byName.put(field.getFieldName(), field);
1349
        }
1350
      }
1351
 
1352
      /**
1353
       * Find the _Fields constant that matches fieldId, or null if its not found.
1354
       */
1355
      public static _Fields findByThriftId(int fieldId) {
1356
        return byId.get(fieldId);
1357
      }
1358
 
1359
      /**
1360
       * Find the _Fields constant that matches fieldId, throwing an exception
1361
       * if it is not found.
1362
       */
1363
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1364
        _Fields fields = findByThriftId(fieldId);
1365
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1366
        return fields;
1367
      }
1368
 
1369
      /**
1370
       * Find the _Fields constant that matches name, or null if its not found.
1371
       */
1372
      public static _Fields findByName(String name) {
1373
        return byName.get(name);
1374
      }
1375
 
1376
      private final short _thriftId;
1377
      private final String _fieldName;
1378
 
1379
      _Fields(short thriftId, String fieldName) {
1380
        _thriftId = thriftId;
1381
        _fieldName = fieldName;
1382
      }
1383
 
1384
      public short getThriftFieldId() {
1385
        return _thriftId;
1386
      }
1387
 
1388
      public String getFieldName() {
1389
        return _fieldName;
1390
      }
1391
    }
1392
 
1393
    // isset id assignments
1394
 
1395
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1396
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
1397
          new FieldValueMetaData(TType.STRUCT)));
1398
    }});
1399
 
1400
    static {
1401
      FieldMetaData.addStructMetaDataMap(sendText_result.class, metaDataMap);
1402
    }
1403
 
1404
    public sendText_result() {
1405
    }
1406
 
1407
    public sendText_result(
1408
      HelperServiceException se)
1409
    {
1410
      this();
1411
      this.se = se;
1412
    }
1413
 
1414
    /**
1415
     * Performs a deep copy on <i>other</i>.
1416
     */
1417
    public sendText_result(sendText_result other) {
1418
      if (other.isSetSe()) {
1419
        this.se = new HelperServiceException(other.se);
1420
      }
1421
    }
1422
 
1423
    public sendText_result deepCopy() {
1424
      return new sendText_result(this);
1425
    }
1426
 
1427
    @Deprecated
1428
    public sendText_result clone() {
1429
      return new sendText_result(this);
1430
    }
1431
 
1432
    public HelperServiceException getSe() {
1433
      return this.se;
1434
    }
1435
 
1436
    public sendText_result setSe(HelperServiceException se) {
1437
      this.se = se;
1438
      return this;
1439
    }
1440
 
1441
    public void unsetSe() {
1442
      this.se = null;
1443
    }
1444
 
1445
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
1446
    public boolean isSetSe() {
1447
      return this.se != null;
1448
    }
1449
 
1450
    public void setSeIsSet(boolean value) {
1451
      if (!value) {
1452
        this.se = null;
1453
      }
1454
    }
1455
 
1456
    public void setFieldValue(_Fields field, Object value) {
1457
      switch (field) {
1458
      case SE:
1459
        if (value == null) {
1460
          unsetSe();
1461
        } else {
1462
          setSe((HelperServiceException)value);
1463
        }
1464
        break;
1465
 
1466
      }
1467
    }
1468
 
1469
    public void setFieldValue(int fieldID, Object value) {
1470
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1471
    }
1472
 
1473
    public Object getFieldValue(_Fields field) {
1474
      switch (field) {
1475
      case SE:
1476
        return getSe();
1477
 
1478
      }
1479
      throw new IllegalStateException();
1480
    }
1481
 
1482
    public Object getFieldValue(int fieldId) {
1483
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1484
    }
1485
 
1486
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1487
    public boolean isSet(_Fields field) {
1488
      switch (field) {
1489
      case SE:
1490
        return isSetSe();
1491
      }
1492
      throw new IllegalStateException();
1493
    }
1494
 
1495
    public boolean isSet(int fieldID) {
1496
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1497
    }
1498
 
1499
    @Override
1500
    public boolean equals(Object that) {
1501
      if (that == null)
1502
        return false;
1503
      if (that instanceof sendText_result)
1504
        return this.equals((sendText_result)that);
1505
      return false;
1506
    }
1507
 
1508
    public boolean equals(sendText_result that) {
1509
      if (that == null)
1510
        return false;
1511
 
1512
      boolean this_present_se = true && this.isSetSe();
1513
      boolean that_present_se = true && that.isSetSe();
1514
      if (this_present_se || that_present_se) {
1515
        if (!(this_present_se && that_present_se))
1516
          return false;
1517
        if (!this.se.equals(that.se))
1518
          return false;
1519
      }
1520
 
1521
      return true;
1522
    }
1523
 
1524
    @Override
1525
    public int hashCode() {
1526
      return 0;
1527
    }
1528
 
1529
    public int compareTo(sendText_result other) {
1530
      if (!getClass().equals(other.getClass())) {
1531
        return getClass().getName().compareTo(other.getClass().getName());
1532
      }
1533
 
1534
      int lastComparison = 0;
1535
      sendText_result typedOther = (sendText_result)other;
1536
 
1537
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
1538
      if (lastComparison != 0) {
1539
        return lastComparison;
1540
      }
1541
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
1542
      if (lastComparison != 0) {
1543
        return lastComparison;
1544
      }
1545
      return 0;
1546
    }
1547
 
1548
    public void read(TProtocol iprot) throws TException {
1549
      TField field;
1550
      iprot.readStructBegin();
1551
      while (true)
1552
      {
1553
        field = iprot.readFieldBegin();
1554
        if (field.type == TType.STOP) { 
1555
          break;
1556
        }
1557
        _Fields fieldId = _Fields.findByThriftId(field.id);
1558
        if (fieldId == null) {
1559
          TProtocolUtil.skip(iprot, field.type);
1560
        } else {
1561
          switch (fieldId) {
1562
            case SE:
1563
              if (field.type == TType.STRUCT) {
1564
                this.se = new HelperServiceException();
1565
                this.se.read(iprot);
1566
              } else { 
1567
                TProtocolUtil.skip(iprot, field.type);
1568
              }
1569
              break;
1570
          }
1571
          iprot.readFieldEnd();
1572
        }
1573
      }
1574
      iprot.readStructEnd();
1575
      validate();
1576
    }
1577
 
1578
    public void write(TProtocol oprot) throws TException {
1579
      oprot.writeStructBegin(STRUCT_DESC);
1580
 
1581
      if (this.isSetSe()) {
1582
        oprot.writeFieldBegin(SE_FIELD_DESC);
1583
        this.se.write(oprot);
1584
        oprot.writeFieldEnd();
1585
      }
1586
      oprot.writeFieldStop();
1587
      oprot.writeStructEnd();
1588
    }
1589
 
1590
    @Override
1591
    public String toString() {
1592
      StringBuilder sb = new StringBuilder("sendText_result(");
1593
      boolean first = true;
1594
 
1595
      sb.append("se:");
1596
      if (this.se == null) {
1597
        sb.append("null");
1598
      } else {
1599
        sb.append(this.se);
1600
      }
1601
      first = false;
1602
      sb.append(")");
1603
      return sb.toString();
1604
    }
1605
 
1606
    public void validate() throws TException {
1607
      // check for required fields
1608
    }
1609
 
1610
  }
1611
 
1612
  public static class addMessage_args implements TBase<addMessage_args._Fields>, java.io.Serializable, Cloneable, Comparable<addMessage_args>   {
1613
    private static final TStruct STRUCT_DESC = new TStruct("addMessage_args");
1614
 
1615
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRUCT, (short)1);
1616
 
1617
    private Message message;
1618
 
1619
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1620
    public enum _Fields implements TFieldIdEnum {
1621
      MESSAGE((short)1, "message");
1622
 
1623
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1624
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1625
 
1626
      static {
1627
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1628
          byId.put((int)field._thriftId, field);
1629
          byName.put(field.getFieldName(), field);
1630
        }
1631
      }
1632
 
1633
      /**
1634
       * Find the _Fields constant that matches fieldId, or null if its not found.
1635
       */
1636
      public static _Fields findByThriftId(int fieldId) {
1637
        return byId.get(fieldId);
1638
      }
1639
 
1640
      /**
1641
       * Find the _Fields constant that matches fieldId, throwing an exception
1642
       * if it is not found.
1643
       */
1644
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1645
        _Fields fields = findByThriftId(fieldId);
1646
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1647
        return fields;
1648
      }
1649
 
1650
      /**
1651
       * Find the _Fields constant that matches name, or null if its not found.
1652
       */
1653
      public static _Fields findByName(String name) {
1654
        return byName.get(name);
1655
      }
1656
 
1657
      private final short _thriftId;
1658
      private final String _fieldName;
1659
 
1660
      _Fields(short thriftId, String fieldName) {
1661
        _thriftId = thriftId;
1662
        _fieldName = fieldName;
1663
      }
1664
 
1665
      public short getThriftFieldId() {
1666
        return _thriftId;
1667
      }
1668
 
1669
      public String getFieldName() {
1670
        return _fieldName;
1671
      }
1672
    }
1673
 
1674
    // isset id assignments
1675
 
1676
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1677
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
1678
          new StructMetaData(TType.STRUCT, Message.class)));
1679
    }});
1680
 
1681
    static {
1682
      FieldMetaData.addStructMetaDataMap(addMessage_args.class, metaDataMap);
1683
    }
1684
 
1685
    public addMessage_args() {
1686
    }
1687
 
1688
    public addMessage_args(
1689
      Message message)
1690
    {
1691
      this();
1692
      this.message = message;
1693
    }
1694
 
1695
    /**
1696
     * Performs a deep copy on <i>other</i>.
1697
     */
1698
    public addMessage_args(addMessage_args other) {
1699
      if (other.isSetMessage()) {
1700
        this.message = new Message(other.message);
1701
      }
1702
    }
1703
 
1704
    public addMessage_args deepCopy() {
1705
      return new addMessage_args(this);
1706
    }
1707
 
1708
    @Deprecated
1709
    public addMessage_args clone() {
1710
      return new addMessage_args(this);
1711
    }
1712
 
1713
    public Message getMessage() {
1714
      return this.message;
1715
    }
1716
 
1717
    public addMessage_args setMessage(Message message) {
1718
      this.message = message;
1719
      return this;
1720
    }
1721
 
1722
    public void unsetMessage() {
1723
      this.message = null;
1724
    }
1725
 
1726
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
1727
    public boolean isSetMessage() {
1728
      return this.message != null;
1729
    }
1730
 
1731
    public void setMessageIsSet(boolean value) {
1732
      if (!value) {
1733
        this.message = null;
1734
      }
1735
    }
1736
 
1737
    public void setFieldValue(_Fields field, Object value) {
1738
      switch (field) {
1739
      case MESSAGE:
1740
        if (value == null) {
1741
          unsetMessage();
1742
        } else {
1743
          setMessage((Message)value);
1744
        }
1745
        break;
1746
 
1747
      }
1748
    }
1749
 
1750
    public void setFieldValue(int fieldID, Object value) {
1751
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1752
    }
1753
 
1754
    public Object getFieldValue(_Fields field) {
1755
      switch (field) {
1756
      case MESSAGE:
1757
        return getMessage();
1758
 
1759
      }
1760
      throw new IllegalStateException();
1761
    }
1762
 
1763
    public Object getFieldValue(int fieldId) {
1764
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1765
    }
1766
 
1767
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1768
    public boolean isSet(_Fields field) {
1769
      switch (field) {
1770
      case MESSAGE:
1771
        return isSetMessage();
1772
      }
1773
      throw new IllegalStateException();
1774
    }
1775
 
1776
    public boolean isSet(int fieldID) {
1777
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1778
    }
1779
 
1780
    @Override
1781
    public boolean equals(Object that) {
1782
      if (that == null)
1783
        return false;
1784
      if (that instanceof addMessage_args)
1785
        return this.equals((addMessage_args)that);
1786
      return false;
1787
    }
1788
 
1789
    public boolean equals(addMessage_args that) {
1790
      if (that == null)
1791
        return false;
1792
 
1793
      boolean this_present_message = true && this.isSetMessage();
1794
      boolean that_present_message = true && that.isSetMessage();
1795
      if (this_present_message || that_present_message) {
1796
        if (!(this_present_message && that_present_message))
1797
          return false;
1798
        if (!this.message.equals(that.message))
1799
          return false;
1800
      }
1801
 
1802
      return true;
1803
    }
1804
 
1805
    @Override
1806
    public int hashCode() {
1807
      return 0;
1808
    }
1809
 
1810
    public int compareTo(addMessage_args other) {
1811
      if (!getClass().equals(other.getClass())) {
1812
        return getClass().getName().compareTo(other.getClass().getName());
1813
      }
1814
 
1815
      int lastComparison = 0;
1816
      addMessage_args typedOther = (addMessage_args)other;
1817
 
1818
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
1819
      if (lastComparison != 0) {
1820
        return lastComparison;
1821
      }
1822
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
1823
      if (lastComparison != 0) {
1824
        return lastComparison;
1825
      }
1826
      return 0;
1827
    }
1828
 
1829
    public void read(TProtocol iprot) throws TException {
1830
      TField field;
1831
      iprot.readStructBegin();
1832
      while (true)
1833
      {
1834
        field = iprot.readFieldBegin();
1835
        if (field.type == TType.STOP) { 
1836
          break;
1837
        }
1838
        _Fields fieldId = _Fields.findByThriftId(field.id);
1839
        if (fieldId == null) {
1840
          TProtocolUtil.skip(iprot, field.type);
1841
        } else {
1842
          switch (fieldId) {
1843
            case MESSAGE:
1844
              if (field.type == TType.STRUCT) {
1845
                this.message = new Message();
1846
                this.message.read(iprot);
1847
              } else { 
1848
                TProtocolUtil.skip(iprot, field.type);
1849
              }
1850
              break;
1851
          }
1852
          iprot.readFieldEnd();
1853
        }
1854
      }
1855
      iprot.readStructEnd();
1856
      validate();
1857
    }
1858
 
1859
    public void write(TProtocol oprot) throws TException {
1860
      validate();
1861
 
1862
      oprot.writeStructBegin(STRUCT_DESC);
1863
      if (this.message != null) {
1864
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
1865
        this.message.write(oprot);
1866
        oprot.writeFieldEnd();
1867
      }
1868
      oprot.writeFieldStop();
1869
      oprot.writeStructEnd();
1870
    }
1871
 
1872
    @Override
1873
    public String toString() {
1874
      StringBuilder sb = new StringBuilder("addMessage_args(");
1875
      boolean first = true;
1876
 
1877
      sb.append("message:");
1878
      if (this.message == null) {
1879
        sb.append("null");
1880
      } else {
1881
        sb.append(this.message);
1882
      }
1883
      first = false;
1884
      sb.append(")");
1885
      return sb.toString();
1886
    }
1887
 
1888
    public void validate() throws TException {
1889
      // check for required fields
1890
    }
1891
 
1892
  }
1893
 
1894
  public static class addMessage_result implements TBase<addMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<addMessage_result>   {
1895
    private static final TStruct STRUCT_DESC = new TStruct("addMessage_result");
1896
 
1897
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
1898
 
1899
    private HelperServiceException se;
1900
 
1901
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1902
    public enum _Fields implements TFieldIdEnum {
1903
      SE((short)1, "se");
1904
 
1905
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1906
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1907
 
1908
      static {
1909
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1910
          byId.put((int)field._thriftId, field);
1911
          byName.put(field.getFieldName(), field);
1912
        }
1913
      }
1914
 
1915
      /**
1916
       * Find the _Fields constant that matches fieldId, or null if its not found.
1917
       */
1918
      public static _Fields findByThriftId(int fieldId) {
1919
        return byId.get(fieldId);
1920
      }
1921
 
1922
      /**
1923
       * Find the _Fields constant that matches fieldId, throwing an exception
1924
       * if it is not found.
1925
       */
1926
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1927
        _Fields fields = findByThriftId(fieldId);
1928
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1929
        return fields;
1930
      }
1931
 
1932
      /**
1933
       * Find the _Fields constant that matches name, or null if its not found.
1934
       */
1935
      public static _Fields findByName(String name) {
1936
        return byName.get(name);
1937
      }
1938
 
1939
      private final short _thriftId;
1940
      private final String _fieldName;
1941
 
1942
      _Fields(short thriftId, String fieldName) {
1943
        _thriftId = thriftId;
1944
        _fieldName = fieldName;
1945
      }
1946
 
1947
      public short getThriftFieldId() {
1948
        return _thriftId;
1949
      }
1950
 
1951
      public String getFieldName() {
1952
        return _fieldName;
1953
      }
1954
    }
1955
 
1956
    // isset id assignments
1957
 
1958
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1959
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
1960
          new FieldValueMetaData(TType.STRUCT)));
1961
    }});
1962
 
1963
    static {
1964
      FieldMetaData.addStructMetaDataMap(addMessage_result.class, metaDataMap);
1965
    }
1966
 
1967
    public addMessage_result() {
1968
    }
1969
 
1970
    public addMessage_result(
1971
      HelperServiceException se)
1972
    {
1973
      this();
1974
      this.se = se;
1975
    }
1976
 
1977
    /**
1978
     * Performs a deep copy on <i>other</i>.
1979
     */
1980
    public addMessage_result(addMessage_result other) {
1981
      if (other.isSetSe()) {
1982
        this.se = new HelperServiceException(other.se);
1983
      }
1984
    }
1985
 
1986
    public addMessage_result deepCopy() {
1987
      return new addMessage_result(this);
1988
    }
1989
 
1990
    @Deprecated
1991
    public addMessage_result clone() {
1992
      return new addMessage_result(this);
1993
    }
1994
 
1995
    public HelperServiceException getSe() {
1996
      return this.se;
1997
    }
1998
 
1999
    public addMessage_result setSe(HelperServiceException se) {
2000
      this.se = se;
2001
      return this;
2002
    }
2003
 
2004
    public void unsetSe() {
2005
      this.se = null;
2006
    }
2007
 
2008
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
2009
    public boolean isSetSe() {
2010
      return this.se != null;
2011
    }
2012
 
2013
    public void setSeIsSet(boolean value) {
2014
      if (!value) {
2015
        this.se = null;
2016
      }
2017
    }
2018
 
2019
    public void setFieldValue(_Fields field, Object value) {
2020
      switch (field) {
2021
      case SE:
2022
        if (value == null) {
2023
          unsetSe();
2024
        } else {
2025
          setSe((HelperServiceException)value);
2026
        }
2027
        break;
2028
 
2029
      }
2030
    }
2031
 
2032
    public void setFieldValue(int fieldID, Object value) {
2033
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2034
    }
2035
 
2036
    public Object getFieldValue(_Fields field) {
2037
      switch (field) {
2038
      case SE:
2039
        return getSe();
2040
 
2041
      }
2042
      throw new IllegalStateException();
2043
    }
2044
 
2045
    public Object getFieldValue(int fieldId) {
2046
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2047
    }
2048
 
2049
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2050
    public boolean isSet(_Fields field) {
2051
      switch (field) {
2052
      case SE:
2053
        return isSetSe();
2054
      }
2055
      throw new IllegalStateException();
2056
    }
2057
 
2058
    public boolean isSet(int fieldID) {
2059
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2060
    }
2061
 
2062
    @Override
2063
    public boolean equals(Object that) {
2064
      if (that == null)
2065
        return false;
2066
      if (that instanceof addMessage_result)
2067
        return this.equals((addMessage_result)that);
2068
      return false;
2069
    }
2070
 
2071
    public boolean equals(addMessage_result that) {
2072
      if (that == null)
2073
        return false;
2074
 
2075
      boolean this_present_se = true && this.isSetSe();
2076
      boolean that_present_se = true && that.isSetSe();
2077
      if (this_present_se || that_present_se) {
2078
        if (!(this_present_se && that_present_se))
2079
          return false;
2080
        if (!this.se.equals(that.se))
2081
          return false;
2082
      }
2083
 
2084
      return true;
2085
    }
2086
 
2087
    @Override
2088
    public int hashCode() {
2089
      return 0;
2090
    }
2091
 
2092
    public int compareTo(addMessage_result other) {
2093
      if (!getClass().equals(other.getClass())) {
2094
        return getClass().getName().compareTo(other.getClass().getName());
2095
      }
2096
 
2097
      int lastComparison = 0;
2098
      addMessage_result typedOther = (addMessage_result)other;
2099
 
2100
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
2101
      if (lastComparison != 0) {
2102
        return lastComparison;
2103
      }
2104
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
2105
      if (lastComparison != 0) {
2106
        return lastComparison;
2107
      }
2108
      return 0;
2109
    }
2110
 
2111
    public void read(TProtocol iprot) throws TException {
2112
      TField field;
2113
      iprot.readStructBegin();
2114
      while (true)
2115
      {
2116
        field = iprot.readFieldBegin();
2117
        if (field.type == TType.STOP) { 
2118
          break;
2119
        }
2120
        _Fields fieldId = _Fields.findByThriftId(field.id);
2121
        if (fieldId == null) {
2122
          TProtocolUtil.skip(iprot, field.type);
2123
        } else {
2124
          switch (fieldId) {
2125
            case SE:
2126
              if (field.type == TType.STRUCT) {
2127
                this.se = new HelperServiceException();
2128
                this.se.read(iprot);
2129
              } else { 
2130
                TProtocolUtil.skip(iprot, field.type);
2131
              }
2132
              break;
2133
          }
2134
          iprot.readFieldEnd();
2135
        }
2136
      }
2137
      iprot.readStructEnd();
2138
      validate();
2139
    }
2140
 
2141
    public void write(TProtocol oprot) throws TException {
2142
      oprot.writeStructBegin(STRUCT_DESC);
2143
 
2144
      if (this.isSetSe()) {
2145
        oprot.writeFieldBegin(SE_FIELD_DESC);
2146
        this.se.write(oprot);
2147
        oprot.writeFieldEnd();
2148
      }
2149
      oprot.writeFieldStop();
2150
      oprot.writeStructEnd();
2151
    }
2152
 
2153
    @Override
2154
    public String toString() {
2155
      StringBuilder sb = new StringBuilder("addMessage_result(");
2156
      boolean first = true;
2157
 
2158
      sb.append("se:");
2159
      if (this.se == null) {
2160
        sb.append("null");
2161
      } else {
2162
        sb.append(this.se);
2163
      }
2164
      first = false;
2165
      sb.append(")");
2166
      return sb.toString();
2167
    }
2168
 
2169
    public void validate() throws TException {
2170
      // check for required fields
2171
    }
2172
 
2173
  }
2174
 
2175
  public static class updateMessage_args implements TBase<updateMessage_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMessage_args>   {
2176
    private static final TStruct STRUCT_DESC = new TStruct("updateMessage_args");
2177
 
2178
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2179
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)2);
2180
 
2181
    private long id;
2182
    private String message;
2183
 
2184
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2185
    public enum _Fields implements TFieldIdEnum {
2186
      ID((short)1, "id"),
2187
      MESSAGE((short)2, "message");
2188
 
2189
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2190
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2191
 
2192
      static {
2193
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2194
          byId.put((int)field._thriftId, field);
2195
          byName.put(field.getFieldName(), field);
2196
        }
2197
      }
2198
 
2199
      /**
2200
       * Find the _Fields constant that matches fieldId, or null if its not found.
2201
       */
2202
      public static _Fields findByThriftId(int fieldId) {
2203
        return byId.get(fieldId);
2204
      }
2205
 
2206
      /**
2207
       * Find the _Fields constant that matches fieldId, throwing an exception
2208
       * if it is not found.
2209
       */
2210
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2211
        _Fields fields = findByThriftId(fieldId);
2212
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2213
        return fields;
2214
      }
2215
 
2216
      /**
2217
       * Find the _Fields constant that matches name, or null if its not found.
2218
       */
2219
      public static _Fields findByName(String name) {
2220
        return byName.get(name);
2221
      }
2222
 
2223
      private final short _thriftId;
2224
      private final String _fieldName;
2225
 
2226
      _Fields(short thriftId, String fieldName) {
2227
        _thriftId = thriftId;
2228
        _fieldName = fieldName;
2229
      }
2230
 
2231
      public short getThriftFieldId() {
2232
        return _thriftId;
2233
      }
2234
 
2235
      public String getFieldName() {
2236
        return _fieldName;
2237
      }
2238
    }
2239
 
2240
    // isset id assignments
2241
    private static final int __ID_ISSET_ID = 0;
2242
    private BitSet __isset_bit_vector = new BitSet(1);
2243
 
2244
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2245
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
2246
          new FieldValueMetaData(TType.I64)));
2247
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
2248
          new FieldValueMetaData(TType.STRING)));
2249
    }});
2250
 
2251
    static {
2252
      FieldMetaData.addStructMetaDataMap(updateMessage_args.class, metaDataMap);
2253
    }
2254
 
2255
    public updateMessage_args() {
2256
    }
2257
 
2258
    public updateMessage_args(
2259
      long id,
2260
      String message)
2261
    {
2262
      this();
2263
      this.id = id;
2264
      setIdIsSet(true);
2265
      this.message = message;
2266
    }
2267
 
2268
    /**
2269
     * Performs a deep copy on <i>other</i>.
2270
     */
2271
    public updateMessage_args(updateMessage_args other) {
2272
      __isset_bit_vector.clear();
2273
      __isset_bit_vector.or(other.__isset_bit_vector);
2274
      this.id = other.id;
2275
      if (other.isSetMessage()) {
2276
        this.message = other.message;
2277
      }
2278
    }
2279
 
2280
    public updateMessage_args deepCopy() {
2281
      return new updateMessage_args(this);
2282
    }
2283
 
2284
    @Deprecated
2285
    public updateMessage_args clone() {
2286
      return new updateMessage_args(this);
2287
    }
2288
 
2289
    public long getId() {
2290
      return this.id;
2291
    }
2292
 
2293
    public updateMessage_args setId(long id) {
2294
      this.id = id;
2295
      setIdIsSet(true);
2296
      return this;
2297
    }
2298
 
2299
    public void unsetId() {
2300
      __isset_bit_vector.clear(__ID_ISSET_ID);
2301
    }
2302
 
2303
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
2304
    public boolean isSetId() {
2305
      return __isset_bit_vector.get(__ID_ISSET_ID);
2306
    }
2307
 
2308
    public void setIdIsSet(boolean value) {
2309
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2310
    }
2311
 
2312
    public String getMessage() {
2313
      return this.message;
2314
    }
2315
 
2316
    public updateMessage_args setMessage(String message) {
2317
      this.message = message;
2318
      return this;
2319
    }
2320
 
2321
    public void unsetMessage() {
2322
      this.message = null;
2323
    }
2324
 
2325
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
2326
    public boolean isSetMessage() {
2327
      return this.message != null;
2328
    }
2329
 
2330
    public void setMessageIsSet(boolean value) {
2331
      if (!value) {
2332
        this.message = null;
2333
      }
2334
    }
2335
 
2336
    public void setFieldValue(_Fields field, Object value) {
2337
      switch (field) {
2338
      case ID:
2339
        if (value == null) {
2340
          unsetId();
2341
        } else {
2342
          setId((Long)value);
2343
        }
2344
        break;
2345
 
2346
      case MESSAGE:
2347
        if (value == null) {
2348
          unsetMessage();
2349
        } else {
2350
          setMessage((String)value);
2351
        }
2352
        break;
2353
 
2354
      }
2355
    }
2356
 
2357
    public void setFieldValue(int fieldID, Object value) {
2358
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2359
    }
2360
 
2361
    public Object getFieldValue(_Fields field) {
2362
      switch (field) {
2363
      case ID:
2364
        return new Long(getId());
2365
 
2366
      case MESSAGE:
2367
        return getMessage();
2368
 
2369
      }
2370
      throw new IllegalStateException();
2371
    }
2372
 
2373
    public Object getFieldValue(int fieldId) {
2374
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2375
    }
2376
 
2377
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2378
    public boolean isSet(_Fields field) {
2379
      switch (field) {
2380
      case ID:
2381
        return isSetId();
2382
      case MESSAGE:
2383
        return isSetMessage();
2384
      }
2385
      throw new IllegalStateException();
2386
    }
2387
 
2388
    public boolean isSet(int fieldID) {
2389
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2390
    }
2391
 
2392
    @Override
2393
    public boolean equals(Object that) {
2394
      if (that == null)
2395
        return false;
2396
      if (that instanceof updateMessage_args)
2397
        return this.equals((updateMessage_args)that);
2398
      return false;
2399
    }
2400
 
2401
    public boolean equals(updateMessage_args that) {
2402
      if (that == null)
2403
        return false;
2404
 
2405
      boolean this_present_id = true;
2406
      boolean that_present_id = true;
2407
      if (this_present_id || that_present_id) {
2408
        if (!(this_present_id && that_present_id))
2409
          return false;
2410
        if (this.id != that.id)
2411
          return false;
2412
      }
2413
 
2414
      boolean this_present_message = true && this.isSetMessage();
2415
      boolean that_present_message = true && that.isSetMessage();
2416
      if (this_present_message || that_present_message) {
2417
        if (!(this_present_message && that_present_message))
2418
          return false;
2419
        if (!this.message.equals(that.message))
2420
          return false;
2421
      }
2422
 
2423
      return true;
2424
    }
2425
 
2426
    @Override
2427
    public int hashCode() {
2428
      return 0;
2429
    }
2430
 
2431
    public int compareTo(updateMessage_args other) {
2432
      if (!getClass().equals(other.getClass())) {
2433
        return getClass().getName().compareTo(other.getClass().getName());
2434
      }
2435
 
2436
      int lastComparison = 0;
2437
      updateMessage_args typedOther = (updateMessage_args)other;
2438
 
2439
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
2440
      if (lastComparison != 0) {
2441
        return lastComparison;
2442
      }
2443
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
2444
      if (lastComparison != 0) {
2445
        return lastComparison;
2446
      }
2447
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
2448
      if (lastComparison != 0) {
2449
        return lastComparison;
2450
      }
2451
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
2452
      if (lastComparison != 0) {
2453
        return lastComparison;
2454
      }
2455
      return 0;
2456
    }
2457
 
2458
    public void read(TProtocol iprot) throws TException {
2459
      TField field;
2460
      iprot.readStructBegin();
2461
      while (true)
2462
      {
2463
        field = iprot.readFieldBegin();
2464
        if (field.type == TType.STOP) { 
2465
          break;
2466
        }
2467
        _Fields fieldId = _Fields.findByThriftId(field.id);
2468
        if (fieldId == null) {
2469
          TProtocolUtil.skip(iprot, field.type);
2470
        } else {
2471
          switch (fieldId) {
2472
            case ID:
2473
              if (field.type == TType.I64) {
2474
                this.id = iprot.readI64();
2475
                setIdIsSet(true);
2476
              } else { 
2477
                TProtocolUtil.skip(iprot, field.type);
2478
              }
2479
              break;
2480
            case MESSAGE:
2481
              if (field.type == TType.STRING) {
2482
                this.message = iprot.readString();
2483
              } else { 
2484
                TProtocolUtil.skip(iprot, field.type);
2485
              }
2486
              break;
2487
          }
2488
          iprot.readFieldEnd();
2489
        }
2490
      }
2491
      iprot.readStructEnd();
2492
      validate();
2493
    }
2494
 
2495
    public void write(TProtocol oprot) throws TException {
2496
      validate();
2497
 
2498
      oprot.writeStructBegin(STRUCT_DESC);
2499
      oprot.writeFieldBegin(ID_FIELD_DESC);
2500
      oprot.writeI64(this.id);
2501
      oprot.writeFieldEnd();
2502
      if (this.message != null) {
2503
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
2504
        oprot.writeString(this.message);
2505
        oprot.writeFieldEnd();
2506
      }
2507
      oprot.writeFieldStop();
2508
      oprot.writeStructEnd();
2509
    }
2510
 
2511
    @Override
2512
    public String toString() {
2513
      StringBuilder sb = new StringBuilder("updateMessage_args(");
2514
      boolean first = true;
2515
 
2516
      sb.append("id:");
2517
      sb.append(this.id);
2518
      first = false;
2519
      if (!first) sb.append(", ");
2520
      sb.append("message:");
2521
      if (this.message == null) {
2522
        sb.append("null");
2523
      } else {
2524
        sb.append(this.message);
2525
      }
2526
      first = false;
2527
      sb.append(")");
2528
      return sb.toString();
2529
    }
2530
 
2531
    public void validate() throws TException {
2532
      // check for required fields
2533
    }
2534
 
2535
  }
2536
 
2537
  public static class updateMessage_result implements TBase<updateMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMessage_result>   {
2538
    private static final TStruct STRUCT_DESC = new TStruct("updateMessage_result");
2539
 
2540
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
2541
 
2542
    private HelperServiceException se;
2543
 
2544
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2545
    public enum _Fields implements TFieldIdEnum {
2546
      SE((short)1, "se");
2547
 
2548
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2549
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2550
 
2551
      static {
2552
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2553
          byId.put((int)field._thriftId, field);
2554
          byName.put(field.getFieldName(), field);
2555
        }
2556
      }
2557
 
2558
      /**
2559
       * Find the _Fields constant that matches fieldId, or null if its not found.
2560
       */
2561
      public static _Fields findByThriftId(int fieldId) {
2562
        return byId.get(fieldId);
2563
      }
2564
 
2565
      /**
2566
       * Find the _Fields constant that matches fieldId, throwing an exception
2567
       * if it is not found.
2568
       */
2569
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2570
        _Fields fields = findByThriftId(fieldId);
2571
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2572
        return fields;
2573
      }
2574
 
2575
      /**
2576
       * Find the _Fields constant that matches name, or null if its not found.
2577
       */
2578
      public static _Fields findByName(String name) {
2579
        return byName.get(name);
2580
      }
2581
 
2582
      private final short _thriftId;
2583
      private final String _fieldName;
2584
 
2585
      _Fields(short thriftId, String fieldName) {
2586
        _thriftId = thriftId;
2587
        _fieldName = fieldName;
2588
      }
2589
 
2590
      public short getThriftFieldId() {
2591
        return _thriftId;
2592
      }
2593
 
2594
      public String getFieldName() {
2595
        return _fieldName;
2596
      }
2597
    }
2598
 
2599
    // isset id assignments
2600
 
2601
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2602
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
2603
          new FieldValueMetaData(TType.STRUCT)));
2604
    }});
2605
 
2606
    static {
2607
      FieldMetaData.addStructMetaDataMap(updateMessage_result.class, metaDataMap);
2608
    }
2609
 
2610
    public updateMessage_result() {
2611
    }
2612
 
2613
    public updateMessage_result(
2614
      HelperServiceException se)
2615
    {
2616
      this();
2617
      this.se = se;
2618
    }
2619
 
2620
    /**
2621
     * Performs a deep copy on <i>other</i>.
2622
     */
2623
    public updateMessage_result(updateMessage_result other) {
2624
      if (other.isSetSe()) {
2625
        this.se = new HelperServiceException(other.se);
2626
      }
2627
    }
2628
 
2629
    public updateMessage_result deepCopy() {
2630
      return new updateMessage_result(this);
2631
    }
2632
 
2633
    @Deprecated
2634
    public updateMessage_result clone() {
2635
      return new updateMessage_result(this);
2636
    }
2637
 
2638
    public HelperServiceException getSe() {
2639
      return this.se;
2640
    }
2641
 
2642
    public updateMessage_result setSe(HelperServiceException se) {
2643
      this.se = se;
2644
      return this;
2645
    }
2646
 
2647
    public void unsetSe() {
2648
      this.se = null;
2649
    }
2650
 
2651
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
2652
    public boolean isSetSe() {
2653
      return this.se != null;
2654
    }
2655
 
2656
    public void setSeIsSet(boolean value) {
2657
      if (!value) {
2658
        this.se = null;
2659
      }
2660
    }
2661
 
2662
    public void setFieldValue(_Fields field, Object value) {
2663
      switch (field) {
2664
      case SE:
2665
        if (value == null) {
2666
          unsetSe();
2667
        } else {
2668
          setSe((HelperServiceException)value);
2669
        }
2670
        break;
2671
 
2672
      }
2673
    }
2674
 
2675
    public void setFieldValue(int fieldID, Object value) {
2676
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2677
    }
2678
 
2679
    public Object getFieldValue(_Fields field) {
2680
      switch (field) {
2681
      case SE:
2682
        return getSe();
2683
 
2684
      }
2685
      throw new IllegalStateException();
2686
    }
2687
 
2688
    public Object getFieldValue(int fieldId) {
2689
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2690
    }
2691
 
2692
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2693
    public boolean isSet(_Fields field) {
2694
      switch (field) {
2695
      case SE:
2696
        return isSetSe();
2697
      }
2698
      throw new IllegalStateException();
2699
    }
2700
 
2701
    public boolean isSet(int fieldID) {
2702
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2703
    }
2704
 
2705
    @Override
2706
    public boolean equals(Object that) {
2707
      if (that == null)
2708
        return false;
2709
      if (that instanceof updateMessage_result)
2710
        return this.equals((updateMessage_result)that);
2711
      return false;
2712
    }
2713
 
2714
    public boolean equals(updateMessage_result that) {
2715
      if (that == null)
2716
        return false;
2717
 
2718
      boolean this_present_se = true && this.isSetSe();
2719
      boolean that_present_se = true && that.isSetSe();
2720
      if (this_present_se || that_present_se) {
2721
        if (!(this_present_se && that_present_se))
2722
          return false;
2723
        if (!this.se.equals(that.se))
2724
          return false;
2725
      }
2726
 
2727
      return true;
2728
    }
2729
 
2730
    @Override
2731
    public int hashCode() {
2732
      return 0;
2733
    }
2734
 
2735
    public int compareTo(updateMessage_result other) {
2736
      if (!getClass().equals(other.getClass())) {
2737
        return getClass().getName().compareTo(other.getClass().getName());
2738
      }
2739
 
2740
      int lastComparison = 0;
2741
      updateMessage_result typedOther = (updateMessage_result)other;
2742
 
2743
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
2744
      if (lastComparison != 0) {
2745
        return lastComparison;
2746
      }
2747
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
2748
      if (lastComparison != 0) {
2749
        return lastComparison;
2750
      }
2751
      return 0;
2752
    }
2753
 
2754
    public void read(TProtocol iprot) throws TException {
2755
      TField field;
2756
      iprot.readStructBegin();
2757
      while (true)
2758
      {
2759
        field = iprot.readFieldBegin();
2760
        if (field.type == TType.STOP) { 
2761
          break;
2762
        }
2763
        _Fields fieldId = _Fields.findByThriftId(field.id);
2764
        if (fieldId == null) {
2765
          TProtocolUtil.skip(iprot, field.type);
2766
        } else {
2767
          switch (fieldId) {
2768
            case SE:
2769
              if (field.type == TType.STRUCT) {
2770
                this.se = new HelperServiceException();
2771
                this.se.read(iprot);
2772
              } else { 
2773
                TProtocolUtil.skip(iprot, field.type);
2774
              }
2775
              break;
2776
          }
2777
          iprot.readFieldEnd();
2778
        }
2779
      }
2780
      iprot.readStructEnd();
2781
      validate();
2782
    }
2783
 
2784
    public void write(TProtocol oprot) throws TException {
2785
      oprot.writeStructBegin(STRUCT_DESC);
2786
 
2787
      if (this.isSetSe()) {
2788
        oprot.writeFieldBegin(SE_FIELD_DESC);
2789
        this.se.write(oprot);
2790
        oprot.writeFieldEnd();
2791
      }
2792
      oprot.writeFieldStop();
2793
      oprot.writeStructEnd();
2794
    }
2795
 
2796
    @Override
2797
    public String toString() {
2798
      StringBuilder sb = new StringBuilder("updateMessage_result(");
2799
      boolean first = true;
2800
 
2801
      sb.append("se:");
2802
      if (this.se == null) {
2803
        sb.append("null");
2804
      } else {
2805
        sb.append(this.se);
2806
      }
2807
      first = false;
2808
      sb.append(")");
2809
      return sb.toString();
2810
    }
2811
 
2812
    public void validate() throws TException {
2813
      // check for required fields
2814
    }
2815
 
2816
  }
2817
 
2818
  public static class getMessage_args implements TBase<getMessage_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMessage_args>   {
2819
    private static final TStruct STRUCT_DESC = new TStruct("getMessage_args");
2820
 
2821
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2822
 
2823
    private long id;
2824
 
2825
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2826
    public enum _Fields implements TFieldIdEnum {
2827
      ID((short)1, "id");
2828
 
2829
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2830
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2831
 
2832
      static {
2833
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2834
          byId.put((int)field._thriftId, field);
2835
          byName.put(field.getFieldName(), field);
2836
        }
2837
      }
2838
 
2839
      /**
2840
       * Find the _Fields constant that matches fieldId, or null if its not found.
2841
       */
2842
      public static _Fields findByThriftId(int fieldId) {
2843
        return byId.get(fieldId);
2844
      }
2845
 
2846
      /**
2847
       * Find the _Fields constant that matches fieldId, throwing an exception
2848
       * if it is not found.
2849
       */
2850
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2851
        _Fields fields = findByThriftId(fieldId);
2852
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2853
        return fields;
2854
      }
2855
 
2856
      /**
2857
       * Find the _Fields constant that matches name, or null if its not found.
2858
       */
2859
      public static _Fields findByName(String name) {
2860
        return byName.get(name);
2861
      }
2862
 
2863
      private final short _thriftId;
2864
      private final String _fieldName;
2865
 
2866
      _Fields(short thriftId, String fieldName) {
2867
        _thriftId = thriftId;
2868
        _fieldName = fieldName;
2869
      }
2870
 
2871
      public short getThriftFieldId() {
2872
        return _thriftId;
2873
      }
2874
 
2875
      public String getFieldName() {
2876
        return _fieldName;
2877
      }
2878
    }
2879
 
2880
    // isset id assignments
2881
    private static final int __ID_ISSET_ID = 0;
2882
    private BitSet __isset_bit_vector = new BitSet(1);
2883
 
2884
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2885
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
2886
          new FieldValueMetaData(TType.I64)));
2887
    }});
2888
 
2889
    static {
2890
      FieldMetaData.addStructMetaDataMap(getMessage_args.class, metaDataMap);
2891
    }
2892
 
2893
    public getMessage_args() {
2894
    }
2895
 
2896
    public getMessage_args(
2897
      long id)
2898
    {
2899
      this();
2900
      this.id = id;
2901
      setIdIsSet(true);
2902
    }
2903
 
2904
    /**
2905
     * Performs a deep copy on <i>other</i>.
2906
     */
2907
    public getMessage_args(getMessage_args other) {
2908
      __isset_bit_vector.clear();
2909
      __isset_bit_vector.or(other.__isset_bit_vector);
2910
      this.id = other.id;
2911
    }
2912
 
2913
    public getMessage_args deepCopy() {
2914
      return new getMessage_args(this);
2915
    }
2916
 
2917
    @Deprecated
2918
    public getMessage_args clone() {
2919
      return new getMessage_args(this);
2920
    }
2921
 
2922
    public long getId() {
2923
      return this.id;
2924
    }
2925
 
2926
    public getMessage_args setId(long id) {
2927
      this.id = id;
2928
      setIdIsSet(true);
2929
      return this;
2930
    }
2931
 
2932
    public void unsetId() {
2933
      __isset_bit_vector.clear(__ID_ISSET_ID);
2934
    }
2935
 
2936
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
2937
    public boolean isSetId() {
2938
      return __isset_bit_vector.get(__ID_ISSET_ID);
2939
    }
2940
 
2941
    public void setIdIsSet(boolean value) {
2942
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2943
    }
2944
 
2945
    public void setFieldValue(_Fields field, Object value) {
2946
      switch (field) {
2947
      case ID:
2948
        if (value == null) {
2949
          unsetId();
2950
        } else {
2951
          setId((Long)value);
2952
        }
2953
        break;
2954
 
2955
      }
2956
    }
2957
 
2958
    public void setFieldValue(int fieldID, Object value) {
2959
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2960
    }
2961
 
2962
    public Object getFieldValue(_Fields field) {
2963
      switch (field) {
2964
      case ID:
2965
        return new Long(getId());
2966
 
2967
      }
2968
      throw new IllegalStateException();
2969
    }
2970
 
2971
    public Object getFieldValue(int fieldId) {
2972
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2973
    }
2974
 
2975
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2976
    public boolean isSet(_Fields field) {
2977
      switch (field) {
2978
      case ID:
2979
        return isSetId();
2980
      }
2981
      throw new IllegalStateException();
2982
    }
2983
 
2984
    public boolean isSet(int fieldID) {
2985
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2986
    }
2987
 
2988
    @Override
2989
    public boolean equals(Object that) {
2990
      if (that == null)
2991
        return false;
2992
      if (that instanceof getMessage_args)
2993
        return this.equals((getMessage_args)that);
2994
      return false;
2995
    }
2996
 
2997
    public boolean equals(getMessage_args that) {
2998
      if (that == null)
2999
        return false;
3000
 
3001
      boolean this_present_id = true;
3002
      boolean that_present_id = true;
3003
      if (this_present_id || that_present_id) {
3004
        if (!(this_present_id && that_present_id))
3005
          return false;
3006
        if (this.id != that.id)
3007
          return false;
3008
      }
3009
 
3010
      return true;
3011
    }
3012
 
3013
    @Override
3014
    public int hashCode() {
3015
      return 0;
3016
    }
3017
 
3018
    public int compareTo(getMessage_args other) {
3019
      if (!getClass().equals(other.getClass())) {
3020
        return getClass().getName().compareTo(other.getClass().getName());
3021
      }
3022
 
3023
      int lastComparison = 0;
3024
      getMessage_args typedOther = (getMessage_args)other;
3025
 
3026
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3027
      if (lastComparison != 0) {
3028
        return lastComparison;
3029
      }
3030
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3031
      if (lastComparison != 0) {
3032
        return lastComparison;
3033
      }
3034
      return 0;
3035
    }
3036
 
3037
    public void read(TProtocol iprot) throws TException {
3038
      TField field;
3039
      iprot.readStructBegin();
3040
      while (true)
3041
      {
3042
        field = iprot.readFieldBegin();
3043
        if (field.type == TType.STOP) { 
3044
          break;
3045
        }
3046
        _Fields fieldId = _Fields.findByThriftId(field.id);
3047
        if (fieldId == null) {
3048
          TProtocolUtil.skip(iprot, field.type);
3049
        } else {
3050
          switch (fieldId) {
3051
            case ID:
3052
              if (field.type == TType.I64) {
3053
                this.id = iprot.readI64();
3054
                setIdIsSet(true);
3055
              } else { 
3056
                TProtocolUtil.skip(iprot, field.type);
3057
              }
3058
              break;
3059
          }
3060
          iprot.readFieldEnd();
3061
        }
3062
      }
3063
      iprot.readStructEnd();
3064
      validate();
3065
    }
3066
 
3067
    public void write(TProtocol oprot) throws TException {
3068
      validate();
3069
 
3070
      oprot.writeStructBegin(STRUCT_DESC);
3071
      oprot.writeFieldBegin(ID_FIELD_DESC);
3072
      oprot.writeI64(this.id);
3073
      oprot.writeFieldEnd();
3074
      oprot.writeFieldStop();
3075
      oprot.writeStructEnd();
3076
    }
3077
 
3078
    @Override
3079
    public String toString() {
3080
      StringBuilder sb = new StringBuilder("getMessage_args(");
3081
      boolean first = true;
3082
 
3083
      sb.append("id:");
3084
      sb.append(this.id);
3085
      first = false;
3086
      sb.append(")");
3087
      return sb.toString();
3088
    }
3089
 
3090
    public void validate() throws TException {
3091
      // check for required fields
3092
    }
3093
 
3094
  }
3095
 
3096
  public static class getMessage_result implements TBase<getMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMessage_result>   {
3097
    private static final TStruct STRUCT_DESC = new TStruct("getMessage_result");
3098
 
3099
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3100
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
3101
 
3102
    private Message success;
3103
    private HelperServiceException se;
3104
 
3105
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3106
    public enum _Fields implements TFieldIdEnum {
3107
      SUCCESS((short)0, "success"),
3108
      SE((short)1, "se");
3109
 
3110
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3111
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3112
 
3113
      static {
3114
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3115
          byId.put((int)field._thriftId, field);
3116
          byName.put(field.getFieldName(), field);
3117
        }
3118
      }
3119
 
3120
      /**
3121
       * Find the _Fields constant that matches fieldId, or null if its not found.
3122
       */
3123
      public static _Fields findByThriftId(int fieldId) {
3124
        return byId.get(fieldId);
3125
      }
3126
 
3127
      /**
3128
       * Find the _Fields constant that matches fieldId, throwing an exception
3129
       * if it is not found.
3130
       */
3131
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3132
        _Fields fields = findByThriftId(fieldId);
3133
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3134
        return fields;
3135
      }
3136
 
3137
      /**
3138
       * Find the _Fields constant that matches name, or null if its not found.
3139
       */
3140
      public static _Fields findByName(String name) {
3141
        return byName.get(name);
3142
      }
3143
 
3144
      private final short _thriftId;
3145
      private final String _fieldName;
3146
 
3147
      _Fields(short thriftId, String fieldName) {
3148
        _thriftId = thriftId;
3149
        _fieldName = fieldName;
3150
      }
3151
 
3152
      public short getThriftFieldId() {
3153
        return _thriftId;
3154
      }
3155
 
3156
      public String getFieldName() {
3157
        return _fieldName;
3158
      }
3159
    }
3160
 
3161
    // isset id assignments
3162
 
3163
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3164
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3165
          new StructMetaData(TType.STRUCT, Message.class)));
3166
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
3167
          new FieldValueMetaData(TType.STRUCT)));
3168
    }});
3169
 
3170
    static {
3171
      FieldMetaData.addStructMetaDataMap(getMessage_result.class, metaDataMap);
3172
    }
3173
 
3174
    public getMessage_result() {
3175
    }
3176
 
3177
    public getMessage_result(
3178
      Message success,
3179
      HelperServiceException se)
3180
    {
3181
      this();
3182
      this.success = success;
3183
      this.se = se;
3184
    }
3185
 
3186
    /**
3187
     * Performs a deep copy on <i>other</i>.
3188
     */
3189
    public getMessage_result(getMessage_result other) {
3190
      if (other.isSetSuccess()) {
3191
        this.success = new Message(other.success);
3192
      }
3193
      if (other.isSetSe()) {
3194
        this.se = new HelperServiceException(other.se);
3195
      }
3196
    }
3197
 
3198
    public getMessage_result deepCopy() {
3199
      return new getMessage_result(this);
3200
    }
3201
 
3202
    @Deprecated
3203
    public getMessage_result clone() {
3204
      return new getMessage_result(this);
3205
    }
3206
 
3207
    public Message getSuccess() {
3208
      return this.success;
3209
    }
3210
 
3211
    public getMessage_result setSuccess(Message success) {
3212
      this.success = success;
3213
      return this;
3214
    }
3215
 
3216
    public void unsetSuccess() {
3217
      this.success = null;
3218
    }
3219
 
3220
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3221
    public boolean isSetSuccess() {
3222
      return this.success != null;
3223
    }
3224
 
3225
    public void setSuccessIsSet(boolean value) {
3226
      if (!value) {
3227
        this.success = null;
3228
      }
3229
    }
3230
 
3231
    public HelperServiceException getSe() {
3232
      return this.se;
3233
    }
3234
 
3235
    public getMessage_result setSe(HelperServiceException se) {
3236
      this.se = se;
3237
      return this;
3238
    }
3239
 
3240
    public void unsetSe() {
3241
      this.se = null;
3242
    }
3243
 
3244
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
3245
    public boolean isSetSe() {
3246
      return this.se != null;
3247
    }
3248
 
3249
    public void setSeIsSet(boolean value) {
3250
      if (!value) {
3251
        this.se = null;
3252
      }
3253
    }
3254
 
3255
    public void setFieldValue(_Fields field, Object value) {
3256
      switch (field) {
3257
      case SUCCESS:
3258
        if (value == null) {
3259
          unsetSuccess();
3260
        } else {
3261
          setSuccess((Message)value);
3262
        }
3263
        break;
3264
 
3265
      case SE:
3266
        if (value == null) {
3267
          unsetSe();
3268
        } else {
3269
          setSe((HelperServiceException)value);
3270
        }
3271
        break;
3272
 
3273
      }
3274
    }
3275
 
3276
    public void setFieldValue(int fieldID, Object value) {
3277
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3278
    }
3279
 
3280
    public Object getFieldValue(_Fields field) {
3281
      switch (field) {
3282
      case SUCCESS:
3283
        return getSuccess();
3284
 
3285
      case SE:
3286
        return getSe();
3287
 
3288
      }
3289
      throw new IllegalStateException();
3290
    }
3291
 
3292
    public Object getFieldValue(int fieldId) {
3293
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3294
    }
3295
 
3296
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3297
    public boolean isSet(_Fields field) {
3298
      switch (field) {
3299
      case SUCCESS:
3300
        return isSetSuccess();
3301
      case SE:
3302
        return isSetSe();
3303
      }
3304
      throw new IllegalStateException();
3305
    }
3306
 
3307
    public boolean isSet(int fieldID) {
3308
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3309
    }
3310
 
3311
    @Override
3312
    public boolean equals(Object that) {
3313
      if (that == null)
3314
        return false;
3315
      if (that instanceof getMessage_result)
3316
        return this.equals((getMessage_result)that);
3317
      return false;
3318
    }
3319
 
3320
    public boolean equals(getMessage_result that) {
3321
      if (that == null)
3322
        return false;
3323
 
3324
      boolean this_present_success = true && this.isSetSuccess();
3325
      boolean that_present_success = true && that.isSetSuccess();
3326
      if (this_present_success || that_present_success) {
3327
        if (!(this_present_success && that_present_success))
3328
          return false;
3329
        if (!this.success.equals(that.success))
3330
          return false;
3331
      }
3332
 
3333
      boolean this_present_se = true && this.isSetSe();
3334
      boolean that_present_se = true && that.isSetSe();
3335
      if (this_present_se || that_present_se) {
3336
        if (!(this_present_se && that_present_se))
3337
          return false;
3338
        if (!this.se.equals(that.se))
3339
          return false;
3340
      }
3341
 
3342
      return true;
3343
    }
3344
 
3345
    @Override
3346
    public int hashCode() {
3347
      return 0;
3348
    }
3349
 
3350
    public int compareTo(getMessage_result other) {
3351
      if (!getClass().equals(other.getClass())) {
3352
        return getClass().getName().compareTo(other.getClass().getName());
3353
      }
3354
 
3355
      int lastComparison = 0;
3356
      getMessage_result typedOther = (getMessage_result)other;
3357
 
3358
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3359
      if (lastComparison != 0) {
3360
        return lastComparison;
3361
      }
3362
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3363
      if (lastComparison != 0) {
3364
        return lastComparison;
3365
      }
3366
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
3367
      if (lastComparison != 0) {
3368
        return lastComparison;
3369
      }
3370
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
3371
      if (lastComparison != 0) {
3372
        return lastComparison;
3373
      }
3374
      return 0;
3375
    }
3376
 
3377
    public void read(TProtocol iprot) throws TException {
3378
      TField field;
3379
      iprot.readStructBegin();
3380
      while (true)
3381
      {
3382
        field = iprot.readFieldBegin();
3383
        if (field.type == TType.STOP) { 
3384
          break;
3385
        }
3386
        _Fields fieldId = _Fields.findByThriftId(field.id);
3387
        if (fieldId == null) {
3388
          TProtocolUtil.skip(iprot, field.type);
3389
        } else {
3390
          switch (fieldId) {
3391
            case SUCCESS:
3392
              if (field.type == TType.STRUCT) {
3393
                this.success = new Message();
3394
                this.success.read(iprot);
3395
              } else { 
3396
                TProtocolUtil.skip(iprot, field.type);
3397
              }
3398
              break;
3399
            case SE:
3400
              if (field.type == TType.STRUCT) {
3401
                this.se = new HelperServiceException();
3402
                this.se.read(iprot);
3403
              } else { 
3404
                TProtocolUtil.skip(iprot, field.type);
3405
              }
3406
              break;
3407
          }
3408
          iprot.readFieldEnd();
3409
        }
3410
      }
3411
      iprot.readStructEnd();
3412
      validate();
3413
    }
3414
 
3415
    public void write(TProtocol oprot) throws TException {
3416
      oprot.writeStructBegin(STRUCT_DESC);
3417
 
3418
      if (this.isSetSuccess()) {
3419
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3420
        this.success.write(oprot);
3421
        oprot.writeFieldEnd();
3422
      } else if (this.isSetSe()) {
3423
        oprot.writeFieldBegin(SE_FIELD_DESC);
3424
        this.se.write(oprot);
3425
        oprot.writeFieldEnd();
3426
      }
3427
      oprot.writeFieldStop();
3428
      oprot.writeStructEnd();
3429
    }
3430
 
3431
    @Override
3432
    public String toString() {
3433
      StringBuilder sb = new StringBuilder("getMessage_result(");
3434
      boolean first = true;
3435
 
3436
      sb.append("success:");
3437
      if (this.success == null) {
3438
        sb.append("null");
3439
      } else {
3440
        sb.append(this.success);
3441
      }
3442
      first = false;
3443
      if (!first) sb.append(", ");
3444
      sb.append("se:");
3445
      if (this.se == null) {
3446
        sb.append("null");
3447
      } else {
3448
        sb.append(this.se);
3449
      }
3450
      first = false;
3451
      sb.append(")");
3452
      return sb.toString();
3453
    }
3454
 
3455
    public void validate() throws TException {
3456
      // check for required fields
3457
    }
3458
 
3459
  }
3460
 
3461
  public static class getSubstitutedMessage_args implements TBase<getSubstitutedMessage_args._Fields>, java.io.Serializable, Cloneable   {
3462
    private static final TStruct STRUCT_DESC = new TStruct("getSubstitutedMessage_args");
3463
 
3464
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3465
    private static final TField PARAMS_FIELD_DESC = new TField("params", TType.MAP, (short)2);
3466
 
3467
    private long id;
3468
    private Map<String,String> params;
3469
 
3470
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3471
    public enum _Fields implements TFieldIdEnum {
3472
      ID((short)1, "id"),
3473
      PARAMS((short)2, "params");
3474
 
3475
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3476
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3477
 
3478
      static {
3479
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3480
          byId.put((int)field._thriftId, field);
3481
          byName.put(field.getFieldName(), field);
3482
        }
3483
      }
3484
 
3485
      /**
3486
       * Find the _Fields constant that matches fieldId, or null if its not found.
3487
       */
3488
      public static _Fields findByThriftId(int fieldId) {
3489
        return byId.get(fieldId);
3490
      }
3491
 
3492
      /**
3493
       * Find the _Fields constant that matches fieldId, throwing an exception
3494
       * if it is not found.
3495
       */
3496
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3497
        _Fields fields = findByThriftId(fieldId);
3498
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3499
        return fields;
3500
      }
3501
 
3502
      /**
3503
       * Find the _Fields constant that matches name, or null if its not found.
3504
       */
3505
      public static _Fields findByName(String name) {
3506
        return byName.get(name);
3507
      }
3508
 
3509
      private final short _thriftId;
3510
      private final String _fieldName;
3511
 
3512
      _Fields(short thriftId, String fieldName) {
3513
        _thriftId = thriftId;
3514
        _fieldName = fieldName;
3515
      }
3516
 
3517
      public short getThriftFieldId() {
3518
        return _thriftId;
3519
      }
3520
 
3521
      public String getFieldName() {
3522
        return _fieldName;
3523
      }
3524
    }
3525
 
3526
    // isset id assignments
3527
    private static final int __ID_ISSET_ID = 0;
3528
    private BitSet __isset_bit_vector = new BitSet(1);
3529
 
3530
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3531
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3532
          new FieldValueMetaData(TType.I64)));
3533
      put(_Fields.PARAMS, new FieldMetaData("params", TFieldRequirementType.DEFAULT, 
3534
          new MapMetaData(TType.MAP, 
3535
              new FieldValueMetaData(TType.STRING), 
3536
              new FieldValueMetaData(TType.STRING))));
3537
    }});
3538
 
3539
    static {
3540
      FieldMetaData.addStructMetaDataMap(getSubstitutedMessage_args.class, metaDataMap);
3541
    }
3542
 
3543
    public getSubstitutedMessage_args() {
3544
    }
3545
 
3546
    public getSubstitutedMessage_args(
3547
      long id,
3548
      Map<String,String> params)
3549
    {
3550
      this();
3551
      this.id = id;
3552
      setIdIsSet(true);
3553
      this.params = params;
3554
    }
3555
 
3556
    /**
3557
     * Performs a deep copy on <i>other</i>.
3558
     */
3559
    public getSubstitutedMessage_args(getSubstitutedMessage_args other) {
3560
      __isset_bit_vector.clear();
3561
      __isset_bit_vector.or(other.__isset_bit_vector);
3562
      this.id = other.id;
3563
      if (other.isSetParams()) {
3564
        Map<String,String> __this__params = new HashMap<String,String>();
3565
        for (Map.Entry<String, String> other_element : other.params.entrySet()) {
3566
 
3567
          String other_element_key = other_element.getKey();
3568
          String other_element_value = other_element.getValue();
3569
 
3570
          String __this__params_copy_key = other_element_key;
3571
 
3572
          String __this__params_copy_value = other_element_value;
3573
 
3574
          __this__params.put(__this__params_copy_key, __this__params_copy_value);
3575
        }
3576
        this.params = __this__params;
3577
      }
3578
    }
3579
 
3580
    public getSubstitutedMessage_args deepCopy() {
3581
      return new getSubstitutedMessage_args(this);
3582
    }
3583
 
3584
    @Deprecated
3585
    public getSubstitutedMessage_args clone() {
3586
      return new getSubstitutedMessage_args(this);
3587
    }
3588
 
3589
    public long getId() {
3590
      return this.id;
3591
    }
3592
 
3593
    public getSubstitutedMessage_args setId(long id) {
3594
      this.id = id;
3595
      setIdIsSet(true);
3596
      return this;
3597
    }
3598
 
3599
    public void unsetId() {
3600
      __isset_bit_vector.clear(__ID_ISSET_ID);
3601
    }
3602
 
3603
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3604
    public boolean isSetId() {
3605
      return __isset_bit_vector.get(__ID_ISSET_ID);
3606
    }
3607
 
3608
    public void setIdIsSet(boolean value) {
3609
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3610
    }
3611
 
3612
    public int getParamsSize() {
3613
      return (this.params == null) ? 0 : this.params.size();
3614
    }
3615
 
3616
    public void putToParams(String key, String val) {
3617
      if (this.params == null) {
3618
        this.params = new HashMap<String,String>();
3619
      }
3620
      this.params.put(key, val);
3621
    }
3622
 
3623
    public Map<String,String> getParams() {
3624
      return this.params;
3625
    }
3626
 
3627
    public getSubstitutedMessage_args setParams(Map<String,String> params) {
3628
      this.params = params;
3629
      return this;
3630
    }
3631
 
3632
    public void unsetParams() {
3633
      this.params = null;
3634
    }
3635
 
3636
    /** Returns true if field params is set (has been asigned a value) and false otherwise */
3637
    public boolean isSetParams() {
3638
      return this.params != null;
3639
    }
3640
 
3641
    public void setParamsIsSet(boolean value) {
3642
      if (!value) {
3643
        this.params = null;
3644
      }
3645
    }
3646
 
3647
    public void setFieldValue(_Fields field, Object value) {
3648
      switch (field) {
3649
      case ID:
3650
        if (value == null) {
3651
          unsetId();
3652
        } else {
3653
          setId((Long)value);
3654
        }
3655
        break;
3656
 
3657
      case PARAMS:
3658
        if (value == null) {
3659
          unsetParams();
3660
        } else {
3661
          setParams((Map<String,String>)value);
3662
        }
3663
        break;
3664
 
3665
      }
3666
    }
3667
 
3668
    public void setFieldValue(int fieldID, Object value) {
3669
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3670
    }
3671
 
3672
    public Object getFieldValue(_Fields field) {
3673
      switch (field) {
3674
      case ID:
3675
        return new Long(getId());
3676
 
3677
      case PARAMS:
3678
        return getParams();
3679
 
3680
      }
3681
      throw new IllegalStateException();
3682
    }
3683
 
3684
    public Object getFieldValue(int fieldId) {
3685
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3686
    }
3687
 
3688
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3689
    public boolean isSet(_Fields field) {
3690
      switch (field) {
3691
      case ID:
3692
        return isSetId();
3693
      case PARAMS:
3694
        return isSetParams();
3695
      }
3696
      throw new IllegalStateException();
3697
    }
3698
 
3699
    public boolean isSet(int fieldID) {
3700
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3701
    }
3702
 
3703
    @Override
3704
    public boolean equals(Object that) {
3705
      if (that == null)
3706
        return false;
3707
      if (that instanceof getSubstitutedMessage_args)
3708
        return this.equals((getSubstitutedMessage_args)that);
3709
      return false;
3710
    }
3711
 
3712
    public boolean equals(getSubstitutedMessage_args that) {
3713
      if (that == null)
3714
        return false;
3715
 
3716
      boolean this_present_id = true;
3717
      boolean that_present_id = true;
3718
      if (this_present_id || that_present_id) {
3719
        if (!(this_present_id && that_present_id))
3720
          return false;
3721
        if (this.id != that.id)
3722
          return false;
3723
      }
3724
 
3725
      boolean this_present_params = true && this.isSetParams();
3726
      boolean that_present_params = true && that.isSetParams();
3727
      if (this_present_params || that_present_params) {
3728
        if (!(this_present_params && that_present_params))
3729
          return false;
3730
        if (!this.params.equals(that.params))
3731
          return false;
3732
      }
3733
 
3734
      return true;
3735
    }
3736
 
3737
    @Override
3738
    public int hashCode() {
3739
      return 0;
3740
    }
3741
 
3742
    public void read(TProtocol iprot) throws TException {
3743
      TField field;
3744
      iprot.readStructBegin();
3745
      while (true)
3746
      {
3747
        field = iprot.readFieldBegin();
3748
        if (field.type == TType.STOP) { 
3749
          break;
3750
        }
3751
        _Fields fieldId = _Fields.findByThriftId(field.id);
3752
        if (fieldId == null) {
3753
          TProtocolUtil.skip(iprot, field.type);
3754
        } else {
3755
          switch (fieldId) {
3756
            case ID:
3757
              if (field.type == TType.I64) {
3758
                this.id = iprot.readI64();
3759
                setIdIsSet(true);
3760
              } else { 
3761
                TProtocolUtil.skip(iprot, field.type);
3762
              }
3763
              break;
3764
            case PARAMS:
3765
              if (field.type == TType.MAP) {
3766
                {
471 rajveer 3767
                  TMap _map8 = iprot.readMapBegin();
3768
                  this.params = new HashMap<String,String>(2*_map8.size);
3769
                  for (int _i9 = 0; _i9 < _map8.size; ++_i9)
352 ashish 3770
                  {
471 rajveer 3771
                    String _key10;
3772
                    String _val11;
3773
                    _key10 = iprot.readString();
3774
                    _val11 = iprot.readString();
3775
                    this.params.put(_key10, _val11);
352 ashish 3776
                  }
3777
                  iprot.readMapEnd();
3778
                }
3779
              } else { 
3780
                TProtocolUtil.skip(iprot, field.type);
3781
              }
3782
              break;
3783
          }
3784
          iprot.readFieldEnd();
3785
        }
3786
      }
3787
      iprot.readStructEnd();
3788
      validate();
3789
    }
3790
 
3791
    public void write(TProtocol oprot) throws TException {
3792
      validate();
3793
 
3794
      oprot.writeStructBegin(STRUCT_DESC);
3795
      oprot.writeFieldBegin(ID_FIELD_DESC);
3796
      oprot.writeI64(this.id);
3797
      oprot.writeFieldEnd();
3798
      if (this.params != null) {
3799
        oprot.writeFieldBegin(PARAMS_FIELD_DESC);
3800
        {
3801
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.params.size()));
471 rajveer 3802
          for (Map.Entry<String, String> _iter12 : this.params.entrySet())
352 ashish 3803
          {
471 rajveer 3804
            oprot.writeString(_iter12.getKey());
3805
            oprot.writeString(_iter12.getValue());
352 ashish 3806
          }
3807
          oprot.writeMapEnd();
3808
        }
3809
        oprot.writeFieldEnd();
3810
      }
3811
      oprot.writeFieldStop();
3812
      oprot.writeStructEnd();
3813
    }
3814
 
3815
    @Override
3816
    public String toString() {
3817
      StringBuilder sb = new StringBuilder("getSubstitutedMessage_args(");
3818
      boolean first = true;
3819
 
3820
      sb.append("id:");
3821
      sb.append(this.id);
3822
      first = false;
3823
      if (!first) sb.append(", ");
3824
      sb.append("params:");
3825
      if (this.params == null) {
3826
        sb.append("null");
3827
      } else {
3828
        sb.append(this.params);
3829
      }
3830
      first = false;
3831
      sb.append(")");
3832
      return sb.toString();
3833
    }
3834
 
3835
    public void validate() throws TException {
3836
      // check for required fields
3837
    }
3838
 
3839
  }
3840
 
3841
  public static class getSubstitutedMessage_result implements TBase<getSubstitutedMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSubstitutedMessage_result>   {
3842
    private static final TStruct STRUCT_DESC = new TStruct("getSubstitutedMessage_result");
3843
 
3844
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3845
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
3846
 
3847
    private Message success;
3848
    private HelperServiceException se;
3849
 
3850
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3851
    public enum _Fields implements TFieldIdEnum {
3852
      SUCCESS((short)0, "success"),
3853
      SE((short)1, "se");
3854
 
3855
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3856
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3857
 
3858
      static {
3859
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3860
          byId.put((int)field._thriftId, field);
3861
          byName.put(field.getFieldName(), field);
3862
        }
3863
      }
3864
 
3865
      /**
3866
       * Find the _Fields constant that matches fieldId, or null if its not found.
3867
       */
3868
      public static _Fields findByThriftId(int fieldId) {
3869
        return byId.get(fieldId);
3870
      }
3871
 
3872
      /**
3873
       * Find the _Fields constant that matches fieldId, throwing an exception
3874
       * if it is not found.
3875
       */
3876
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3877
        _Fields fields = findByThriftId(fieldId);
3878
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3879
        return fields;
3880
      }
3881
 
3882
      /**
3883
       * Find the _Fields constant that matches name, or null if its not found.
3884
       */
3885
      public static _Fields findByName(String name) {
3886
        return byName.get(name);
3887
      }
3888
 
3889
      private final short _thriftId;
3890
      private final String _fieldName;
3891
 
3892
      _Fields(short thriftId, String fieldName) {
3893
        _thriftId = thriftId;
3894
        _fieldName = fieldName;
3895
      }
3896
 
3897
      public short getThriftFieldId() {
3898
        return _thriftId;
3899
      }
3900
 
3901
      public String getFieldName() {
3902
        return _fieldName;
3903
      }
3904
    }
3905
 
3906
    // isset id assignments
3907
 
3908
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3909
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3910
          new StructMetaData(TType.STRUCT, Message.class)));
3911
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
3912
          new FieldValueMetaData(TType.STRUCT)));
3913
    }});
3914
 
3915
    static {
3916
      FieldMetaData.addStructMetaDataMap(getSubstitutedMessage_result.class, metaDataMap);
3917
    }
3918
 
3919
    public getSubstitutedMessage_result() {
3920
    }
3921
 
3922
    public getSubstitutedMessage_result(
3923
      Message success,
3924
      HelperServiceException se)
3925
    {
3926
      this();
3927
      this.success = success;
3928
      this.se = se;
3929
    }
3930
 
3931
    /**
3932
     * Performs a deep copy on <i>other</i>.
3933
     */
3934
    public getSubstitutedMessage_result(getSubstitutedMessage_result other) {
3935
      if (other.isSetSuccess()) {
3936
        this.success = new Message(other.success);
3937
      }
3938
      if (other.isSetSe()) {
3939
        this.se = new HelperServiceException(other.se);
3940
      }
3941
    }
3942
 
3943
    public getSubstitutedMessage_result deepCopy() {
3944
      return new getSubstitutedMessage_result(this);
3945
    }
3946
 
3947
    @Deprecated
3948
    public getSubstitutedMessage_result clone() {
3949
      return new getSubstitutedMessage_result(this);
3950
    }
3951
 
3952
    public Message getSuccess() {
3953
      return this.success;
3954
    }
3955
 
3956
    public getSubstitutedMessage_result setSuccess(Message success) {
3957
      this.success = success;
3958
      return this;
3959
    }
3960
 
3961
    public void unsetSuccess() {
3962
      this.success = null;
3963
    }
3964
 
3965
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3966
    public boolean isSetSuccess() {
3967
      return this.success != null;
3968
    }
3969
 
3970
    public void setSuccessIsSet(boolean value) {
3971
      if (!value) {
3972
        this.success = null;
3973
      }
3974
    }
3975
 
3976
    public HelperServiceException getSe() {
3977
      return this.se;
3978
    }
3979
 
3980
    public getSubstitutedMessage_result setSe(HelperServiceException se) {
3981
      this.se = se;
3982
      return this;
3983
    }
3984
 
3985
    public void unsetSe() {
3986
      this.se = null;
3987
    }
3988
 
3989
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
3990
    public boolean isSetSe() {
3991
      return this.se != null;
3992
    }
3993
 
3994
    public void setSeIsSet(boolean value) {
3995
      if (!value) {
3996
        this.se = null;
3997
      }
3998
    }
3999
 
4000
    public void setFieldValue(_Fields field, Object value) {
4001
      switch (field) {
4002
      case SUCCESS:
4003
        if (value == null) {
4004
          unsetSuccess();
4005
        } else {
4006
          setSuccess((Message)value);
4007
        }
4008
        break;
4009
 
4010
      case SE:
4011
        if (value == null) {
4012
          unsetSe();
4013
        } else {
4014
          setSe((HelperServiceException)value);
4015
        }
4016
        break;
4017
 
4018
      }
4019
    }
4020
 
4021
    public void setFieldValue(int fieldID, Object value) {
4022
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4023
    }
4024
 
4025
    public Object getFieldValue(_Fields field) {
4026
      switch (field) {
4027
      case SUCCESS:
4028
        return getSuccess();
4029
 
4030
      case SE:
4031
        return getSe();
4032
 
4033
      }
4034
      throw new IllegalStateException();
4035
    }
4036
 
4037
    public Object getFieldValue(int fieldId) {
4038
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4039
    }
4040
 
4041
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4042
    public boolean isSet(_Fields field) {
4043
      switch (field) {
4044
      case SUCCESS:
4045
        return isSetSuccess();
4046
      case SE:
4047
        return isSetSe();
4048
      }
4049
      throw new IllegalStateException();
4050
    }
4051
 
4052
    public boolean isSet(int fieldID) {
4053
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4054
    }
4055
 
4056
    @Override
4057
    public boolean equals(Object that) {
4058
      if (that == null)
4059
        return false;
4060
      if (that instanceof getSubstitutedMessage_result)
4061
        return this.equals((getSubstitutedMessage_result)that);
4062
      return false;
4063
    }
4064
 
4065
    public boolean equals(getSubstitutedMessage_result that) {
4066
      if (that == null)
4067
        return false;
4068
 
4069
      boolean this_present_success = true && this.isSetSuccess();
4070
      boolean that_present_success = true && that.isSetSuccess();
4071
      if (this_present_success || that_present_success) {
4072
        if (!(this_present_success && that_present_success))
4073
          return false;
4074
        if (!this.success.equals(that.success))
4075
          return false;
4076
      }
4077
 
4078
      boolean this_present_se = true && this.isSetSe();
4079
      boolean that_present_se = true && that.isSetSe();
4080
      if (this_present_se || that_present_se) {
4081
        if (!(this_present_se && that_present_se))
4082
          return false;
4083
        if (!this.se.equals(that.se))
4084
          return false;
4085
      }
4086
 
4087
      return true;
4088
    }
4089
 
4090
    @Override
4091
    public int hashCode() {
4092
      return 0;
4093
    }
4094
 
4095
    public int compareTo(getSubstitutedMessage_result other) {
4096
      if (!getClass().equals(other.getClass())) {
4097
        return getClass().getName().compareTo(other.getClass().getName());
4098
      }
4099
 
4100
      int lastComparison = 0;
4101
      getSubstitutedMessage_result typedOther = (getSubstitutedMessage_result)other;
4102
 
4103
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4104
      if (lastComparison != 0) {
4105
        return lastComparison;
4106
      }
4107
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4108
      if (lastComparison != 0) {
4109
        return lastComparison;
4110
      }
4111
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
4112
      if (lastComparison != 0) {
4113
        return lastComparison;
4114
      }
4115
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
4116
      if (lastComparison != 0) {
4117
        return lastComparison;
4118
      }
4119
      return 0;
4120
    }
4121
 
4122
    public void read(TProtocol iprot) throws TException {
4123
      TField field;
4124
      iprot.readStructBegin();
4125
      while (true)
4126
      {
4127
        field = iprot.readFieldBegin();
4128
        if (field.type == TType.STOP) { 
4129
          break;
4130
        }
4131
        _Fields fieldId = _Fields.findByThriftId(field.id);
4132
        if (fieldId == null) {
4133
          TProtocolUtil.skip(iprot, field.type);
4134
        } else {
4135
          switch (fieldId) {
4136
            case SUCCESS:
4137
              if (field.type == TType.STRUCT) {
4138
                this.success = new Message();
4139
                this.success.read(iprot);
4140
              } else { 
4141
                TProtocolUtil.skip(iprot, field.type);
4142
              }
4143
              break;
4144
            case SE:
4145
              if (field.type == TType.STRUCT) {
4146
                this.se = new HelperServiceException();
4147
                this.se.read(iprot);
4148
              } else { 
4149
                TProtocolUtil.skip(iprot, field.type);
4150
              }
4151
              break;
4152
          }
4153
          iprot.readFieldEnd();
4154
        }
4155
      }
4156
      iprot.readStructEnd();
4157
      validate();
4158
    }
4159
 
4160
    public void write(TProtocol oprot) throws TException {
4161
      oprot.writeStructBegin(STRUCT_DESC);
4162
 
4163
      if (this.isSetSuccess()) {
4164
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4165
        this.success.write(oprot);
4166
        oprot.writeFieldEnd();
4167
      } else if (this.isSetSe()) {
4168
        oprot.writeFieldBegin(SE_FIELD_DESC);
4169
        this.se.write(oprot);
4170
        oprot.writeFieldEnd();
4171
      }
4172
      oprot.writeFieldStop();
4173
      oprot.writeStructEnd();
4174
    }
4175
 
4176
    @Override
4177
    public String toString() {
4178
      StringBuilder sb = new StringBuilder("getSubstitutedMessage_result(");
4179
      boolean first = true;
4180
 
4181
      sb.append("success:");
4182
      if (this.success == null) {
4183
        sb.append("null");
4184
      } else {
4185
        sb.append(this.success);
4186
      }
4187
      first = false;
4188
      if (!first) sb.append(", ");
4189
      sb.append("se:");
4190
      if (this.se == null) {
4191
        sb.append("null");
4192
      } else {
4193
        sb.append(this.se);
4194
      }
4195
      first = false;
4196
      sb.append(")");
4197
      return sb.toString();
4198
    }
4199
 
4200
    public void validate() throws TException {
4201
      // check for required fields
4202
    }
4203
 
4204
  }
4205
 
4206
}