Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | 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
    /**
668 chandransh 31
     * Returns a provider for a given provider ID. Throws an exception if none found.
32
     * 
33
     * @param providerId
34
     */
35
    public Provider getProvider(long providerId) throws LogisticsServiceException, TException;
36
 
37
    /**
674 chandransh 38
     * Returns a list containing all the providers.
39
     */
40
    public List<Provider> getAllProviders() throws LogisticsServiceException, TException;
41
 
42
    /**
648 chandransh 43
     * Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
44
     * Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
45
     * is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised.
46
     * 
47
     * @param itemId
48
     * @param destination_pin
49
     */
50
    public LogisticsInfo getLogisticsEstimation(long itemId, String destination_pin) throws LogisticsServiceException, TException;
483 rajveer 51
 
648 chandransh 52
    /**
53
     * Same as above excpet that an airway bill number is also allocated and returned.
54
     * 
55
     * @param destination_pincode
56
     * @param item_id
57
     */
715 rajveer 58
    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id) throws LogisticsServiceException, TException;
471 rajveer 59
 
648 chandransh 60
    /**
61
     * Returns an unused AWB number for the given provider.
62
     * 
63
     * @param providerId
64
     */
65
    public String getEmptyAWB(long providerId) throws LogisticsServiceException, TException;
471 rajveer 66
 
648 chandransh 67
    /**
68
     * Returns the list of updates for the given AWB number and provider id. The list is empty if there are no updates yet.
69
     * 
70
     * @param awb
71
     * @param providerId
72
     */
73
    public List<AwbUpdate> getShipmentInfo(String awb, long providerId) throws LogisticsServiceException, TException;
477 rajveer 74
 
730 chandransh 75
    /**
76
     * Returns the short three letter code of a pincode for the given provider.
77
     *    Raises an exception if the pin code is not serviced by the given provider.
78
     * 
79
     * @param providerId
80
     * @param pinCode
81
     */
82
    public String getDestinationCode(long providerId, String pinCode) throws LogisticsServiceException, TException;
83
 
412 ashish 84
  }
85
 
86
  public static class Client implements Iface {
87
    public Client(TProtocol prot)
88
    {
89
      this(prot, prot);
90
    }
91
 
92
    public Client(TProtocol iprot, TProtocol oprot)
93
    {
94
      iprot_ = iprot;
95
      oprot_ = oprot;
96
    }
97
 
98
    protected TProtocol iprot_;
99
    protected TProtocol oprot_;
100
 
101
    protected int seqid_;
102
 
103
    public TProtocol getInputProtocol()
104
    {
105
      return this.iprot_;
106
    }
107
 
108
    public TProtocol getOutputProtocol()
109
    {
110
      return this.oprot_;
111
    }
112
 
668 chandransh 113
    public Provider getProvider(long providerId) throws LogisticsServiceException, TException
114
    {
115
      send_getProvider(providerId);
116
      return recv_getProvider();
117
    }
118
 
119
    public void send_getProvider(long providerId) throws TException
120
    {
121
      oprot_.writeMessageBegin(new TMessage("getProvider", TMessageType.CALL, seqid_));
122
      getProvider_args args = new getProvider_args();
123
      args.providerId = providerId;
124
      args.write(oprot_);
125
      oprot_.writeMessageEnd();
126
      oprot_.getTransport().flush();
127
    }
128
 
129
    public Provider recv_getProvider() throws LogisticsServiceException, TException
130
    {
131
      TMessage msg = iprot_.readMessageBegin();
132
      if (msg.type == TMessageType.EXCEPTION) {
133
        TApplicationException x = TApplicationException.read(iprot_);
134
        iprot_.readMessageEnd();
135
        throw x;
136
      }
137
      getProvider_result result = new getProvider_result();
138
      result.read(iprot_);
139
      iprot_.readMessageEnd();
140
      if (result.isSetSuccess()) {
141
        return result.success;
142
      }
143
      if (result.lse != null) {
144
        throw result.lse;
145
      }
146
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getProvider failed: unknown result");
147
    }
148
 
674 chandransh 149
    public List<Provider> getAllProviders() throws LogisticsServiceException, TException
150
    {
151
      send_getAllProviders();
152
      return recv_getAllProviders();
153
    }
154
 
155
    public void send_getAllProviders() throws TException
156
    {
157
      oprot_.writeMessageBegin(new TMessage("getAllProviders", TMessageType.CALL, seqid_));
158
      getAllProviders_args args = new getAllProviders_args();
159
      args.write(oprot_);
160
      oprot_.writeMessageEnd();
161
      oprot_.getTransport().flush();
162
    }
163
 
164
    public List<Provider> recv_getAllProviders() throws LogisticsServiceException, TException
165
    {
166
      TMessage msg = iprot_.readMessageBegin();
167
      if (msg.type == TMessageType.EXCEPTION) {
168
        TApplicationException x = TApplicationException.read(iprot_);
169
        iprot_.readMessageEnd();
170
        throw x;
171
      }
172
      getAllProviders_result result = new getAllProviders_result();
173
      result.read(iprot_);
174
      iprot_.readMessageEnd();
175
      if (result.isSetSuccess()) {
176
        return result.success;
177
      }
178
      if (result.lse != null) {
179
        throw result.lse;
180
      }
181
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllProviders failed: unknown result");
182
    }
183
 
648 chandransh 184
    public LogisticsInfo getLogisticsEstimation(long itemId, String destination_pin) throws LogisticsServiceException, TException
483 rajveer 185
    {
648 chandransh 186
      send_getLogisticsEstimation(itemId, destination_pin);
471 rajveer 187
      return recv_getLogisticsEstimation();
188
    }
189
 
648 chandransh 190
    public void send_getLogisticsEstimation(long itemId, String destination_pin) throws TException
471 rajveer 191
    {
192
      oprot_.writeMessageBegin(new TMessage("getLogisticsEstimation", TMessageType.CALL, seqid_));
193
      getLogisticsEstimation_args args = new getLogisticsEstimation_args();
194
      args.itemId = itemId;
195
      args.destination_pin = destination_pin;
196
      args.write(oprot_);
197
      oprot_.writeMessageEnd();
198
      oprot_.getTransport().flush();
199
    }
200
 
648 chandransh 201
    public LogisticsInfo recv_getLogisticsEstimation() throws LogisticsServiceException, TException
471 rajveer 202
    {
203
      TMessage msg = iprot_.readMessageBegin();
204
      if (msg.type == TMessageType.EXCEPTION) {
205
        TApplicationException x = TApplicationException.read(iprot_);
206
        iprot_.readMessageEnd();
207
        throw x;
208
      }
209
      getLogisticsEstimation_result result = new getLogisticsEstimation_result();
210
      result.read(iprot_);
211
      iprot_.readMessageEnd();
212
      if (result.isSetSuccess()) {
213
        return result.success;
214
      }
215
      if (result.se != null) {
216
        throw result.se;
217
      }
218
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
219
    }
220
 
715 rajveer 221
    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id) throws LogisticsServiceException, TException
471 rajveer 222
    {
648 chandransh 223
      send_getLogisticsInfo(destination_pincode, item_id);
224
      return recv_getLogisticsInfo();
471 rajveer 225
    }
226
 
715 rajveer 227
    public void send_getLogisticsInfo(String destination_pincode, long item_id) throws TException
471 rajveer 228
    {
648 chandransh 229
      oprot_.writeMessageBegin(new TMessage("getLogisticsInfo", TMessageType.CALL, seqid_));
230
      getLogisticsInfo_args args = new getLogisticsInfo_args();
231
      args.destination_pincode = destination_pincode;
232
      args.item_id = item_id;
471 rajveer 233
      args.write(oprot_);
234
      oprot_.writeMessageEnd();
235
      oprot_.getTransport().flush();
236
    }
237
 
648 chandransh 238
    public LogisticsInfo recv_getLogisticsInfo() throws LogisticsServiceException, TException
471 rajveer 239
    {
240
      TMessage msg = iprot_.readMessageBegin();
241
      if (msg.type == TMessageType.EXCEPTION) {
242
        TApplicationException x = TApplicationException.read(iprot_);
243
        iprot_.readMessageEnd();
244
        throw x;
245
      }
648 chandransh 246
      getLogisticsInfo_result result = new getLogisticsInfo_result();
471 rajveer 247
      result.read(iprot_);
248
      iprot_.readMessageEnd();
648 chandransh 249
      if (result.isSetSuccess()) {
250
        return result.success;
477 rajveer 251
      }
648 chandransh 252
      if (result.se != null) {
253
        throw result.se;
412 ashish 254
      }
648 chandransh 255
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsInfo failed: unknown result");
412 ashish 256
    }
257
 
648 chandransh 258
    public String getEmptyAWB(long providerId) throws LogisticsServiceException, TException
412 ashish 259
    {
648 chandransh 260
      send_getEmptyAWB(providerId);
412 ashish 261
      return recv_getEmptyAWB();
262
    }
263
 
648 chandransh 264
    public void send_getEmptyAWB(long providerId) throws TException
412 ashish 265
    {
266
      oprot_.writeMessageBegin(new TMessage("getEmptyAWB", TMessageType.CALL, seqid_));
267
      getEmptyAWB_args args = new getEmptyAWB_args();
648 chandransh 268
      args.providerId = providerId;
412 ashish 269
      args.write(oprot_);
270
      oprot_.writeMessageEnd();
271
      oprot_.getTransport().flush();
272
    }
273
 
648 chandransh 274
    public String recv_getEmptyAWB() throws LogisticsServiceException, TException
412 ashish 275
    {
276
      TMessage msg = iprot_.readMessageBegin();
277
      if (msg.type == TMessageType.EXCEPTION) {
278
        TApplicationException x = TApplicationException.read(iprot_);
279
        iprot_.readMessageEnd();
280
        throw x;
281
      }
282
      getEmptyAWB_result result = new getEmptyAWB_result();
283
      result.read(iprot_);
284
      iprot_.readMessageEnd();
285
      if (result.isSetSuccess()) {
286
        return result.success;
287
      }
648 chandransh 288
      if (result.se != null) {
289
        throw result.se;
290
      }
412 ashish 291
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
292
    }
293
 
648 chandransh 294
    public List<AwbUpdate> getShipmentInfo(String awb, long providerId) throws LogisticsServiceException, TException
412 ashish 295
    {
648 chandransh 296
      send_getShipmentInfo(awb, providerId);
412 ashish 297
      return recv_getShipmentInfo();
298
    }
299
 
648 chandransh 300
    public void send_getShipmentInfo(String awb, long providerId) throws TException
412 ashish 301
    {
302
      oprot_.writeMessageBegin(new TMessage("getShipmentInfo", TMessageType.CALL, seqid_));
303
      getShipmentInfo_args args = new getShipmentInfo_args();
304
      args.awb = awb;
648 chandransh 305
      args.providerId = providerId;
412 ashish 306
      args.write(oprot_);
307
      oprot_.writeMessageEnd();
308
      oprot_.getTransport().flush();
309
    }
310
 
648 chandransh 311
    public List<AwbUpdate> recv_getShipmentInfo() throws LogisticsServiceException, TException
412 ashish 312
    {
313
      TMessage msg = iprot_.readMessageBegin();
314
      if (msg.type == TMessageType.EXCEPTION) {
315
        TApplicationException x = TApplicationException.read(iprot_);
316
        iprot_.readMessageEnd();
317
        throw x;
318
      }
319
      getShipmentInfo_result result = new getShipmentInfo_result();
320
      result.read(iprot_);
321
      iprot_.readMessageEnd();
322
      if (result.isSetSuccess()) {
323
        return result.success;
324
      }
648 chandransh 325
      if (result.se != null) {
326
        throw result.se;
327
      }
412 ashish 328
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
329
    }
330
 
730 chandransh 331
    public String getDestinationCode(long providerId, String pinCode) throws LogisticsServiceException, TException
332
    {
333
      send_getDestinationCode(providerId, pinCode);
334
      return recv_getDestinationCode();
335
    }
336
 
337
    public void send_getDestinationCode(long providerId, String pinCode) throws TException
338
    {
339
      oprot_.writeMessageBegin(new TMessage("getDestinationCode", TMessageType.CALL, seqid_));
340
      getDestinationCode_args args = new getDestinationCode_args();
341
      args.providerId = providerId;
342
      args.pinCode = pinCode;
343
      args.write(oprot_);
344
      oprot_.writeMessageEnd();
345
      oprot_.getTransport().flush();
346
    }
347
 
348
    public String recv_getDestinationCode() throws LogisticsServiceException, TException
349
    {
350
      TMessage msg = iprot_.readMessageBegin();
351
      if (msg.type == TMessageType.EXCEPTION) {
352
        TApplicationException x = TApplicationException.read(iprot_);
353
        iprot_.readMessageEnd();
354
        throw x;
355
      }
356
      getDestinationCode_result result = new getDestinationCode_result();
357
      result.read(iprot_);
358
      iprot_.readMessageEnd();
359
      if (result.isSetSuccess()) {
360
        return result.success;
361
      }
362
      if (result.se != null) {
363
        throw result.se;
364
      }
365
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDestinationCode failed: unknown result");
366
    }
367
 
412 ashish 368
  }
369
  public static class Processor implements TProcessor {
370
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
371
    public Processor(Iface iface)
372
    {
373
      iface_ = iface;
668 chandransh 374
      processMap_.put("getProvider", new getProvider());
674 chandransh 375
      processMap_.put("getAllProviders", new getAllProviders());
648 chandransh 376
      processMap_.put("getLogisticsEstimation", new getLogisticsEstimation());
483 rajveer 377
      processMap_.put("getLogisticsInfo", new getLogisticsInfo());
412 ashish 378
      processMap_.put("getEmptyAWB", new getEmptyAWB());
379
      processMap_.put("getShipmentInfo", new getShipmentInfo());
730 chandransh 380
      processMap_.put("getDestinationCode", new getDestinationCode());
412 ashish 381
    }
382
 
383
    protected static interface ProcessFunction {
384
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
385
    }
386
 
387
    private Iface iface_;
388
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
389
 
390
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
391
    {
392
      TMessage msg = iprot.readMessageBegin();
393
      ProcessFunction fn = processMap_.get(msg.name);
394
      if (fn == null) {
395
        TProtocolUtil.skip(iprot, TType.STRUCT);
396
        iprot.readMessageEnd();
397
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
398
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
399
        x.write(oprot);
400
        oprot.writeMessageEnd();
401
        oprot.getTransport().flush();
402
        return true;
403
      }
404
      fn.process(msg.seqid, iprot, oprot);
405
      return true;
406
    }
407
 
668 chandransh 408
    private class getProvider implements ProcessFunction {
409
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
410
      {
411
        getProvider_args args = new getProvider_args();
412
        args.read(iprot);
413
        iprot.readMessageEnd();
414
        getProvider_result result = new getProvider_result();
415
        try {
416
          result.success = iface_.getProvider(args.providerId);
417
        } catch (LogisticsServiceException lse) {
418
          result.lse = lse;
419
        } catch (Throwable th) {
420
          LOGGER.error("Internal error processing getProvider", th);
421
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getProvider");
422
          oprot.writeMessageBegin(new TMessage("getProvider", TMessageType.EXCEPTION, seqid));
423
          x.write(oprot);
424
          oprot.writeMessageEnd();
425
          oprot.getTransport().flush();
426
          return;
427
        }
428
        oprot.writeMessageBegin(new TMessage("getProvider", TMessageType.REPLY, seqid));
429
        result.write(oprot);
430
        oprot.writeMessageEnd();
431
        oprot.getTransport().flush();
432
      }
433
 
434
    }
435
 
674 chandransh 436
    private class getAllProviders implements ProcessFunction {
437
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
438
      {
439
        getAllProviders_args args = new getAllProviders_args();
440
        args.read(iprot);
441
        iprot.readMessageEnd();
442
        getAllProviders_result result = new getAllProviders_result();
443
        try {
444
          result.success = iface_.getAllProviders();
445
        } catch (LogisticsServiceException lse) {
446
          result.lse = lse;
447
        } catch (Throwable th) {
448
          LOGGER.error("Internal error processing getAllProviders", th);
449
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllProviders");
450
          oprot.writeMessageBegin(new TMessage("getAllProviders", TMessageType.EXCEPTION, seqid));
451
          x.write(oprot);
452
          oprot.writeMessageEnd();
453
          oprot.getTransport().flush();
454
          return;
455
        }
456
        oprot.writeMessageBegin(new TMessage("getAllProviders", TMessageType.REPLY, seqid));
457
        result.write(oprot);
458
        oprot.writeMessageEnd();
459
        oprot.getTransport().flush();
460
      }
461
 
462
    }
463
 
648 chandransh 464
    private class getLogisticsEstimation implements ProcessFunction {
483 rajveer 465
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
466
      {
648 chandransh 467
        getLogisticsEstimation_args args = new getLogisticsEstimation_args();
483 rajveer 468
        args.read(iprot);
469
        iprot.readMessageEnd();
648 chandransh 470
        getLogisticsEstimation_result result = new getLogisticsEstimation_result();
483 rajveer 471
        try {
648 chandransh 472
          result.success = iface_.getLogisticsEstimation(args.itemId, args.destination_pin);
483 rajveer 473
        } catch (LogisticsServiceException se) {
474
          result.se = se;
475
        } catch (Throwable th) {
648 chandransh 476
          LOGGER.error("Internal error processing getLogisticsEstimation", th);
477
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLogisticsEstimation");
478
          oprot.writeMessageBegin(new TMessage("getLogisticsEstimation", TMessageType.EXCEPTION, seqid));
483 rajveer 479
          x.write(oprot);
480
          oprot.writeMessageEnd();
481
          oprot.getTransport().flush();
482
          return;
483
        }
648 chandransh 484
        oprot.writeMessageBegin(new TMessage("getLogisticsEstimation", TMessageType.REPLY, seqid));
483 rajveer 485
        result.write(oprot);
486
        oprot.writeMessageEnd();
487
        oprot.getTransport().flush();
488
      }
489
 
490
    }
491
 
648 chandransh 492
    private class getLogisticsInfo implements ProcessFunction {
471 rajveer 493
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
494
      {
648 chandransh 495
        getLogisticsInfo_args args = new getLogisticsInfo_args();
471 rajveer 496
        args.read(iprot);
497
        iprot.readMessageEnd();
648 chandransh 498
        getLogisticsInfo_result result = new getLogisticsInfo_result();
471 rajveer 499
        try {
648 chandransh 500
          result.success = iface_.getLogisticsInfo(args.destination_pincode, args.item_id);
471 rajveer 501
        } catch (LogisticsServiceException se) {
502
          result.se = se;
503
        } catch (Throwable th) {
648 chandransh 504
          LOGGER.error("Internal error processing getLogisticsInfo", th);
505
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLogisticsInfo");
506
          oprot.writeMessageBegin(new TMessage("getLogisticsInfo", TMessageType.EXCEPTION, seqid));
471 rajveer 507
          x.write(oprot);
508
          oprot.writeMessageEnd();
509
          oprot.getTransport().flush();
510
          return;
511
        }
648 chandransh 512
        oprot.writeMessageBegin(new TMessage("getLogisticsInfo", TMessageType.REPLY, seqid));
471 rajveer 513
        result.write(oprot);
514
        oprot.writeMessageEnd();
515
        oprot.getTransport().flush();
516
      }
517
 
518
    }
519
 
412 ashish 520
    private class getEmptyAWB implements ProcessFunction {
521
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
522
      {
523
        getEmptyAWB_args args = new getEmptyAWB_args();
524
        args.read(iprot);
525
        iprot.readMessageEnd();
526
        getEmptyAWB_result result = new getEmptyAWB_result();
648 chandransh 527
        try {
528
          result.success = iface_.getEmptyAWB(args.providerId);
529
        } catch (LogisticsServiceException se) {
530
          result.se = se;
531
        } catch (Throwable th) {
532
          LOGGER.error("Internal error processing getEmptyAWB", th);
533
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getEmptyAWB");
534
          oprot.writeMessageBegin(new TMessage("getEmptyAWB", TMessageType.EXCEPTION, seqid));
535
          x.write(oprot);
536
          oprot.writeMessageEnd();
537
          oprot.getTransport().flush();
538
          return;
539
        }
412 ashish 540
        oprot.writeMessageBegin(new TMessage("getEmptyAWB", TMessageType.REPLY, seqid));
541
        result.write(oprot);
542
        oprot.writeMessageEnd();
543
        oprot.getTransport().flush();
544
      }
545
 
546
    }
547
 
548
    private class getShipmentInfo implements ProcessFunction {
549
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
550
      {
551
        getShipmentInfo_args args = new getShipmentInfo_args();
552
        args.read(iprot);
553
        iprot.readMessageEnd();
554
        getShipmentInfo_result result = new getShipmentInfo_result();
648 chandransh 555
        try {
556
          result.success = iface_.getShipmentInfo(args.awb, args.providerId);
557
        } catch (LogisticsServiceException se) {
558
          result.se = se;
559
        } catch (Throwable th) {
560
          LOGGER.error("Internal error processing getShipmentInfo", th);
561
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getShipmentInfo");
562
          oprot.writeMessageBegin(new TMessage("getShipmentInfo", TMessageType.EXCEPTION, seqid));
563
          x.write(oprot);
564
          oprot.writeMessageEnd();
565
          oprot.getTransport().flush();
566
          return;
567
        }
412 ashish 568
        oprot.writeMessageBegin(new TMessage("getShipmentInfo", TMessageType.REPLY, seqid));
569
        result.write(oprot);
570
        oprot.writeMessageEnd();
571
        oprot.getTransport().flush();
572
      }
573
 
574
    }
575
 
730 chandransh 576
    private class getDestinationCode implements ProcessFunction {
577
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
578
      {
579
        getDestinationCode_args args = new getDestinationCode_args();
580
        args.read(iprot);
581
        iprot.readMessageEnd();
582
        getDestinationCode_result result = new getDestinationCode_result();
583
        try {
584
          result.success = iface_.getDestinationCode(args.providerId, args.pinCode);
585
        } catch (LogisticsServiceException se) {
586
          result.se = se;
587
        } catch (Throwable th) {
588
          LOGGER.error("Internal error processing getDestinationCode", th);
589
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDestinationCode");
590
          oprot.writeMessageBegin(new TMessage("getDestinationCode", TMessageType.EXCEPTION, seqid));
591
          x.write(oprot);
592
          oprot.writeMessageEnd();
593
          oprot.getTransport().flush();
594
          return;
595
        }
596
        oprot.writeMessageBegin(new TMessage("getDestinationCode", TMessageType.REPLY, seqid));
597
        result.write(oprot);
598
        oprot.writeMessageEnd();
599
        oprot.getTransport().flush();
600
      }
601
 
602
    }
603
 
412 ashish 604
  }
