Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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