Subversion Repositories SmartDukaan

Rev

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

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