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