Subversion Repositories SmartDukaan

Rev

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