Subversion Repositories SmartDukaan

Rev

Rev 764 | Rev 1139 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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