605
 
668 chandransh 606
  public static class getProvider_args implements TBase<getProvider_args._Fields>, java.io.Serializable, Cloneable, Comparable<getProvider_args>   {
607
    private static final TStruct STRUCT_DESC = new TStruct("getProvider_args");
608
 
609
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
610
 
611
    private long providerId;
612
 
613
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
614
    public enum _Fields implements TFieldIdEnum {
615
      PROVIDER_ID((short)1, "providerId");
616
 
617
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
618
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
619
 
620
      static {
621
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
622
          byId.put((int)field._thriftId, field);
623
          byName.put(field.getFieldName(), field);
624
        }
625
      }
626
 
627
      /**
628
       * Find the _Fields constant that matches fieldId, or null if its not found.
629
       */
630
      public static _Fields findByThriftId(int fieldId) {
631
        return byId.get(fieldId);
632
      }
633
 
634
      /**
635
       * Find the _Fields constant that matches fieldId, throwing an exception
636
       * if it is not found.
637
       */
638
      public static _Fields findByThriftIdOrThrow(int fieldId) {
639
        _Fields fields = findByThriftId(fieldId);
640
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
641
        return fields;
642
      }
643
 
644
      /**
645
       * Find the _Fields constant that matches name, or null if its not found.
646
       */
647
      public static _Fields findByName(String name) {
648
        return byName.get(name);
649
      }
650
 
651
      private final short _thriftId;
652
      private final String _fieldName;
653
 
654
      _Fields(short thriftId, String fieldName) {
655
        _thriftId = thriftId;
656
        _fieldName = fieldName;
657
      }
658
 
659
      public short getThriftFieldId() {
660
        return _thriftId;
661
      }
662
 
663
      public String getFieldName() {
664
        return _fieldName;
665
      }
666
    }
667
 
668
    // isset id assignments
669
    private static final int __PROVIDERID_ISSET_ID = 0;
670
    private BitSet __isset_bit_vector = new BitSet(1);
671
 
672
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
673
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
674
          new FieldValueMetaData(TType.I64)));
675
    }});
676
 
677
    static {
678
      FieldMetaData.addStructMetaDataMap(getProvider_args.class, metaDataMap);
679
    }
680
 
681
    public getProvider_args() {
682
    }
683
 
684
    public getProvider_args(
685
      long providerId)
686
    {
687
      this();
688
      this.providerId = providerId;
689
      setProviderIdIsSet(true);
690
    }
691
 
692
    /**
693
     * Performs a deep copy on <i>other</i>.
694
     */
695
    public getProvider_args(getProvider_args other) {
696
      __isset_bit_vector.clear();
697
      __isset_bit_vector.or(other.__isset_bit_vector);
698
      this.providerId = other.providerId;
699
    }
700
 
701
    public getProvider_args deepCopy() {
702
      return new getProvider_args(this);
703
    }
704
 
705
    @Deprecated
706
    public getProvider_args clone() {
707
      return new getProvider_args(this);
708
    }
709
 
710
    public long getProviderId() {
711
      return this.providerId;
712
    }
713
 
714
    public getProvider_args setProviderId(long providerId) {
715
      this.providerId = providerId;
716
      setProviderIdIsSet(true);
717
      return this;
718
    }
719
 
720
    public void unsetProviderId() {
721
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
722
    }
723
 
724
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
725
    public boolean isSetProviderId() {
726
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
727
    }
728
 
729
    public void setProviderIdIsSet(boolean value) {
730
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
731
    }
732
 
733
    public void setFieldValue(_Fields field, Object value) {
734
      switch (field) {
735
      case PROVIDER_ID:
736
        if (value == null) {
737
          unsetProviderId();
738
        } else {
739
          setProviderId((Long)value);
740
        }
741
        break;
742
 
743
      }
744
    }
745
 
746
    public void setFieldValue(int fieldID, Object value) {
747
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
748
    }
749
 
750
    public Object getFieldValue(_Fields field) {
751
      switch (field) {
752
      case PROVIDER_ID:
753
        return new Long(getProviderId());
754
 
755
      }
756
      throw new IllegalStateException();
757
    }
758
 
759
    public Object getFieldValue(int fieldId) {
760
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
761
    }
762
 
763
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
764
    public boolean isSet(_Fields field) {
765
      switch (field) {
766
      case PROVIDER_ID:
767
        return isSetProviderId();
768
      }
769
      throw new IllegalStateException();
770
    }
771
 
772
    public boolean isSet(int fieldID) {
773
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
774
    }
775
 
776
    @Override
777
    public boolean equals(Object that) {
778
      if (that == null)
779
        return false;
780
      if (that instanceof getProvider_args)
781
        return this.equals((getProvider_args)that);
782
      return false;
783
    }
784
 
785
    public boolean equals(getProvider_args that) {
786
      if (that == null)
787
        return false;
788
 
789
      boolean this_present_providerId = true;
790
      boolean that_present_providerId = true;
791
      if (this_present_providerId || that_present_providerId) {
792
        if (!(this_present_providerId && that_present_providerId))
793
          return false;
794
        if (this.providerId != that.providerId)
795
          return false;
796
      }
797
 
798
      return true;
799
    }
800
 
801
    @Override
802
    public int hashCode() {
803
      return 0;
804
    }
805
 
806
    public int compareTo(getProvider_args other) {
807
      if (!getClass().equals(other.getClass())) {
808
        return getClass().getName().compareTo(other.getClass().getName());
809
      }
810
 
811
      int lastComparison = 0;
812
      getProvider_args typedOther = (getProvider_args)other;
813
 
814
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
815
      if (lastComparison != 0) {
816
        return lastComparison;
817
      }
818
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
819
      if (lastComparison != 0) {
820
        return lastComparison;
821
      }
822
      return 0;
823
    }
824
 
825
    public void read(TProtocol iprot) throws TException {
826
      TField field;
827
      iprot.readStructBegin();
828
      while (true)
829
      {
830
        field = iprot.readFieldBegin();
831
        if (field.type == TType.STOP) { 
832
          break;
833
        }
834
        _Fields fieldId = _Fields.findByThriftId(field.id);
835
        if (fieldId == null) {
836
          TProtocolUtil.skip(iprot, field.type);
837
        } else {
838
          switch (fieldId) {
839
            case PROVIDER_ID:
840
              if (field.type == TType.I64) {
841
                this.providerId = iprot.readI64();
842
                setProviderIdIsSet(true);
843
              } else { 
844
                TProtocolUtil.skip(iprot, field.type);
845
              }
846
              break;
847
          }
848
          iprot.readFieldEnd();
849
        }
850
      }
851
      iprot.readStructEnd();
852
      validate();
853
    }
854
 
855
    public void write(TProtocol oprot) throws TException {
856
      validate();
857
 
858
      oprot.writeStructBegin(STRUCT_DESC);
859
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
860
      oprot.writeI64(this.providerId);
861
      oprot.writeFieldEnd();
862
      oprot.writeFieldStop();
863
      oprot.writeStructEnd();
864
    }
865
 
866
    @Override
867
    public String toString() {
868
      StringBuilder sb = new StringBuilder("getProvider_args(");
869
      boolean first = true;
870
 
871
      sb.append("providerId:");
872
      sb.append(this.providerId);
873
      first = false;
874
      sb.append(")");
875
      return sb.toString();
876
    }
877
 
878
    public void validate() throws TException {
879
      // check for required fields
880
    }
881
 
882
  }
883
 
884
  public static class getProvider_result implements TBase<getProvider_result._Fields>, java.io.Serializable, Cloneable, Comparable<getProvider_result>   {
885
    private static final TStruct STRUCT_DESC = new TStruct("getProvider_result");
886
 
887
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
888
    private static final TField LSE_FIELD_DESC = new TField("lse", TType.STRUCT, (short)1);
889
 
890
    private Provider success;
891
    private LogisticsServiceException lse;
892
 
893
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
894
    public enum _Fields implements TFieldIdEnum {
895
      SUCCESS((short)0, "success"),
896
      LSE((short)1, "lse");
897
 
898
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
899
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
900
 
901
      static {
902
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
903
          byId.put((int)field._thriftId, field);
904
          byName.put(field.getFieldName(), field);
905
        }
906
      }
907
 
908
      /**
909
       * Find the _Fields constant that matches fieldId, or null if its not found.
910
       */
911
      public static _Fields findByThriftId(int fieldId) {
912
        return byId.get(fieldId);
913
      }
914
 
915
      /**
916
       * Find the _Fields constant that matches fieldId, throwing an exception
917
       * if it is not found.
918
       */
919
      public static _Fields findByThriftIdOrThrow(int fieldId) {
920
        _Fields fields = findByThriftId(fieldId);
921
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
922
        return fields;
923
      }
924
 
925
      /**
926
       * Find the _Fields constant that matches name, or null if its not found.
927
       */
928
      public static _Fields findByName(String name) {
929
        return byName.get(name);
930
      }
931
 
932
      private final short _thriftId;
933
      private final String _fieldName;
934
 
935
      _Fields(short thriftId, String fieldName) {
936
        _thriftId = thriftId;
937
        _fieldName = fieldName;
938
      }
939
 
940
      public short getThriftFieldId() {
941
        return _thriftId;
942
      }
943
 
944
      public String getFieldName() {
945
        return _fieldName;
946
      }
947
    }
948
 
949
    // isset id assignments
950
 
951
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
952
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
953
          new StructMetaData(TType.STRUCT, Provider.class)));
954
      put(_Fields.LSE, new FieldMetaData("lse", TFieldRequirementType.DEFAULT, 
955
          new FieldValueMetaData(TType.STRUCT)));
956
    }});
957
 
958
    static {
959
      FieldMetaData.addStructMetaDataMap(getProvider_result.class, metaDataMap);
960
    }
961
 
962
    public getProvider_result() {
963
    }
964
 
965
    public getProvider_result(
966
      Provider success,
967
      LogisticsServiceException lse)
968
    {
969
      this();
970
      this.success = success;
971
      this.lse = lse;
972
    }
973
 
974
    /**
975
     * Performs a deep copy on <i>other</i>.
976
     */
977
    public getProvider_result(getProvider_result other) {
978
      if (other.isSetSuccess()) {
979
        this.success = new Provider(other.success);
980
      }
981
      if (other.isSetLse()) {
982
        this.lse = new LogisticsServiceException(other.lse);
983
      }
984
    }
985
 
986
    public getProvider_result deepCopy() {
987
      return new getProvider_result(this);
988
    }
989
 
990
    @Deprecated
991
    public getProvider_result clone() {
992
      return new getProvider_result(this);
993
    }
994
 
995
    public Provider getSuccess() {
996
      return this.success;
997
    }
998
 
999
    public getProvider_result setSuccess(Provider success) {
1000
      this.success = success;
1001
      return this;
1002
    }
1003
 
1004
    public void unsetSuccess() {
1005
      this.success = null;
1006
    }
1007
 
1008
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1009
    public boolean isSetSuccess() {
1010
      return this.success != null;
1011
    }
1012
 
1013
    public void setSuccessIsSet(boolean value) {
1014
      if (!value) {
1015
        this.success = null;
1016
      }
1017
    }
1018
 
1019
    public LogisticsServiceException getLse() {
1020
      return this.lse;
1021
    }
1022
 
1023
    public getProvider_result setLse(LogisticsServiceException lse) {
1024
      this.lse = lse;
1025
      return this;
1026
    }
1027
 
1028
    public void unsetLse() {
1029
      this.lse = null;
1030
    }
1031
 
1032
    /** Returns true if field lse is set (has been asigned a value) and false otherwise */
1033
    public boolean isSetLse() {
1034
      return this.lse != null;
1035
    }
1036
 
1037
    public void setLseIsSet(boolean value) {
1038
      if (!value) {
1039
        this.lse = null;
1040
      }
1041
    }
1042
 
1043
    public void setFieldValue(_Fields field, Object value) {
1044
      switch (field) {
1045
      case SUCCESS:
1046
        if (value == null) {
1047
          unsetSuccess();
1048
        } else {
1049
          setSuccess((Provider)value);
1050
        }
1051
        break;
1052
 
1053
      case LSE:
1054
        if (value == null) {
1055
          unsetLse();
1056
        } else {
1057
          setLse((LogisticsServiceException)value);
1058
        }
1059
        break;
1060
 
1061
      }
1062
    }
1063
 
1064
    public void setFieldValue(int fieldID, Object value) {
1065
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1066
    }
1067
 
1068
    public Object getFieldValue(_Fields field) {
1069
      switch (field) {
1070
      case SUCCESS:
1071
        return getSuccess();
1072
 
1073
      case LSE:
1074
        return getLse();
1075
 
1076
      }
1077
      throw new IllegalStateException();
1078
    }
1079
 
1080
    public Object getFieldValue(int fieldId) {
1081
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1082
    }
1083
 
1084
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1085
    public boolean isSet(_Fields field) {
1086
      switch (field) {
1087
      case SUCCESS:
1088
        return isSetSuccess();
1089
      case LSE:
1090
        return isSetLse();
1091
      }
1092
      throw new IllegalStateException();
1093
    }
1094
 
1095
    public boolean isSet(int fieldID) {
1096
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1097
    }
1098
 
1099
    @Override
1100
    public boolean equals(Object that) {
1101
      if (that == null)
1102
        return false;
1103
      if (that instanceof getProvider_result)
1104
        return this.equals((getProvider_result)that);
1105
      return false;
1106
    }
1107
 
1108
    public boolean equals(getProvider_result that) {
1109
      if (that == null)
1110
        return false;
1111
 
1112
      boolean this_present_success = true && this.isSetSuccess();
1113
      boolean that_present_success = true && that.isSetSuccess();
1114
      if (this_present_success || that_present_success) {
1115
        if (!(this_present_success && that_present_success))
1116
          return false;
1117
        if (!this.success.equals(that.success))
1118
          return false;
1119
      }
1120
 
1121
      boolean this_present_lse = true && this.isSetLse();
1122
      boolean that_present_lse = true && that.isSetLse();
1123
      if (this_present_lse || that_present_lse) {
1124
        if (!(this_present_lse && that_present_lse))
1125
          return false;
1126
        if (!this.lse.equals(that.lse))
1127
          return false;
1128
      }
1129
 
1130
      return true;
1131
    }
1132
 
1133
    @Override
1134
    public int hashCode() {
1135
      return 0;
1136
    }
1137
 
1138
    public int compareTo(getProvider_result other) {
1139
      if (!getClass().equals(other.getClass())) {
1140
        return getClass().getName().compareTo(other.getClass().getName());
1141
      }
1142
 
1143
      int lastComparison = 0;
1144
      getProvider_result typedOther = (getProvider_result)other;
1145
 
1146
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
1147
      if (lastComparison != 0) {
1148
        return lastComparison;
1149
      }
1150
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
1151
      if (lastComparison != 0) {
1152
        return lastComparison;
1153
      }
1154
      lastComparison = Boolean.valueOf(isSetLse()).compareTo(isSetLse());
1155
      if (lastComparison != 0) {
1156
        return lastComparison;
1157
      }
1158
      lastComparison = TBaseHelper.compareTo(lse, typedOther.lse);
1159
      if (lastComparison != 0) {
1160
        return lastComparison;
1161
      }
1162
      return 0;
1163
    }
1164
 
1165
    public void read(TProtocol iprot) throws TException {
1166
      TField field;
1167
      iprot.readStructBegin();
1168
      while (true)
1169
      {
1170
        field = iprot.readFieldBegin();
1171
        if (field.type == TType.STOP) { 
1172
          break;
1173
        }
1174
        _Fields fieldId = _Fields.findByThriftId(field.id);
1175
        if (fieldId == null) {
1176
          TProtocolUtil.skip(iprot, field.type);
1177
        } else {
1178
          switch (fieldId) {
1179
            case SUCCESS:
1180
              if (field.type == TType.STRUCT) {
1181
                this.success = new Provider();
1182
                this.success.read(iprot);
1183
              } else { 
1184
                TProtocolUtil.skip(iprot, field.type);
1185
              }
1186
              break;
1187
            case LSE:
1188
              if (field.type == TType.STRUCT) {
1189
                this.lse = new LogisticsServiceException();
1190
                this.lse.read(iprot);
1191
              } else { 
1192
                TProtocolUtil.skip(iprot, field.type);
1193
              }
1194
              break;
1195
          }
1196
          iprot.readFieldEnd();
1197
        }
1198
      }
1199
      iprot.readStructEnd();
1200
      validate();
1201
    }
1202
 
1203
    public void write(TProtocol oprot) throws TException {
1204
      oprot.writeStructBegin(STRUCT_DESC);
1205
 
1206
      if (this.isSetSuccess()) {
1207
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1208
        this.success.write(oprot);
1209
        oprot.writeFieldEnd();
1210
      } else if (this.isSetLse()) {
1211
        oprot.writeFieldBegin(LSE_FIELD_DESC);
1212
        this.lse.write(oprot);
1213
        oprot.writeFieldEnd();
1214
      }
1215
      oprot.writeFieldStop();
1216
      oprot.writeStructEnd();
1217
    }
1218
 
1219
    @Override
1220
    public String toString() {
1221
      StringBuilder sb = new StringBuilder("getProvider_result(");
1222
      boolean first = true;
1223
 
1224
      sb.append("success:");
1225
      if (this.success == null) {
1226
        sb.append("null");
1227
      } else {
1228
        sb.append(this.success);
1229
      }
1230
      first = false;
1231
      if (!first) sb.append(", ");
1232
      sb.append("lse:");
1233
      if (this.lse == null) {
1234
        sb.append("null");
1235
      } else {
1236
        sb.append(this.lse);
1237
      }
1238
      first = false;
1239
      sb.append(")");
1240
      return sb.toString();
1241
    }
1242
 
1243
    public void validate() throws TException {
1244
      // check for required fields
1245
    }
1246
 
1247
  }
1248
 
674 chandransh 1249
  public static class getAllProviders_args implements TBase<getAllProviders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllProviders_args>   {
1250
    private static final TStruct STRUCT_DESC = new TStruct("getAllProviders_args");
1251
 
1252
 
1253
 
1254
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1255
    public enum _Fields implements TFieldIdEnum {
1256
;
1257
 
1258
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1259
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1260
 
1261
      static {
1262
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1263
          byId.put((int)field._thriftId, field);
1264
          byName.put(field.getFieldName(), field);
1265
        }
1266
      }
1267
 
1268
      /**
1269
       * Find the _Fields constant that matches fieldId, or null if its not found.
1270
       */
1271
      public static _Fields findByThriftId(int fieldId) {
1272
        return byId.get(fieldId);
1273
      }
1274
 
1275
      /**
1276
       * Find the _Fields constant that matches fieldId, throwing an exception
1277
       * if it is not found.
1278
       */
1279
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1280
        _Fields fields = findByThriftId(fieldId);
1281
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1282
        return fields;
1283
      }
1284
 
1285
      /**
1286
       * Find the _Fields constant that matches name, or null if its not found.
1287
       */
1288
      public static _Fields findByName(String name) {
1289
        return byName.get(name);
1290
      }
1291
 
1292
      private final short _thriftId;
1293
      private final String _fieldName;
1294
 
1295
      _Fields(short thriftId, String fieldName) {
1296
        _thriftId = thriftId;
1297
        _fieldName = fieldName;
1298
      }
1299
 
1300
      public short getThriftFieldId() {
1301
        return _thriftId;
1302
      }
1303
 
1304
      public String getFieldName() {
1305
        return _fieldName;
1306
      }
1307
    }
1308
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1309
    }});
1310
 
1311
    static {
1312
      FieldMetaData.addStructMetaDataMap(getAllProviders_args.class, metaDataMap);
1313
    }
1314
 
1315
    public getAllProviders_args() {
1316
    }
1317
 
1318
    /**
1319
     * Performs a deep copy on <i>other</i>.
1320
     */
1321
    public getAllProviders_args(getAllProviders_args other) {
1322
    }
1323
 
1324
    public getAllProviders_args deepCopy() {
1325
      return new getAllProviders_args(this);
1326
    }
1327
 
1328
    @Deprecated
1329
    public getAllProviders_args clone() {
1330
      return new getAllProviders_args(this);
1331
    }
1332
 
1333
    public void setFieldValue(_Fields field, Object value) {
1334
      switch (field) {
1335
      }
1336
    }
1337
 
1338
    public void setFieldValue(int fieldID, Object value) {
1339
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1340
    }
1341
 
1342
    public Object getFieldValue(_Fields field) {
1343
      switch (field) {
1344
      }
1345
      throw new IllegalStateException();
1346
    }
