Subversion Repositories SmartDukaan

Rev

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