Subversion Repositories SmartDukaan

Rev

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