Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
779 rajveer 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.test;
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 TestService {
27
 
28
  public interface Iface {
29
 
30
    public void sayHello(String message) throws TException;
31
 
32
    public String getUser(long id) throws TException;
33
 
896 rajveer 34
    public long getAddressId() throws TException;
35
 
36
    public Address getAddress() throws TException;
37
 
779 rajveer 38
    public void createUser(String name) throws TException;
39
 
40
    public void closeSession() throws 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 sayHello(String message) throws TException
72
    {
73
      send_sayHello(message);
74
      recv_sayHello();
75
    }
76
 
77
    public void send_sayHello(String message) throws TException
78
    {
79
      oprot_.writeMessageBegin(new TMessage("sayHello", TMessageType.CALL, seqid_));
80
      sayHello_args args = new sayHello_args();
81
      args.message = message;
82
      args.write(oprot_);
83
      oprot_.writeMessageEnd();
84
      oprot_.getTransport().flush();
85
    }
86
 
87
    public void recv_sayHello() throws 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
      sayHello_result result = new sayHello_result();
96
      result.read(iprot_);
97
      iprot_.readMessageEnd();
98
      return;
99
    }
100
 
101
    public String getUser(long id) throws TException
102
    {
103
      send_getUser(id);
104
      return recv_getUser();
105
    }
106
 
107
    public void send_getUser(long id) throws TException
108
    {
109
      oprot_.writeMessageBegin(new TMessage("getUser", TMessageType.CALL, seqid_));
110
      getUser_args args = new getUser_args();
111
      args.id = id;
112
      args.write(oprot_);
113
      oprot_.writeMessageEnd();
114
      oprot_.getTransport().flush();
115
    }
116
 
117
    public String recv_getUser() throws TException
118
    {
119
      TMessage msg = iprot_.readMessageBegin();
120
      if (msg.type == TMessageType.EXCEPTION) {
121
        TApplicationException x = TApplicationException.read(iprot_);
122
        iprot_.readMessageEnd();
123
        throw x;
124
      }
125
      getUser_result result = new getUser_result();
126
      result.read(iprot_);
127
      iprot_.readMessageEnd();
128
      if (result.isSetSuccess()) {
129
        return result.success;
130
      }
131
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUser failed: unknown result");
132
    }
133
 
896 rajveer 134
    public long getAddressId() throws TException
135
    {
136
      send_getAddressId();
137
      return recv_getAddressId();
138
    }
139
 
140
    public void send_getAddressId() throws TException
141
    {
142
      oprot_.writeMessageBegin(new TMessage("getAddressId", TMessageType.CALL, seqid_));
143
      getAddressId_args args = new getAddressId_args();
144
      args.write(oprot_);
145
      oprot_.writeMessageEnd();
146
      oprot_.getTransport().flush();
147
    }
148
 
149
    public long recv_getAddressId() throws TException
150
    {
151
      TMessage msg = iprot_.readMessageBegin();
152
      if (msg.type == TMessageType.EXCEPTION) {
153
        TApplicationException x = TApplicationException.read(iprot_);
154
        iprot_.readMessageEnd();
155
        throw x;
156
      }
157
      getAddressId_result result = new getAddressId_result();
158
      result.read(iprot_);
159
      iprot_.readMessageEnd();
160
      if (result.isSetSuccess()) {
161
        return result.success;
162
      }
163
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAddressId failed: unknown result");
164
    }
165
 
166
    public Address getAddress() throws TException
167
    {
168
      send_getAddress();
169
      return recv_getAddress();
170
    }
171
 
172
    public void send_getAddress() throws TException
173
    {
174
      oprot_.writeMessageBegin(new TMessage("getAddress", TMessageType.CALL, seqid_));
175
      getAddress_args args = new getAddress_args();
176
      args.write(oprot_);
177
      oprot_.writeMessageEnd();
178
      oprot_.getTransport().flush();
179
    }
180
 
181
    public Address recv_getAddress() throws TException
182
    {
183
      TMessage msg = iprot_.readMessageBegin();
184
      if (msg.type == TMessageType.EXCEPTION) {
185
        TApplicationException x = TApplicationException.read(iprot_);
186
        iprot_.readMessageEnd();
187
        throw x;
188
      }
189
      getAddress_result result = new getAddress_result();
190
      result.read(iprot_);
191
      iprot_.readMessageEnd();
192
      if (result.isSetSuccess()) {
193
        return result.success;
194
      }
195
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAddress failed: unknown result");
196
    }
197
 
779 rajveer 198
    public void createUser(String name) throws TException
199
    {
200
      send_createUser(name);
201
      recv_createUser();
202
    }
203
 
204
    public void send_createUser(String name) throws TException
205
    {
206
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
207
      createUser_args args = new createUser_args();
208
      args.name = name;
209
      args.write(oprot_);
210
      oprot_.writeMessageEnd();
211
      oprot_.getTransport().flush();
212
    }
213
 
214
    public void recv_createUser() throws TException
215
    {
216
      TMessage msg = iprot_.readMessageBegin();
217
      if (msg.type == TMessageType.EXCEPTION) {
218
        TApplicationException x = TApplicationException.read(iprot_);
219
        iprot_.readMessageEnd();
220
        throw x;
221
      }
222
      createUser_result result = new createUser_result();
223
      result.read(iprot_);
224
      iprot_.readMessageEnd();
225
      return;
226
    }
227
 
228
    public void closeSession() throws TException
229
    {
230
      send_closeSession();
231
      recv_closeSession();
232
    }
233
 
234
    public void send_closeSession() throws TException
235
    {
236
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
237
      closeSession_args args = new closeSession_args();
238
      args.write(oprot_);
239
      oprot_.writeMessageEnd();
240
      oprot_.getTransport().flush();
241
    }
242
 
243
    public void recv_closeSession() throws TException
244
    {
245
      TMessage msg = iprot_.readMessageBegin();
246
      if (msg.type == TMessageType.EXCEPTION) {
247
        TApplicationException x = TApplicationException.read(iprot_);
248
        iprot_.readMessageEnd();
249
        throw x;
250
      }
251
      closeSession_result result = new closeSession_result();
252
      result.read(iprot_);
253
      iprot_.readMessageEnd();
254
      return;
255
    }
256
 
257
  }
258
  public static class Processor implements TProcessor {
259
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
260
    public Processor(Iface iface)
261
    {
262
      iface_ = iface;
263
      processMap_.put("sayHello", new sayHello());
264
      processMap_.put("getUser", new getUser());
896 rajveer 265
      processMap_.put("getAddressId", new getAddressId());
266
      processMap_.put("getAddress", new getAddress());
779 rajveer 267
      processMap_.put("createUser", new createUser());
268
      processMap_.put("closeSession", new closeSession());
269
    }
270
 
271
    protected static interface ProcessFunction {
272
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
273
    }
274
 
275
    private Iface iface_;
276
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
277
 
278
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
279
    {
280
      TMessage msg = iprot.readMessageBegin();
281
      ProcessFunction fn = processMap_.get(msg.name);
282
      if (fn == null) {
283
        TProtocolUtil.skip(iprot, TType.STRUCT);
284
        iprot.readMessageEnd();
285
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
286
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
287
        x.write(oprot);
288
        oprot.writeMessageEnd();
289
        oprot.getTransport().flush();
290
        return true;
291
      }
292
      fn.process(msg.seqid, iprot, oprot);
293
      return true;
294
    }
295
 
296
    private class sayHello implements ProcessFunction {
297
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
298
      {
299
        sayHello_args args = new sayHello_args();
300
        args.read(iprot);
301
        iprot.readMessageEnd();
302
        sayHello_result result = new sayHello_result();
303
        iface_.sayHello(args.message);
304
        oprot.writeMessageBegin(new TMessage("sayHello", TMessageType.REPLY, seqid));
305
        result.write(oprot);
306
        oprot.writeMessageEnd();
307
        oprot.getTransport().flush();
308
      }
309
 
310
    }
311
 
312
    private class getUser implements ProcessFunction {
313
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
314
      {
315
        getUser_args args = new getUser_args();
316
        args.read(iprot);
317
        iprot.readMessageEnd();
318
        getUser_result result = new getUser_result();
319
        result.success = iface_.getUser(args.id);
320
        oprot.writeMessageBegin(new TMessage("getUser", TMessageType.REPLY, seqid));
321
        result.write(oprot);
322
        oprot.writeMessageEnd();
323
        oprot.getTransport().flush();
324
      }
325
 
326
    }
327
 
896 rajveer 328
    private class getAddressId implements ProcessFunction {
329
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
330
      {
331
        getAddressId_args args = new getAddressId_args();
332
        args.read(iprot);
333
        iprot.readMessageEnd();
334
        getAddressId_result result = new getAddressId_result();
335
        result.success = iface_.getAddressId();
336
        result.setSuccessIsSet(true);
337
        oprot.writeMessageBegin(new TMessage("getAddressId", TMessageType.REPLY, seqid));
338
        result.write(oprot);
339
        oprot.writeMessageEnd();
340
        oprot.getTransport().flush();
341
      }
342
 
343
    }
344
 
345
    private class getAddress implements ProcessFunction {
346
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
347
      {
348
        getAddress_args args = new getAddress_args();
349
        args.read(iprot);
350
        iprot.readMessageEnd();
351
        getAddress_result result = new getAddress_result();
352
        result.success = iface_.getAddress();
353
        oprot.writeMessageBegin(new TMessage("getAddress", TMessageType.REPLY, seqid));
354
        result.write(oprot);
355
        oprot.writeMessageEnd();
356
        oprot.getTransport().flush();
357
      }
358
 
359
    }
360
 
779 rajveer 361
    private class createUser implements ProcessFunction {
362
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
363
      {
364
        createUser_args args = new createUser_args();
365
        args.read(iprot);
366
        iprot.readMessageEnd();
367
        createUser_result result = new createUser_result();
368
        iface_.createUser(args.name);
369
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
370
        result.write(oprot);
371
        oprot.writeMessageEnd();
372
        oprot.getTransport().flush();
373
      }
374
 
375
    }
376
 
377
    private class closeSession implements ProcessFunction {
378
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
379
      {
380
        closeSession_args args = new closeSession_args();
381
        args.read(iprot);
382
        iprot.readMessageEnd();
383
        closeSession_result result = new closeSession_result();
384
        iface_.closeSession();
385
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
386
        result.write(oprot);
387
        oprot.writeMessageEnd();
388
        oprot.getTransport().flush();
389
      }
390
 
391
    }
392
 
393
  }
394
 
