Subversion Repositories SmartDukaan

Rev

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