Subversion Repositories SmartDukaan

Rev

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