395
  public static class sayHello_args implements TBase<sayHello_args._Fields>, java.io.Serializable, Cloneable, Comparable<sayHello_args>   {
396
    private static final TStruct STRUCT_DESC = new TStruct("sayHello_args");
397
 
398
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
399
 
400
    private String message;
401
 
402
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
403
    public enum _Fields implements TFieldIdEnum {
404
      MESSAGE((short)1, "message");
405
 
406
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
407
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
408
 
409
      static {
410
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
411
          byId.put((int)field._thriftId, field);
412
          byName.put(field.getFieldName(), field);
413
        }
414
      }
415
 
416
      /**
417
       * Find the _Fields constant that matches fieldId, or null if its not found.
418
       */
419
      public static _Fields findByThriftId(int fieldId) {
420
        return byId.get(fieldId);
421
      }
422
 
423
      /**
424
       * Find the _Fields constant that matches fieldId, throwing an exception
425
       * if it is not found.
426
       */
427
      public static _Fields findByThriftIdOrThrow(int fieldId) {
428
        _Fields fields = findByThriftId(fieldId);
429
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
430
        return fields;
431
      }
432
 
433
      /**
434
       * Find the _Fields constant that matches name, or null if its not found.
435
       */
436
      public static _Fields findByName(String name) {
437
        return byName.get(name);
438
      }
439
 
440
      private final short _thriftId;
441
      private final String _fieldName;
442
 
443
      _Fields(short thriftId, String fieldName) {
444
        _thriftId = thriftId;
445
        _fieldName = fieldName;
446
      }
447
 
448
      public short getThriftFieldId() {
449
        return _thriftId;
450
      }
451
 
452
      public String getFieldName() {
453
        return _fieldName;
454
      }
455
    }
456
 
457
    // isset id assignments
458
 
459
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
460
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
461
          new FieldValueMetaData(TType.STRING)));
462
    }});
463
 
464
    static {
465
      FieldMetaData.addStructMetaDataMap(sayHello_args.class, metaDataMap);
466
    }
467
 
468
    public sayHello_args() {
469
    }
470
 
471
    public sayHello_args(
472
      String message)
473
    {
474
      this();
475
      this.message = message;
476
    }
477
 
478
    /**
479
     * Performs a deep copy on <i>other</i>.
480
     */
481
    public sayHello_args(sayHello_args other) {
482
      if (other.isSetMessage()) {
483
        this.message = other.message;
484
      }
485
    }
486
 
487
    public sayHello_args deepCopy() {
488
      return new sayHello_args(this);
489
    }
490
 
491
    @Deprecated
492
    public sayHello_args clone() {
493
      return new sayHello_args(this);
494
    }
495
 
496
    public String getMessage() {
497
      return this.message;
498
    }
499
 
500
    public sayHello_args setMessage(String message) {
501
      this.message = message;
502
      return this;
503
    }
504
 
505
    public void unsetMessage() {
506
      this.message = null;
507
    }
508
 
509
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
510
    public boolean isSetMessage() {
511
      return this.message != null;
512
    }
513
 
514
    public void setMessageIsSet(boolean value) {
515
      if (!value) {
516
        this.message = null;
517
      }
518
    }
519
 
520
    public void setFieldValue(_Fields field, Object value) {
521
      switch (field) {
522
      case MESSAGE:
523
        if (value == null) {
524
          unsetMessage();
525
        } else {
526
          setMessage((String)value);
527
        }
528
        break;
529
 
530
      }
531
    }
532
 
533
    public void setFieldValue(int fieldID, Object value) {
534
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
535
    }
536
 
537
    public Object getFieldValue(_Fields field) {
538
      switch (field) {
539
      case MESSAGE:
540
        return getMessage();
541
 
542
      }
543
      throw new IllegalStateException();
544
    }
545
 
546
    public Object getFieldValue(int fieldId) {
547
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
548
    }
549
 
550
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
551
    public boolean isSet(_Fields field) {
552
      switch (field) {
553
      case MESSAGE:
554
        return isSetMessage();
555
      }
556
      throw new IllegalStateException();
557
    }
558
 
559
    public boolean isSet(int fieldID) {
560
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
561
    }
562
 
563
    @Override
564
    public boolean equals(Object that) {
565
      if (that == null)
566
        return false;
567
      if (that instanceof sayHello_args)
568
        return this.equals((sayHello_args)that);
569
      return false;
570
    }
571
 
572
    public boolean equals(sayHello_args that) {
573
      if (that == null)
574
        return false;
575
 
576
      boolean this_present_message = true && this.isSetMessage();
577
      boolean that_present_message = true && that.isSetMessage();
578
      if (this_present_message || that_present_message) {
579
        if (!(this_present_message && that_present_message))
580
          return false;
581
        if (!this.message.equals(that.message))
582
          return false;
583
      }
584
 
585
      return true;
586
    }
587
 
588
    @Override
589
    public int hashCode() {
590
      return 0;
591
    }
592
 
593
    public int compareTo(sayHello_args other) {
594
      if (!getClass().equals(other.getClass())) {
595
        return getClass().getName().compareTo(other.getClass().getName());
596
      }
597
 
598
      int lastComparison = 0;
599
      sayHello_args typedOther = (sayHello_args)other;
600
 
601
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
602
      if (lastComparison != 0) {
603
        return lastComparison;
604
      }
605
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
606
      if (lastComparison != 0) {
607
        return lastComparison;
608
      }
609
      return 0;
610
    }
611
 
612
    public void read(TProtocol iprot) throws TException {
613
      TField field;
614
      iprot.readStructBegin();
615
      while (true)
616
      {
617
        field = iprot.readFieldBegin();
618
        if (field.type == TType.STOP) { 
619
          break;
620
        }
621
        _Fields fieldId = _Fields.findByThriftId(field.id);
622
        if (fieldId == null) {
623
          TProtocolUtil.skip(iprot, field.type);
624
        } else {
625
          switch (fieldId) {
626
            case MESSAGE:
627
              if (field.type == TType.STRING) {
628
                this.message = iprot.readString();
629
              } else { 
630
                TProtocolUtil.skip(iprot, field.type);
631
              }
632
              break;
633
          }
634
          iprot.readFieldEnd();
635
        }
636
      }
637
      iprot.readStructEnd();
638
      validate();
639
    }
640
 
641
    public void write(TProtocol oprot) throws TException {
642
      validate();
643
 
644
      oprot.writeStructBegin(STRUCT_DESC);
645
      if (this.message != null) {
646
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
647
        oprot.writeString(this.message);
648
        oprot.writeFieldEnd();
649
      }
650
      oprot.writeFieldStop();
651
      oprot.writeStructEnd();
652
    }
653
 
654
    @Override
655
    public String toString() {
656
      StringBuilder sb = new StringBuilder("sayHello_args(");
657
      boolean first = true;
658
 
659
      sb.append("message:");
660
      if (this.message == null) {
661
        sb.append("null");
662
      } else {
663
        sb.append(this.message);
664
      }
665
      first = false;
666
      sb.append(")");
667
      return sb.toString();
668
    }
669
 
670
    public void validate() throws TException {
671
      // check for required fields
672
    }
673
 
674
  }
675
 
676
  public static class sayHello_result implements TBase<sayHello_result._Fields>, java.io.Serializable, Cloneable, Comparable<sayHello_result>   {
677
    private static final TStruct STRUCT_DESC = new TStruct("sayHello_result");
678
 
679
 
680
 
681
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
682
    public enum _Fields implements TFieldIdEnum {
683
;
684
 
685
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
686
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
687
 
688
      static {
689
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
690
          byId.put((int)field._thriftId, field);
691
          byName.put(field.getFieldName(), field);
692
        }
693
      }
694
 
695
      /**
696
       * Find the _Fields constant that matches fieldId, or null if its not found.
697
       */
698
      public static _Fields findByThriftId(int fieldId) {
699
        return byId.get(fieldId);
700
      }
701
 
702
      /**
703
       * Find the _Fields constant that matches fieldId, throwing an exception
704
       * if it is not found.
705
       */
706
      public static _Fields findByThriftIdOrThrow(int fieldId) {
707
        _Fields fields = findByThriftId(fieldId);
708
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
709
        return fields;
710
      }
711
 
712
      /**
713
       * Find the _Fields constant that matches name, or null if its not found.
714
       */
715
      public static _Fields findByName(String name) {
716
        return byName.get(name);
717
      }
718
 
719
      private final short _thriftId;
720
      private final String _fieldName;
721
 
722
      _Fields(short thriftId, String fieldName) {
723
        _thriftId = thriftId;
724
        _fieldName = fieldName;
725
      }
726
 
727
      public short getThriftFieldId() {
728
        return _thriftId;
729
      }
730
 
731
      public String getFieldName() {
732
        return _fieldName;
733
      }
734
    }
735
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
736
    }});
737
 
738
    static {
739
      FieldMetaData.addStructMetaDataMap(sayHello_result.class, metaDataMap);
740
    }
741
 
742
    public sayHello_result() {
743
    }
744
 
745
    /**
746
     * Performs a deep copy on <i>other</i>.
747
     */
748
    public sayHello_result(sayHello_result other) {
749
    }
750
 
751
    public sayHello_result deepCopy() {
752
      return new sayHello_result(this);
753
    }
754
 
755
    @Deprecated
756
    public sayHello_result clone() {
757
      return new sayHello_result(this);
758
    }
759
 
760
    public void setFieldValue(_Fields field, Object value) {
761
      switch (field) {
762
      }
763
    }
764
 
765
    public void setFieldValue(int fieldID, Object value) {
766
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
767
    }
768
 
769
    public Object getFieldValue(_Fields field) {
770
      switch (field) {
771
      }
772
      throw new IllegalStateException();
773
    }
774
 
775
    public Object getFieldValue(int fieldId) {
776
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
777
    }
778
 
779
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
780
    public boolean isSet(_Fields field) {
781
      switch (field) {
782
      }
783
      throw new IllegalStateException();
784
    }
785
 
786
    public boolean isSet(int fieldID) {
787
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
788
    }
789
 
790
    @Override
791
    public boolean equals(Object that) {
792
      if (that == null)
793
        return false;
794
      if (that instanceof sayHello_result)
795
        return this.equals((sayHello_result)that);
796
      return false;
797
    }
798
 
799
    public boolean equals(sayHello_result that) {
800
      if (that == null)
801
        return false;
802
 
803
      return true;
804
    }
805
 
806
    @Override
807
    public int hashCode() {
808
      return 0;
809
    }
810
 
811
    public int compareTo(sayHello_result other) {
812
      if (!getClass().equals(other.getClass())) {
813
        return getClass().getName().compareTo(other.getClass().getName());
814
      }
815
 
816
      int lastComparison = 0;
817
      sayHello_result typedOther = (sayHello_result)other;
818
 
819
      return 0;
820
    }
821
 
