Subversion Repositories SmartDukaan

Rev

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