1347
 
1348
    public Object getFieldValue(int fieldId) {
1349
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1350
    }
1351
 
1352
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1353
    public boolean isSet(_Fields field) {
1354
      switch (field) {
1355
      }
1356
      throw new IllegalStateException();
1357
    }
1358
 
1359
    public boolean isSet(int fieldID) {
1360
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1361
    }
1362
 
1363
    @Override
1364
    public boolean equals(Object that) {
1365
      if (that == null)
1366
        return false;
1367
      if (that instanceof getAllProviders_args)
1368
        return this.equals((getAllProviders_args)that);
1369
      return false;
1370
    }
1371
 
1372
    public boolean equals(getAllProviders_args that) {
1373
      if (that == null)
1374
        return false;
1375
 
1376
      return true;
1377
    }
1378
 
1379
    @Override
1380
    public int hashCode() {
1381
      return 0;
1382
    }
1383
 
1384
    public int compareTo(getAllProviders_args other) {
1385
      if (!getClass().equals(other.getClass())) {
1386
        return getClass().getName().compareTo(other.getClass().getName());
1387
      }
1388
 
1389
      int lastComparison = 0;
1390
      getAllProviders_args typedOther = (getAllProviders_args)other;
1391
 
1392
      return 0;
1393
    }
1394
 
1395
    public void read(TProtocol iprot) throws TException {
1396
      TField field;
1397
      iprot.readStructBegin();
1398
      while (true)
1399
      {
1400
        field = iprot.readFieldBegin();
1401
        if (field.type == TType.STOP) { 
1402
          break;
1403
        }
1404
        _Fields fieldId = _Fields.findByThriftId(field.id);
1405
        if (fieldId == null) {
1406
          TProtocolUtil.skip(iprot, field.type);
1407
        } else {
1408
          switch (fieldId) {
1409
          }
1410
          iprot.readFieldEnd();
1411
        }
1412
      }
1413
      iprot.readStructEnd();
1414
      validate();
1415
    }
1416
 
1417
    public void write(TProtocol oprot) throws TException {
1418
      validate();
1419
 
1420
      oprot.writeStructBegin(STRUCT_DESC);
1421
      oprot.writeFieldStop();
1422
      oprot.writeStructEnd();
1423
    }
1424
 
1425
    @Override
1426
    public String toString() {
1427
      StringBuilder sb = new StringBuilder("getAllProviders_args(");
1428
      boolean first = true;
1429
 
1430
      sb.append(")");
1431
      return sb.toString();
1432
    }
1433
 
1434
    public void validate() throws TException {
1435
      // check for required fields
1436
    }
1437
 
1438
  }
1439
 
1440
  public static class getAllProviders_result implements TBase<getAllProviders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllProviders_result>   {
1441
    private static final TStruct STRUCT_DESC = new TStruct("getAllProviders_result");
1442
 
1443
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1444
    private static final TField LSE_FIELD_DESC = new TField("lse", TType.STRUCT, (short)1);
1445
 
1446
    private List<Provider> success;
1447
    private LogisticsServiceException lse;
1448
 
1449
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1450
    public enum _Fields implements TFieldIdEnum {
1451
      SUCCESS((short)0, "success"),
1452
      LSE((short)1, "lse");
1453
 
1454
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1455
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1456
 
1457
      static {
1458
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1459
          byId.put((int)field._thriftId, field);
1460
          byName.put(field.getFieldName(), field);
1461
        }
1462
      }
1463
 
1464
      /**
1465
       * Find the _Fields constant that matches fieldId, or null if its not found.
1466
       */
1467
      public static _Fields findByThriftId(int fieldId) {
1468
        return byId.get(fieldId);
1469
      }
1470
 
1471
      /**
1472
       * Find the _Fields constant that matches fieldId, throwing an exception
1473
       * if it is not found.
1474
       */
1475
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1476
        _Fields fields = findByThriftId(fieldId);
1477
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1478
        return fields;
1479
      }
1480
 
1481
      /**
1482
       * Find the _Fields constant that matches name, or null if its not found.
1483
       */
1484
      public static _Fields findByName(String name) {
1485
        return byName.get(name);
1486
      }
1487
 
1488
      private final short _thriftId;
1489
      private final String _fieldName;
1490
 
1491
      _Fields(short thriftId, String fieldName) {
1492
        _thriftId = thriftId;
1493
        _fieldName = fieldName;
1494
      }
1495
 
1496
      public short getThriftFieldId() {
1497
        return _thriftId;
1498
      }
1499
 
1500
      public String getFieldName() {
1501
        return _fieldName;
1502
      }
1503
    }
1504
 
1505
    // isset id assignments
1506
 
1507
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1508
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1509
          new ListMetaData(TType.LIST, 
1510
              new StructMetaData(TType.STRUCT, Provider.class))));
1511
      put(_Fields.LSE, new FieldMetaData("lse", TFieldRequirementType.DEFAULT, 
1512
          new FieldValueMetaData(TType.STRUCT)));
1513
    }});
1514
 
1515
    static {
1516
      FieldMetaData.addStructMetaDataMap(getAllProviders_result.class, metaDataMap);
1517
    }
1518
 
1519
    public getAllProviders_result() {
1520
    }
1521
 
1522
    public getAllProviders_result(
1523
      List<Provider> success,
1524
      LogisticsServiceException lse)
1525
    {
1526
      this();
1527
      this.success = success;
1528
      this.lse = lse;
1529
    }
1530
 
1531
    /**
1532
     * Performs a deep copy on <i>other</i>.
1533
     */
1534
    public getAllProviders_result(getAllProviders_result other) {
1535
      if (other.isSetSuccess()) {
1536
        List<Provider> __this__success = new ArrayList<Provider>();
1537
        for (Provider other_element : other.success) {
1538
          __this__success.add(new Provider(other_element));
1539
        }
1540
        this.success = __this__success;
1541
      }
1542
      if (other.isSetLse()) {
1543
        this.lse = new LogisticsServiceException(other.lse);
1544
      }
1545
    }
1546
 
1547
    public getAllProviders_result deepCopy() {
1548
      return new getAllProviders_result(this);
1549
    }
1550
 
1551
    @Deprecated
1552
    public getAllProviders_result clone() {
1553
      return new getAllProviders_result(this);
1554
    }
1555
 
1556
    public int getSuccessSize() {
1557
      return (this.success == null) ? 0 : this.success.size();
1558
    }
1559
 
1560
    public java.util.Iterator<Provider> getSuccessIterator() {
1561
      return (this.success == null) ? null : this.success.iterator();
1562
    }
1563
 
1564
    public void addToSuccess(Provider elem) {
1565
      if (this.success == null) {
1566
        this.success = new ArrayList<Provider>();
1567
      }
1568
      this.success.add(elem);
1569
    }
1570
 
1571
    public List<Provider> getSuccess() {
1572
      return this.success;
1573
    }
1574
 
1575
    public getAllProviders_result setSuccess(List<Provider> success) {
1576
      this.success = success;
1577
      return this;
1578
    }
1579
 
1580
    public void unsetSuccess() {
1581
      this.success = null;
1582
    }
1583
 
1584
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1585
    public boolean isSetSuccess() {
1586
      return this.success != null;
1587
    }
1588
 
1589
    public void setSuccessIsSet(boolean value) {
1590
      if (!value) {
1591
        this.success = null;
1592
      }
1593
    }
1594
 
1595
    public LogisticsServiceException getLse() {
1596
      return this.lse;
1597
    }
1598
 
1599
    public getAllProviders_result setLse(LogisticsServiceException lse) {
1600
      this.lse = lse;
1601
      return this;
1602
    }
1603
 
1604
    public void unsetLse() {
1605
      this.lse = null;
1606
    }
1607
 
1608
    /** Returns true if field lse is set (has been asigned a value) and false otherwise */
1609
    public boolean isSetLse() {
1610
      return this.lse != null;
1611
    }
1612
 
1613
    public void setLseIsSet(boolean value) {
1614
      if (!value) {
1615
        this.lse = null;
1616
      }
1617
    }
1618
 
1619
    public void setFieldValue(_Fields field, Object value) {
1620
      switch (field) {
1621
      case SUCCESS:
1622
        if (value == null) {
1623
          unsetSuccess();
1624
        } else {
1625
          setSuccess((List<Provider>)value);
1626
        }
1627
        break;
1628
 
1629
      case LSE:
1630
        if (value == null) {
1631
          unsetLse();
1632
        } else {
1633
          setLse((LogisticsServiceException)value);
1634
        }
1635
        break;
1636
 
1637
      }
1638
    }
1639
 
1640
    public void setFieldValue(int fieldID, Object value) {
1641
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1642
    }
1643
 
1644
    public Object getFieldValue(_Fields field) {
1645
      switch (field) {
1646
      case SUCCESS:
1647
        return getSuccess();
1648
 
1649
      case LSE:
1650
        return getLse();
1651
 
1652
      }
1653
      throw new IllegalStateException();
1654
    }
1655
 
1656
    public Object getFieldValue(int fieldId) {
1657
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1658
    }
1659
 
1660
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1661
    public boolean isSet(_Fields field) {
1662
      switch (field) {
1663
      case SUCCESS:
1664
        return isSetSuccess();
1665
      case LSE:
1666
        return isSetLse();
1667
      }
1668
      throw new IllegalStateException();
1669
    }
1670
 
1671
    public boolean isSet(int fieldID) {
1672
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1673
    }
1674
 
1675
    @Override
1676
    public boolean equals(Object that) {
1677
      if (that == null)
1678
        return false;
1679
      if (that instanceof getAllProviders_result)
1680
        return this.equals((getAllProviders_result)that);
1681
      return false;
1682
    }
1683
 
1684
    public boolean equals(getAllProviders_result that) {
1685
      if (that == null)
1686
        return false;
1687
 
1688
      boolean this_present_success = true && this.isSetSuccess();
1689
      boolean that_present_success = true && that.isSetSuccess();
1690
      if (this_present_success || that_present_success) {
1691
        if (!(this_present_success && that_present_success))
1692
          return false;
1693
        if (!this.success.equals(that.success))
1694
          return false;
1695
      }
1696
 
1697
      boolean this_present_lse = true && this.isSetLse();
1698
      boolean that_present_lse = true && that.isSetLse();
1699
      if (this_present_lse || that_present_lse) {
1700
        if (!(this_present_lse && that_present_lse))
1701
          return false;
1702
        if (!this.lse.equals(that.lse))
1703
          return false;
1704
      }
1705
 
1706
      return true;
1707
    }
1708
 
1709
    @Override
1710
    public int hashCode() {
1711
      return 0;
1712
    }
1713
 
1714
    public int compareTo(getAllProviders_result other) {
1715
      if (!getClass().equals(other.getClass())) {
1716
        return getClass().getName().compareTo(other.getClass().getName());
1717
      }
1718
 
1719
      int lastComparison = 0;
1720
      getAllProviders_result typedOther = (getAllProviders_result)other;
1721
 
1722
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
1723
      if (lastComparison != 0) {
1724
        return lastComparison;
1725
      }
1726
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
1727
      if (lastComparison != 0) {
1728
        return lastComparison;
1729
      }
1730
      lastComparison = Boolean.valueOf(isSetLse()).compareTo(isSetLse());
1731
      if (lastComparison != 0) {
1732
        return lastComparison;
1733
      }
1734
      lastComparison = TBaseHelper.compareTo(lse, typedOther.lse);
1735
      if (lastComparison != 0) {
1736
        return lastComparison;
1737
      }
1738
      return 0;
1739
    }
1740
 
1741
    public void read(TProtocol iprot) throws TException {
1742
      TField field;
1743
      iprot.readStructBegin();
1744
      while (true)
1745
      {
1746
        field = iprot.readFieldBegin();
1747
        if (field.type == TType.STOP) { 
1748
          break;
1749
        }
1750
        _Fields fieldId = _Fields.findByThriftId(field.id);
1751
        if (fieldId == null) {
1752
          TProtocolUtil.skip(iprot, field.type);
1753
        } else {
1754
          switch (fieldId) {
1755
            case SUCCESS:
1756
              if (field.type == TType.LIST) {
1757
                {
1758
                  TList _list0 = iprot.readListBegin();
1759
                  this.success = new ArrayList<Provider>(_list0.size);
1760
                  for (int _i1 = 0; _i1 < _list0.size; ++_i1)
1761
                  {
1762
                    Provider _elem2;
1763
                    _elem2 = new Provider();
1764
                    _elem2.read(iprot);
1765
                    this.success.add(_elem2);
1766
                  }
1767
                  iprot.readListEnd();
1768
                }
1769
              } else { 
1770
                TProtocolUtil.skip(iprot, field.type);
1771
              }
1772
              break;
1773
            case LSE:
1774
              if (field.type == TType.STRUCT) {
1775
                this.lse = new LogisticsServiceException();
1776
                this.lse.read(iprot);
1777
              } else { 
1778
                TProtocolUtil.skip(iprot, field.type);
1779
              }
1780
              break;
1781
          }
1782
          iprot.readFieldEnd();
1783
        }
1784
      }
1785
      iprot.readStructEnd();
1786
      validate();
1787
    }
1788
 
1789
    public void write(TProtocol oprot) throws TException {
1790
      oprot.writeStructBegin(STRUCT_DESC);
1791
 
1792
      if (this.isSetSuccess()) {
1793
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1794
        {
1795
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1796
          for (Provider _iter3 : this.success)
1797
          {
1798
            _iter3.write(oprot);
1799
          }
1800
          oprot.writeListEnd();
1801
        }
1802
        oprot.writeFieldEnd();
1803
      } else if (this.isSetLse()) {
1804
        oprot.writeFieldBegin(LSE_FIELD_DESC);
1805
        this.lse.write(oprot);
1806
        oprot.writeFieldEnd();
1807
      }
1808
      oprot.writeFieldStop();
1809
      oprot.writeStructEnd();
1810
    }
1811
 
1812
    @Override
1813
    public String toString() {
1814
      StringBuilder sb = new StringBuilder("getAllProviders_result(");
1815
      boolean first = true;
1816
 
1817
      sb.append("success:");
1818
      if (this.success == null) {
1819
        sb.append("null");
1820
      } else {
1821
        sb.append(this.success);
1822
      }
1823
      first = false;
1824
      if (!first) sb.append(", ");
1825
      sb.append("lse:");
1826
      if (this.lse == null) {
1827
        sb.append("null");
1828
      } else {
1829
        sb.append(this.lse);
1830
      }
1831
      first = false;
1832
      sb.append(")");
1833
      return sb.toString();
1834
    }
1835
 
1836
    public void validate() throws TException {
1837
      // check for required fields
1838
    }
1839
 
1840
  }
1841
 
471 rajveer 1842
  public static class getLogisticsEstimation_args implements TBase<getLogisticsEstimation_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLogisticsEstimation_args>   {
1843
    private static final TStruct STRUCT_DESC = new TStruct("getLogisticsEstimation_args");
1844
 
1845
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)1);
1846
    private static final TField DESTINATION_PIN_FIELD_DESC = new TField("destination_pin", TType.STRING, (short)2);
1847
 
1848
    private long itemId;
1849
    private String destination_pin;
1850
 
1851
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1852
    public enum _Fields implements TFieldIdEnum {
1853
      ITEM_ID((short)1, "itemId"),
648 chandransh 1854
      DESTINATION_PIN((short)2, "destination_pin");
471 rajveer 1855
 
1856
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1857
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1858
 
1859
      static {
1860
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1861
          byId.put((int)field._thriftId, field);
1862
          byName.put(field.getFieldName(), field);
1863
        }
1864
      }
1865
 
1866
      /**
1867
       * Find the _Fields constant that matches fieldId, or null if its not found.
1868
       */
1869
      public static _Fields findByThriftId(int fieldId) {
1870
        return byId.get(fieldId);
1871
      }
1872
 
1873
      /**
1874
       * Find the _Fields constant that matches fieldId, throwing an exception
1875
       * if it is not found.
1876
       */
1877
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1878
        _Fields fields = findByThriftId(fieldId);
1879
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1880
        return fields;
1881
      }
1882
 
1883
      /**
1884
       * Find the _Fields constant that matches name, or null if its not found.
1885
       */
1886
      public static _Fields findByName(String name) {
1887
        return byName.get(name);
1888
      }
1889
 
1890
      private final short _thriftId;
1891
      private final String _fieldName;
1892
 
1893
      _Fields(short thriftId, String fieldName) {
1894
        _thriftId = thriftId;
1895
        _fieldName = fieldName;
1896
      }
1897
 
1898
      public short getThriftFieldId() {
1899
        return _thriftId;
1900
      }
1901
 
1902
      public String getFieldName() {
1903
        return _fieldName;
1904
      }
1905
    }
1906
 
1907
    // isset id assignments
1908
    private static final int __ITEMID_ISSET_ID = 0;
648 chandransh 1909
    private BitSet __isset_bit_vector = new BitSet(1);
471 rajveer 1910
 
1911
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1912
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
1913
          new FieldValueMetaData(TType.I64)));
1914
      put(_Fields.DESTINATION_PIN, new FieldMetaData("destination_pin", TFieldRequirementType.DEFAULT, 
1915
          new FieldValueMetaData(TType.STRING)));
1916
    }});
1917
 
1918
    static {
1919
      FieldMetaData.addStructMetaDataMap(getLogisticsEstimation_args.class, metaDataMap);
1920
    }
1921
 
1922
    public getLogisticsEstimation_args() {
1923
    }
1924
 
1925
    public getLogisticsEstimation_args(
1926
      long itemId,
648 chandransh 1927
      String destination_pin)
471 rajveer 1928
    {
1929
      this();
1930
      this.itemId = itemId;
1931
      setItemIdIsSet(true);
1932
      this.destination_pin = destination_pin;
1933
    }
1934
 
1935
    /**
1936
     * Performs a deep copy on <i>other</i>.
1937
     */
1938
    public getLogisticsEstimation_args(getLogisticsEstimation_args other) {
1939
      __isset_bit_vector.clear();
1940
      __isset_bit_vector.or(other.__isset_bit_vector);
1941
      this.itemId = other.itemId;
1942
      if (other.isSetDestination_pin()) {
1943
        this.destination_pin = other.destination_pin;
1944
      }
1945
    }
1946
 
1947
    public getLogisticsEstimation_args deepCopy() {
1948
      return new getLogisticsEstimation_args(this);
1949
    }
1950
 
1951
    @Deprecated
1952
    public getLogisticsEstimation_args clone() {
1953
      return new getLogisticsEstimation_args(this);
1954
    }
1955
 
1956
    public long getItemId() {
1957
      return this.itemId;
1958
    }
1959
 
1960
    public getLogisticsEstimation_args setItemId(long itemId) {
1961
      this.itemId = itemId;
1962
      setItemIdIsSet(true);
1963
      return this;
1964
    }
1965
 
1966
    public void unsetItemId() {
1967
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
1968
    }
1969
 
1970
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
1971
    public boolean isSetItemId() {
1972
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
1973
    }
1974
 
1975
    public void setItemIdIsSet(boolean value) {
1976
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
1977
    }
1978
 
1979
    public String getDestination_pin() {
1980
      return this.destination_pin;
1981
    }
1982
 
1983
    public getLogisticsEstimation_args setDestination_pin(String destination_pin) {
1984
      this.destination_pin = destination_pin;
1985
      return this;
1986
    }
1987
 
1988
    public void unsetDestination_pin() {
1989
      this.destination_pin = null;
1990
    }
1991
 
1992
    /** Returns true if field destination_pin is set (has been asigned a value) and false otherwise */
1993
    public boolean isSetDestination_pin() {
1994
      return this.destination_pin != null;
1995
    }
1996
 
1997
    public void setDestination_pinIsSet(boolean value) {
1998
      if (!value) {
1999
        this.destination_pin = null;
2000
      }
2001
    }
2002
 
2003
    public void setFieldValue(_Fields field, Object value) {
2004
      switch (field) {
2005
      case ITEM_ID:
2006
        if (value == null) {
2007
          unsetItemId();
2008
        } else {
2009
          setItemId((Long)value);
2010
        }
2011
        break;
2012
 
2013
      case DESTINATION_PIN:
2014
        if (value == null) {
2015
          unsetDestination_pin();
2016
        } else {
2017
          setDestination_pin((String)value);
2018
        }
2019
        break;
2020
 
2021
      }
2022
    }
2023
 
2024
    public void setFieldValue(int fieldID, Object value) {
2025
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2026
    }
2027
 
2028
    public Object getFieldValue(_Fields field) {
2029
      switch (field) {
2030
      case ITEM_ID:
2031
        return new Long(getItemId());
2032
 
2033
      case DESTINATION_PIN:
2034
        return getDestination_pin();
2035
 
2036
      }
2037
      throw new IllegalStateException();
2038
    }
2039
 
2040
    public Object getFieldValue(int fieldId) {
2041
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2042
    }
2043
 
2044
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2045
    public boolean isSet(_Fields field) {
2046
      switch (field) {
2047
      case ITEM_ID:
2048
        return isSetItemId();
2049
      case DESTINATION_PIN:
2050
        return isSetDestination_pin();
2051
      }
2052
      throw new IllegalStateException();
2053
    }
2054
 
2055
    public boolean isSet(int fieldID) {
2056
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2057
    }
2058
 
2059
    @Override
2060
    public boolean equals(Object that) {
2061
      if (that == null)
2062
        return false;
2063
      if (that instanceof getLogisticsEstimation_args)
2064
        return this.equals((getLogisticsEstimation_args)that);
2065
      return false;
2066
    }
2067
 
