Subversion Repositories SmartDukaan

Rev

Rev 3103 | Rev 3430 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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