Subversion Repositories SmartDukaan

Rev

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

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