822
    public void read(TProtocol iprot) throws TException {
823
      TField field;
824
      iprot.readStructBegin();
825
      while (true)
826
      {
827
        field = iprot.readFieldBegin();
828
        if (field.type == TType.STOP) { 
829
          break;
830
        }
831
        _Fields fieldId = _Fields.findByThriftId(field.id);
832
        if (fieldId == null) {
833
          TProtocolUtil.skip(iprot, field.type);
834
        } else {
835
          switch (fieldId) {
836
          }
837
          iprot.readFieldEnd();
838
        }
839
      }
840
      iprot.readStructEnd();
841
      validate();
842
    }
843
 
844
    public void write(TProtocol oprot) throws TException {
845
      oprot.writeStructBegin(STRUCT_DESC);
846
 
847
      oprot.writeFieldStop();
848
      oprot.writeStructEnd();
849
    }
850
 
851
    @Override
852
    public String toString() {
853
      StringBuilder sb = new StringBuilder("sayHello_result(");
854
      boolean first = true;
855
 
856
      sb.append(")");
857
      return sb.toString();
858
    }
859
 
860
    public void validate() throws TException {
861
      // check for required fields
862
    }
863
 
864
  }
865
 
866
  public static class getUser_args implements TBase<getUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_args>   {
867
    private static final TStruct STRUCT_DESC = new TStruct("getUser_args");
868
 
869
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
870
 
871
    private long id;
872
 
873
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
874
    public enum _Fields implements TFieldIdEnum {
875
      ID((short)1, "id");
876
 
877
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
878
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
879
 
880
      static {
881
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
882
          byId.put((int)field._thriftId, field);
883
          byName.put(field.getFieldName(), field);
884
        }
885
      }
886
 
887
      /**
888
       * Find the _Fields constant that matches fieldId, or null if its not found.
889
       */
890
      public static _Fields findByThriftId(int fieldId) {
891
        return byId.get(fieldId);
892
      }
893
 
894
      /**
895
       * Find the _Fields constant that matches fieldId, throwing an exception
896
       * if it is not found.
897
       */
898
      public static _Fields findByThriftIdOrThrow(int fieldId) {
899
        _Fields fields = findByThriftId(fieldId);
900
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
901
        return fields;
902
      }
903
 
904
      /**
905
       * Find the _Fields constant that matches name, or null if its not found.
906
       */
907
      public static _Fields findByName(String name) {
908
        return byName.get(name);
909
      }
910
 
911
      private final short _thriftId;
912
      private final String _fieldName;
913
 
914
      _Fields(short thriftId, String fieldName) {
915
        _thriftId = thriftId;
916
        _fieldName = fieldName;
917
      }
918
 
919
      public short getThriftFieldId() {
920
        return _thriftId;
921
      }
922
 
923
      public String getFieldName() {
924
        return _fieldName;
925
      }
926
    }
927
 
928
    // isset id assignments
929
    private static final int __ID_ISSET_ID = 0;
930
    private BitSet __isset_bit_vector = new BitSet(1);
931
 
932
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
933
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
934
          new FieldValueMetaData(TType.I64)));
935
    }});
936
 
937
    static {
938
      FieldMetaData.addStructMetaDataMap(getUser_args.class, metaDataMap);
939
    }
940
 
941
    public getUser_args() {
942
    }
943
 
944
    public getUser_args(
945
      long id)
946
    {
947
      this();
948
      this.id = id;
949
      setIdIsSet(true);
950
    }
951
 
952
    /**
953
     * Performs a deep copy on <i>other</i>.
954
     */
955
    public getUser_args(getUser_args other) {
956
      __isset_bit_vector.clear();
957
      __isset_bit_vector.or(other.__isset_bit_vector);
958
      this.id = other.id;
959
    }
960
 
961
    public getUser_args deepCopy() {
962
      return new getUser_args(this);
963
    }
964
 
965
    @Deprecated
966
    public getUser_args clone() {
967
      return new getUser_args(this);
968
    }
969
 
970
    public long getId() {
971
      return this.id;
972
    }
973
 
974
    public getUser_args setId(long id) {
975
      this.id = id;
976
      setIdIsSet(true);
977
      return this;
978
    }
979
 
980
    public void unsetId() {
981
      __isset_bit_vector.clear(__ID_ISSET_ID);
982
    }
983
 
984
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
985
    public boolean isSetId() {
986
      return __isset_bit_vector.get(__ID_ISSET_ID);
987
    }
988
 
989
    public void setIdIsSet(boolean value) {
990
      __isset_bit_vector.set(__ID_ISSET_ID, value);
991
    }
992
 
993
    public void setFieldValue(_Fields field, Object value) {
994
      switch (field) {
995
      case ID:
996
        if (value == null) {
997
          unsetId();
998
        } else {
999
          setId((Long)value);
1000
        }
1001
        break;
1002
 
1003
      }
1004
    }
1005
 
1006
    public void setFieldValue(int fieldID, Object value) {
1007
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1008
    }
1009
 
1010
    public Object getFieldValue(_Fields field) {
1011
      switch (field) {
1012
      case ID:
1013
        return new Long(getId());
1014
 
1015
      }
1016
      throw new IllegalStateException();
1017
    }
1018
 
1019
    public Object getFieldValue(int fieldId) {
1020
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1021
    }
1022
 
1023
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1024
    public boolean isSet(_Fields field) {
1025
      switch (field) {
1026
      case ID:
1027
        return isSetId();
1028
      }
1029
      throw new IllegalStateException();
1030
    }
1031
 
1032
    public boolean isSet(int fieldID) {
1033
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1034
    }
1035
 
1036
    @Override
1037
    public boolean equals(Object that) {
1038
      if (that == null)
1039
        return false;
1040
      if (that instanceof getUser_args)
1041
        return this.equals((getUser_args)that);
1042
      return false;
1043
    }
1044
 
1045
    public boolean equals(getUser_args that) {
1046
      if (that == null)
1047
        return false;
1048
 
1049
      boolean this_present_id = true;
1050
      boolean that_present_id = true;
1051
      if (this_present_id || that_present_id) {
1052
        if (!(this_present_id && that_present_id))
1053
          return false;
1054
        if (this.id != that.id)
1055
          return false;
1056
      }
1057
 
1058
      return true;
1059
    }
1060
 
1061
    @Override
1062
    public int hashCode() {
1063
      return 0;
1064
    }
1065
 
1066
    public int compareTo(getUser_args other) {
1067
      if (!getClass().equals(other.getClass())) {
1068
        return getClass().getName().compareTo(other.getClass().getName());
1069
      }
1070
 
1071
      int lastComparison = 0;
1072
      getUser_args typedOther = (getUser_args)other;
1073
 
1074
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
1075
      if (lastComparison != 0) {
1076
        return lastComparison;
1077
      }
1078
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
1079
      if (lastComparison != 0) {
1080
        return lastComparison;
1081
      }
1082
      return 0;
1083
    }
1084
 
1085
    public void read(TProtocol iprot) throws TException {
1086
      TField field;
1087
      iprot.readStructBegin();
1088
      while (true)
1089
      {
1090
        field = iprot.readFieldBegin();
1091
        if (field.type == TType.STOP) { 
1092
          break;
1093
        }
1094
        _Fields fieldId = _Fields.findByThriftId(field.id);
1095
        if (fieldId == null) {
1096
          TProtocolUtil.skip(iprot, field.type);
1097
        } else {
1098
          switch (fieldId) {
1099
            case ID:
1100
              if (field.type == TType.I64) {
1101
                this.id = iprot.readI64();
1102
                setIdIsSet(true);
1103
              } else { 
1104
                TProtocolUtil.skip(iprot, field.type);
1105
              }
1106
              break;
1107
          }
1108
          iprot.readFieldEnd();
1109
        }
1110
      }
1111
      iprot.readStructEnd();
1112
      validate();
1113
    }
1114
 
1115
    public void write(TProtocol oprot) throws TException {
1116
      validate();
1117
 
1118
      oprot.writeStructBegin(STRUCT_DESC);
1119
      oprot.writeFieldBegin(ID_FIELD_DESC);
1120
      oprot.writeI64(this.id);
1121
      oprot.writeFieldEnd();
1122
      oprot.writeFieldStop();
1123
      oprot.writeStructEnd();
1124
    }
1125
 
1126
    @Override
1127
    public String toString() {
1128
      StringBuilder sb = new StringBuilder("getUser_args(");
1129
      boolean first = true;
1130
 
1131
      sb.append("id:");
1132
      sb.append(this.id);
1133
      first = false;
1134
      sb.append(")");
1135
      return sb.toString();
1136
    }
1137
 
1138
    public void validate() throws TException {
1139
      // check for required fields
1140
    }
1141
 
1142
  }
1143
 
1144
  public static class getUser_result implements TBase<getUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_result>   {
1145
    private static final TStruct STRUCT_DESC = new TStruct("getUser_result");
1146
 
1147
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
1148
 
1149
    private String success;
1150
 
1151
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1152
    public enum _Fields implements TFieldIdEnum {
1153
      SUCCESS((short)0, "success");
1154
 
1155
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1156
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1157
 
1158
      static {
1159
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1160
          byId.put((int)field._thriftId, field);
1161
          byName.put(field.getFieldName(), field);
1162
        }
1163
      }
1164
 
1165
      /**
1166
       * Find the _Fields constant that matches fieldId, or null if its not found.
1167
       */
1168
      public static _Fields findByThriftId(int fieldId) {
1169
        return byId.get(fieldId);
1170
      }
1171
 
1172
      /**
1173
       * Find the _Fields constant that matches fieldId, throwing an exception
1174
       * if it is not found.
1175
       */
1176
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1177
        _Fields fields = findByThriftId(fieldId);
1178
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1179
        return fields;
1180
      }
1181
 
1182
      /**
1183
       * Find the _Fields constant that matches name, or null if its not found.
1184
       */
1185
      public static _Fields findByName(String name) {
1186
        return byName.get(name);
1187
      }
1188
 
1189
      private final short _thriftId;
1190
      private final String _fieldName;
1191
 
1192
      _Fields(short thriftId, String fieldName) {
1193
        _thriftId = thriftId;
1194
        _fieldName = fieldName;
1195
      }
1196
 
1197
      public short getThriftFieldId() {
1198
        return _thriftId;
1199
      }
1200
 
1201
      public String getFieldName() {
1202
        return _fieldName;
1203
      }
1204
    }
1205
 
1206
    // isset id assignments
1207
 
1208
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1209
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1210
          new FieldValueMetaData(TType.STRING)));
1211
    }});
1212
 
1213
    static {
1214
      FieldMetaData.addStructMetaDataMap(getUser_result.class, metaDataMap);
1215
    }
1216
 
1217
    public getUser_result() {
1218
    }
1219
 
1220
    public getUser_result(
1221
      String success)
1222
    {
1223
      this();
1224
      this.success = success;
1225
    }