2068
    public boolean equals(getLogisticsEstimation_args that) {
2069
      if (that == null)
2070
        return false;
2071
 
2072
      boolean this_present_itemId = true;
2073
      boolean that_present_itemId = true;
2074
      if (this_present_itemId || that_present_itemId) {
2075
        if (!(this_present_itemId && that_present_itemId))
2076
          return false;
2077
        if (this.itemId != that.itemId)
2078
          return false;
2079
      }
2080
 
2081
      boolean this_present_destination_pin = true && this.isSetDestination_pin();
2082
      boolean that_present_destination_pin = true && that.isSetDestination_pin();
2083
      if (this_present_destination_pin || that_present_destination_pin) {
2084
        if (!(this_present_destination_pin && that_present_destination_pin))
2085
          return false;
2086
        if (!this.destination_pin.equals(that.destination_pin))
2087
          return false;
2088
      }
2089
 
2090
      return true;
2091
    }
2092
 
2093
    @Override
2094
    public int hashCode() {
2095
      return 0;
2096
    }
2097
 
2098
    public int compareTo(getLogisticsEstimation_args other) {
2099
      if (!getClass().equals(other.getClass())) {
2100
        return getClass().getName().compareTo(other.getClass().getName());
2101
      }
2102
 
2103
      int lastComparison = 0;
2104
      getLogisticsEstimation_args typedOther = (getLogisticsEstimation_args)other;
2105
 
2106
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
2107
      if (lastComparison != 0) {
2108
        return lastComparison;
2109
      }
2110
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
2111
      if (lastComparison != 0) {
2112
        return lastComparison;
2113
      }
2114
      lastComparison = Boolean.valueOf(isSetDestination_pin()).compareTo(isSetDestination_pin());
2115
      if (lastComparison != 0) {
2116
        return lastComparison;
2117
      }
2118
      lastComparison = TBaseHelper.compareTo(destination_pin, typedOther.destination_pin);
2119
      if (lastComparison != 0) {
2120
        return lastComparison;
2121
      }
2122
      return 0;
2123
    }
2124
 
2125
    public void read(TProtocol iprot) throws TException {
2126
      TField field;
2127
      iprot.readStructBegin();
2128
      while (true)
2129
      {
2130
        field = iprot.readFieldBegin();
2131
        if (field.type == TType.STOP) { 
2132
          break;
2133
        }
2134
        _Fields fieldId = _Fields.findByThriftId(field.id);
2135
        if (fieldId == null) {
2136
          TProtocolUtil.skip(iprot, field.type);
2137
        } else {
2138
          switch (fieldId) {
2139
            case ITEM_ID:
2140
              if (field.type == TType.I64) {
2141
                this.itemId = iprot.readI64();
2142
                setItemIdIsSet(true);
2143
              } else { 
2144
                TProtocolUtil.skip(iprot, field.type);
2145
              }
2146
              break;
2147
            case DESTINATION_PIN:
2148
              if (field.type == TType.STRING) {
2149
                this.destination_pin = iprot.readString();
2150
              } else { 
2151
                TProtocolUtil.skip(iprot, field.type);
2152
              }
2153
              break;
2154
          }
2155
          iprot.readFieldEnd();
2156
        }
2157
      }
2158
      iprot.readStructEnd();
2159
      validate();
2160
    }
2161
 
2162
    public void write(TProtocol oprot) throws TException {
2163
      validate();
2164
 
2165
      oprot.writeStructBegin(STRUCT_DESC);
2166
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
2167
      oprot.writeI64(this.itemId);
2168
      oprot.writeFieldEnd();
2169
      if (this.destination_pin != null) {
2170
        oprot.writeFieldBegin(DESTINATION_PIN_FIELD_DESC);
2171
        oprot.writeString(this.destination_pin);
2172
        oprot.writeFieldEnd();
2173
      }
2174
      oprot.writeFieldStop();
2175
      oprot.writeStructEnd();
2176
    }
2177
 
2178
    @Override
2179
    public String toString() {
2180
      StringBuilder sb = new StringBuilder("getLogisticsEstimation_args(");
2181
      boolean first = true;
2182
 
2183
      sb.append("itemId:");
2184
      sb.append(this.itemId);
2185
      first = false;
2186
      if (!first) sb.append(", ");
2187
      sb.append("destination_pin:");
2188
      if (this.destination_pin == null) {
2189
        sb.append("null");
2190
      } else {
2191
        sb.append(this.destination_pin);
2192
      }
2193
      first = false;
2194
      sb.append(")");
2195
      return sb.toString();
2196
    }
2197
 
2198
    public void validate() throws TException {
2199
      // check for required fields
2200
    }
2201
 
2202
  }
2203
 
2204
  public static class getLogisticsEstimation_result implements TBase<getLogisticsEstimation_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLogisticsEstimation_result>   {
2205
    private static final TStruct STRUCT_DESC = new TStruct("getLogisticsEstimation_result");
2206
 
2207
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2208
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
2209
 
648 chandransh 2210
    private LogisticsInfo success;
471 rajveer 2211
    private LogisticsServiceException se;
2212
 
2213
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2214
    public enum _Fields implements TFieldIdEnum {
2215
      SUCCESS((short)0, "success"),
2216
      SE((short)1, "se");
2217
 
2218
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2219
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2220
 
2221
      static {
2222
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2223
          byId.put((int)field._thriftId, field);
2224
          byName.put(field.getFieldName(), field);
2225
        }
2226
      }
2227
 
2228
      /**
2229
       * Find the _Fields constant that matches fieldId, or null if its not found.
2230
       */
2231
      public static _Fields findByThriftId(int fieldId) {
2232
        return byId.get(fieldId);
2233
      }
2234
 
2235
      /**
2236
       * Find the _Fields constant that matches fieldId, throwing an exception
2237
       * if it is not found.
2238
       */
2239
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2240
        _Fields fields = findByThriftId(fieldId);
2241
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2242
        return fields;
2243
      }
2244
 
2245
      /**
2246
       * Find the _Fields constant that matches name, or null if its not found.
2247
       */
2248
      public static _Fields findByName(String name) {
2249
        return byName.get(name);
2250
      }
2251
 
2252
      private final short _thriftId;
2253
      private final String _fieldName;
2254
 
2255
      _Fields(short thriftId, String fieldName) {
2256
        _thriftId = thriftId;
2257
        _fieldName = fieldName;
2258
      }
2259
 
2260
      public short getThriftFieldId() {
2261
        return _thriftId;
2262
      }
2263
 
2264
      public String getFieldName() {
2265
        return _fieldName;
2266
      }
2267
    }
2268
 
2269
    // isset id assignments
2270
 
2271
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2272
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
648 chandransh 2273
          new StructMetaData(TType.STRUCT, LogisticsInfo.class)));
471 rajveer 2274
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
2275
          new FieldValueMetaData(TType.STRUCT)));
2276
    }});
2277
 
2278
    static {
2279
      FieldMetaData.addStructMetaDataMap(getLogisticsEstimation_result.class, metaDataMap);
2280
    }
2281
 
2282
    public getLogisticsEstimation_result() {
2283
    }
2284
 
2285
    public getLogisticsEstimation_result(
648 chandransh 2286
      LogisticsInfo success,
471 rajveer 2287
      LogisticsServiceException se)
2288
    {
2289
      this();
2290
      this.success = success;
2291
      this.se = se;
2292
    }
2293
 
2294
    /**
2295
     * Performs a deep copy on <i>other</i>.
2296
     */
2297
    public getLogisticsEstimation_result(getLogisticsEstimation_result other) {
2298
      if (other.isSetSuccess()) {
648 chandransh 2299
        this.success = new LogisticsInfo(other.success);
471 rajveer 2300
      }
2301
      if (other.isSetSe()) {
2302
        this.se = new LogisticsServiceException(other.se);
2303
      }
2304
    }
2305
 
2306
    public getLogisticsEstimation_result deepCopy() {
2307
      return new getLogisticsEstimation_result(this);
2308
    }
2309
 
2310
    @Deprecated
2311
    public getLogisticsEstimation_result clone() {
2312
      return new getLogisticsEstimation_result(this);
2313
    }
2314
 
648 chandransh 2315
    public LogisticsInfo getSuccess() {
471 rajveer 2316
      return this.success;
2317
    }
2318
 
648 chandransh 2319
    public getLogisticsEstimation_result setSuccess(LogisticsInfo success) {
471 rajveer 2320
      this.success = success;
2321
      return this;
2322
    }
2323
 
2324
    public void unsetSuccess() {
2325
      this.success = null;
2326
    }
2327
 
2328
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2329
    public boolean isSetSuccess() {
2330
      return this.success != null;
2331
    }
2332
 
2333
    public void setSuccessIsSet(boolean value) {
2334
      if (!value) {
2335
        this.success = null;
2336
      }
2337
    }
2338
 
2339
    public LogisticsServiceException getSe() {
2340
      return this.se;
2341
    }
2342
 
2343
    public getLogisticsEstimation_result setSe(LogisticsServiceException se) {
2344
      this.se = se;
2345
      return this;
2346
    }
2347
 
2348
    public void unsetSe() {
2349
      this.se = null;
2350
    }
2351
 
2352
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
2353
    public boolean isSetSe() {
2354
      return this.se != null;
2355
    }
2356
 
2357
    public void setSeIsSet(boolean value) {
2358
      if (!value) {
2359
        this.se = null;
2360
      }
2361
    }
2362
 
2363
    public void setFieldValue(_Fields field, Object value) {
2364
      switch (field) {
2365
      case SUCCESS:
2366
        if (value == null) {
2367
          unsetSuccess();
2368
        } else {
648 chandransh 2369
          setSuccess((LogisticsInfo)value);
471 rajveer 2370
        }
2371
        break;
2372
 
2373
      case SE:
2374
        if (value == null) {
2375
          unsetSe();
2376
        } else {
2377
          setSe((LogisticsServiceException)value);
2378
        }
2379
        break;
2380
 
2381
      }
2382
    }
2383
 
2384
    public void setFieldValue(int fieldID, Object value) {
2385
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2386
    }
2387
 
2388
    public Object getFieldValue(_Fields field) {
2389
      switch (field) {
2390
      case SUCCESS:
2391
        return getSuccess();
2392
 
2393
      case SE:
2394
        return getSe();
2395
 
2396
      }
2397
      throw new IllegalStateException();
2398
    }
2399
 
2400
    public Object getFieldValue(int fieldId) {
2401
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2402
    }
2403
 
2404
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2405
    public boolean isSet(_Fields field) {
2406
      switch (field) {
2407
      case SUCCESS:
2408
        return isSetSuccess();
2409
      case SE:
2410
        return isSetSe();
2411
      }
2412
      throw new IllegalStateException();
2413
    }
2414
 
2415
    public boolean isSet(int fieldID) {
2416
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2417
    }
2418
 
2419
    @Override
2420
    public boolean equals(Object that) {
2421
      if (that == null)
2422
        return false;
2423
      if (that instanceof getLogisticsEstimation_result)
2424
        return this.equals((getLogisticsEstimation_result)that);
2425
      return false;
2426
    }
2427
 
2428
    public boolean equals(getLogisticsEstimation_result that) {
2429
      if (that == null)
2430
        return false;
2431
 
2432
      boolean this_present_success = true && this.isSetSuccess();
2433
      boolean that_present_success = true && that.isSetSuccess();
2434
      if (this_present_success || that_present_success) {
2435
        if (!(this_present_success && that_present_success))
2436
          return false;
2437
        if (!this.success.equals(that.success))
2438
          return false;
2439
      }
2440
 
2441
      boolean this_present_se = true && this.isSetSe();
2442
      boolean that_present_se = true && that.isSetSe();
2443
      if (this_present_se || that_present_se) {
2444
        if (!(this_present_se && that_present_se))
2445
          return false;
2446
        if (!this.se.equals(that.se))
2447
          return false;
2448
      }
2449
 
2450
      return true;
2451
    }
2452
 
2453
    @Override
2454
    public int hashCode() {
2455
      return 0;
2456
    }
2457
 
2458
    public int compareTo(getLogisticsEstimation_result other) {
2459
      if (!getClass().equals(other.getClass())) {
2460
        return getClass().getName().compareTo(other.getClass().getName());
2461
      }
2462
 
2463
      int lastComparison = 0;
2464
      getLogisticsEstimation_result typedOther = (getLogisticsEstimation_result)other;
2465
 
2466
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2467
      if (lastComparison != 0) {
2468
        return lastComparison;
2469
      }
2470
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2471
      if (lastComparison != 0) {
2472
        return lastComparison;
2473
      }
2474
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
2475
      if (lastComparison != 0) {
2476
        return lastComparison;
2477
      }
2478
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
2479
      if (lastComparison != 0) {
2480
        return lastComparison;
2481
      }
2482
      return 0;
2483
    }
2484
 
2485
    public void read(TProtocol iprot) throws TException {
2486
      TField field;
2487
      iprot.readStructBegin();
2488
      while (true)
2489
      {
2490
        field = iprot.readFieldBegin();
2491
        if (field.type == TType.STOP) { 
2492
          break;
2493
        }
2494
        _Fields fieldId = _Fields.findByThriftId(field.id);
2495
        if (fieldId == null) {
2496
          TProtocolUtil.skip(iprot, field.type);
2497
        } else {
2498
          switch (fieldId) {
2499
            case SUCCESS:
2500
              if (field.type == TType.STRUCT) {
648 chandransh 2501
                this.success = new LogisticsInfo();
471 rajveer 2502
                this.success.read(iprot);
2503
              } else { 
2504
                TProtocolUtil.skip(iprot, field.type);
2505
              }
2506
              break;
2507
            case SE:
2508
              if (field.type == TType.STRUCT) {
2509
                this.se = new LogisticsServiceException();
2510
                this.se.read(iprot);
2511
              } else { 
2512
                TProtocolUtil.skip(iprot, field.type);
2513
              }
2514
              break;
2515
          }
2516
          iprot.readFieldEnd();
2517
        }
2518
      }
2519
      iprot.readStructEnd();
2520
      validate();
2521
    }
2522
 
2523
    public void write(TProtocol oprot) throws TException {
2524
      oprot.writeStructBegin(STRUCT_DESC);
2525
 
2526
      if (this.isSetSuccess()) {
2527
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2528
        this.success.write(oprot);
2529
        oprot.writeFieldEnd();
2530
      } else if (this.isSetSe()) {
2531
        oprot.writeFieldBegin(SE_FIELD_DESC);
2532
        this.se.write(oprot);
2533
        oprot.writeFieldEnd();
2534
      }
2535
      oprot.writeFieldStop();
2536
      oprot.writeStructEnd();
2537
    }
2538
 
2539
    @Override
2540
    public String toString() {
2541
      StringBuilder sb = new StringBuilder("getLogisticsEstimation_result(");
2542
      boolean first = true;
2543
 
2544
      sb.append("success:");
2545
      if (this.success == null) {
2546
        sb.append("null");
2547
      } else {
2548
        sb.append(this.success);
2549
      }
2550
      first = false;
2551
      if (!first) sb.append(", ");
2552
      sb.append("se:");
2553
      if (this.se == null) {
2554
        sb.append("null");
2555
      } else {
2556
        sb.append(this.se);
2557
      }
2558
      first = false;
2559
      sb.append(")");
2560
      return sb.toString();
2561
    }
2562
 
2563
    public void validate() throws TException {
2564
      // check for required fields
2565
    }
2566
 
2567
  }
2568
 
648 chandransh 2569
  public static class getLogisticsInfo_args implements TBase<getLogisticsInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLogisticsInfo_args>   {
2570
    private static final TStruct STRUCT_DESC = new TStruct("getLogisticsInfo_args");
471 rajveer 2571
 
648 chandransh 2572
    private static final TField DESTINATION_PINCODE_FIELD_DESC = new TField("destination_pincode", TType.STRING, (short)1);
715 rajveer 2573
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
471 rajveer 2574
 
648 chandransh 2575
    private String destination_pincode;
715 rajveer 2576
    private long item_id;
471 rajveer 2577
 
2578
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2579
    public enum _Fields implements TFieldIdEnum {
648 chandransh 2580
      DESTINATION_PINCODE((short)1, "destination_pincode"),
2581
      ITEM_ID((short)2, "item_id");
471 rajveer 2582
 
2583
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2584
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2585
 
2586
      static {
2587
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2588
          byId.put((int)field._thriftId, field);
2589
          byName.put(field.getFieldName(), field);
2590
        }
2591
      }
2592
 
2593
      /**
2594
       * Find the _Fields constant that matches fieldId, or null if its not found.
2595
       */
2596
      public static _Fields findByThriftId(int fieldId) {
2597
        return byId.get(fieldId);
2598
      }
2599
 
2600
      /**
2601
       * Find the _Fields constant that matches fieldId, throwing an exception
2602
       * if it is not found.
2603
       */
2604
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2605
        _Fields fields = findByThriftId(fieldId);
2606
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2607
        return fields;
2608
      }
2609
 
2610
      /**
2611
       * Find the _Fields constant that matches name, or null if its not found.
2612
       */
2613
      public static _Fields findByName(String name) {
2614
        return byName.get(name);
2615
      }
2616
 
2617
      private final short _thriftId;
2618
      private final String _fieldName;
2619
 
2620
      _Fields(short thriftId, String fieldName) {
2621
        _thriftId = thriftId;
2622
        _fieldName = fieldName;
2623
      }
2624
 
2625
      public short getThriftFieldId() {
2626
        return _thriftId;
2627
      }
2628
 
2629
      public String getFieldName() {
2630
        return _fieldName;
2631
      }
2632
    }
2633
 
2634
    // isset id assignments
715 rajveer 2635
    private static final int __ITEM_ID_ISSET_ID = 0;
2636
    private BitSet __isset_bit_vector = new BitSet(1);
471 rajveer 2637
 
2638
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
648 chandransh 2639
      put(_Fields.DESTINATION_PINCODE, new FieldMetaData("destination_pincode", TFieldRequirementType.DEFAULT, 
471 rajveer 2640
          new FieldValueMetaData(TType.STRING)));
648 chandransh 2641
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
715 rajveer 2642
          new FieldValueMetaData(TType.I64)));
477 rajveer 2643
    }});
2644
 
2645
    static {
648 chandransh 2646
      FieldMetaData.addStructMetaDataMap(getLogisticsInfo_args.class, metaDataMap);
477 rajveer 2647
    }
2648
 
648 chandransh 2649
    public getLogisticsInfo_args() {
477 rajveer 2650
    }
2651
 
648 chandransh 2652
    public getLogisticsInfo_args(
2653
      String destination_pincode,
715 rajveer 2654
      long item_id)
477 rajveer 2655
    {
2656
      this();
648 chandransh 2657
      this.destination_pincode = destination_pincode;
2658
      this.item_id = item_id;
715 rajveer 2659
      setItem_idIsSet(true);
477 rajveer 2660
    }
2661
 
2662
    /**
2663
     * Performs a deep copy on <i>other</i>.
2664
     */
648 chandransh 2665
    public getLogisticsInfo_args(getLogisticsInfo_args other) {
715 rajveer 2666
      __isset_bit_vector.clear();
2667
      __isset_bit_vector.or(other.__isset_bit_vector);
648 chandransh 2668
      if (other.isSetDestination_pincode()) {
2669
        this.destination_pincode = other.destination_pincode;
477 rajveer 2670
      }
715 rajveer 2671
      this.item_id = other.item_id;
477 rajveer 2672
    }
2673
 
648 chandransh 2674
    public getLogisticsInfo_args deepCopy() {
2675
      return new getLogisticsInfo_args(this);
477 rajveer 2676
    }
2677
 
2678
    @Deprecated
648 chandransh 2679
    public getLogisticsInfo_args clone() {
2680
      return new getLogisticsInfo_args(this);
477 rajveer 2681
    }
2682
 
648 chandransh 2683
    public String getDestination_pincode() {
2684
      return this.destination_pincode;
477 rajveer 2685
    }
2686
 
648 chandransh 2687
    public getLogisticsInfo_args setDestination_pincode(String destination_pincode) {
2688
      this.destination_pincode = destination_pincode;
477 rajveer 2689
      return this;
2690
    }
2691
 
648 chandransh 2692
    public void unsetDestination_pincode() {
2693
      this.destination_pincode = null;
477 rajveer 2694
    }
2695
 
648 chandransh 2696
    /** Returns true if field destination_pincode is set (has been asigned a value) and false otherwise */
2697
    public boolean isSetDestination_pincode() {
2698
      return this.destination_pincode != null;
477 rajveer 2699
    }
2700
 
648 chandransh 2701
    public void setDestination_pincodeIsSet(boolean value) {
477 rajveer 2702
      if (!value) {
648 chandransh 2703
        this.destination_pincode = null;
477 rajveer 2704
      }
2705
    }
2706
 
715 rajveer 2707
    public long getItem_id() {
648 chandransh 2708
      return this.item_id;
477 rajveer 2709
    }
2710
 
715 rajveer 2711
    public getLogisticsInfo_args setItem_id(long item_id) {
648 chandransh 2712
      this.item_id = item_id;
715 rajveer 2713
      setItem_idIsSet(true);
477 rajveer 2714
      return this;
2715
    }
2716
 
648 chandransh 2717
    public void unsetItem_id() {
715 rajveer 2718
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
477 rajveer 2719
    }
2720
 
648 chandransh 2721
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
2722
    public boolean isSetItem_id() {
715 rajveer 2723
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
477 rajveer 2724
    }
2725
 
648 chandransh 2726
    public void setItem_idIsSet(boolean value) {
715 rajveer 2727
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
477 rajveer 2728
    }
2729
 
