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