1226
 
1227
    /**
1228
     * Performs a deep copy on <i>other</i>.
1229
     */
1230
    public getUser_result(getUser_result other) {
1231
      if (other.isSetSuccess()) {
1232
        this.success = other.success;
1233
      }
1234
    }
1235
 
1236
    public getUser_result deepCopy() {
1237
      return new getUser_result(this);
1238
    }
1239
 
1240
    @Deprecated
1241
    public getUser_result clone() {
1242
      return new getUser_result(this);
1243
    }
1244
 
1245
    public String getSuccess() {
1246
      return this.success;
1247
    }
1248
 
1249
    public getUser_result setSuccess(String success) {
1250
      this.success = success;
1251
      return this;
1252
    }
1253
 
1254
    public void unsetSuccess() {
1255
      this.success = null;
1256
    }
1257
 
1258
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1259
    public boolean isSetSuccess() {
1260
      return this.success != null;
1261
    }
1262
 
1263
    public void setSuccessIsSet(boolean value) {
1264
      if (!value) {
1265
        this.success = null;
1266
      }
1267
    }
1268
 
1269
    public void setFieldValue(_Fields field, Object value) {
1270
      switch (field) {
1271
      case SUCCESS:
1272
        if (value == null) {
1273
          unsetSuccess();
1274
        } else {
1275
          setSuccess((String)value);
1276
        }
1277
        break;
1278
 
1279
      }
1280
    }
1281
 
1282
    public void setFieldValue(int fieldID, Object value) {
1283
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1284
    }
1285
 
1286
    public Object getFieldValue(_Fields field) {
1287
      switch (field) {
1288
      case SUCCESS:
1289
        return getSuccess();
1290
 
1291
      }
1292
      throw new IllegalStateException();
1293
    }
1294
 
1295
    public Object getFieldValue(int fieldId) {
1296
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1297
    }
1298
 
1299
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1300
    public boolean isSet(_Fields field) {
1301
      switch (field) {
1302
      case SUCCESS:
1303
        return isSetSuccess();
1304
      }
1305
      throw new IllegalStateException();
1306
    }
1307
 
1308
    public boolean isSet(int fieldID) {
1309
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1310
    }
1311
 
1312
    @Override
1313
    public boolean equals(Object that) {
1314
      if (that == null)
1315
        return false;
1316
      if (that instanceof getUser_result)
1317
        return this.equals((getUser_result)that);
1318
      return false;
1319
    }
1320
 
1321
    public boolean equals(getUser_result that) {
1322
      if (that == null)
1323
        return false;
1324
 
1325
      boolean this_present_success = true && this.isSetSuccess();
1326
      boolean that_present_success = true && that.isSetSuccess();
1327
      if (this_present_success || that_present_success) {
1328
        if (!(this_present_success && that_present_success))
1329
          return false;
1330
        if (!this.success.equals(that.success))
1331
          return false;
1332
      }
1333
 
1334
      return true;
1335
    }
1336
 
1337
    @Override
1338
    public int hashCode() {
1339
      return 0;
1340
    }
1341
 
1342
    public int compareTo(getUser_result other) {
1343
      if (!getClass().equals(other.getClass())) {
1344
        return getClass().getName().compareTo(other.getClass().getName());
1345
      }
1346
 
1347
      int lastComparison = 0;
1348
      getUser_result typedOther = (getUser_result)other;
1349
 
1350
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
1351
      if (lastComparison != 0) {
1352
        return lastComparison;
1353
      }
1354
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
1355
      if (lastComparison != 0) {
1356
        return lastComparison;
1357
      }
1358
      return 0;
1359
    }
1360
 
1361
    public void read(TProtocol iprot) throws TException {
1362
      TField field;
1363
      iprot.readStructBegin();
1364
      while (true)
1365
      {
1366
        field = iprot.readFieldBegin();
1367
        if (field.type == TType.STOP) { 
1368
          break;
1369
        }
1370
        _Fields fieldId = _Fields.findByThriftId(field.id);
1371
        if (fieldId == null) {
1372
          TProtocolUtil.skip(iprot, field.type);
1373
        } else {
1374
          switch (fieldId) {
1375
            case SUCCESS:
1376
              if (field.type == TType.STRING) {
1377
                this.success = iprot.readString();
1378
              } else { 
1379
                TProtocolUtil.skip(iprot, field.type);
1380
              }
1381
              break;
1382
          }
1383
          iprot.readFieldEnd();
1384
        }
1385
      }
1386
      iprot.readStructEnd();
1387
      validate();
1388
    }
1389
 
1390
    public void write(TProtocol oprot) throws TException {
1391
      oprot.writeStructBegin(STRUCT_DESC);
1392
 
1393
      if (this.isSetSuccess()) {
1394
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1395
        oprot.writeString(this.success);
1396
        oprot.writeFieldEnd();
1397
      }
1398
      oprot.writeFieldStop();
1399
      oprot.writeStructEnd();
1400
    }
1401
 
1402
    @Override
1403
    public String toString() {
1404
      StringBuilder sb = new StringBuilder("getUser_result(");
1405
      boolean first = true;
1406
 
1407
      sb.append("success:");
1408
      if (this.success == null) {
1409
        sb.append("null");
1410
      } else {
1411
        sb.append(this.success);
1412
      }
1413
      first = false;
1414
      sb.append(")");
1415
      return sb.toString();
1416
    }
1417
 
1418
    public void validate() throws TException {
1419
      // check for required fields
1420
    }
1421
 
1422
  }
1423
 
896 rajveer 1424
  public static class getAddressId_args implements TBase<getAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAddressId_args>   {
1425
    private static final TStruct STRUCT_DESC = new TStruct("getAddressId_args");
1426
 
1427
 
1428
 
1429
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1430
    public enum _Fields implements TFieldIdEnum {
1431
;
1432
 
1433
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1435
 
1436
      static {
1437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1438
          byId.put((int)field._thriftId, field);
1439
          byName.put(field.getFieldName(), field);
1440
        }
1441
      }
1442
 
1443
      /**
1444
       * Find the _Fields constant that matches fieldId, or null if its not found.
1445
       */
1446
      public static _Fields findByThriftId(int fieldId) {
1447
        return byId.get(fieldId);
1448
      }
1449
 
1450
      /**
1451
       * Find the _Fields constant that matches fieldId, throwing an exception
1452
       * if it is not found.
1453
       */
1454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1455
        _Fields fields = findByThriftId(fieldId);
1456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1457
        return fields;
1458
      }
1459
 
1460
      /**
1461
       * Find the _Fields constant that matches name, or null if its not found.
1462
       */
1463
      public static _Fields findByName(String name) {
1464
        return byName.get(name);
1465
      }
1466
 
1467
      private final short _thriftId;
1468
      private final String _fieldName;
1469
 
1470
      _Fields(short thriftId, String fieldName) {
1471
        _thriftId = thriftId;
1472
        _fieldName = fieldName;
1473
      }
1474
 
1475
      public short getThriftFieldId() {
1476
        return _thriftId;
1477
      }
1478
 
1479
      public String getFieldName() {
1480
        return _fieldName;
1481
      }
1482
    }
1483
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1484
    }});
1485
 
1486
    static {
1487
      FieldMetaData.addStructMetaDataMap(getAddressId_args.class, metaDataMap);
1488
    }
1489
 
1490
    public getAddressId_args() {
1491
    }
1492
 
1493
    /**
1494
     * Performs a deep copy on <i>other</i>.
1495
     */
1496
    public getAddressId_args(getAddressId_args other) {
1497
    }
1498
 
1499
    public getAddressId_args deepCopy() {
1500
      return new getAddressId_args(this);
1501
    }
1502
 
1503
    @Deprecated
1504
    public getAddressId_args clone() {
1505
      return new getAddressId_args(this);
1506
    }
1507
 
1508
    public void setFieldValue(_Fields field, Object value) {
1509
      switch (field) {
1510
      }
1511
    }
1512
 
1513
    public void setFieldValue(int fieldID, Object value) {
1514
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1515
    }
1516
 
1517
    public Object getFieldValue(_Fields field) {
1518
      switch (field) {
1519
      }
1520
      throw new IllegalStateException();
1521
    }
1522
 
1523
    public Object getFieldValue(int fieldId) {
1524
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1525
    }
1526
 
1527
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1528
    public boolean isSet(_Fields field) {
1529
      switch (field) {
1530
      }
1531
      throw new IllegalStateException();
1532
    }
1533
 
1534
    public boolean isSet(int fieldID) {
1535
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1536
    }
1537
 
1538
    @Override
1539
    public boolean equals(Object that) {
1540
      if (that == null)
1541
        return false;
1542
      if (that instanceof getAddressId_args)
1543
        return this.equals((getAddressId_args)that);
1544
      return false;
1545
    }
1546
 
1547
    public boolean equals(getAddressId_args that) {
1548
      if (that == null)
1549
        return false;
1550
 
1551
      return true;
1552
    }
1553
 
1554
    @Override
1555
    public int hashCode() {
1556
      return 0;
1557
    }
1558
 
1559
    public int compareTo(getAddressId_args other) {
1560
      if (!getClass().equals(other.getClass())) {
1561
        return getClass().getName().compareTo(other.getClass().getName());
1562
      }
1563
 
1564
      int lastComparison = 0;
1565
      getAddressId_args typedOther = (getAddressId_args)other;
1566
 
1567
      return 0;
1568
    }
1569
 
1570
    public void read(TProtocol iprot) throws TException {
1571
      TField field;
1572
      iprot.readStructBegin();
1573
      while (true)
1574
      {
1575
        field = iprot.readFieldBegin();
1576
        if (field.type == TType.STOP) { 
1577
          break;
1578
        }
1579
        _Fields fieldId = _Fields.findByThriftId(field.id);
1580
        if (fieldId == null) {
1581
          TProtocolUtil.skip(iprot, field.type);
1582
        } else {
1583
          switch (fieldId) {
1584
          }
1585
          iprot.readFieldEnd();
1586
        }
1587
      }
1588
      iprot.readStructEnd();
1589
      validate();
1590
    }
1591
 
1592
    public void write(TProtocol oprot) throws TException {
1593
      validate();
1594
 
1595
      oprot.writeStructBegin(STRUCT_DESC);
1596
      oprot.writeFieldStop();
1597
      oprot.writeStructEnd();
1598
    }
1599
 
1600
    @Override
1601
    public String toString() {
1602
      StringBuilder sb = new StringBuilder("getAddressId_args(");
1603
      boolean first = true;
1604
 
1605
      sb.append(")");
1606
      return sb.toString();
1607
    }
1608
 
1609
    public void validate() throws TException {
1610
      // check for required fields
1611
    }
1612
 
1613
  }
1614
 