2730
    public void setFieldValue(_Fields field, Object value) {
2731
      switch (field) {
648 chandransh 2732
      case DESTINATION_PINCODE:
477 rajveer 2733
        if (value == null) {
648 chandransh 2734
          unsetDestination_pincode();
477 rajveer 2735
        } else {
648 chandransh 2736
          setDestination_pincode((String)value);
477 rajveer 2737
        }
2738
        break;
2739
 
648 chandransh 2740
      case ITEM_ID:
477 rajveer 2741
        if (value == null) {
648 chandransh 2742
          unsetItem_id();
477 rajveer 2743
        } else {
715 rajveer 2744
          setItem_id((Long)value);
477 rajveer 2745
        }
2746
        break;
2747
 
2748
      }
2749
    }
2750
 
2751
    public void setFieldValue(int fieldID, Object value) {
2752
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2753
    }
2754
 
2755
    public Object getFieldValue(_Fields field) {
2756
      switch (field) {
648 chandransh 2757
      case DESTINATION_PINCODE:
2758
        return getDestination_pincode();
477 rajveer 2759
 
648 chandransh 2760
      case ITEM_ID:
715 rajveer 2761
        return new Long(getItem_id());
477 rajveer 2762
 
2763
      }
2764
      throw new IllegalStateException();
2765
    }
2766
 
2767
    public Object getFieldValue(int fieldId) {
2768
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2769
    }
2770
 
2771
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2772
    public boolean isSet(_Fields field) {
2773
      switch (field) {
648 chandransh 2774
      case DESTINATION_PINCODE:
2775
        return isSetDestination_pincode();
2776
      case ITEM_ID:
2777
        return isSetItem_id();
477 rajveer 2778
      }
2779
      throw new IllegalStateException();
2780
    }
2781
 
2782
    public boolean isSet(int fieldID) {
2783
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2784
    }
2785
 
2786
    @Override
2787
    public boolean equals(Object that) {
2788
      if (that == null)
2789
        return false;
648 chandransh 2790
      if (that instanceof getLogisticsInfo_args)
2791
        return this.equals((getLogisticsInfo_args)that);
477 rajveer 2792
      return false;
2793
    }
2794
 
648 chandransh 2795
    public boolean equals(getLogisticsInfo_args that) {
477 rajveer 2796
      if (that == null)
2797
        return false;
2798
 
648 chandransh 2799
      boolean this_present_destination_pincode = true && this.isSetDestination_pincode();
2800
      boolean that_present_destination_pincode = true && that.isSetDestination_pincode();
2801
      if (this_present_destination_pincode || that_present_destination_pincode) {
2802
        if (!(this_present_destination_pincode && that_present_destination_pincode))
477 rajveer 2803
          return false;
648 chandransh 2804
        if (!this.destination_pincode.equals(that.destination_pincode))
477 rajveer 2805
          return false;
2806
      }
2807
 
715 rajveer 2808
      boolean this_present_item_id = true;
2809
      boolean that_present_item_id = true;
648 chandransh 2810
      if (this_present_item_id || that_present_item_id) {
2811
        if (!(this_present_item_id && that_present_item_id))
477 rajveer 2812
          return false;
715 rajveer 2813
        if (this.item_id != that.item_id)
477 rajveer 2814
          return false;
2815
      }
2816
 
2817
      return true;
2818
    }
2819
 
2820
    @Override
2821
    public int hashCode() {
2822
      return 0;
2823
    }
2824
 
648 chandransh 2825
    public int compareTo(getLogisticsInfo_args other) {
477 rajveer 2826
      if (!getClass().equals(other.getClass())) {
2827
        return getClass().getName().compareTo(other.getClass().getName());
2828
      }
2829
 
2830
      int lastComparison = 0;
648 chandransh 2831
      getLogisticsInfo_args typedOther = (getLogisticsInfo_args)other;
477 rajveer 2832
 
648 chandransh 2833
      lastComparison = Boolean.valueOf(isSetDestination_pincode()).compareTo(isSetDestination_pincode());
477 rajveer 2834
      if (lastComparison != 0) {
2835
        return lastComparison;
2836
      }
648 chandransh 2837
      lastComparison = TBaseHelper.compareTo(destination_pincode, typedOther.destination_pincode);
477 rajveer 2838
      if (lastComparison != 0) {
2839
        return lastComparison;
2840
      }
648 chandransh 2841
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
477 rajveer 2842
      if (lastComparison != 0) {
2843
        return lastComparison;
2844
      }
648 chandransh 2845
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
477 rajveer 2846
      if (lastComparison != 0) {
2847
        return lastComparison;
2848
      }
2849
      return 0;
2850
    }
2851
 
2852
    public void read(TProtocol iprot) throws TException {
2853
      TField field;
2854
      iprot.readStructBegin();
2855
      while (true)
2856
      {
2857
        field = iprot.readFieldBegin();
2858
        if (field.type == TType.STOP) { 
2859
          break;
2860
        }
2861
        _Fields fieldId = _Fields.findByThriftId(field.id);
2862
        if (fieldId == null) {
2863
          TProtocolUtil.skip(iprot, field.type);
2864
        } else {
2865
          switch (fieldId) {
648 chandransh 2866
            case DESTINATION_PINCODE:
477 rajveer 2867
              if (field.type == TType.STRING) {
648 chandransh 2868
                this.destination_pincode = iprot.readString();
477 rajveer 2869
              } else { 
2870
                TProtocolUtil.skip(iprot, field.type);
2871
              }
2872
              break;
648 chandransh 2873
            case ITEM_ID:
715 rajveer 2874
              if (field.type == TType.I64) {
2875
                this.item_id = iprot.readI64();
2876
                setItem_idIsSet(true);
477 rajveer 2877
              } else { 
2878
                TProtocolUtil.skip(iprot, field.type);
2879
              }
2880
              break;
2881
          }
2882
          iprot.readFieldEnd();
2883
        }
2884
      }
2885
      iprot.readStructEnd();
2886
      validate();
2887
    }
2888
 
2889
    public void write(TProtocol oprot) throws TException {
2890
      validate();
2891
 
2892
      oprot.writeStructBegin(STRUCT_DESC);
648 chandransh 2893
      if (this.destination_pincode != null) {
2894
        oprot.writeFieldBegin(DESTINATION_PINCODE_FIELD_DESC);
2895
        oprot.writeString(this.destination_pincode);
477 rajveer 2896
        oprot.writeFieldEnd();
2897
      }
715 rajveer 2898
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
2899
      oprot.writeI64(this.item_id);
2900
      oprot.writeFieldEnd();
477 rajveer 2901
      oprot.writeFieldStop();
2902
      oprot.writeStructEnd();
2903
    }
2904
 
2905
    @Override
2906
    public String toString() {
648 chandransh 2907
      StringBuilder sb = new StringBuilder("getLogisticsInfo_args(");
477 rajveer 2908
      boolean first = true;
2909
 
648 chandransh 2910
      sb.append("destination_pincode:");
2911
      if (this.destination_pincode == null) {
477 rajveer 2912
        sb.append("null");
2913
      } else {
648 chandransh 2914
        sb.append(this.destination_pincode);
477 rajveer 2915
      }
2916
      first = false;
2917
      if (!first) sb.append(", ");
648 chandransh 2918
      sb.append("item_id:");
715 rajveer 2919
      sb.append(this.item_id);
477 rajveer 2920
      first = false;
2921
      sb.append(")");
2922
      return sb.toString();
2923
    }
2924
 
2925
    public void validate() throws TException {
2926
      // check for required fields
2927
    }
2928
 
2929
  }
2930
 
648 chandransh 2931
  public static class getLogisticsInfo_result implements TBase<getLogisticsInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLogisticsInfo_result>   {
2932
    private static final TStruct STRUCT_DESC = new TStruct("getLogisticsInfo_result");
477 rajveer 2933
 
648 chandransh 2934
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2935
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
477 rajveer 2936
 
648 chandransh 2937
    private LogisticsInfo success;
2938
    private LogisticsServiceException se;
477 rajveer 2939
 
2940
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2941
    public enum _Fields implements TFieldIdEnum {
648 chandransh 2942
      SUCCESS((short)0, "success"),
2943
      SE((short)1, "se");
477 rajveer 2944
 
2945
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2946
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2947
 
2948
      static {
2949
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2950
          byId.put((int)field._thriftId, field);
2951
          byName.put(field.getFieldName(), field);
2952
        }
2953
      }
2954
 
2955
      /**
2956
       * Find the _Fields constant that matches fieldId, or null if its not found.
2957
       */
2958
      public static _Fields findByThriftId(int fieldId) {
2959
        return byId.get(fieldId);
2960
      }
2961
 
2962
      /**
2963
       * Find the _Fields constant that matches fieldId, throwing an exception
2964
       * if it is not found.
2965
       */
2966
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2967
        _Fields fields = findByThriftId(fieldId);
2968
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2969
        return fields;
2970
      }
2971
 
2972
      /**
2973
       * Find the _Fields constant that matches name, or null if its not found.
2974
       */
2975
      public static _Fields findByName(String name) {
2976
        return byName.get(name);
2977
      }
2978
 
2979
      private final short _thriftId;
2980
      private final String _fieldName;
2981
 
2982
      _Fields(short thriftId, String fieldName) {
2983
        _thriftId = thriftId;
2984
        _fieldName = fieldName;
2985
      }
2986
 
2987
      public short getThriftFieldId() {
2988
        return _thriftId;
2989
      }
2990
 
2991
      public String getFieldName() {
2992
        return _fieldName;
2993
      }
2994
    }
2995
 
412 ashish 2996
    // isset id assignments
2997
 
2998
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
648 chandransh 2999
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3000
          new StructMetaData(TType.STRUCT, LogisticsInfo.class)));
3001
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
3002
          new FieldValueMetaData(TType.STRUCT)));
412 ashish 3003
    }});
3004
 
3005
    static {
648 chandransh 3006
      FieldMetaData.addStructMetaDataMap(getLogisticsInfo_result.class, metaDataMap);
412 ashish 3007
    }
3008
 
648 chandransh 3009
    public getLogisticsInfo_result() {
412 ashish 3010
    }
3011
 
648 chandransh 3012
    public getLogisticsInfo_result(
3013
      LogisticsInfo success,
3014
      LogisticsServiceException se)
412 ashish 3015
    {
3016
      this();
648 chandransh 3017
      this.success = success;
3018
      this.se = se;
412 ashish 3019
    }
3020
 
3021
    /**
3022
     * Performs a deep copy on <i>other</i>.
3023
     */
648 chandransh 3024
    public getLogisticsInfo_result(getLogisticsInfo_result other) {
3025
      if (other.isSetSuccess()) {
3026
        this.success = new LogisticsInfo(other.success);
412 ashish 3027
      }
648 chandransh 3028
      if (other.isSetSe()) {
3029
        this.se = new LogisticsServiceException(other.se);
3030
      }
412 ashish 3031
    }
3032
 
648 chandransh 3033
    public getLogisticsInfo_result deepCopy() {
3034
      return new getLogisticsInfo_result(this);
412 ashish 3035
    }
3036
 
3037
    @Deprecated
648 chandransh 3038
    public getLogisticsInfo_result clone() {
3039
      return new getLogisticsInfo_result(this);
412 ashish 3040
    }
3041
 
648 chandransh 3042
    public LogisticsInfo getSuccess() {
3043
      return this.success;
412 ashish 3044
    }
3045
 
648 chandransh 3046
    public getLogisticsInfo_result setSuccess(LogisticsInfo success) {
3047
      this.success = success;
412 ashish 3048
      return this;
3049
    }
3050
 
648 chandransh 3051
    public void unsetSuccess() {
3052
      this.success = null;
412 ashish 3053
    }
3054
 
648 chandransh 3055
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3056
    public boolean isSetSuccess() {
3057
      return this.success != null;
412 ashish 3058
    }
3059
 
648 chandransh 3060
    public void setSuccessIsSet(boolean value) {
412 ashish 3061
      if (!value) {
648 chandransh 3062
        this.success = null;
412 ashish 3063
      }
3064
    }
3065
 
648 chandransh 3066
    public LogisticsServiceException getSe() {
3067
      return this.se;
412 ashish 3068
    }
3069
 
648 chandransh 3070
    public getLogisticsInfo_result setSe(LogisticsServiceException se) {
3071
      this.se = se;
412 ashish 3072
      return this;
3073
    }
3074
 
648 chandransh 3075
    public void unsetSe() {
3076
      this.se = null;
412 ashish 3077
    }
3078
 
648 chandransh 3079
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
3080
    public boolean isSetSe() {
3081
      return this.se != null;
412 ashish 3082
    }
3083
 
648 chandransh 3084
    public void setSeIsSet(boolean value) {
3085
      if (!value) {
3086
        this.se = null;
3087
      }
412 ashish 3088
    }
3089
 
3090
    public void setFieldValue(_Fields field, Object value) {
3091
      switch (field) {
648 chandransh 3092
      case SUCCESS:
412 ashish 3093
        if (value == null) {
648 chandransh 3094
          unsetSuccess();
412 ashish 3095
        } else {
648 chandransh 3096
          setSuccess((LogisticsInfo)value);
412 ashish 3097
        }
3098
        break;
3099
 
648 chandransh 3100
      case SE:
412 ashish 3101
        if (value == null) {
648 chandransh 3102
          unsetSe();
412 ashish 3103
        } else {
648 chandransh 3104
          setSe((LogisticsServiceException)value);
412 ashish 3105
        }
3106
        break;
3107
 
3108
      }
3109
    }
3110
 
3111
    public void setFieldValue(int fieldID, Object value) {
3112
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3113
    }
3114
 
3115
    public Object getFieldValue(_Fields field) {
3116
      switch (field) {
648 chandransh 3117
      case SUCCESS:
3118
        return getSuccess();
412 ashish 3119
 
648 chandransh 3120
      case SE:
3121
        return getSe();
412 ashish 3122
 
3123
      }
3124
      throw new IllegalStateException();
3125
    }
3126
 
3127
    public Object getFieldValue(int fieldId) {
3128
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3129
    }
3130
 
3131
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3132
    public boolean isSet(_Fields field) {
3133
      switch (field) {
648 chandransh 3134
      case SUCCESS:
3135
        return isSetSuccess();
3136
      case SE:
3137
        return isSetSe();
412 ashish 3138
      }
3139
      throw new IllegalStateException();
3140
    }
3141
 
3142
    public boolean isSet(int fieldID) {
3143
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3144
    }
3145
 
3146
    @Override
3147
    public boolean equals(Object that) {
3148
      if (that == null)
3149
        return false;
648 chandransh 3150
      if (that instanceof getLogisticsInfo_result)
3151
        return this.equals((getLogisticsInfo_result)that);
412 ashish 3152
      return false;
3153
    }
3154
 
648 chandransh 3155
    public boolean equals(getLogisticsInfo_result that) {
412 ashish 3156
      if (that == null)
3157
        return false;
3158
 
648 chandransh 3159
      boolean this_present_success = true && this.isSetSuccess();
3160
      boolean that_present_success = true && that.isSetSuccess();
3161
      if (this_present_success || that_present_success) {
3162
        if (!(this_present_success && that_present_success))
412 ashish 3163
          return false;
648 chandransh 3164
        if (!this.success.equals(that.success))
412 ashish 3165
          return false;
3166
      }
3167
 
648 chandransh 3168
      boolean this_present_se = true && this.isSetSe();
3169
      boolean that_present_se = true && that.isSetSe();
3170
      if (this_present_se || that_present_se) {
3171
        if (!(this_present_se && that_present_se))
412 ashish 3172
          return false;
648 chandransh 3173
        if (!this.se.equals(that.se))
412 ashish 3174
          return false;
3175
      }
3176
 
3177
      return true;
3178
    }
3179
 
3180
    @Override
3181
    public int hashCode() {
3182
      return 0;
3183
    }
3184
 
648 chandransh 3185
    public int compareTo(getLogisticsInfo_result other) {
412 ashish 3186
      if (!getClass().equals(other.getClass())) {
3187
        return getClass().getName().compareTo(other.getClass().getName());
3188
      }
3189
 
3190
      int lastComparison = 0;
648 chandransh 3191
      getLogisticsInfo_result typedOther = (getLogisticsInfo_result)other;
412 ashish 3192
 
648 chandransh 3193
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
412 ashish 3194
      if (lastComparison != 0) {
3195
        return lastComparison;
3196
      }
648 chandransh 3197
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
412 ashish 3198
      if (lastComparison != 0) {
3199
        return lastComparison;
3200
      }
648 chandransh 3201
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
412 ashish 3202
      if (lastComparison != 0) {
3203
        return lastComparison;
3204
      }
648 chandransh 3205
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
412 ashish 3206
      if (lastComparison != 0) {
3207
        return lastComparison;
3208
      }
3209
      return 0;
3210
    }
3211
 
3212
    public void read(TProtocol iprot) throws TException {
3213
      TField field;
3214
      iprot.readStructBegin();
3215
      while (true)
3216
      {
3217
        field = iprot.readFieldBegin();
3218
        if (field.type == TType.STOP) { 
3219
          break;
3220
        }
3221
        _Fields fieldId = _Fields.findByThriftId(field.id);
3222
        if (fieldId == null) {
3223
          TProtocolUtil.skip(iprot, field.type);
3224
        } else {
3225
          switch (fieldId) {
648 chandransh 3226
            case SUCCESS:
3227
              if (field.type == TType.STRUCT) {
3228
                this.success = new LogisticsInfo();
3229
                this.success.read(iprot);
412 ashish 3230
              } else { 
3231
                TProtocolUtil.skip(iprot, field.type);
3232
              }
3233
              break;
648 chandransh 3234
            case SE:
3235
              if (field.type == TType.STRUCT) {
3236
                this.se = new LogisticsServiceException();
3237
                this.se.read(iprot);
412 ashish 3238
              } else { 
3239
                TProtocolUtil.skip(iprot, field.type);
3240
              }
3241
              break;
3242
          }
3243
          iprot.readFieldEnd();
3244
        }
3245
      }
3246
      iprot.readStructEnd();
3247
      validate();
3248
    }
3249
 
3250
    public void write(TProtocol oprot) throws TException {
648 chandransh 3251
      oprot.writeStructBegin(STRUCT_DESC);
412 ashish 3252
 
648 chandransh 3253
      if (this.isSetSuccess()) {
3254
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3255
        this.success.write(oprot);
412 ashish 3256
        oprot.writeFieldEnd();
648 chandransh 3257
      } else if (this.isSetSe()) {
3258
        oprot.writeFieldBegin(SE_FIELD_DESC);
3259
        this.se.write(oprot);
3260
        oprot.writeFieldEnd();
412 ashish 3261
      }
3262
      oprot.writeFieldStop();
3263
      oprot.writeStructEnd();
3264
    }
3265
 
3266
    @Override
3267
    public String toString() {
648 chandransh 3268
      StringBuilder sb = new StringBuilder("getLogisticsInfo_result(");
412 ashish 3269
      boolean first = true;
3270
 
648 chandransh 3271
      sb.append("success:");
3272
      if (this.success == null) {
412 ashish 3273
        sb.append("null");
3274
      } else {
648 chandransh 3275
        sb.append(this.success);
412 ashish 3276
      }
3277
      first = false;
3278
      if (!first) sb.append(", ");
648 chandransh 3279
      sb.append("se:");
3280
      if (this.se == null) {
3281
        sb.append("null");
3282
      } else {
3283
        sb.append(this.se);
3284
      }
412 ashish 3285
      first = false;
3286
      sb.append(")");
3287
      return sb.toString();
3288
    }
3289
 
3290
    public void validate() throws TException {
3291
      // check for required fields
3292
    }
3293
 
3294
  }
3295
 
3296
  public static class getEmptyAWB_args implements TBase<getEmptyAWB_args._Fields>, java.io.Serializable, Cloneable, Comparable<getEmptyAWB_args>   {
3297
    private static final TStruct STRUCT_DESC = new TStruct("getEmptyAWB_args");
3298
 
648 chandransh 3299
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
412 ashish 3300
 
648 chandransh 3301
    private long providerId;
412 ashish 3302
 
3303
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3304
    public enum _Fields implements TFieldIdEnum {
648 chandransh 3305
      PROVIDER_ID((short)1, "providerId");
412 ashish 3306
 
3307
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3308
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3309
 
3310
      static {
3311
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3312
          byId.put((int)field._thriftId, field);
3313
          byName.put(field.getFieldName(), field);
3314
        }
3315
      }
3316
 
3317
      /**
3318
       * Find the _Fields constant that matches fieldId, or null if its not found.
3319
       */
3320
      public static _Fields findByThriftId(int fieldId) {
3321
        return byId.get(fieldId);
3322
      }
3323
 
3324
      /**
3325
       * Find the _Fields constant that matches fieldId, throwing an exception
3326
       * if it is not found.
3327
       */
3328
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3329
        _Fields fields = findByThriftId(fieldId);
3330
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3331
        return fields;
3332
      }
3333
 
3334
      /**
3335
       * Find the _Fields constant that matches name, or null if its not found.
3336
       */
3337
      public static _Fields findByName(String name) {
3338
        return byName.get(name);
3339
      }
3340
 
3341
      private final short _thriftId;
3342
      private final String _fieldName;
3343
 
3344
      _Fields(short thriftId, String fieldName) {
3345
        _thriftId = thriftId;
3346
        _fieldName = fieldName;
3347
      }
3348
 
3349
      public short getThriftFieldId() {
3350
        return _thriftId;
3351
      }
3352
 
3353
      public String getFieldName() {
3354
        return _fieldName;
3355
      }
3356
    }
3357
 
3358
    // isset id assignments
648 chandransh 3359
    private static final int __PROVIDERID_ISSET_ID = 0;
