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