1615
  public static class getAddressId_result implements TBase<getAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAddressId_result>   {
1616
    private static final TStruct STRUCT_DESC = new TStruct("getAddressId_result");
1617
 
1618
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
1619
 
1620
    private long success;
1621
 
1622
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1623
    public enum _Fields implements TFieldIdEnum {
1624
      SUCCESS((short)0, "success");
1625
 
1626
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1627
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1628
 
1629
      static {
1630
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1631
          byId.put((int)field._thriftId, field);
1632
          byName.put(field.getFieldName(), field);
1633
        }
1634
      }
1635
 
1636
      /**
1637
       * Find the _Fields constant that matches fieldId, or null if its not found.
1638
       */
1639
      public static _Fields findByThriftId(int fieldId) {
1640
        return byId.get(fieldId);
1641
      }
1642
 
1643
      /**
1644
       * Find the _Fields constant that matches fieldId, throwing an exception
1645
       * if it is not found.
1646
       */
1647
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1648
        _Fields fields = findByThriftId(fieldId);
1649
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1650
        return fields;
1651
      }
1652
 
1653
      /**
1654
       * Find the _Fields constant that matches name, or null if its not found.
1655
       */
1656
      public static _Fields findByName(String name) {
1657
        return byName.get(name);
1658
      }
1659
 
1660
      private final short _thriftId;
1661
      private final String _fieldName;
1662
 
1663
      _Fields(short thriftId, String fieldName) {
1664
        _thriftId = thriftId;
1665
        _fieldName = fieldName;
1666
      }
1667
 
1668
      public short getThriftFieldId() {
1669
        return _thriftId;
1670
      }
1671
 
1672
      public String getFieldName() {
1673
        return _fieldName;
1674
      }
1675
    }
1676
 
1677
    // isset id assignments
1678
    private static final int __SUCCESS_ISSET_ID = 0;
1679
    private BitSet __isset_bit_vector = new BitSet(1);
1680
 
1681
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1682
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1683
          new FieldValueMetaData(TType.I64)));
1684
    }});
1685
 
1686
    static {
1687
      FieldMetaData.addStructMetaDataMap(getAddressId_result.class, metaDataMap);
1688
    }
1689
 
1690
    public getAddressId_result() {
1691
    }
1692
 
1693
    public getAddressId_result(
1694
      long success)
1695
    {
1696
      this();
1697
      this.success = success;
1698
      setSuccessIsSet(true);
1699
    }
1700
 
1701
    /**
1702
     * Performs a deep copy on <i>other</i>.
1703
     */
1704
    public getAddressId_result(getAddressId_result other) {
1705
      __isset_bit_vector.clear();
1706
      __isset_bit_vector.or(other.__isset_bit_vector);
1707
      this.success = other.success;
1708
    }
1709
 
1710
    public getAddressId_result deepCopy() {
1711
      return new getAddressId_result(this);
1712
    }
1713
 
1714
    @Deprecated
1715
    public getAddressId_result clone() {
1716
      return new getAddressId_result(this);
1717
    }
1718
 
1719
    public long getSuccess() {
1720
      return this.success;
1721
    }
1722
 
1723
    public getAddressId_result setSuccess(long success) {
1724
      this.success = success;
1725
      setSuccessIsSet(true);
1726
      return this;
1727
    }
1728
 
1729
    public void unsetSuccess() {
1730
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
1731
    }
1732
 
1733
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1734
    public boolean isSetSuccess() {
1735
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
1736
    }
1737
 
1738
    public void setSuccessIsSet(boolean value) {
1739
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
1740
    }
1741
 
1742
    public void setFieldValue(_Fields field, Object value) {
1743
      switch (field) {
1744
      case SUCCESS:
1745
        if (value == null) {
1746
          unsetSuccess();
1747
        } else {
1748
          setSuccess((Long)value);
1749
        }
1750
        break;
1751
 
1752
      }
1753
    }
1754
 
1755
    public void setFieldValue(int fieldID, Object value) {
1756
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1757
    }
1758
 
1759
    public Object getFieldValue(_Fields field) {
1760
      switch (field) {
1761
      case SUCCESS:
1762
        return new Long(getSuccess());
1763
 
1764
      }
1765
      throw new IllegalStateException();
1766
    }
1767
 
1768
    public Object getFieldValue(int fieldId) {
1769
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1770
    }
1771
 
1772
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1773
    public boolean isSet(_Fields field) {
1774
      switch (field) {
1775
      case SUCCESS:
1776
        return isSetSuccess();
1777
      }
1778
      throw new IllegalStateException();
1779
    }
1780
 
1781
    public boolean isSet(int fieldID) {
1782
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1783
    }
1784
 
1785
    @Override
1786
    public boolean equals(Object that) {
1787
      if (that == null)
1788
        return false;
1789
      if (that instanceof getAddressId_result)
1790
        return this.equals((getAddressId_result)that);
1791
      return false;
1792
    }
1793
 
1794
    public boolean equals(getAddressId_result that) {
1795
      if (that == null)
1796
        return false;
1797
 
1798
      boolean this_present_success = true;
1799
      boolean that_present_success = true;
1800
      if (this_present_success || that_present_success) {
1801
        if (!(this_present_success && that_present_success))
1802
          return false;
1803
        if (this.success != that.success)
1804
          return false;
1805
      }
1806
 
1807
      return true;
1808
    }
1809
 
1810
    @Override
1811
    public int hashCode() {
1812
      return 0;
1813
    }
1814
 
1815
    public int compareTo(getAddressId_result other) {
1816
      if (!getClass().equals(other.getClass())) {
1817
        return getClass().getName().compareTo(other.getClass().getName());
1818
      }
1819
 
1820
      int lastComparison = 0;
1821
      getAddressId_result typedOther = (getAddressId_result)other;
1822
 
1823
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
1824
      if (lastComparison != 0) {
1825
        return lastComparison;
1826
      }
1827
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
1828
      if (lastComparison != 0) {
1829
        return lastComparison;
1830
      }
1831
      return 0;
1832
    }
1833
 
1834
    public void read(TProtocol iprot) throws TException {
1835
      TField field;
1836
      iprot.readStructBegin();
1837
      while (true)
1838
      {
1839
        field = iprot.readFieldBegin();
1840
        if (field.type == TType.STOP) { 
1841
          break;
1842
        }
1843
        _Fields fieldId = _Fields.findByThriftId(field.id);
1844
        if (fieldId == null) {
1845
          TProtocolUtil.skip(iprot, field.type);
1846
        } else {
1847
          switch (fieldId) {
1848
            case SUCCESS:
1849
              if (field.type == TType.I64) {
1850
                this.success = iprot.readI64();
1851
                setSuccessIsSet(true);
1852
              } else { 
1853
                TProtocolUtil.skip(iprot, field.type);
1854
              }
1855
              break;
1856
          }
1857
          iprot.readFieldEnd();
1858
        }
1859
      }
1860
      iprot.readStructEnd();
1861
      validate();
1862
    }
1863
 
1864
    public void write(TProtocol oprot) throws TException {
1865
      oprot.writeStructBegin(STRUCT_DESC);
1866
 
1867
      if (this.isSetSuccess()) {
1868
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1869
        oprot.writeI64(this.success);
1870
        oprot.writeFieldEnd();
1871
      }
1872
      oprot.writeFieldStop();
1873
      oprot.writeStructEnd();
1874
    }
1875
 
1876
    @Override
1877
    public String toString() {
1878
      StringBuilder sb = new StringBuilder("getAddressId_result(");
1879
      boolean first = true;
1880
 
1881
      sb.append("success:");
1882
      sb.append(this.success);
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 getAddress_args implements TBase<getAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAddress_args>   {
1895
    private static final TStruct STRUCT_DESC = new TStruct("getAddress_args");
1896
 
1897
 
1898
 
1899
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1900
    public enum _Fields implements TFieldIdEnum {
1901
;
1902
 
1903
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1904
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1905
 
1906
      static {
1907
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1908
          byId.put((int)field._thriftId, field);
1909
          byName.put(field.getFieldName(), field);
1910
        }
1911
      }
1912
 
1913
      /**
1914
       * Find the _Fields constant that matches fieldId, or null if its not found.
1915
       */
1916
      public static _Fields findByThriftId(int fieldId) {
1917
        return byId.get(fieldId);
1918
      }
1919
 
1920
      /**
1921
       * Find the _Fields constant that matches fieldId, throwing an exception
1922
       * if it is not found.
1923
       */
1924
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1925
        _Fields fields = findByThriftId(fieldId);
1926
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1927
        return fields;
1928
      }
1929
 
1930
      /**
1931
       * Find the _Fields constant that matches name, or null if its not found.
1932
       */
1933
      public static _Fields findByName(String name) {
1934
        return byName.get(name);
1935
      }
1936
 
1937
      private final short _thriftId;
1938
      private final String _fieldName;
1939
 
1940
      _Fields(short thriftId, String fieldName) {
1941
        _thriftId = thriftId;
1942
        _fieldName = fieldName;
1943
      }
1944
 
1945
      public short getThriftFieldId() {
1946
        return _thriftId;
1947
      }
1948
 
1949
      public String getFieldName() {
1950
        return _fieldName;
1951
      }
1952
    }
1953
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1954
    }});
1955
 
1956
    static {
1957
      FieldMetaData.addStructMetaDataMap(getAddress_args.class, metaDataMap);
1958
    }
1959
 
1960
    public getAddress_args() {
1961
    }
1962
 
1963
    /**
1964
     * Performs a deep copy on <i>other</i>.
1965
     */
1966
    public getAddress_args(getAddress_args other) {
1967
    }
1968
 
1969
    public getAddress_args deepCopy() {
1970
      return new getAddress_args(this);
1971
    }
1972
 
1973
    @Deprecated
1974
    public getAddress_args clone() {
1975
      return new getAddress_args(this);
1976
    }
1977
 
1978
    public void setFieldValue(_Fields field, Object value) {
1979
      switch (field) {
1980
      }
1981
    }
1982
 
1983
    public void setFieldValue(int fieldID, Object value) {
1984
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1985
    }
1986
 
1987
    public Object getFieldValue(_Fields field) {
1988
      switch (field) {
1989
      }
1990
      throw new IllegalStateException();
1991
    }
1992
 
1993
    public Object getFieldValue(int fieldId) {
1994
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1995
    }
1996
 
1997
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1998
    public boolean isSet(_Fields field) {
1999
      switch (field) {
2000
      }
2001
      throw new IllegalStateException();
2002
    }
2003
 
2004
    public boolean isSet(int fieldID) {
2005
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2006
    }
2007
 
2008
    @Override
2009
    public boolean equals(Object that) {
2010
      if (that == null)
2011
        return false;
2012
      if (that instanceof getAddress_args)
2013
        return this.equals((getAddress_args)that);
2014
      return false;
2015
    }