412 ashish 3360
    private BitSet __isset_bit_vector = new BitSet(1);
3361
 
3362
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
648 chandransh 3363
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
412 ashish 3364
          new FieldValueMetaData(TType.I64)));
3365
    }});
3366
 
3367
    static {
3368
      FieldMetaData.addStructMetaDataMap(getEmptyAWB_args.class, metaDataMap);
3369
    }
3370
 
3371
    public getEmptyAWB_args() {
3372
    }
3373
 
3374
    public getEmptyAWB_args(
648 chandransh 3375
      long providerId)
412 ashish 3376
    {
3377
      this();
648 chandransh 3378
      this.providerId = providerId;
3379
      setProviderIdIsSet(true);
412 ashish 3380
    }
3381
 
3382
    /**
3383
     * Performs a deep copy on <i>other</i>.
3384
     */
3385
    public getEmptyAWB_args(getEmptyAWB_args other) {
3386
      __isset_bit_vector.clear();
3387
      __isset_bit_vector.or(other.__isset_bit_vector);
648 chandransh 3388
      this.providerId = other.providerId;
412 ashish 3389
    }
3390
 
3391
    public getEmptyAWB_args deepCopy() {
3392
      return new getEmptyAWB_args(this);
3393
    }
3394
 
3395
    @Deprecated
3396
    public getEmptyAWB_args clone() {
3397
      return new getEmptyAWB_args(this);
3398
    }
3399
 
648 chandransh 3400
    public long getProviderId() {
3401
      return this.providerId;
412 ashish 3402
    }
3403
 
648 chandransh 3404
    public getEmptyAWB_args setProviderId(long providerId) {
3405
      this.providerId = providerId;
3406
      setProviderIdIsSet(true);
412 ashish 3407
      return this;
3408
    }
3409
 
648 chandransh 3410
    public void unsetProviderId() {
3411
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
412 ashish 3412
    }
3413
 
648 chandransh 3414
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
3415
    public boolean isSetProviderId() {
3416
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
412 ashish 3417
    }
3418
 
648 chandransh 3419
    public void setProviderIdIsSet(boolean value) {
3420
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
412 ashish 3421
    }
3422
 
3423
    public void setFieldValue(_Fields field, Object value) {
3424
      switch (field) {
3425
      case PROVIDER_ID:
3426
        if (value == null) {
648 chandransh 3427
          unsetProviderId();
412 ashish 3428
        } else {
648 chandransh 3429
          setProviderId((Long)value);
412 ashish 3430
        }
3431
        break;
3432
 
3433
      }
3434
    }
3435
 
3436
    public void setFieldValue(int fieldID, Object value) {
3437
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3438
    }
3439
 
3440
    public Object getFieldValue(_Fields field) {
3441
      switch (field) {
3442
      case PROVIDER_ID:
648 chandransh 3443
        return new Long(getProviderId());
412 ashish 3444
 
3445
      }
3446
      throw new IllegalStateException();
3447
    }
3448
 
3449
    public Object getFieldValue(int fieldId) {
3450
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3451
    }
3452
 
3453
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3454
    public boolean isSet(_Fields field) {
3455
      switch (field) {
3456
      case PROVIDER_ID:
648 chandransh 3457
        return isSetProviderId();
412 ashish 3458
      }
3459
      throw new IllegalStateException();
3460
    }
3461
 
3462
    public boolean isSet(int fieldID) {
3463
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3464
    }
3465
 
3466
    @Override
3467
    public boolean equals(Object that) {
3468
      if (that == null)
3469
        return false;
3470
      if (that instanceof getEmptyAWB_args)
3471
        return this.equals((getEmptyAWB_args)that);
3472
      return false;
3473
    }
3474
 
3475
    public boolean equals(getEmptyAWB_args that) {
3476
      if (that == null)
3477
        return false;
3478
 
648 chandransh 3479
      boolean this_present_providerId = true;
3480
      boolean that_present_providerId = true;
3481
      if (this_present_providerId || that_present_providerId) {
3482
        if (!(this_present_providerId && that_present_providerId))
412 ashish 3483
          return false;
648 chandransh 3484
        if (this.providerId != that.providerId)
412 ashish 3485
          return false;
3486
      }
3487
 
3488
      return true;
3489
    }
3490
 
3491
    @Override
3492
    public int hashCode() {
3493
      return 0;
3494
    }
3495
 
3496
    public int compareTo(getEmptyAWB_args other) {
3497
      if (!getClass().equals(other.getClass())) {
3498
        return getClass().getName().compareTo(other.getClass().getName());
3499
      }
3500
 
3501
      int lastComparison = 0;
3502
      getEmptyAWB_args typedOther = (getEmptyAWB_args)other;
3503
 
648 chandransh 3504
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
412 ashish 3505
      if (lastComparison != 0) {
3506
        return lastComparison;
3507
      }
648 chandransh 3508
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
412 ashish 3509
      if (lastComparison != 0) {
3510
        return lastComparison;
3511
      }
3512
      return 0;
3513
    }
3514
 
3515
    public void read(TProtocol iprot) throws TException {
3516
      TField field;
3517
      iprot.readStructBegin();
3518
      while (true)
3519
      {
3520
        field = iprot.readFieldBegin();
3521
        if (field.type == TType.STOP) { 
3522
          break;
3523
        }
3524
        _Fields fieldId = _Fields.findByThriftId(field.id);
3525
        if (fieldId == null) {
3526
          TProtocolUtil.skip(iprot, field.type);
3527
        } else {
3528
          switch (fieldId) {
3529
            case PROVIDER_ID:
3530
              if (field.type == TType.I64) {
648 chandransh 3531
                this.providerId = iprot.readI64();
3532
                setProviderIdIsSet(true);
412 ashish 3533
              } else { 
3534
                TProtocolUtil.skip(iprot, field.type);
3535
              }
3536
              break;
3537
          }
3538
          iprot.readFieldEnd();
3539
        }
3540
      }
3541
      iprot.readStructEnd();
3542
      validate();
3543
    }
3544
 
3545
    public void write(TProtocol oprot) throws TException {
3546
      validate();
3547
 
3548
      oprot.writeStructBegin(STRUCT_DESC);
3549
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
648 chandransh 3550
      oprot.writeI64(this.providerId);
412 ashish 3551
      oprot.writeFieldEnd();
3552
      oprot.writeFieldStop();
3553
      oprot.writeStructEnd();
3554
    }
3555
 
3556
    @Override
3557
    public String toString() {
3558
      StringBuilder sb = new StringBuilder("getEmptyAWB_args(");
3559
      boolean first = true;
3560
 
648 chandransh 3561
      sb.append("providerId:");
3562
      sb.append(this.providerId);
412 ashish 3563
      first = false;
3564
      sb.append(")");
3565
      return sb.toString();
3566
    }
3567
 
3568
    public void validate() throws TException {
3569
      // check for required fields
3570
    }
3571
 
3572
  }
3573
 
3574
  public static class getEmptyAWB_result implements TBase<getEmptyAWB_result._Fields>, java.io.Serializable, Cloneable, Comparable<getEmptyAWB_result>   {
3575
    private static final TStruct STRUCT_DESC = new TStruct("getEmptyAWB_result");
3576
 
3577
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
648 chandransh 3578
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
412 ashish 3579
 
3580
    private String success;
648 chandransh 3581
    private LogisticsServiceException se;
412 ashish 3582
 
3583
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3584
    public enum _Fields implements TFieldIdEnum {
648 chandransh 3585
      SUCCESS((short)0, "success"),
3586
      SE((short)1, "se");
412 ashish 3587
 
3588
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3589
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3590
 
3591
      static {
3592
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3593
          byId.put((int)field._thriftId, field);
3594
          byName.put(field.getFieldName(), field);
3595
        }
3596
      }
3597
 
3598
      /**
3599
       * Find the _Fields constant that matches fieldId, or null if its not found.
3600
       */
3601
      public static _Fields findByThriftId(int fieldId) {
3602
        return byId.get(fieldId);
3603
      }
3604
 
3605
      /**
3606
       * Find the _Fields constant that matches fieldId, throwing an exception
3607
       * if it is not found.
3608
       */
3609
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3610
        _Fields fields = findByThriftId(fieldId);
3611
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3612
        return fields;
3613
      }
3614
 
3615
      /**
3616
       * Find the _Fields constant that matches name, or null if its not found.
3617
       */
3618
      public static _Fields findByName(String name) {
3619
        return byName.get(name);
3620
      }
3621
 
3622
      private final short _thriftId;
3623
      private final String _fieldName;
3624
 
3625
      _Fields(short thriftId, String fieldName) {
3626
        _thriftId = thriftId;
3627
        _fieldName = fieldName;
3628
      }
3629
 
3630
      public short getThriftFieldId() {
3631
        return _thriftId;
3632
      }
3633
 
3634
      public String getFieldName() {
3635
        return _fieldName;
3636
      }
3637
    }
3638
 
3639
    // isset id assignments
3640
 
3641
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3642
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3643
          new FieldValueMetaData(TType.STRING)));
648 chandransh 3644
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
3645
          new FieldValueMetaData(TType.STRUCT)));
412 ashish 3646
    }});
3647
 
3648
    static {
3649
      FieldMetaData.addStructMetaDataMap(getEmptyAWB_result.class, metaDataMap);
3650
    }
3651
 
3652
    public getEmptyAWB_result() {
3653
    }
3654
 
3655
    public getEmptyAWB_result(
648 chandransh 3656
      String success,
3657
      LogisticsServiceException se)
412 ashish 3658
    {
3659
      this();
3660
      this.success = success;
648 chandransh 3661
      this.se = se;
412 ashish 3662
    }
3663
 
3664
    /**
3665
     * Performs a deep copy on <i>other</i>.
3666
     */
3667
    public getEmptyAWB_result(getEmptyAWB_result other) {
3668
      if (other.isSetSuccess()) {
3669
        this.success = other.success;
3670
      }
648 chandransh 3671
      if (other.isSetSe()) {
3672
        this.se = new LogisticsServiceException(other.se);
3673
      }
412 ashish 3674
    }
3675
 
3676
    public getEmptyAWB_result deepCopy() {
3677
      return new getEmptyAWB_result(this);
3678
    }
3679
 
3680
    @Deprecated
3681
    public getEmptyAWB_result clone() {
3682
      return new getEmptyAWB_result(this);
3683
    }
3684
 
3685
    public String getSuccess() {
3686
      return this.success;
3687
    }
3688
 
3689
    public getEmptyAWB_result setSuccess(String success) {
3690
      this.success = success;
3691
      return this;
3692
    }
3693
 
3694
    public void unsetSuccess() {
3695
      this.success = null;
3696
    }
3697
 
3698
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3699
    public boolean isSetSuccess() {
3700
      return this.success != null;
3701
    }
3702
 
3703
    public void setSuccessIsSet(boolean value) {
3704
      if (!value) {
3705
        this.success = null;
3706
      }
3707
    }
3708
 
648 chandransh 3709
    public LogisticsServiceException getSe() {
3710
      return this.se;
412 ashish 3711
    }
3712
 
648 chandransh 3713
    public getEmptyAWB_result setSe(LogisticsServiceException se) {
3714
      this.se = se;
412 ashish 3715
      return this;
3716
    }
3717
 
648 chandransh 3718
    public void unsetSe() {
3719
      this.se = null;
412 ashish 3720
    }
3721
 
648 chandransh 3722
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
3723
    public boolean isSetSe() {
3724
      return this.se != null;
412 ashish 3725
    }
3726
 
648 chandransh 3727
    public void setSeIsSet(boolean value) {
412 ashish 3728
      if (!value) {
648 chandransh 3729
        this.se = null;
412 ashish 3730
      }
3731
    }
3732
 
3733
    public void setFieldValue(_Fields field, Object value) {
3734
      switch (field) {
3735
      case SUCCESS:
3736
        if (value == null) {
3737
          unsetSuccess();
3738
        } else {
648 chandransh 3739
          setSuccess((String)value);
412 ashish 3740
        }
3741
        break;
3742
 
648 chandransh 3743
      case SE:
3744
        if (value == null) {
3745
          unsetSe();
3746
        } else {
3747
          setSe((LogisticsServiceException)value);
3748
        }
3749
        break;
3750
 
412 ashish 3751
      }
3752
    }
3753
 
3754
    public void setFieldValue(int fieldID, Object value) {
3755
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3756
    }
3757
 
3758
    public Object getFieldValue(_Fields field) {
3759
      switch (field) {
3760
      case SUCCESS:
3761
        return getSuccess();
3762
 
648 chandransh 3763
      case SE:
3764
        return getSe();
3765
 
412 ashish 3766
      }
3767
      throw new IllegalStateException();
3768
    }
3769
 
3770
    public Object getFieldValue(int fieldId) {
3771
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3772
    }
3773
 
3774
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3775
    public boolean isSet(_Fields field) {
3776
      switch (field) {
3777
      case SUCCESS:
3778
        return isSetSuccess();
648 chandransh 3779
      case SE:
3780
        return isSetSe();
412 ashish 3781
      }
3782
      throw new IllegalStateException();
3783
    }
3784
 
3785
    public boolean isSet(int fieldID) {
3786
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3787
    }
3788
 
3789
    @Override
3790
    public boolean equals(Object that) {
3791
      if (that == null)
3792
        return false;
648 chandransh 3793
      if (that instanceof getEmptyAWB_result)
3794
        return this.equals((getEmptyAWB_result)that);
412 ashish 3795
      return false;
3796
    }
3797
 
648 chandransh 3798
    public boolean equals(getEmptyAWB_result that) {
412 ashish 3799
      if (that == null)
3800
        return false;
3801
 
3802
      boolean this_present_success = true && this.isSetSuccess();
3803
      boolean that_present_success = true && that.isSetSuccess();
3804
      if (this_present_success || that_present_success) {
3805
        if (!(this_present_success && that_present_success))
3806
          return false;
3807
        if (!this.success.equals(that.success))
3808
          return false;
3809
      }
3810
 
648 chandransh 3811
      boolean this_present_se = true && this.isSetSe();
3812
      boolean that_present_se = true && that.isSetSe();
3813
      if (this_present_se || that_present_se) {
3814
        if (!(this_present_se && that_present_se))
3815
          return false;
3816
        if (!this.se.equals(that.se))
3817
          return false;
3818
      }
3819
 
412 ashish 3820
      return true;
3821
    }
3822
 
3823
    @Override
3824
    public int hashCode() {
3825
      return 0;
3826
    }
3827
 
648 chandransh 3828
    public int compareTo(getEmptyAWB_result other) {
412 ashish 3829
      if (!getClass().equals(other.getClass())) {
3830
        return getClass().getName().compareTo(other.getClass().getName());
3831
      }
3832
 
3833
      int lastComparison = 0;
648 chandransh 3834
      getEmptyAWB_result typedOther = (getEmptyAWB_result)other;
412 ashish 3835
 
3836
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3837
      if (lastComparison != 0) {
3838
        return lastComparison;
3839
      }
3840
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3841
      if (lastComparison != 0) {
3842
        return lastComparison;
3843
      }
648 chandransh 3844
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
412 ashish 3845
      if (lastComparison != 0) {
3846
        return lastComparison;
3847
      }
648 chandransh 3848
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
412 ashish 3849
      if (lastComparison != 0) {
3850
        return lastComparison;
3851
      }
3852
      return 0;
3853
    }
3854
 
3855
    public void read(TProtocol iprot) throws TException {
3856
      TField field;
3857
      iprot.readStructBegin();
3858
      while (true)
3859
      {
3860
        field = iprot.readFieldBegin();
3861
        if (field.type == TType.STOP) { 
3862
          break;
3863
        }
3864
        _Fields fieldId = _Fields.findByThriftId(field.id);
3865
        if (fieldId == null) {
3866
          TProtocolUtil.skip(iprot, field.type);
3867
        } else {
3868
          switch (fieldId) {
648 chandransh 3869
            case SUCCESS:
3870
              if (field.type == TType.STRING) {
3871
                this.success = iprot.readString();
412 ashish 3872
              } else { 
3873
                TProtocolUtil.skip(iprot, field.type);
3874
              }
3875
              break;
648 chandransh 3876
            case SE:
412 ashish 3877
              if (field.type == TType.STRUCT) {
648 chandransh 3878
                this.se = new LogisticsServiceException();
3879
                this.se.read(iprot);
412 ashish 3880
              } else { 
3881
                TProtocolUtil.skip(iprot, field.type);
3882
              }
3883
              break;
3884
          }
3885
          iprot.readFieldEnd();
3886
        }
3887
      }
3888
      iprot.readStructEnd();
3889
      validate();
3890
    }
3891
 
3892
    public void write(TProtocol oprot) throws TException {
3893
      oprot.writeStructBegin(STRUCT_DESC);
3894
 
3895
      if (this.isSetSuccess()) {
3896
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
648 chandransh 3897
        oprot.writeString(this.success);
412 ashish 3898
        oprot.writeFieldEnd();
648 chandransh 3899
      } else if (this.isSetSe()) {
3900
        oprot.writeFieldBegin(SE_FIELD_DESC);
3901
        this.se.write(oprot);
3902
        oprot.writeFieldEnd();
412 ashish 3903
      }
3904
      oprot.writeFieldStop();
3905
      oprot.writeStructEnd();
3906
    }
3907
 
3908
    @Override
3909
    public String toString() {
648 chandransh 3910
      StringBuilder sb = new StringBuilder("getEmptyAWB_result(");
412 ashish 3911
      boolean first = true;
3912
 
3913
      sb.append("success:");
3914
      if (this.success == null) {
3915
        sb.append("null");
3916
      } else {
3917
        sb.append(this.success);
3918
      }
3919
      first = false;
648 chandransh 3920
      if (!first) sb.append(", ");
3921
      sb.append("se:");
3922
      if (this.se == null) {
442 rajveer 3923
        sb.append("null");
3924
      } else {
648 chandransh 3925
        sb.append(this.se);
442 rajveer 3926
      }
3927
      first = false;
3928
      sb.append(")");
3929
      return sb.toString();
3930
    }
3931
 
3932
    public void validate() throws TException {
3933
      // check for required fields
3934
    }
3935
 
3936
  }
3937
 
648 chandransh 3938
  public static class getShipmentInfo_args implements TBase<getShipmentInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getShipmentInfo_args>   {
3939
    private static final TStruct STRUCT_DESC = new TStruct("getShipmentInfo_args");
442 rajveer 3940
 
3941
    private static final TField AWB_FIELD_DESC = new TField("awb", TType.STRING, (short)1);
648 chandransh 3942
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
442 rajveer 3943
 
3944
    private String awb;
648 chandransh 3945
    private long providerId;
442 rajveer 3946
 
3947
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3948
    public enum _Fields implements TFieldIdEnum {
3949
      AWB((short)1, "awb"),
648 chandransh 3950
      PROVIDER_ID((short)2, "providerId");
442 rajveer 3951
 
3952
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3953
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3954
 
3955
      static {
3956
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3957
          byId.put((int)field._thriftId, field);
3958
          byName.put(field.getFieldName(), field);
3959
        }
3960
      }
3961
 
3962
      /**
3963
       * Find the _Fields constant that matches fieldId, or null if its not found.
3964
       */
3965
      public static _Fields findByThriftId(int fieldId) {
3966
        return byId.get(fieldId);
3967
      }
3968
 
3969
      /**
3970
       * Find the _Fields constant that matches fieldId, throwing an exception
3971
       * if it is not found.
3972
       */
3973
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3974
        _Fields fields = findByThriftId(fieldId);
3975
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3976
        return fields;
3977
      }
3978
 
3979
      /**
3980
       * Find the _Fields constant that matches name, or null if its not found.
3981
       */
3982
      public static _Fields findByName(String name) {
3983
        return byName.get(name);
3984
      }
3985
 
3986
      private final short _thriftId;
3987
      private final String _fieldName;
3988
 
3989
      _Fields(short thriftId, String fieldName) {
3990
        _thriftId = thriftId;
3991
        _fieldName = fieldName;
3992
      }
3993
 
3994
      public short getThriftFieldId() {
3995
        return _thriftId;
3996
      }
3997
 
3998
      public String getFieldName() {
3999
        return _fieldName;
4000
      }
4001
    }
4002
 
4003
    // isset id assignments
648 chandransh 4004
    private static final int __PROVIDERID_ISSET_ID = 0;
4005
    private BitSet __isset_bit_vector = new BitSet(1);
442 rajveer 4006
 
4007
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4008
      put(_Fields.AWB, new FieldMetaData("awb", TFieldRequirementType.DEFAULT, 
4009
          new FieldValueMetaData(TType.STRING)));
648 chandransh 4010
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
4011
          new FieldValueMetaData(TType.I64)));
442 rajveer 4012
    }});
4013
 
4014
    static {
648 chandransh 4015
      FieldMetaData.addStructMetaDataMap(getShipmentInfo_args.class, metaDataMap);
442 rajveer 4016
    }
4017
 
648 chandransh 4018
    public getShipmentInfo_args() {
442 rajveer 4019
    }
4020
 
648 chandransh 4021
    public getShipmentInfo_args(
442 rajveer 4022
      String awb,
648 chandransh 4023
      long providerId)
442 rajveer 4024
    {
4025
      this();
4026
      this.awb = awb;
648 chandransh 4027
      this.providerId = providerId;
4028
      setProviderIdIsSet(true);
442 rajveer 4029
    }
4030
 
4031
    /**
4032
     * Performs a deep copy on <i>other</i>.
4033
     */
