Subversion Repositories SmartDukaan

Rev

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