2016
 
2017
    public boolean equals(getAddress_args that) {
2018
      if (that == null)
2019
        return false;
2020
 
2021
      return true;
2022
    }
2023
 
2024
    @Override
2025
    public int hashCode() {
2026
      return 0;
2027
    }
2028
 
2029
    public int compareTo(getAddress_args other) {
2030
      if (!getClass().equals(other.getClass())) {
2031
        return getClass().getName().compareTo(other.getClass().getName());
2032
      }
2033
 
2034
      int lastComparison = 0;
2035
      getAddress_args typedOther = (getAddress_args)other;
2036
 
2037
      return 0;
2038
    }
2039
 
2040
    public void read(TProtocol iprot) throws TException {
2041
      TField field;
2042
      iprot.readStructBegin();
2043
      while (true)
2044
      {
2045
        field = iprot.readFieldBegin();
2046
        if (field.type == TType.STOP) { 
2047
          break;
2048
        }
2049
        _Fields fieldId = _Fields.findByThriftId(field.id);
2050
        if (fieldId == null) {
2051
          TProtocolUtil.skip(iprot, field.type);
2052
        } else {
2053
          switch (fieldId) {
2054
          }
2055
          iprot.readFieldEnd();
2056
        }
2057
      }
2058
      iprot.readStructEnd();
2059
      validate();
2060
    }
2061
 
2062
    public void write(TProtocol oprot) throws TException {
2063
      validate();
2064
 
2065
      oprot.writeStructBegin(STRUCT_DESC);
2066
      oprot.writeFieldStop();
2067
      oprot.writeStructEnd();
2068
    }
2069
 
2070
    @Override
2071
    public String toString() {
2072
      StringBuilder sb = new StringBuilder("getAddress_args(");
2073
      boolean first = true;
2074
 
2075
      sb.append(")");
2076
      return sb.toString();
2077
    }
2078
 
2079
    public void validate() throws TException {
2080
      // check for required fields
2081
    }
2082
 
2083
  }
2084
 
2085
  public static class getAddress_result implements TBase<getAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAddress_result>   {
2086
    private static final TStruct STRUCT_DESC = new TStruct("getAddress_result");
2087
 
2088
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2089
 
2090
    private Address success;
2091
 
2092
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2093
    public enum _Fields implements TFieldIdEnum {
2094
      SUCCESS((short)0, "success");
2095
 
2096
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2097
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2098
 
2099
      static {
2100
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2101
          byId.put((int)field._thriftId, field);
2102
          byName.put(field.getFieldName(), field);
2103
        }
2104
      }
2105
 
2106
      /**
2107
       * Find the _Fields constant that matches fieldId, or null if its not found.
2108
       */
2109
      public static _Fields findByThriftId(int fieldId) {
2110
        return byId.get(fieldId);
2111
      }
2112
 
2113
      /**
2114
       * Find the _Fields constant that matches fieldId, throwing an exception
2115
       * if it is not found.
2116
       */
2117
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2118
        _Fields fields = findByThriftId(fieldId);
2119
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2120
        return fields;
2121
      }
2122
 
2123
      /**
2124
       * Find the _Fields constant that matches name, or null if its not found.
2125
       */
2126
      public static _Fields findByName(String name) {
2127
        return byName.get(name);
2128
      }
2129
 
2130
      private final short _thriftId;
2131
      private final String _fieldName;
2132
 
2133
      _Fields(short thriftId, String fieldName) {
2134
        _thriftId = thriftId;
2135
        _fieldName = fieldName;
2136
      }
2137
 
2138
      public short getThriftFieldId() {
2139
        return _thriftId;
2140
      }
2141
 
2142
      public String getFieldName() {
2143
        return _fieldName;
2144
      }
2145
    }
2146
 
2147
    // isset id assignments
2148
 
2149
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2150
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2151
          new StructMetaData(TType.STRUCT, Address.class)));
2152
    }});
2153
 
2154
    static {
2155
      FieldMetaData.addStructMetaDataMap(getAddress_result.class, metaDataMap);
2156
    }
2157
 
2158
    public getAddress_result() {
2159
    }
2160
 
2161
    public getAddress_result(
2162
      Address success)
2163
    {
2164
      this();
2165
      this.success = success;
2166
    }
2167
 
2168
    /**
2169
     * Performs a deep copy on <i>other</i>.
2170
     */
2171
    public getAddress_result(getAddress_result other) {
2172
      if (other.isSetSuccess()) {
2173
        this.success = new Address(other.success);
2174
      }
2175
    }
2176
 
2177
    public getAddress_result deepCopy() {
2178
      return new getAddress_result(this);
2179
    }
2180
 
2181
    @Deprecated
2182
    public getAddress_result clone() {
2183
      return new getAddress_result(this);
2184
    }
2185
 
2186
    public Address getSuccess() {
2187
      return this.success;
2188
    }
2189
 
2190
    public getAddress_result setSuccess(Address success) {
2191
      this.success = success;
2192
      return this;
2193
    }
2194
 
2195
    public void unsetSuccess() {
2196
      this.success = null;
2197
    }
2198
 
2199
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2200
    public boolean isSetSuccess() {
2201
      return this.success != null;
2202
    }
2203
 
2204
    public void setSuccessIsSet(boolean value) {
2205
      if (!value) {
2206
        this.success = null;
2207
      }
2208
    }
2209
 
2210
    public void setFieldValue(_Fields field, Object value) {
2211
      switch (field) {
2212
      case SUCCESS:
2213
        if (value == null) {
2214
          unsetSuccess();
2215
        } else {
2216
          setSuccess((Address)value);
2217
        }
2218
        break;
2219
 
2220
      }
2221
    }
2222
 
2223
    public void setFieldValue(int fieldID, Object value) {
2224
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2225
    }
2226
 
2227
    public Object getFieldValue(_Fields field) {
2228
      switch (field) {
2229
      case SUCCESS:
2230
        return getSuccess();
2231
 
2232
      }
2233
      throw new IllegalStateException();
2234
    }
2235
 
2236
    public Object getFieldValue(int fieldId) {
2237
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2238
    }
2239
 
2240
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2241
    public boolean isSet(_Fields field) {
2242
      switch (field) {
2243
      case SUCCESS:
2244
        return isSetSuccess();
2245
      }
2246
      throw new IllegalStateException();
2247
    }
2248
 
2249
    public boolean isSet(int fieldID) {
2250
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2251
    }
2252
 
2253
    @Override
2254
    public boolean equals(Object that) {
2255
      if (that == null)
2256
        return false;
2257
      if (that instanceof getAddress_result)
2258
        return this.equals((getAddress_result)that);
2259
      return false;
2260
    }
2261
 
2262
    public boolean equals(getAddress_result that) {
2263
      if (that == null)
2264
        return false;
2265
 
2266
      boolean this_present_success = true && this.isSetSuccess();
2267
      boolean that_present_success = true && that.isSetSuccess();
2268
      if (this_present_success || that_present_success) {
2269
        if (!(this_present_success && that_present_success))
2270
          return false;
2271
        if (!this.success.equals(that.success))
2272
          return false;
2273
      }
2274
 
2275
      return true;
2276
    }
2277
 
2278
    @Override
2279
    public int hashCode() {
2280
      return 0;
2281
    }
2282
 
2283
    public int compareTo(getAddress_result other) {
2284
      if (!getClass().equals(other.getClass())) {
2285
        return getClass().getName().compareTo(other.getClass().getName());
2286
      }
2287
 
2288
      int lastComparison = 0;
2289
      getAddress_result typedOther = (getAddress_result)other;
2290
 
2291
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2292
      if (lastComparison != 0) {
2293
        return lastComparison;
2294
      }
2295
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2296
      if (lastComparison != 0) {
2297
        return lastComparison;
2298
      }
2299
      return 0;
2300
    }
2301
 
2302
    public void read(TProtocol iprot) throws TException {
2303
      TField field;
2304
      iprot.readStructBegin();
2305
      while (true)
2306
      {
2307
        field = iprot.readFieldBegin();
2308
        if (field.type == TType.STOP) { 
2309
          break;
2310
        }
2311
        _Fields fieldId = _Fields.findByThriftId(field.id);
2312
        if (fieldId == null) {
2313
          TProtocolUtil.skip(iprot, field.type);
2314
        } else {
2315
          switch (fieldId) {
2316
            case SUCCESS:
2317
              if (field.type == TType.STRUCT) {
2318
                this.success = new Address();
2319
                this.success.read(iprot);
2320
              } else { 
2321
                TProtocolUtil.skip(iprot, field.type);
2322
              }
2323
              break;
2324
          }
2325
          iprot.readFieldEnd();
2326
        }
2327
      }
2328
      iprot.readStructEnd();
2329
      validate();
2330
    }
2331
 
2332
    public void write(TProtocol oprot) throws TException {
2333
      oprot.writeStructBegin(STRUCT_DESC);
2334
 
2335
      if (this.isSetSuccess()) {
2336
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2337
        this.success.write(oprot);
2338
        oprot.writeFieldEnd();
2339
      }
2340
      oprot.writeFieldStop();
2341
      oprot.writeStructEnd();
2342
    }
2343
 
2344
    @Override
2345
    public String toString() {
2346
      StringBuilder sb = new StringBuilder("getAddress_result(");
2347
      boolean first = true;
2348
 
2349
      sb.append("success:");
2350
      if (this.success == null) {
2351
        sb.append("null");
2352
      } else {
2353
        sb.append(this.success);
2354
      }
2355
      first = false;
2356
      sb.append(")");
2357
      return sb.toString();
2358
    }
2359
 
2360
    public void validate() throws TException {
2361
      // check for required fields
2362
    }
2363
 
2364
  }
2365
 
779 rajveer 2366
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
2367
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
2368
 
2369
    private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
2370
 
2371
    private String name;
2372
 
2373
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2374
    public enum _Fields implements TFieldIdEnum {
2375
      NAME((short)1, "name");
2376
 
2377
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2378
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2379
 
2380
      static {
2381
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2382
          byId.put((int)field._thriftId, field);
2383
          byName.put(field.getFieldName(), field);
2384
        }
2385
      }
2386
 
2387
      /**
2388
       * Find the _Fields constant that matches fieldId, or null if its not found.
2389
       */
2390
      public static _Fields findByThriftId(int fieldId) {
2391
        return byId.get(fieldId);
2392
      }
2393
 
2394
      /**
2395
       * Find the _Fields constant that matches fieldId, throwing an exception
2396
       * if it is not found.
2397
       */
2398
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2399
        _Fields fields = findByThriftId(fieldId);
2400
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2401
        return fields;
2402
      }
2403
 
2404
      /**
2405
       * Find the _Fields constant that matches name, or null if its not found.
2406
       */