648 chandransh 4034
    public getShipmentInfo_args(getShipmentInfo_args other) {
4035
      __isset_bit_vector.clear();
4036
      __isset_bit_vector.or(other.__isset_bit_vector);
442 rajveer 4037
      if (other.isSetAwb()) {
4038
        this.awb = other.awb;
4039
      }
648 chandransh 4040
      this.providerId = other.providerId;
442 rajveer 4041
    }
4042
 
648 chandransh 4043
    public getShipmentInfo_args deepCopy() {
4044
      return new getShipmentInfo_args(this);
442 rajveer 4045
    }
4046
 
4047
    @Deprecated
648 chandransh 4048
    public getShipmentInfo_args clone() {
4049
      return new getShipmentInfo_args(this);
442 rajveer 4050
    }
4051
 
4052
    public String getAwb() {
4053
      return this.awb;
4054
    }
4055
 
648 chandransh 4056
    public getShipmentInfo_args setAwb(String awb) {
442 rajveer 4057
      this.awb = awb;
4058
      return this;
4059
    }
4060
 
4061
    public void unsetAwb() {
4062
      this.awb = null;
4063
    }
4064
 
4065
    /** Returns true if field awb is set (has been asigned a value) and false otherwise */
4066
    public boolean isSetAwb() {
4067
      return this.awb != null;
4068
    }
4069
 
4070
    public void setAwbIsSet(boolean value) {
4071
      if (!value) {
4072
        this.awb = null;
4073
      }
4074
    }
4075
 
648 chandransh 4076
    public long getProviderId() {
4077
      return this.providerId;
442 rajveer 4078
    }
4079
 
648 chandransh 4080
    public getShipmentInfo_args setProviderId(long providerId) {
4081
      this.providerId = providerId;
4082
      setProviderIdIsSet(true);
442 rajveer 4083
      return this;
4084
    }
4085
 
648 chandransh 4086
    public void unsetProviderId() {
4087
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
442 rajveer 4088
    }
4089
 
648 chandransh 4090
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
4091
    public boolean isSetProviderId() {
4092
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
442 rajveer 4093
    }
4094
 
648 chandransh 4095
    public void setProviderIdIsSet(boolean value) {
4096
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
442 rajveer 4097
    }
4098
 
4099
    public void setFieldValue(_Fields field, Object value) {
4100
      switch (field) {
4101
      case AWB:
4102
        if (value == null) {
4103
          unsetAwb();
4104
        } else {
4105
          setAwb((String)value);
4106
        }
4107
        break;
4108
 
648 chandransh 4109
      case PROVIDER_ID:
442 rajveer 4110
        if (value == null) {
648 chandransh 4111
          unsetProviderId();
442 rajveer 4112
        } else {
648 chandransh 4113
          setProviderId((Long)value);
442 rajveer 4114
        }
4115
        break;
4116
 
4117
      }
4118
    }
4119
 
4120
    public void setFieldValue(int fieldID, Object value) {
4121
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4122
    }
4123
 
4124
    public Object getFieldValue(_Fields field) {
4125
      switch (field) {
4126
      case AWB:
4127
        return getAwb();
4128
 
648 chandransh 4129
      case PROVIDER_ID:
4130
        return new Long(getProviderId());
442 rajveer 4131
 
4132
      }
4133
      throw new IllegalStateException();
4134
    }
4135
 
4136
    public Object getFieldValue(int fieldId) {
4137
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4138
    }
4139
 
4140
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4141
    public boolean isSet(_Fields field) {
4142
      switch (field) {
4143
      case AWB:
4144
        return isSetAwb();
648 chandransh 4145
      case PROVIDER_ID:
4146
        return isSetProviderId();
442 rajveer 4147
      }
4148
      throw new IllegalStateException();
4149
    }
4150
 
4151
    public boolean isSet(int fieldID) {
4152
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4153
    }
4154
 
4155
    @Override
4156
    public boolean equals(Object that) {
4157
      if (that == null)
4158
        return false;
648 chandransh 4159
      if (that instanceof getShipmentInfo_args)
4160
        return this.equals((getShipmentInfo_args)that);
442 rajveer 4161
      return false;
4162
    }
4163
 
648 chandransh 4164
    public boolean equals(getShipmentInfo_args that) {
442 rajveer 4165
      if (that == null)
4166
        return false;
4167
 
4168
      boolean this_present_awb = true && this.isSetAwb();
4169
      boolean that_present_awb = true && that.isSetAwb();
4170
      if (this_present_awb || that_present_awb) {
4171
        if (!(this_present_awb && that_present_awb))
4172
          return false;
4173
        if (!this.awb.equals(that.awb))
4174
          return false;
4175
      }
4176
 
648 chandransh 4177
      boolean this_present_providerId = true;
4178
      boolean that_present_providerId = true;
4179
      if (this_present_providerId || that_present_providerId) {
4180
        if (!(this_present_providerId && that_present_providerId))
442 rajveer 4181
          return false;
648 chandransh 4182
        if (this.providerId != that.providerId)
442 rajveer 4183
          return false;
4184
      }
4185
 
4186
      return true;
4187
    }
4188
 
4189
    @Override
4190
    public int hashCode() {
4191
      return 0;
4192
    }
4193
 
648 chandransh 4194
    public int compareTo(getShipmentInfo_args other) {
442 rajveer 4195
      if (!getClass().equals(other.getClass())) {
4196
        return getClass().getName().compareTo(other.getClass().getName());
4197
      }
4198
 
4199
      int lastComparison = 0;
648 chandransh 4200
      getShipmentInfo_args typedOther = (getShipmentInfo_args)other;
442 rajveer 4201
 
4202
      lastComparison = Boolean.valueOf(isSetAwb()).compareTo(isSetAwb());
4203
      if (lastComparison != 0) {
4204
        return lastComparison;
4205
      }
4206
      lastComparison = TBaseHelper.compareTo(awb, typedOther.awb);
4207
      if (lastComparison != 0) {
4208
        return lastComparison;
4209
      }
648 chandransh 4210
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
442 rajveer 4211
      if (lastComparison != 0) {
4212
        return lastComparison;
4213
      }
648 chandransh 4214
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
442 rajveer 4215
      if (lastComparison != 0) {
4216
        return lastComparison;
4217
      }
4218
      return 0;
4219
    }
4220
 
4221
    public void read(TProtocol iprot) throws TException {
4222
      TField field;
4223
      iprot.readStructBegin();
4224
      while (true)
4225
      {
4226
        field = iprot.readFieldBegin();
4227
        if (field.type == TType.STOP) { 
4228
          break;
4229
        }
4230
        _Fields fieldId = _Fields.findByThriftId(field.id);
4231
        if (fieldId == null) {
4232
          TProtocolUtil.skip(iprot, field.type);
4233
        } else {
4234
          switch (fieldId) {
4235
            case AWB:
4236
              if (field.type == TType.STRING) {
4237
                this.awb = iprot.readString();
4238
              } else { 
4239
                TProtocolUtil.skip(iprot, field.type);
4240
              }
4241
              break;
648 chandransh 4242
            case PROVIDER_ID:
4243
              if (field.type == TType.I64) {
4244
                this.providerId = iprot.readI64();
4245
                setProviderIdIsSet(true);
442 rajveer 4246
              } else { 
4247
                TProtocolUtil.skip(iprot, field.type);
4248
              }
4249
              break;
4250
          }
4251
          iprot.readFieldEnd();
4252
        }
4253
      }
4254
      iprot.readStructEnd();
4255
      validate();
4256
    }
4257
 
4258
    public void write(TProtocol oprot) throws TException {
4259
      validate();
4260
 
4261
      oprot.writeStructBegin(STRUCT_DESC);
4262
      if (this.awb != null) {
4263
        oprot.writeFieldBegin(AWB_FIELD_DESC);
4264
        oprot.writeString(this.awb);
4265
        oprot.writeFieldEnd();
4266
      }
648 chandransh 4267
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
4268
      oprot.writeI64(this.providerId);
4269
      oprot.writeFieldEnd();
442 rajveer 4270
      oprot.writeFieldStop();
4271
      oprot.writeStructEnd();
4272
    }
4273
 
4274
    @Override
4275
    public String toString() {
648 chandransh 4276
      StringBuilder sb = new StringBuilder("getShipmentInfo_args(");
442 rajveer 4277
      boolean first = true;
4278
 
4279
      sb.append("awb:");
4280
      if (this.awb == null) {
4281
        sb.append("null");
4282
      } else {
4283
        sb.append(this.awb);
4284
      }
4285
      first = false;
4286
      if (!first) sb.append(", ");
648 chandransh 4287
      sb.append("providerId:");
4288
      sb.append(this.providerId);
442 rajveer 4289
      first = false;
4290
      sb.append(")");
4291
      return sb.toString();
4292
    }
4293
 
4294
    public void validate() throws TException {
4295
      // check for required fields
4296
    }
4297
 
4298
  }
4299
 
412 ashish 4300
  public static class getShipmentInfo_result implements TBase<getShipmentInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getShipmentInfo_result>   {
4301
    private static final TStruct STRUCT_DESC = new TStruct("getShipmentInfo_result");
4302
 
648 chandransh 4303
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4304
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
412 ashish 4305
 
648 chandransh 4306
    private List<AwbUpdate> success;
4307
    private LogisticsServiceException se;
412 ashish 4308
 
4309
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4310
    public enum _Fields implements TFieldIdEnum {
648 chandransh 4311
      SUCCESS((short)0, "success"),
4312
      SE((short)1, "se");
412 ashish 4313
 
4314
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4315
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4316
 
4317
      static {
4318
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4319
          byId.put((int)field._thriftId, field);
4320
          byName.put(field.getFieldName(), field);
4321
        }
4322
      }
4323
 
4324
      /**
4325
       * Find the _Fields constant that matches fieldId, or null if its not found.
4326
       */
4327
      public static _Fields findByThriftId(int fieldId) {
4328
        return byId.get(fieldId);
4329
      }
4330
 
4331
      /**
4332
       * Find the _Fields constant that matches fieldId, throwing an exception
4333
       * if it is not found.
4334
       */
4335
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4336
        _Fields fields = findByThriftId(fieldId);
4337
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4338
        return fields;
4339
      }
4340
 
4341
      /**
4342
       * Find the _Fields constant that matches name, or null if its not found.
4343
       */
4344
      public static _Fields findByName(String name) {
4345
        return byName.get(name);
4346
      }
4347
 
4348
      private final short _thriftId;
4349
      private final String _fieldName;
4350
 
4351
      _Fields(short thriftId, String fieldName) {
4352
        _thriftId = thriftId;
4353
        _fieldName = fieldName;
4354
      }
4355
 
4356
      public short getThriftFieldId() {
4357
        return _thriftId;
4358
      }
4359
 
4360
      public String getFieldName() {
4361
        return _fieldName;
4362
      }
4363
    }
4364
 
4365
    // isset id assignments
4366
 
4367
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4368
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
648 chandransh 4369
          new ListMetaData(TType.LIST, 
4370
              new StructMetaData(TType.STRUCT, AwbUpdate.class))));
4371
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
4372
          new FieldValueMetaData(TType.STRUCT)));
412 ashish 4373
    }});
4374
 
4375
    static {
4376
      FieldMetaData.addStructMetaDataMap(getShipmentInfo_result.class, metaDataMap);
4377
    }
4378
 
4379
    public getShipmentInfo_result() {
4380
    }
4381
 
4382
    public getShipmentInfo_result(
648 chandransh 4383
      List<AwbUpdate> success,
4384
      LogisticsServiceException se)
412 ashish 4385
    {
4386
      this();
4387
      this.success = success;
648 chandransh 4388
      this.se = se;
412 ashish 4389
    }
4390
 
4391
    /**
4392
     * Performs a deep copy on <i>other</i>.
4393
     */
4394
    public getShipmentInfo_result(getShipmentInfo_result other) {
4395
      if (other.isSetSuccess()) {
648 chandransh 4396
        List<AwbUpdate> __this__success = new ArrayList<AwbUpdate>();
4397
        for (AwbUpdate other_element : other.success) {
4398
          __this__success.add(new AwbUpdate(other_element));
4399
        }
4400
        this.success = __this__success;
412 ashish 4401
      }
648 chandransh 4402
      if (other.isSetSe()) {
4403
        this.se = new LogisticsServiceException(other.se);
4404
      }
412 ashish 4405
    }
4406
 
4407
    public getShipmentInfo_result deepCopy() {
4408
      return new getShipmentInfo_result(this);
4409
    }
4410
 
4411
    @Deprecated
4412
    public getShipmentInfo_result clone() {
4413
      return new getShipmentInfo_result(this);
4414
    }
4415
 
4416
    public int getSuccessSize() {
4417
      return (this.success == null) ? 0 : this.success.size();
4418
    }
4419
 
648 chandransh 4420
    public java.util.Iterator<AwbUpdate> getSuccessIterator() {
412 ashish 4421
      return (this.success == null) ? null : this.success.iterator();
4422
    }
4423
 
648 chandransh 4424
    public void addToSuccess(AwbUpdate elem) {
412 ashish 4425
      if (this.success == null) {
648 chandransh 4426
        this.success = new ArrayList<AwbUpdate>();
412 ashish 4427
      }
4428
      this.success.add(elem);
4429
    }
4430
 
648 chandransh 4431
    public List<AwbUpdate> getSuccess() {
412 ashish 4432
      return this.success;
4433
    }
4434
 
648 chandransh 4435
    public getShipmentInfo_result setSuccess(List<AwbUpdate> success) {
412 ashish 4436
      this.success = success;
4437
      return this;
4438
    }
4439
 
4440
    public void unsetSuccess() {
4441
      this.success = null;
4442
    }
4443
 
4444
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4445
    public boolean isSetSuccess() {
4446
      return this.success != null;
4447
    }
4448
 
4449
    public void setSuccessIsSet(boolean value) {
4450
      if (!value) {
4451
        this.success = null;
4452
      }
4453
    }
4454
 
648 chandransh 4455
    public LogisticsServiceException getSe() {
4456
      return this.se;
412 ashish 4457
    }
4458
 
648 chandransh 4459
    public getShipmentInfo_result setSe(LogisticsServiceException se) {
4460
      this.se = se;
4461
      return this;
412 ashish 4462
    }
4463
 
648 chandransh 4464
    public void unsetSe() {
4465
      this.se = null;
412 ashish 4466
    }
4467
 
648 chandransh 4468
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
4469
    public boolean isSetSe() {
4470
      return this.se != null;
412 ashish 4471
    }
4472
 
648 chandransh 4473
    public void setSeIsSet(boolean value) {
4474
      if (!value) {
4475
        this.se = null;
412 ashish 4476
      }
4477
    }
4478
 
4479
    public void setFieldValue(_Fields field, Object value) {
4480
      switch (field) {
648 chandransh 4481
      case SUCCESS:
412 ashish 4482
        if (value == null) {
648 chandransh 4483
          unsetSuccess();
412 ashish 4484
        } else {
648 chandransh 4485
          setSuccess((List<AwbUpdate>)value);
412 ashish 4486
        }
4487
        break;
4488
 
648 chandransh 4489
      case SE:
412 ashish 4490
        if (value == null) {
648 chandransh 4491
          unsetSe();
412 ashish 4492
        } else {
648 chandransh 4493
          setSe((LogisticsServiceException)value);
412 ashish 4494
        }
4495
        break;
4496
 
4497
      }
4498
    }
4499
 
4500
    public void setFieldValue(int fieldID, Object value) {
4501
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4502
    }
4503
 
4504
    public Object getFieldValue(_Fields field) {
4505
      switch (field) {
648 chandransh 4506
      case SUCCESS:
4507
        return getSuccess();
412 ashish 4508
 
648 chandransh 4509
      case SE:
4510
        return getSe();
412 ashish 4511
 
4512
      }
4513
      throw new IllegalStateException();
4514
    }
4515
 
4516
    public Object getFieldValue(int fieldId) {
4517
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4518
    }
4519
 
4520
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4521
    public boolean isSet(_Fields field) {
4522
      switch (field) {
648 chandransh 4523
      case SUCCESS:
4524
        return isSetSuccess();
4525
      case SE:
4526
        return isSetSe();
412 ashish 4527
      }
4528
      throw new IllegalStateException();
4529
    }
4530
 
4531
    public boolean isSet(int fieldID) {
4532
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4533
    }
4534
 
4535
    @Override
4536
    public boolean equals(Object that) {
4537
      if (that == null)
4538
        return false;
648 chandransh 4539
      if (that instanceof getShipmentInfo_result)
4540
        return this.equals((getShipmentInfo_result)that);
412 ashish 4541
      return false;
4542
    }
4543
 
648 chandransh 4544
    public boolean equals(getShipmentInfo_result that) {
412 ashish 4545
      if (that == null)
4546
        return false;
4547
 
648 chandransh 4548
      boolean this_present_success = true && this.isSetSuccess();
4549
      boolean that_present_success = true && that.isSetSuccess();
4550
      if (this_present_success || that_present_success) {
4551
        if (!(this_present_success && that_present_success))
412 ashish 4552
          return false;
648 chandransh 4553
        if (!this.success.equals(that.success))
412 ashish 4554
          return false;
4555
      }
4556
 
648 chandransh 4557
      boolean this_present_se = true && this.isSetSe();
4558
      boolean that_present_se = true && that.isSetSe();
4559
      if (this_present_se || that_present_se) {
4560
        if (!(this_present_se && that_present_se))
412 ashish 4561
          return false;
648 chandransh 4562
        if (!this.se.equals(that.se))
412 ashish 4563
          return false;
4564
      }
4565
 
4566
      return true;
4567
    }
4568
 
4569
    @Override
4570
    public int hashCode() {
4571
      return 0;
4572
    }
4573
 
648 chandransh 4574
    public int compareTo(getShipmentInfo_result other) {
412 ashish 4575
      if (!getClass().equals(other.getClass())) {
4576
        return getClass().getName().compareTo(other.getClass().getName());
4577
      }
4578
 
4579
      int lastComparison = 0;
648 chandransh 4580
      getShipmentInfo_result typedOther = (getShipmentInfo_result)other;
412 ashish 4581
 
648 chandransh 4582
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
412 ashish 4583
      if (lastComparison != 0) {
4584
        return lastComparison;
4585
      }
648 chandransh 4586
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
412 ashish 4587
      if (lastComparison != 0) {
4588
        return lastComparison;
4589
      }
648 chandransh 4590
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
412 ashish 4591
      if (lastComparison != 0) {
4592
        return lastComparison;
4593
      }
648 chandransh 4594
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
412 ashish 4595
      if (lastComparison != 0) {
4596
        return lastComparison;
4597
      }
4598
      return 0;
4599
    }
4600
 
4601
    public void read(TProtocol iprot) throws TException {
4602
      TField field;
4603
      iprot.readStructBegin();
4604
      while (true)
4605
      {
4606
        field = iprot.readFieldBegin();
4607
        if (field.type == TType.STOP) { 
4608
          break;
4609
        }
4610
        _Fields fieldId = _Fields.findByThriftId(field.id);
4611
        if (fieldId == null) {
4612
          TProtocolUtil.skip(iprot, field.type);
4613
        } else {
4614
          switch (fieldId) {
4615
            case SUCCESS:
4616
              if (field.type == TType.LIST) {
4617
                {
674 chandransh 4618
                  TList _list4 = iprot.readListBegin();
4619
                  this.success = new ArrayList<AwbUpdate>(_list4.size);
4620
                  for (int _i5 = 0; _i5 < _list4.size; ++_i5)
412 ashish 4621
                  {
674 chandransh 4622
                    AwbUpdate _elem6;
4623
                    _elem6 = new AwbUpdate();
4624
                    _elem6.read(iprot);
4625
                    this.success.add(_elem6);
412 ashish 4626
                  }
4627
                  iprot.readListEnd();
4628
                }
4629
              } else { 
4630
                TProtocolUtil.skip(iprot, field.type);
4631
              }
4632
              break;
648 chandransh 4633
            case SE:
4634
              if (field.type == TType.STRUCT) {
4635
                this.se = new LogisticsServiceException();
4636
                this.se.read(iprot);
4637
              } else { 
4638
                TProtocolUtil.skip(iprot, field.type);
4639
              }
4640
              break;
412 ashish 4641
          }
4642
          iprot.readFieldEnd();
4643
        }
4644
      }
4645
      iprot.readStructEnd();
4646
      validate();
4647
    }
4648
 
4649
    public void write(TProtocol oprot) throws TException {
4650
      oprot.writeStructBegin(STRUCT_DESC);
4651
 
4652
      if (this.isSetSuccess()) {
4653
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4654
        {
4655
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
674 chandransh 4656
          for (AwbUpdate _iter7 : this.success)
412 ashish 4657
          {
674 chandransh 4658
            _iter7.write(oprot);
412 ashish 4659
          }
4660
          oprot.writeListEnd();
4661
        }
4662
        oprot.writeFieldEnd();
648 chandransh 4663
      } else if (this.isSetSe()) {
4664
        oprot.writeFieldBegin(SE_FIELD_DESC);
4665
        this.se.write(oprot);
4666
        oprot.writeFieldEnd();
412 ashish 4667
      }
4668
      oprot.writeFieldStop();
4669
      oprot.writeStructEnd();
4670
    }
4671
 
4672
    @Override
4673
    public String toString() {
648 chandransh 4674
      StringBuilder sb = new StringBuilder("getShipmentInfo_result(");
412 ashish 4675
      boolean first = true;
4676
 
4677
      sb.append("success:");
4678
      if (this.success == null) {
4679
        sb.append("null");
4680
      } else {
4681
        sb.append(this.success);
4682
      }
4683
      first = false;
648 chandransh 4684
      if (!first) sb.append(", ");
4685
      sb.append("se:");
4686
      if (this.se == null) {
4687
        sb.append("null");
4688
      } else {
4689
        sb.append(this.se);
4690
      }
4691
      first = false;
412 ashish 4692
      sb.append(")");
4693
      return sb.toString();
4694
    }
