Subversion Repositories SmartDukaan

Rev

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