2407
      public static _Fields findByName(String name) {
2408
        return byName.get(name);
2409
      }
2410
 
2411
      private final short _thriftId;
2412
      private final String _fieldName;
2413
 
2414
      _Fields(short thriftId, String fieldName) {
2415
        _thriftId = thriftId;
2416
        _fieldName = fieldName;
2417
      }
2418
 
2419
      public short getThriftFieldId() {
2420
        return _thriftId;
2421
      }
2422
 
2423
      public String getFieldName() {
2424
        return _fieldName;
2425
      }
2426
    }
2427
 
2428
    // isset id assignments
2429
 
2430
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2431
      put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, 
2432
          new FieldValueMetaData(TType.STRING)));
2433
    }});
2434
 
2435
    static {
2436
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
2437
    }
2438
 
2439
    public createUser_args() {
2440
    }
2441
 
2442
    public createUser_args(
2443
      String name)
2444
    {
2445
      this();
2446
      this.name = name;
2447
    }
2448
 
2449
    /**
2450
     * Performs a deep copy on <i>other</i>.
2451
     */
2452
    public createUser_args(createUser_args other) {
2453
      if (other.isSetName()) {
2454
        this.name = other.name;
2455
      }
2456
    }
2457
 
2458
    public createUser_args deepCopy() {
2459
      return new createUser_args(this);
2460
    }
2461
 
2462
    @Deprecated
2463
    public createUser_args clone() {
2464
      return new createUser_args(this);
2465
    }
2466
 
2467
    public String getName() {
2468
      return this.name;
2469
    }
2470
 
2471
    public createUser_args setName(String name) {
2472
      this.name = name;
2473
      return this;
2474
    }
2475
 
2476
    public void unsetName() {
2477
      this.name = null;
2478
    }
2479
 
2480
    /** Returns true if field name is set (has been asigned a value) and false otherwise */
2481
    public boolean isSetName() {
2482
      return this.name != null;
2483
    }
2484
 
2485
    public void setNameIsSet(boolean value) {
2486
      if (!value) {
2487
        this.name = null;
2488
      }
2489
    }
2490
 
2491
    public void setFieldValue(_Fields field, Object value) {
2492
      switch (field) {
2493
      case NAME:
2494
        if (value == null) {
2495
          unsetName();
2496
        } else {
2497
          setName((String)value);
2498
        }
2499
        break;
2500
 
2501
      }
2502
    }
2503
 
2504
    public void setFieldValue(int fieldID, Object value) {
2505
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2506
    }
2507
 
2508
    public Object getFieldValue(_Fields field) {
2509
      switch (field) {
2510
      case NAME:
2511
        return getName();
2512
 
2513
      }
2514
      throw new IllegalStateException();
2515
    }
2516
 
2517
    public Object getFieldValue(int fieldId) {
2518
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2519
    }
2520
 
2521
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2522
    public boolean isSet(_Fields field) {
2523
      switch (field) {
2524
      case NAME:
2525
        return isSetName();
2526
      }
2527
      throw new IllegalStateException();
2528
    }
2529
 
2530
    public boolean isSet(int fieldID) {
2531
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2532
    }
2533
 
2534
    @Override
2535
    public boolean equals(Object that) {
2536
      if (that == null)
2537
        return false;
2538
      if (that instanceof createUser_args)
2539
        return this.equals((createUser_args)that);
2540
      return false;
2541
    }
2542
 
2543
    public boolean equals(createUser_args that) {
2544
      if (that == null)
2545
        return false;
2546
 
2547
      boolean this_present_name = true && this.isSetName();
2548
      boolean that_present_name = true && that.isSetName();
2549
      if (this_present_name || that_present_name) {
2550
        if (!(this_present_name && that_present_name))
2551
          return false;
2552
        if (!this.name.equals(that.name))
2553
          return false;
2554
      }
2555
 
2556
      return true;
2557
    }
2558
 
2559
    @Override
2560
    public int hashCode() {
2561
      return 0;
2562
    }
2563
 
2564
    public int compareTo(createUser_args other) {
2565
      if (!getClass().equals(other.getClass())) {
2566
        return getClass().getName().compareTo(other.getClass().getName());
2567
      }
2568
 
2569
      int lastComparison = 0;
2570
      createUser_args typedOther = (createUser_args)other;
2571
 
2572
      lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());
2573
      if (lastComparison != 0) {
2574
        return lastComparison;
2575
      }
2576
      lastComparison = TBaseHelper.compareTo(name, typedOther.name);
2577
      if (lastComparison != 0) {
2578
        return lastComparison;
2579
      }
2580
      return 0;
2581
    }
2582
 
2583
    public void read(TProtocol iprot) throws TException {
2584
      TField field;
2585
      iprot.readStructBegin();
2586
      while (true)
2587
      {
2588
        field = iprot.readFieldBegin();
2589
        if (field.type == TType.STOP) { 
2590
          break;
2591
        }
2592
        _Fields fieldId = _Fields.findByThriftId(field.id);
2593
        if (fieldId == null) {
2594
          TProtocolUtil.skip(iprot, field.type);
2595
        } else {
2596
          switch (fieldId) {
2597
            case NAME:
2598
              if (field.type == TType.STRING) {
2599
                this.name = iprot.readString();
2600
              } else { 
2601
                TProtocolUtil.skip(iprot, field.type);
2602
              }
2603
              break;
2604
          }
2605
          iprot.readFieldEnd();
2606
        }
2607
      }
2608
      iprot.readStructEnd();
2609
      validate();
2610
    }
2611
 
2612
    public void write(TProtocol oprot) throws TException {
2613
      validate();
2614
 
2615
      oprot.writeStructBegin(STRUCT_DESC);
2616
      if (this.name != null) {
2617
        oprot.writeFieldBegin(NAME_FIELD_DESC);
2618
        oprot.writeString(this.name);
2619
        oprot.writeFieldEnd();
2620
      }
2621
      oprot.writeFieldStop();
2622
      oprot.writeStructEnd();
2623
    }
2624
 
2625
    @Override
2626
    public String toString() {
2627
      StringBuilder sb = new StringBuilder("createUser_args(");
2628
      boolean first = true;
2629
 
2630
      sb.append("name:");
2631
      if (this.name == null) {
2632
        sb.append("null");
2633
      } else {
2634
        sb.append(this.name);
2635
      }
2636
      first = false;
2637
      sb.append(")");
2638
      return sb.toString();
2639
    }
2640
 
2641
    public void validate() throws TException {
2642
      // check for required fields
2643
    }
2644
 
2645
  }
2646
 
2647
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
2648
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
2649
 
2650
 
2651
 
2652
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2653
    public enum _Fields implements TFieldIdEnum {
2654
;
2655
 
2656
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2657
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2658
 
2659
      static {
2660
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2661
          byId.put((int)field._thriftId, field);
2662
          byName.put(field.getFieldName(), field);
2663
        }
2664
      }
2665
 
2666
      /**
2667
       * Find the _Fields constant that matches fieldId, or null if its not found.
2668
       */
2669
      public static _Fields findByThriftId(int fieldId) {
2670
        return byId.get(fieldId);
2671
      }
2672
 
2673
      /**
2674
       * Find the _Fields constant that matches fieldId, throwing an exception
2675
       * if it is not found.
2676
       */
2677
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2678
        _Fields fields = findByThriftId(fieldId);
2679
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2680
        return fields;
2681
      }
2682
 
2683
      /**
2684
       * Find the _Fields constant that matches name, or null if its not found.
2685
       */
2686
      public static _Fields findByName(String name) {
2687
        return byName.get(name);
2688
      }
2689
 
2690
      private final short _thriftId;
2691
      private final String _fieldName;
2692
 
2693
      _Fields(short thriftId, String fieldName) {
2694
        _thriftId = thriftId;
2695
        _fieldName = fieldName;
2696
      }
2697
 
2698
      public short getThriftFieldId() {
2699
        return _thriftId;
2700
      }
2701
 
2702
      public String getFieldName() {
2703
        return _fieldName;
2704
      }
2705
    }
2706
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2707
    }});
2708
 
2709
    static {
2710
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
2711
    }
2712
 
2713
    public createUser_result() {
2714
    }
2715
 
2716
    /**
2717
     * Performs a deep copy on <i>other</i>.
2718
     */
2719
    public createUser_result(createUser_result other) {
2720
    }
2721
 
2722
    public createUser_result deepCopy() {
2723
      return new createUser_result(this);
2724
    }
2725
 
2726
    @Deprecated
2727
    public createUser_result clone() {
2728
      return new createUser_result(this);
2729
    }
2730
 
2731
    public void setFieldValue(_Fields field, Object value) {
2732
      switch (field) {
2733
      }
2734
    }
2735
 
2736
    public void setFieldValue(int fieldID, Object value) {
2737
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2738
    }
2739
 
2740
    public Object getFieldValue(_Fields field) {
2741
      switch (field) {
2742
      }
2743
      throw new IllegalStateException();
2744
    }
2745
 
2746
    public Object getFieldValue(int fieldId) {
2747
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2748
    }
2749
 
2750
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2751
    public boolean isSet(_Fields field) {
2752
      switch (field) {
2753
      }
2754
      throw new IllegalStateException();
2755
    }
2756
 
2757
    public boolean isSet(int fieldID) {
2758
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2759
    }
2760
 
2761
    @Override
2762
    public boolean equals(Object that) {
2763
      if (that == null)
2764
        return false;
2765
      if (that instanceof createUser_result)
2766
        return this.equals((createUser_result)that);
2767
      return false;
2768
    }
2769
 
2770
    public boolean equals(createUser_result that) {
2771
      if (that == null)
2772
        return false;
2773
 
2774
      return true;
2775
    }
2776
 
2777
    @Override
2778
    public int hashCode() {
2779
      return 0;
2780
    }
2781
 
2782
    public int compareTo(createUser_result other) {
2783
      if (!getClass().equals(other.getClass())) {
2784
        return getClass().getName().compareTo(other.getClass().getName());
2785
      }
2786
 
2787
      int lastComparison = 0;
2788
      createUser_result typedOther = (createUser_result)other;
2789
 
2790
      return 0;
2791
    }
2792
 
2793
    public void read(TProtocol iprot) throws TException {
2794
      TField field;
2795
      iprot.readStructBegin();
2796
      while (true)
2797
      {
2798
        field = iprot.readFieldBegin();
2799
        if (field.type == TType.STOP) { 
2800
          break;
2801
        }
2802
        _Fields fieldId = _Fields.findByThriftId(field.id);
2803
        if (fieldId == null) {
2804
          TProtocolUtil.skip(iprot, field.type);
2805
        } else {
2806
          switch (fieldId) {
2807
          }
2808
          iprot.readFieldEnd();
2809
        }
2810
      }
2811
      iprot.readStructEnd();
2812
      validate();
2813
    }