4695
 
4696
    public void validate() throws TException {
4697
      // check for required fields
4698
    }
4699
 
4700
  }
4701
 
730 chandransh 4702
  public static class getDestinationCode_args implements TBase<getDestinationCode_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDestinationCode_args>   {
4703
    private static final TStruct STRUCT_DESC = new TStruct("getDestinationCode_args");
4704
 
4705
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
4706
    private static final TField PIN_CODE_FIELD_DESC = new TField("pinCode", TType.STRING, (short)2);
4707
 
4708
    private long providerId;
4709
    private String pinCode;
4710
 
4711
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4712
    public enum _Fields implements TFieldIdEnum {
4713
      PROVIDER_ID((short)1, "providerId"),
4714
      PIN_CODE((short)2, "pinCode");
4715
 
4716
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4717
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4718
 
4719
      static {
4720
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4721
          byId.put((int)field._thriftId, field);
4722
          byName.put(field.getFieldName(), field);
4723
        }
4724
      }
4725
 
4726
      /**
4727
       * Find the _Fields constant that matches fieldId, or null if its not found.
4728
       */
4729
      public static _Fields findByThriftId(int fieldId) {
4730
        return byId.get(fieldId);
4731
      }
4732
 
4733
      /**
4734
       * Find the _Fields constant that matches fieldId, throwing an exception
4735
       * if it is not found.
4736
       */
4737
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4738
        _Fields fields = findByThriftId(fieldId);
4739
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4740
        return fields;
4741
      }
4742
 
4743
      /**
4744
       * Find the _Fields constant that matches name, or null if its not found.
4745
       */
4746
      public static _Fields findByName(String name) {
4747
        return byName.get(name);
4748
      }
4749
 
4750
      private final short _thriftId;
4751
      private final String _fieldName;
4752
 
4753
      _Fields(short thriftId, String fieldName) {
4754
        _thriftId = thriftId;
4755
        _fieldName = fieldName;
4756
      }
4757
 
4758
      public short getThriftFieldId() {
4759
        return _thriftId;
4760
      }
4761
 
4762
      public String getFieldName() {
4763
        return _fieldName;
4764
      }
4765
    }
4766
 
4767
    // isset id assignments
4768
    private static final int __PROVIDERID_ISSET_ID = 0;
4769
    private BitSet __isset_bit_vector = new BitSet(1);
4770
 
4771
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4772
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
4773
          new FieldValueMetaData(TType.I64)));
4774
      put(_Fields.PIN_CODE, new FieldMetaData("pinCode", TFieldRequirementType.DEFAULT, 
4775
          new FieldValueMetaData(TType.STRING)));
4776
    }});
4777
 
4778
    static {
4779
      FieldMetaData.addStructMetaDataMap(getDestinationCode_args.class, metaDataMap);
4780
    }
4781
 
4782
    public getDestinationCode_args() {
4783
    }
4784
 
4785
    public getDestinationCode_args(
4786
      long providerId,
4787
      String pinCode)
4788
    {
4789
      this();
4790
      this.providerId = providerId;
4791
      setProviderIdIsSet(true);
4792
      this.pinCode = pinCode;
4793
    }
4794
 
4795
    /**
4796
     * Performs a deep copy on <i>other</i>.
4797
     */
4798
    public getDestinationCode_args(getDestinationCode_args other) {
4799
      __isset_bit_vector.clear();
4800
      __isset_bit_vector.or(other.__isset_bit_vector);
4801
      this.providerId = other.providerId;
4802
      if (other.isSetPinCode()) {
4803
        this.pinCode = other.pinCode;
4804
      }
4805
    }
4806
 
4807
    public getDestinationCode_args deepCopy() {
4808
      return new getDestinationCode_args(this);
4809
    }
4810
 
4811
    @Deprecated
4812
    public getDestinationCode_args clone() {
4813
      return new getDestinationCode_args(this);
4814
    }
4815
 
4816
    public long getProviderId() {
4817
      return this.providerId;
4818
    }
4819
 
4820
    public getDestinationCode_args setProviderId(long providerId) {
4821
      this.providerId = providerId;
4822
      setProviderIdIsSet(true);
4823
      return this;
4824
    }
4825
 
4826
    public void unsetProviderId() {
4827
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
4828
    }
4829
 
4830
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
4831
    public boolean isSetProviderId() {
4832
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
4833
    }
4834
 
4835
    public void setProviderIdIsSet(boolean value) {
4836
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
4837
    }
4838
 
4839
    public String getPinCode() {
4840
      return this.pinCode;
4841
    }
4842
 
4843
    public getDestinationCode_args setPinCode(String pinCode) {
4844
      this.pinCode = pinCode;
4845
      return this;
4846
    }
4847
 
4848
    public void unsetPinCode() {
4849
      this.pinCode = null;
4850
    }
4851
 
4852
    /** Returns true if field pinCode is set (has been asigned a value) and false otherwise */
4853
    public boolean isSetPinCode() {
4854
      return this.pinCode != null;
4855
    }
4856
 
4857
    public void setPinCodeIsSet(boolean value) {
4858
      if (!value) {
4859
        this.pinCode = null;
4860
      }
4861
    }
4862
 
4863
    public void setFieldValue(_Fields field, Object value) {
4864
      switch (field) {
4865
      case PROVIDER_ID:
4866
        if (value == null) {
4867
          unsetProviderId();
4868
        } else {
4869
          setProviderId((Long)value);
4870
        }
4871
        break;
4872
 
4873
      case PIN_CODE:
4874
        if (value == null) {
4875
          unsetPinCode();
4876
        } else {
4877
          setPinCode((String)value);
4878
        }
4879
        break;
4880
 
4881
      }
4882
    }
4883
 
4884
    public void setFieldValue(int fieldID, Object value) {
4885
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4886
    }
4887
 
4888
    public Object getFieldValue(_Fields field) {
4889
      switch (field) {
4890
      case PROVIDER_ID:
4891
        return new Long(getProviderId());
4892
 
4893
      case PIN_CODE:
4894
        return getPinCode();
4895
 
4896
      }
4897
      throw new IllegalStateException();
4898
    }
4899
 
4900
    public Object getFieldValue(int fieldId) {
4901
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4902
    }
4903
 
4904
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4905
    public boolean isSet(_Fields field) {
4906
      switch (field) {
4907
      case PROVIDER_ID:
4908
        return isSetProviderId();
4909
      case PIN_CODE:
4910
        return isSetPinCode();
4911
      }
4912
      throw new IllegalStateException();
4913
    }
4914
 
4915
    public boolean isSet(int fieldID) {
4916
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4917
    }
4918
 
4919
    @Override
4920
    public boolean equals(Object that) {
4921
      if (that == null)
4922
        return false;
4923
      if (that instanceof getDestinationCode_args)
4924
        return this.equals((getDestinationCode_args)that);
4925
      return false;
4926
    }
4927
 
4928
    public boolean equals(getDestinationCode_args that) {
4929
      if (that == null)
4930
        return false;
4931
 
4932
      boolean this_present_providerId = true;
4933
      boolean that_present_providerId = true;
4934
      if (this_present_providerId || that_present_providerId) {
4935
        if (!(this_present_providerId && that_present_providerId))
4936
          return false;
4937
        if (this.providerId != that.providerId)
4938
          return false;
4939
      }
4940
 
4941
      boolean this_present_pinCode = true && this.isSetPinCode();
4942
      boolean that_present_pinCode = true && that.isSetPinCode();
4943
      if (this_present_pinCode || that_present_pinCode) {
4944
        if (!(this_present_pinCode && that_present_pinCode))
4945
          return false;
4946
        if (!this.pinCode.equals(that.pinCode))
4947
          return false;
4948
      }
4949
 
4950
      return true;
4951
    }
4952
 
4953
    @Override
4954
    public int hashCode() {
4955
      return 0;
4956
    }
4957
 
4958
    public int compareTo(getDestinationCode_args other) {
4959
      if (!getClass().equals(other.getClass())) {
4960
        return getClass().getName().compareTo(other.getClass().getName());
4961
      }
4962
 
4963
      int lastComparison = 0;
4964
      getDestinationCode_args typedOther = (getDestinationCode_args)other;
4965
 
4966
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
4967
      if (lastComparison != 0) {
4968
        return lastComparison;
4969
      }
4970
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
4971
      if (lastComparison != 0) {
4972
        return lastComparison;
4973
      }
4974
      lastComparison = Boolean.valueOf(isSetPinCode()).compareTo(isSetPinCode());
4975
      if (lastComparison != 0) {
4976
        return lastComparison;
4977
      }
4978
      lastComparison = TBaseHelper.compareTo(pinCode, typedOther.pinCode);
4979
      if (lastComparison != 0) {
4980
        return lastComparison;
4981
      }
4982
      return 0;
4983
    }
4984
 
4985
    public void read(TProtocol iprot) throws TException {
4986
      TField field;
4987
      iprot.readStructBegin();
4988
      while (true)
4989
      {
4990
        field = iprot.readFieldBegin();
4991
        if (field.type == TType.STOP) { 
4992
          break;
4993
        }
4994
        _Fields fieldId = _Fields.findByThriftId(field.id);
4995
        if (fieldId == null) {
4996
          TProtocolUtil.skip(iprot, field.type);
4997
        } else {
4998
          switch (fieldId) {
4999
            case PROVIDER_ID:
5000
              if (field.type == TType.I64) {
5001
                this.providerId = iprot.readI64();
5002
                setProviderIdIsSet(true);
5003
              } else { 
5004
                TProtocolUtil.skip(iprot, field.type);
5005
              }
5006
              break;
5007
            case PIN_CODE:
5008
              if (field.type == TType.STRING) {
5009
                this.pinCode = iprot.readString();
5010
              } else { 
5011
                TProtocolUtil.skip(iprot, field.type);
5012
              }
5013
              break;
5014
          }
5015
          iprot.readFieldEnd();
5016
        }
5017
      }
5018
      iprot.readStructEnd();
5019
      validate();
5020
    }
5021
 
5022
    public void write(TProtocol oprot) throws TException {
5023
      validate();
5024
 
5025
      oprot.writeStructBegin(STRUCT_DESC);
5026
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
5027
      oprot.writeI64(this.providerId);
5028
      oprot.writeFieldEnd();
5029
      if (this.pinCode != null) {
5030
        oprot.writeFieldBegin(PIN_CODE_FIELD_DESC);
5031
        oprot.writeString(this.pinCode);
5032
        oprot.writeFieldEnd();
5033
      }
5034
      oprot.writeFieldStop();
5035
      oprot.writeStructEnd();
5036
    }
5037
 
5038
    @Override
5039
    public String toString() {
5040
      StringBuilder sb = new StringBuilder("getDestinationCode_args(");
5041
      boolean first = true;
5042
 
5043
      sb.append("providerId:");
5044
      sb.append(this.providerId);
5045
      first = false;
5046
      if (!first) sb.append(", ");
5047
      sb.append("pinCode:");
5048
      if (this.pinCode == null) {
5049
        sb.append("null");
5050
      } else {
5051
        sb.append(this.pinCode);
5052
      }
5053
      first = false;
5054
      sb.append(")");
5055
      return sb.toString();
5056
    }
5057
 
5058
    public void validate() throws TException {
5059
      // check for required fields
5060
    }
5061
 
5062
  }
5063
 
5064
  public static class getDestinationCode_result implements TBase<getDestinationCode_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDestinationCode_result>   {
5065
    private static final TStruct STRUCT_DESC = new TStruct("getDestinationCode_result");
5066
 
5067
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
5068
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
5069
 
5070
    private String success;
5071
    private LogisticsServiceException se;
5072
 
5073
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5074
    public enum _Fields implements TFieldIdEnum {
5075
      SUCCESS((short)0, "success"),
5076
      SE((short)1, "se");
5077
 
5078
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5079
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5080
 
5081
      static {
5082
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5083
          byId.put((int)field._thriftId, field);
5084
          byName.put(field.getFieldName(), field);
5085
        }
5086
      }
5087
 
5088
      /**
5089
       * Find the _Fields constant that matches fieldId, or null if its not found.
5090
       */
5091
      public static _Fields findByThriftId(int fieldId) {
5092
        return byId.get(fieldId);
5093
      }
5094
 
5095
      /**
5096
       * Find the _Fields constant that matches fieldId, throwing an exception
5097
       * if it is not found.
5098
       */
5099
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5100
        _Fields fields = findByThriftId(fieldId);
5101
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5102
        return fields;
5103
      }
5104
 
5105
      /**
5106
       * Find the _Fields constant that matches name, or null if its not found.
5107
       */
5108
      public static _Fields findByName(String name) {
5109
        return byName.get(name);
5110
      }
5111
 
5112
      private final short _thriftId;
5113
      private final String _fieldName;
5114
 
5115
      _Fields(short thriftId, String fieldName) {
5116
        _thriftId = thriftId;
5117
        _fieldName = fieldName;
5118
      }
5119
 
5120
      public short getThriftFieldId() {
5121
        return _thriftId;
5122
      }
5123
 
5124
      public String getFieldName() {
5125
        return _fieldName;
5126
      }
5127
    }
5128
 
5129
    // isset id assignments
5130
 
5131
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5132
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5133
          new FieldValueMetaData(TType.STRING)));
5134
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
5135
          new FieldValueMetaData(TType.STRUCT)));
5136
    }});
5137
 
5138
    static {
5139
      FieldMetaData.addStructMetaDataMap(getDestinationCode_result.class, metaDataMap);
5140
    }
5141
 
5142
    public getDestinationCode_result() {
5143
    }
5144
 
5145
    public getDestinationCode_result(
5146
      String success,
5147
      LogisticsServiceException se)
5148
    {
5149
      this();
5150
      this.success = success;
5151
      this.se = se;
5152
    }
5153
 
5154
    /**
5155
     * Performs a deep copy on <i>other</i>.
5156
     */
5157
    public getDestinationCode_result(getDestinationCode_result other) {
5158
      if (other.isSetSuccess()) {
5159
        this.success = other.success;
5160
      }
5161
      if (other.isSetSe()) {
5162
        this.se = new LogisticsServiceException(other.se);
5163
      }
5164
    }
5165
 
5166
    public getDestinationCode_result deepCopy() {
5167
      return new getDestinationCode_result(this);
5168
    }
5169
 
5170
    @Deprecated
5171
    public getDestinationCode_result clone() {
5172
      return new getDestinationCode_result(this);
5173
    }
5174
 
5175
    public String getSuccess() {
5176
      return this.success;
5177
    }
5178
 
5179
    public getDestinationCode_result setSuccess(String success) {
5180
      this.success = success;
5181
      return this;
5182
    }
5183
 
5184
    public void unsetSuccess() {
5185
      this.success = null;
5186
    }
5187
 
5188
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5189
    public boolean isSetSuccess() {
5190
      return this.success != null;
5191
    }
5192
 
5193
    public void setSuccessIsSet(boolean value) {
5194
      if (!value) {
5195
        this.success = null;
5196
      }
5197
    }
5198
 
5199
    public LogisticsServiceException getSe() {
5200
      return this.se;
5201
    }
5202
 
5203
    public getDestinationCode_result setSe(LogisticsServiceException se) {
5204
      this.se = se;
5205
      return this;
5206
    }
5207
 
5208
    public void unsetSe() {
5209
      this.se = null;
5210
    }
5211
 
5212
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
5213
    public boolean isSetSe() {
5214
      return this.se != null;
5215
    }
5216
 
5217
    public void setSeIsSet(boolean value) {
5218
      if (!value) {
5219
        this.se = null;
5220
      }
5221
    }
5222
 
5223
    public void setFieldValue(_Fields field, Object value) {
5224
      switch (field) {
5225
      case SUCCESS:
5226
        if (value == null) {
5227
          unsetSuccess();
5228
        } else {
5229
          setSuccess((String)value);
5230
        }
5231
        break;
5232
 
5233
      case SE:
5234
        if (value == null) {
5235
          unsetSe();
5236
        } else {
5237
          setSe((LogisticsServiceException)value);
5238
        }
5239
        break;
5240
 
5241
      }
5242
    }
5243
 
5244
    public void setFieldValue(int fieldID, Object value) {
5245
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5246
    }
5247
 
5248
    public Object getFieldValue(_Fields field) {
5249
      switch (field) {
5250
      case SUCCESS:
5251
        return getSuccess();
5252
 
5253
      case SE:
5254
        return getSe();
5255
 
5256
      }
5257
      throw new IllegalStateException();
5258
    }
5259
 
5260
    public Object getFieldValue(int fieldId) {
5261
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5262
    }
5263
 
5264
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5265
    public boolean isSet(_Fields field) {
5266
      switch (field) {
5267
      case SUCCESS:
5268
        return isSetSuccess();
5269
      case SE:
5270
        return isSetSe();
5271
      }
5272
      throw new IllegalStateException();
5273
    }
5274
 
5275
    public boolean isSet(int fieldID) {
5276
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5277
    }
5278
 
5279
    @Override
5280
    public boolean equals(Object that) {
5281
      if (that == null)
5282
        return false;
5283
      if (that instanceof getDestinationCode_result)
5284
        return this.equals((getDestinationCode_result)that);
5285
      return false;
5286
    }
5287
 
5288
    public boolean equals(getDestinationCode_result that) {
5289
      if (that == null)
5290
        return false;
5291
 
5292
      boolean this_present_success = true && this.isSetSuccess();
5293
      boolean that_present_success = true && that.isSetSuccess();
5294
      if (this_present_success || that_present_success) {
5295
        if (!(this_present_success && that_present_success))
5296
          return false;
5297
        if (!this.success.equals(that.success))
5298
          return false;
5299
      }
5300
 
5301
      boolean this_present_se = true && this.isSetSe();
5302
      boolean that_present_se = true && that.isSetSe();
5303
      if (this_present_se || that_present_se) {
5304
        if (!(this_present_se && that_present_se))
5305
          return false;
5306
        if (!this.se.equals(that.se))
5307
          return false;
5308
      }
5309
 
5310
      return true;
5311
    }
5312
 
5313
    @Override
5314
    public int hashCode() {
5315
      return 0;
5316
    }
5317
 
5318
    public int compareTo(getDestinationCode_result other) {
5319
      if (!getClass().equals(other.getClass())) {
5320
        return getClass().getName().compareTo(other.getClass().getName());
5321
      }
5322
 
5323
      int lastComparison = 0;
5324
      getDestinationCode_result typedOther = (getDestinationCode_result)other;
5325
 
5326
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5327
      if (lastComparison != 0) {
5328
        return lastComparison;
5329
      }
5330
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5331
      if (lastComparison != 0) {
5332
        return lastComparison;
5333
      }
5334
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
5335
      if (lastComparison != 0) {
5336
        return lastComparison;
5337
      }
5338
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
5339
      if (lastComparison != 0) {
5340
        return lastComparison;
5341
      }
5342
      return 0;
5343
    }
5344
 
5345
    public void read(TProtocol iprot) throws TException {
5346
      TField field;
5347
      iprot.readStructBegin();
5348
      while (true)
5349
      {
5350
        field = iprot.readFieldBegin();
5351
        if (field.type == TType.STOP) { 
5352
          break;
5353
        }
5354
        _Fields fieldId = _Fields.findByThriftId(field.id);
5355
        if (fieldId == null) {
5356
          TProtocolUtil.skip(iprot, field.type);
5357
        } else {
5358
          switch (fieldId) {
5359
            case SUCCESS:
5360
              if (field.type == TType.STRING) {
5361
                this.success = iprot.readString();
5362
              } else { 
5363
                TProtocolUtil.skip(iprot, field.type);
5364
              }
5365
              break;
5366
            case SE:
5367
              if (field.type == TType.STRUCT) {
5368
                this.se = new LogisticsServiceException();
5369
                this.se.read(iprot);
5370
              } else { 
5371
                TProtocolUtil.skip(iprot, field.type);
5372
              }
5373
              break;
5374
          }
5375
          iprot.readFieldEnd();
5376
        }
5377
      }
5378
      iprot.readStructEnd();
5379
      validate();
5380
    }
5381
 
5382
    public void write(TProtocol oprot) throws TException {
5383
      oprot.writeStructBegin(STRUCT_DESC);
5384
 
5385
      if (this.isSetSuccess()) {
5386
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5387
        oprot.writeString(this.success);
5388
        oprot.writeFieldEnd();
5389
      } else if (this.isSetSe()) {
5390
        oprot.writeFieldBegin(SE_FIELD_DESC);
5391
        this.se.write(oprot);
5392
        oprot.writeFieldEnd();
5393
      }
5394
      oprot.writeFieldStop();
5395
      oprot.writeStructEnd();
5396
    }
5397
 
5398
    @Override
5399
    public String toString() {
5400
      StringBuilder sb = new StringBuilder("getDestinationCode_result(");
5401
      boolean first = true;
5402
 
5403
      sb.append("success:");
5404
      if (this.success == null) {
5405
        sb.append("null");
5406
      } else {
5407
        sb.append(this.success);
5408
      }
5409
      first = false;
5410
      if (!first) sb.append(", ");
5411
      sb.append("se:");
5412
      if (this.se == null) {
5413
        sb.append("null");
5414
      } else {
5415
        sb.append(this.se);
5416
      }
5417
      first = false;
5418
      sb.append(")");
5419
      return sb.toString();
5420
    }
5421
 
5422
    public void validate() throws TException {
5423
      // check for required fields
5424
    }
5425
 
5426
  }
5427
 
412 ashish 5428
}