Subversion Repositories SmartDukaan

Rev

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