2814
 
2815
    public void write(TProtocol oprot) throws TException {
2816
      oprot.writeStructBegin(STRUCT_DESC);
2817
 
2818
      oprot.writeFieldStop();
2819
      oprot.writeStructEnd();
2820
    }
2821
 
2822
    @Override
2823
    public String toString() {
2824
      StringBuilder sb = new StringBuilder("createUser_result(");
2825
      boolean first = true;
2826
 
2827
      sb.append(")");
2828
      return sb.toString();
2829
    }
2830
 
2831
    public void validate() throws TException {
2832
      // check for required fields
2833
    }
2834
 
2835
  }
2836
 
2837
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2838
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2839
 
2840
 
2841
 
2842
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2843
    public enum _Fields implements TFieldIdEnum {
2844
;
2845
 
2846
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2847
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2848
 
2849
      static {
2850
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2851
          byId.put((int)field._thriftId, field);
2852
          byName.put(field.getFieldName(), field);
2853
        }
2854
      }
2855
 
2856
      /**
2857
       * Find the _Fields constant that matches fieldId, or null if its not found.
2858
       */
2859
      public static _Fields findByThriftId(int fieldId) {
2860
        return byId.get(fieldId);
2861
      }
2862
 
2863
      /**
2864
       * Find the _Fields constant that matches fieldId, throwing an exception
2865
       * if it is not found.
2866
       */
2867
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2868
        _Fields fields = findByThriftId(fieldId);
2869
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2870
        return fields;
2871
      }
2872
 
2873
      /**
2874
       * Find the _Fields constant that matches name, or null if its not found.
2875
       */
2876
      public static _Fields findByName(String name) {
2877
        return byName.get(name);
2878
      }
2879
 
2880
      private final short _thriftId;
2881
      private final String _fieldName;
2882
 
2883
      _Fields(short thriftId, String fieldName) {
2884
        _thriftId = thriftId;
2885
        _fieldName = fieldName;
2886
      }
2887
 
2888
      public short getThriftFieldId() {
2889
        return _thriftId;
2890
      }
2891
 
2892
      public String getFieldName() {
2893
        return _fieldName;
2894
      }
2895
    }
2896
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2897
    }});
2898
 
2899
    static {
2900
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2901
    }
2902
 
2903
    public closeSession_args() {
2904
    }
2905
 
2906
    /**
2907
     * Performs a deep copy on <i>other</i>.
2908
     */
2909
    public closeSession_args(closeSession_args other) {
2910
    }
2911
 
2912
    public closeSession_args deepCopy() {
2913
      return new closeSession_args(this);
2914
    }
2915
 
2916
    @Deprecated
2917
    public closeSession_args clone() {
2918
      return new closeSession_args(this);
2919
    }
2920
 
2921
    public void setFieldValue(_Fields field, Object value) {
2922
      switch (field) {
2923
      }
2924
    }
2925
 
2926
    public void setFieldValue(int fieldID, Object value) {
2927
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2928
    }
2929
 
2930
    public Object getFieldValue(_Fields field) {
2931
      switch (field) {
2932
      }
2933
      throw new IllegalStateException();
2934
    }
2935
 
2936
    public Object getFieldValue(int fieldId) {
2937
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2938
    }
2939
 
2940
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2941
    public boolean isSet(_Fields field) {
2942
      switch (field) {
2943
      }
2944
      throw new IllegalStateException();
2945
    }
2946
 
2947
    public boolean isSet(int fieldID) {
2948
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2949
    }
2950
 
2951
    @Override
2952
    public boolean equals(Object that) {
2953
      if (that == null)
2954
        return false;
2955
      if (that instanceof closeSession_args)
2956
        return this.equals((closeSession_args)that);
2957
      return false;
2958
    }
2959
 
2960
    public boolean equals(closeSession_args that) {
2961
      if (that == null)
2962
        return false;
2963
 
2964
      return true;
2965
    }
2966
 
2967
    @Override
2968
    public int hashCode() {
2969
      return 0;
2970
    }
2971
 
2972
    public int compareTo(closeSession_args other) {
2973
      if (!getClass().equals(other.getClass())) {
2974
        return getClass().getName().compareTo(other.getClass().getName());
2975
      }
2976
 
2977
      int lastComparison = 0;
2978
      closeSession_args typedOther = (closeSession_args)other;
2979
 
2980
      return 0;
2981
    }
2982
 
2983
    public void read(TProtocol iprot) throws TException {
2984
      TField field;
2985
      iprot.readStructBegin();
2986
      while (true)
2987
      {
2988
        field = iprot.readFieldBegin();
2989
        if (field.type == TType.STOP) { 
2990
          break;
2991
        }
2992
        _Fields fieldId = _Fields.findByThriftId(field.id);
2993
        if (fieldId == null) {
2994
          TProtocolUtil.skip(iprot, field.type);
2995
        } else {
2996
          switch (fieldId) {
2997
          }
2998
          iprot.readFieldEnd();
2999
        }
3000
      }
3001
      iprot.readStructEnd();
3002
      validate();
3003
    }
3004
 
3005
    public void write(TProtocol oprot) throws TException {
3006
      validate();
3007
 
3008
      oprot.writeStructBegin(STRUCT_DESC);
3009
      oprot.writeFieldStop();
3010
      oprot.writeStructEnd();
3011
    }
3012
 
3013
    @Override
3014
    public String toString() {
3015
      StringBuilder sb = new StringBuilder("closeSession_args(");
3016
      boolean first = true;
3017
 
3018
      sb.append(")");
3019
      return sb.toString();
3020
    }
3021
 
3022
    public void validate() throws TException {
3023
      // check for required fields
3024
    }
3025
 
3026
  }
3027
 
3028
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3029
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3030
 
3031
 
3032
 
3033
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3034
    public enum _Fields implements TFieldIdEnum {
3035
;
3036
 
3037
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3038
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3039
 
3040
      static {
3041
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3042
          byId.put((int)field._thriftId, field);
3043
          byName.put(field.getFieldName(), field);
3044
        }
3045
      }
3046
 
3047
      /**
3048
       * Find the _Fields constant that matches fieldId, or null if its not found.
3049
       */
3050
      public static _Fields findByThriftId(int fieldId) {
3051
        return byId.get(fieldId);
3052
      }
3053
 
3054
      /**
3055
       * Find the _Fields constant that matches fieldId, throwing an exception
3056
       * if it is not found.
3057
       */
3058
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3059
        _Fields fields = findByThriftId(fieldId);
3060
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3061
        return fields;
3062
      }
3063
 
3064
      /**
3065
       * Find the _Fields constant that matches name, or null if its not found.
3066
       */
3067
      public static _Fields findByName(String name) {
3068
        return byName.get(name);
3069
      }
3070
 
3071
      private final short _thriftId;
3072
      private final String _fieldName;
3073
 
3074
      _Fields(short thriftId, String fieldName) {
3075
        _thriftId = thriftId;
3076
        _fieldName = fieldName;
3077
      }
3078
 
3079
      public short getThriftFieldId() {
3080
        return _thriftId;
3081
      }
3082
 
3083
      public String getFieldName() {
3084
        return _fieldName;
3085
      }
3086
    }
3087
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3088
    }});
3089
 
3090
    static {
3091
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3092
    }
3093
 
3094
    public closeSession_result() {
3095
    }
3096
 
3097
    /**
3098
     * Performs a deep copy on <i>other</i>.
3099
     */
3100
    public closeSession_result(closeSession_result other) {
3101
    }
3102
 
3103
    public closeSession_result deepCopy() {
3104
      return new closeSession_result(this);
3105
    }
3106
 
3107
    @Deprecated
3108
    public closeSession_result clone() {
3109
      return new closeSession_result(this);
3110
    }
3111
 
3112
    public void setFieldValue(_Fields field, Object value) {
3113
      switch (field) {
3114
      }
3115
    }
3116
 
3117
    public void setFieldValue(int fieldID, Object value) {
3118
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3119
    }
3120
 
3121
    public Object getFieldValue(_Fields field) {
3122
      switch (field) {
3123
      }
3124
      throw new IllegalStateException();
3125
    }
3126
 
3127
    public Object getFieldValue(int fieldId) {
3128
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3129
    }
3130
 
3131
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3132
    public boolean isSet(_Fields field) {
3133
      switch (field) {
3134
      }
3135
      throw new IllegalStateException();
3136
    }
3137
 
3138
    public boolean isSet(int fieldID) {
3139
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3140
    }
3141
 
3142
    @Override
3143
    public boolean equals(Object that) {
3144
      if (that == null)
3145
        return false;
3146
      if (that instanceof closeSession_result)
3147
        return this.equals((closeSession_result)that);
3148
      return false;
3149
    }
3150
 
3151
    public boolean equals(closeSession_result that) {
3152
      if (that == null)
3153
        return false;
3154
 
3155
      return true;
3156
    }
3157
 
3158
    @Override
3159
    public int hashCode() {
3160
      return 0;
3161
    }
3162
 
3163
    public int compareTo(closeSession_result other) {
3164
      if (!getClass().equals(other.getClass())) {
3165
        return getClass().getName().compareTo(other.getClass().getName());
3166
      }
3167
 
3168
      int lastComparison = 0;
3169
      closeSession_result typedOther = (closeSession_result)other;
3170
 
3171
      return 0;
3172
    }
3173
 
3174
    public void read(TProtocol iprot) throws TException {
3175
      TField field;
3176
      iprot.readStructBegin();
3177
      while (true)
3178
      {
3179
        field = iprot.readFieldBegin();
3180
        if (field.type == TType.STOP) { 
3181
          break;
3182
        }
3183
        _Fields fieldId = _Fields.findByThriftId(field.id);
3184
        if (fieldId == null) {
3185
          TProtocolUtil.skip(iprot, field.type);
3186
        } else {
3187
          switch (fieldId) {
3188
          }
3189
          iprot.readFieldEnd();
3190
        }
3191
      }
3192
      iprot.readStructEnd();
3193
      validate();
3194
    }
3195
 
3196
    public void write(TProtocol oprot) throws TException {
3197
      oprot.writeStructBegin(STRUCT_DESC);
3198
 
3199
      oprot.writeFieldStop();
3200
      oprot.writeStructEnd();
3201
    }
3202
 
3203
    @Override
3204
    public String toString() {
3205
      StringBuilder sb = new StringBuilder("closeSession_result(");
3206
      boolean first = true;
3207
 
3208
      sb.append(")");
3209
      return sb.toString();
3210
    }
3211
 
3212
    public void validate() throws TException {
3213
      // check for required fields
3214
    }
3215
 
3216
  }
3217
 
3218
}