Subversion Repositories SmartDukaan

Rev

Rev 442 | 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
 
7
from thrift.Thrift import *
8
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
try:
13
  from thrift.protocol import fastbinary
14
except:
15
  fastbinary = None
16
 
17
 
18
class Iface:
19
  def addEmptyAWBs(self, numbers, provider_id):
20
    """
21
    Parameters:
22
     - numbers
23
     - provider_id
24
    """
25
    pass
26
 
27
  def getEmptyAWB(self, provider_id):
28
    """
29
    Parameters:
30
     - provider_id
31
    """
32
    pass
33
 
34
  def getProviders(self, ):
35
    pass
36
 
37
  def getProvider(self, provider_id):
38
    """
39
    Parameters:
40
     - provider_id
41
    """
42
    pass
43
 
44
  def getShipmentInfo(self, awb):
45
    """
46
    Parameters:
47
     - awb
48
    """
49
    pass
50
 
51
  def getShipments(self, warehouse_id, from_date, to_date, provider_id):
52
    """
53
    Parameters:
54
     - warehouse_id
55
     - from_date
56
     - to_date
57
     - provider_id
58
    """
59
    pass
60
 
61
  def getTodaysShipments(self, warehouse_id, provider_id):
62
    """
63
    Parameters:
64
     - warehouse_id
65
     - provider_id
66
    """
67
    pass
68
 
69
 
70
class Client(Iface):
71
  def __init__(self, iprot, oprot=None):
72
    self._iprot = self._oprot = iprot
73
    if oprot != None:
74
      self._oprot = oprot
75
    self._seqid = 0
76
 
77
  def addEmptyAWBs(self, numbers, provider_id):
78
    """
79
    Parameters:
80
     - numbers
81
     - provider_id
82
    """
83
    self.send_addEmptyAWBs(numbers, provider_id)
84
    self.recv_addEmptyAWBs()
85
 
86
  def send_addEmptyAWBs(self, numbers, provider_id):
87
    self._oprot.writeMessageBegin('addEmptyAWBs', TMessageType.CALL, self._seqid)
88
    args = addEmptyAWBs_args()
89
    args.numbers = numbers
90
    args.provider_id = provider_id
91
    args.write(self._oprot)
92
    self._oprot.writeMessageEnd()
93
    self._oprot.trans.flush()
94
 
95
  def recv_addEmptyAWBs(self, ):
96
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
97
    if mtype == TMessageType.EXCEPTION:
98
      x = TApplicationException()
99
      x.read(self._iprot)
100
      self._iprot.readMessageEnd()
101
      raise x
102
    result = addEmptyAWBs_result()
103
    result.read(self._iprot)
104
    self._iprot.readMessageEnd()
105
    return
106
 
107
  def getEmptyAWB(self, provider_id):
108
    """
109
    Parameters:
110
     - provider_id
111
    """
112
    self.send_getEmptyAWB(provider_id)
113
    return self.recv_getEmptyAWB()
114
 
115
  def send_getEmptyAWB(self, provider_id):
116
    self._oprot.writeMessageBegin('getEmptyAWB', TMessageType.CALL, self._seqid)
117
    args = getEmptyAWB_args()
118
    args.provider_id = provider_id
119
    args.write(self._oprot)
120
    self._oprot.writeMessageEnd()
121
    self._oprot.trans.flush()
122
 
123
  def recv_getEmptyAWB(self, ):
124
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
125
    if mtype == TMessageType.EXCEPTION:
126
      x = TApplicationException()
127
      x.read(self._iprot)
128
      self._iprot.readMessageEnd()
129
      raise x
130
    result = getEmptyAWB_result()
131
    result.read(self._iprot)
132
    self._iprot.readMessageEnd()
133
    if result.success != None:
134
      return result.success
135
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
136
 
137
  def getProviders(self, ):
138
    self.send_getProviders()
139
    return self.recv_getProviders()
140
 
141
  def send_getProviders(self, ):
142
    self._oprot.writeMessageBegin('getProviders', TMessageType.CALL, self._seqid)
143
    args = getProviders_args()
144
    args.write(self._oprot)
145
    self._oprot.writeMessageEnd()
146
    self._oprot.trans.flush()
147
 
148
  def recv_getProviders(self, ):
149
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
150
    if mtype == TMessageType.EXCEPTION:
151
      x = TApplicationException()
152
      x.read(self._iprot)
153
      self._iprot.readMessageEnd()
154
      raise x
155
    result = getProviders_result()
156
    result.read(self._iprot)
157
    self._iprot.readMessageEnd()
158
    if result.success != None:
159
      return result.success
160
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProviders failed: unknown result");
161
 
162
  def getProvider(self, provider_id):
163
    """
164
    Parameters:
165
     - provider_id
166
    """
167
    self.send_getProvider(provider_id)
168
    return self.recv_getProvider()
169
 
170
  def send_getProvider(self, provider_id):
171
    self._oprot.writeMessageBegin('getProvider', TMessageType.CALL, self._seqid)
172
    args = getProvider_args()
173
    args.provider_id = provider_id
174
    args.write(self._oprot)
175
    self._oprot.writeMessageEnd()
176
    self._oprot.trans.flush()
177
 
178
  def recv_getProvider(self, ):
179
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
180
    if mtype == TMessageType.EXCEPTION:
181
      x = TApplicationException()
182
      x.read(self._iprot)
183
      self._iprot.readMessageEnd()
184
      raise x
185
    result = getProvider_result()
186
    result.read(self._iprot)
187
    self._iprot.readMessageEnd()
188
    if result.success != None:
189
      return result.success
190
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProvider failed: unknown result");
191
 
192
  def getShipmentInfo(self, awb):
193
    """
194
    Parameters:
195
     - awb
196
    """
197
    self.send_getShipmentInfo(awb)
198
    return self.recv_getShipmentInfo()
199
 
200
  def send_getShipmentInfo(self, awb):
201
    self._oprot.writeMessageBegin('getShipmentInfo', TMessageType.CALL, self._seqid)
202
    args = getShipmentInfo_args()
203
    args.awb = awb
204
    args.write(self._oprot)
205
    self._oprot.writeMessageEnd()
206
    self._oprot.trans.flush()
207
 
208
  def recv_getShipmentInfo(self, ):
209
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
210
    if mtype == TMessageType.EXCEPTION:
211
      x = TApplicationException()
212
      x.read(self._iprot)
213
      self._iprot.readMessageEnd()
214
      raise x
215
    result = getShipmentInfo_result()
216
    result.read(self._iprot)
217
    self._iprot.readMessageEnd()
218
    if result.success != None:
219
      return result.success
220
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
221
 
222
  def getShipments(self, warehouse_id, from_date, to_date, provider_id):
223
    """
224
    Parameters:
225
     - warehouse_id
226
     - from_date
227
     - to_date
228
     - provider_id
229
    """
230
    self.send_getShipments(warehouse_id, from_date, to_date, provider_id)
231
    return self.recv_getShipments()
232
 
233
  def send_getShipments(self, warehouse_id, from_date, to_date, provider_id):
234
    self._oprot.writeMessageBegin('getShipments', TMessageType.CALL, self._seqid)
235
    args = getShipments_args()
236
    args.warehouse_id = warehouse_id
237
    args.from_date = from_date
238
    args.to_date = to_date
239
    args.provider_id = provider_id
240
    args.write(self._oprot)
241
    self._oprot.writeMessageEnd()
242
    self._oprot.trans.flush()
243
 
244
  def recv_getShipments(self, ):
245
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
246
    if mtype == TMessageType.EXCEPTION:
247
      x = TApplicationException()
248
      x.read(self._iprot)
249
      self._iprot.readMessageEnd()
250
      raise x
251
    result = getShipments_result()
252
    result.read(self._iprot)
253
    self._iprot.readMessageEnd()
254
    if result.success != None:
255
      return result.success
256
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShipments failed: unknown result");
257
 
258
  def getTodaysShipments(self, warehouse_id, provider_id):
259
    """
260
    Parameters:
261
     - warehouse_id
262
     - provider_id
263
    """
264
    self.send_getTodaysShipments(warehouse_id, provider_id)
265
    return self.recv_getTodaysShipments()
266
 
267
  def send_getTodaysShipments(self, warehouse_id, provider_id):
268
    self._oprot.writeMessageBegin('getTodaysShipments', TMessageType.CALL, self._seqid)
269
    args = getTodaysShipments_args()
270
    args.warehouse_id = warehouse_id
271
    args.provider_id = provider_id
272
    args.write(self._oprot)
273
    self._oprot.writeMessageEnd()
274
    self._oprot.trans.flush()
275
 
276
  def recv_getTodaysShipments(self, ):
277
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
278
    if mtype == TMessageType.EXCEPTION:
279
      x = TApplicationException()
280
      x.read(self._iprot)
281
      self._iprot.readMessageEnd()
282
      raise x
283
    result = getTodaysShipments_result()
284
    result.read(self._iprot)
285
    self._iprot.readMessageEnd()
286
    if result.success != None:
287
      return result.success
288
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTodaysShipments failed: unknown result");
289
 
290
 
291
class Processor(Iface, TProcessor):
292
  def __init__(self, handler):
293
    self._handler = handler
294
    self._processMap = {}
295
    self._processMap["addEmptyAWBs"] = Processor.process_addEmptyAWBs
296
    self._processMap["getEmptyAWB"] = Processor.process_getEmptyAWB
297
    self._processMap["getProviders"] = Processor.process_getProviders
298
    self._processMap["getProvider"] = Processor.process_getProvider
299
    self._processMap["getShipmentInfo"] = Processor.process_getShipmentInfo
300
    self._processMap["getShipments"] = Processor.process_getShipments
301
    self._processMap["getTodaysShipments"] = Processor.process_getTodaysShipments
302
 
303
  def process(self, iprot, oprot):
304
    (name, type, seqid) = iprot.readMessageBegin()
305
    if name not in self._processMap:
306
      iprot.skip(TType.STRUCT)
307
      iprot.readMessageEnd()
308
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
309
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
310
      x.write(oprot)
311
      oprot.writeMessageEnd()
312
      oprot.trans.flush()
313
      return
314
    else:
315
      self._processMap[name](self, seqid, iprot, oprot)
316
    return True
317
 
318
  def process_addEmptyAWBs(self, seqid, iprot, oprot):
319
    args = addEmptyAWBs_args()
320
    args.read(iprot)
321
    iprot.readMessageEnd()
322
    result = addEmptyAWBs_result()
323
    self._handler.addEmptyAWBs(args.numbers, args.provider_id)
324
    oprot.writeMessageBegin("addEmptyAWBs", TMessageType.REPLY, seqid)
325
    result.write(oprot)
326
    oprot.writeMessageEnd()
327
    oprot.trans.flush()
328
 
329
  def process_getEmptyAWB(self, seqid, iprot, oprot):
330
    args = getEmptyAWB_args()
331
    args.read(iprot)
332
    iprot.readMessageEnd()
333
    result = getEmptyAWB_result()
334
    result.success = self._handler.getEmptyAWB(args.provider_id)
335
    oprot.writeMessageBegin("getEmptyAWB", TMessageType.REPLY, seqid)
336
    result.write(oprot)
337
    oprot.writeMessageEnd()
338
    oprot.trans.flush()
339
 
340
  def process_getProviders(self, seqid, iprot, oprot):
341
    args = getProviders_args()
342
    args.read(iprot)
343
    iprot.readMessageEnd()
344
    result = getProviders_result()
345
    result.success = self._handler.getProviders()
346
    oprot.writeMessageBegin("getProviders", TMessageType.REPLY, seqid)
347
    result.write(oprot)
348
    oprot.writeMessageEnd()
349
    oprot.trans.flush()
350
 
351
  def process_getProvider(self, seqid, iprot, oprot):
352
    args = getProvider_args()
353
    args.read(iprot)
354
    iprot.readMessageEnd()
355
    result = getProvider_result()
356
    result.success = self._handler.getProvider(args.provider_id)
357
    oprot.writeMessageBegin("getProvider", TMessageType.REPLY, seqid)
358
    result.write(oprot)
359
    oprot.writeMessageEnd()
360
    oprot.trans.flush()
361
 
362
  def process_getShipmentInfo(self, seqid, iprot, oprot):
363
    args = getShipmentInfo_args()
364
    args.read(iprot)
365
    iprot.readMessageEnd()
366
    result = getShipmentInfo_result()
367
    result.success = self._handler.getShipmentInfo(args.awb)
368
    oprot.writeMessageBegin("getShipmentInfo", TMessageType.REPLY, seqid)
369
    result.write(oprot)
370
    oprot.writeMessageEnd()
371
    oprot.trans.flush()
372
 
373
  def process_getShipments(self, seqid, iprot, oprot):
374
    args = getShipments_args()
375
    args.read(iprot)
376
    iprot.readMessageEnd()
377
    result = getShipments_result()
378
    result.success = self._handler.getShipments(args.warehouse_id, args.from_date, args.to_date, args.provider_id)
379
    oprot.writeMessageBegin("getShipments", TMessageType.REPLY, seqid)
380
    result.write(oprot)
381
    oprot.writeMessageEnd()
382
    oprot.trans.flush()
383
 
384
  def process_getTodaysShipments(self, seqid, iprot, oprot):
385
    args = getTodaysShipments_args()
386
    args.read(iprot)
387
    iprot.readMessageEnd()
388
    result = getTodaysShipments_result()
389
    result.success = self._handler.getTodaysShipments(args.warehouse_id, args.provider_id)
390
    oprot.writeMessageBegin("getTodaysShipments", TMessageType.REPLY, seqid)
391
    result.write(oprot)
392
    oprot.writeMessageEnd()
393
    oprot.trans.flush()
394
 
395
 
396
# HELPER FUNCTIONS AND STRUCTURES
397
 
398
class addEmptyAWBs_args:
399
  """
400
  Attributes:
401
   - numbers
402
   - provider_id
403
  """
404
 
405
  thrift_spec = (
406
    None, # 0
407
    (1, TType.LIST, 'numbers', (TType.STRING,None), None, ), # 1
408
    (2, TType.I64, 'provider_id', None, None, ), # 2
409
  )
410
 
411
  def __init__(self, numbers=None, provider_id=None,):
412
    self.numbers = numbers
413
    self.provider_id = provider_id
414
 
415
  def read(self, iprot):
416
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
417
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
418
      return
419
    iprot.readStructBegin()
420
    while True:
421
      (fname, ftype, fid) = iprot.readFieldBegin()
422
      if ftype == TType.STOP:
423
        break
424
      if fid == 1:
425
        if ftype == TType.LIST:
426
          self.numbers = []
427
          (_etype10, _size7) = iprot.readListBegin()
428
          for _i11 in xrange(_size7):
429
            _elem12 = iprot.readString();
430
            self.numbers.append(_elem12)
431
          iprot.readListEnd()
432
        else:
433
          iprot.skip(ftype)
434
      elif fid == 2:
435
        if ftype == TType.I64:
436
          self.provider_id = iprot.readI64();
437
        else:
438
          iprot.skip(ftype)
439
      else:
440
        iprot.skip(ftype)
441
      iprot.readFieldEnd()
442
    iprot.readStructEnd()
443
 
444
  def write(self, oprot):
445
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
446
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
447
      return
448
    oprot.writeStructBegin('addEmptyAWBs_args')
449
    if self.numbers != None:
450
      oprot.writeFieldBegin('numbers', TType.LIST, 1)
451
      oprot.writeListBegin(TType.STRING, len(self.numbers))
452
      for iter13 in self.numbers:
453
        oprot.writeString(iter13)
454
      oprot.writeListEnd()
455
      oprot.writeFieldEnd()
456
    if self.provider_id != None:
457
      oprot.writeFieldBegin('provider_id', TType.I64, 2)
458
      oprot.writeI64(self.provider_id)
459
      oprot.writeFieldEnd()
460
    oprot.writeFieldStop()
461
    oprot.writeStructEnd()
462
 
463
  def __repr__(self):
464
    L = ['%s=%r' % (key, value)
465
      for key, value in self.__dict__.iteritems()]
466
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
467
 
468
  def __eq__(self, other):
469
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
470
 
471
  def __ne__(self, other):
472
    return not (self == other)
473
 
474
class addEmptyAWBs_result:
475
 
476
  thrift_spec = (
477
  )
478
 
479
  def read(self, iprot):
480
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
481
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
482
      return
483
    iprot.readStructBegin()
484
    while True:
485
      (fname, ftype, fid) = iprot.readFieldBegin()
486
      if ftype == TType.STOP:
487
        break
488
      else:
489
        iprot.skip(ftype)
490
      iprot.readFieldEnd()
491
    iprot.readStructEnd()
492
 
493
  def write(self, oprot):
494
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
495
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
496
      return
497
    oprot.writeStructBegin('addEmptyAWBs_result')
498
    oprot.writeFieldStop()
499
    oprot.writeStructEnd()
500
 
501
  def __repr__(self):
502
    L = ['%s=%r' % (key, value)
503
      for key, value in self.__dict__.iteritems()]
504
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
505
 
506
  def __eq__(self, other):
507
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
508
 
509
  def __ne__(self, other):
510
    return not (self == other)
511
 
512
class getEmptyAWB_args:
513
  """
514
  Attributes:
515
   - provider_id
516
  """
517
 
518
  thrift_spec = (
519
    None, # 0
520
    (1, TType.I64, 'provider_id', None, None, ), # 1
521
  )
522
 
523
  def __init__(self, provider_id=None,):
524
    self.provider_id = provider_id
525
 
526
  def read(self, iprot):
527
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
528
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
529
      return
530
    iprot.readStructBegin()
531
    while True:
532
      (fname, ftype, fid) = iprot.readFieldBegin()
533
      if ftype == TType.STOP:
534
        break
535
      if fid == 1:
536
        if ftype == TType.I64:
537
          self.provider_id = iprot.readI64();
538
        else:
539
          iprot.skip(ftype)
540
      else:
541
        iprot.skip(ftype)
542
      iprot.readFieldEnd()
543
    iprot.readStructEnd()
544
 
545
  def write(self, oprot):
546
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
547
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
548
      return
549
    oprot.writeStructBegin('getEmptyAWB_args')
550
    if self.provider_id != None:
551
      oprot.writeFieldBegin('provider_id', TType.I64, 1)
552
      oprot.writeI64(self.provider_id)
553
      oprot.writeFieldEnd()
554
    oprot.writeFieldStop()
555
    oprot.writeStructEnd()
556
 
557
  def __repr__(self):
558
    L = ['%s=%r' % (key, value)
559
      for key, value in self.__dict__.iteritems()]
560
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
561
 
562
  def __eq__(self, other):
563
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
564
 
565
  def __ne__(self, other):
566
    return not (self == other)
567
 
568
class getEmptyAWB_result:
569
  """
570
  Attributes:
571
   - success
572
  """
573
 
574
  thrift_spec = (
575
    (0, TType.STRING, 'success', None, None, ), # 0
576
  )
577
 
578
  def __init__(self, success=None,):
579
    self.success = success
580
 
581
  def read(self, iprot):
582
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
583
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
584
      return
585
    iprot.readStructBegin()
586
    while True:
587
      (fname, ftype, fid) = iprot.readFieldBegin()
588
      if ftype == TType.STOP:
589
        break
590
      if fid == 0:
591
        if ftype == TType.STRING:
592
          self.success = iprot.readString();
593
        else:
594
          iprot.skip(ftype)
595
      else:
596
        iprot.skip(ftype)
597
      iprot.readFieldEnd()
598
    iprot.readStructEnd()
599
 
600
  def write(self, oprot):
601
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
602
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
603
      return
604
    oprot.writeStructBegin('getEmptyAWB_result')
605
    if self.success != None:
606
      oprot.writeFieldBegin('success', TType.STRING, 0)
607
      oprot.writeString(self.success)
608
      oprot.writeFieldEnd()
609
    oprot.writeFieldStop()
610
    oprot.writeStructEnd()
611
 
612
  def __repr__(self):
613
    L = ['%s=%r' % (key, value)
614
      for key, value in self.__dict__.iteritems()]
615
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
616
 
617
  def __eq__(self, other):
618
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
619
 
620
  def __ne__(self, other):
621
    return not (self == other)
622
 
623
class getProviders_args:
624
 
625
  thrift_spec = (
626
  )
627
 
628
  def read(self, iprot):
629
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
630
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
631
      return
632
    iprot.readStructBegin()
633
    while True:
634
      (fname, ftype, fid) = iprot.readFieldBegin()
635
      if ftype == TType.STOP:
636
        break
637
      else:
638
        iprot.skip(ftype)
639
      iprot.readFieldEnd()
640
    iprot.readStructEnd()
641
 
642
  def write(self, oprot):
643
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
644
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
645
      return
646
    oprot.writeStructBegin('getProviders_args')
647
    oprot.writeFieldStop()
648
    oprot.writeStructEnd()
649
 
650
  def __repr__(self):
651
    L = ['%s=%r' % (key, value)
652
      for key, value in self.__dict__.iteritems()]
653
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
654
 
655
  def __eq__(self, other):
656
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
657
 
658
  def __ne__(self, other):
659
    return not (self == other)
660
 
661
class getProviders_result:
662
  """
663
  Attributes:
664
   - success
665
  """
666
 
667
  thrift_spec = (
668
    (0, TType.LIST, 'success', (TType.STRUCT,(Provider, Provider.thrift_spec)), None, ), # 0
669
  )
670
 
671
  def __init__(self, success=None,):
672
    self.success = success
673
 
674
  def read(self, iprot):
675
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
676
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
677
      return
678
    iprot.readStructBegin()
679
    while True:
680
      (fname, ftype, fid) = iprot.readFieldBegin()
681
      if ftype == TType.STOP:
682
        break
683
      if fid == 0:
684
        if ftype == TType.LIST:
685
          self.success = []
686
          (_etype17, _size14) = iprot.readListBegin()
687
          for _i18 in xrange(_size14):
688
            _elem19 = Provider()
689
            _elem19.read(iprot)
690
            self.success.append(_elem19)
691
          iprot.readListEnd()
692
        else:
693
          iprot.skip(ftype)
694
      else:
695
        iprot.skip(ftype)
696
      iprot.readFieldEnd()
697
    iprot.readStructEnd()
698
 
699
  def write(self, oprot):
700
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
701
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
702
      return
703
    oprot.writeStructBegin('getProviders_result')
704
    if self.success != None:
705
      oprot.writeFieldBegin('success', TType.LIST, 0)
706
      oprot.writeListBegin(TType.STRUCT, len(self.success))
707
      for iter20 in self.success:
708
        iter20.write(oprot)
709
      oprot.writeListEnd()
710
      oprot.writeFieldEnd()
711
    oprot.writeFieldStop()
712
    oprot.writeStructEnd()
713
 
714
  def __repr__(self):
715
    L = ['%s=%r' % (key, value)
716
      for key, value in self.__dict__.iteritems()]
717
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
718
 
719
  def __eq__(self, other):
720
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
721
 
722
  def __ne__(self, other):
723
    return not (self == other)
724
 
725
class getProvider_args:
726
  """
727
  Attributes:
728
   - provider_id
729
  """
730
 
731
  thrift_spec = (
732
    None, # 0
733
    (1, TType.I64, 'provider_id', None, None, ), # 1
734
  )
735
 
736
  def __init__(self, provider_id=None,):
737
    self.provider_id = provider_id
738
 
739
  def read(self, iprot):
740
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
741
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
742
      return
743
    iprot.readStructBegin()
744
    while True:
745
      (fname, ftype, fid) = iprot.readFieldBegin()
746
      if ftype == TType.STOP:
747
        break
748
      if fid == 1:
749
        if ftype == TType.I64:
750
          self.provider_id = iprot.readI64();
751
        else:
752
          iprot.skip(ftype)
753
      else:
754
        iprot.skip(ftype)
755
      iprot.readFieldEnd()
756
    iprot.readStructEnd()
757
 
758
  def write(self, oprot):
759
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
760
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
761
      return
762
    oprot.writeStructBegin('getProvider_args')
763
    if self.provider_id != None:
764
      oprot.writeFieldBegin('provider_id', TType.I64, 1)
765
      oprot.writeI64(self.provider_id)
766
      oprot.writeFieldEnd()
767
    oprot.writeFieldStop()
768
    oprot.writeStructEnd()
769
 
770
  def __repr__(self):
771
    L = ['%s=%r' % (key, value)
772
      for key, value in self.__dict__.iteritems()]
773
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
774
 
775
  def __eq__(self, other):
776
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
777
 
778
  def __ne__(self, other):
779
    return not (self == other)
780
 
781
class getProvider_result:
782
  """
783
  Attributes:
784
   - success
785
  """
786
 
787
  thrift_spec = (
788
    (0, TType.STRUCT, 'success', (Provider, Provider.thrift_spec), None, ), # 0
789
  )
790
 
791
  def __init__(self, success=None,):
792
    self.success = success
793
 
794
  def read(self, iprot):
795
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
796
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
797
      return
798
    iprot.readStructBegin()
799
    while True:
800
      (fname, ftype, fid) = iprot.readFieldBegin()
801
      if ftype == TType.STOP:
802
        break
803
      if fid == 0:
804
        if ftype == TType.STRUCT:
805
          self.success = Provider()
806
          self.success.read(iprot)
807
        else:
808
          iprot.skip(ftype)
809
      else:
810
        iprot.skip(ftype)
811
      iprot.readFieldEnd()
812
    iprot.readStructEnd()
813
 
814
  def write(self, oprot):
815
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
816
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
817
      return
818
    oprot.writeStructBegin('getProvider_result')
819
    if self.success != None:
820
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
821
      self.success.write(oprot)
822
      oprot.writeFieldEnd()
823
    oprot.writeFieldStop()
824
    oprot.writeStructEnd()
825
 
826
  def __repr__(self):
827
    L = ['%s=%r' % (key, value)
828
      for key, value in self.__dict__.iteritems()]
829
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
830
 
831
  def __eq__(self, other):
832
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
833
 
834
  def __ne__(self, other):
835
    return not (self == other)
836
 
837
class getShipmentInfo_args:
838
  """
839
  Attributes:
840
   - awb
841
  """
842
 
843
  thrift_spec = (
844
    None, # 0
845
    (1, TType.STRING, 'awb', None, None, ), # 1
846
  )
847
 
848
  def __init__(self, awb=None,):
849
    self.awb = awb
850
 
851
  def read(self, iprot):
852
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
853
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
854
      return
855
    iprot.readStructBegin()
856
    while True:
857
      (fname, ftype, fid) = iprot.readFieldBegin()
858
      if ftype == TType.STOP:
859
        break
860
      if fid == 1:
861
        if ftype == TType.STRING:
862
          self.awb = iprot.readString();
863
        else:
864
          iprot.skip(ftype)
865
      else:
866
        iprot.skip(ftype)
867
      iprot.readFieldEnd()
868
    iprot.readStructEnd()
869
 
870
  def write(self, oprot):
871
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
872
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
873
      return
874
    oprot.writeStructBegin('getShipmentInfo_args')
875
    if self.awb != None:
876
      oprot.writeFieldBegin('awb', TType.STRING, 1)
877
      oprot.writeString(self.awb)
878
      oprot.writeFieldEnd()
879
    oprot.writeFieldStop()
880
    oprot.writeStructEnd()
881
 
882
  def __repr__(self):
883
    L = ['%s=%r' % (key, value)
884
      for key, value in self.__dict__.iteritems()]
885
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
886
 
887
  def __eq__(self, other):
888
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
889
 
890
  def __ne__(self, other):
891
    return not (self == other)
892
 
893
class getShipmentInfo_result:
894
  """
895
  Attributes:
896
   - success
897
  """
898
 
899
  thrift_spec = (
900
    (0, TType.STRUCT, 'success', (ShipmentStatusInfo, ShipmentStatusInfo.thrift_spec), None, ), # 0
901
  )
902
 
903
  def __init__(self, success=None,):
904
    self.success = success
905
 
906
  def read(self, iprot):
907
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
908
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
909
      return
910
    iprot.readStructBegin()
911
    while True:
912
      (fname, ftype, fid) = iprot.readFieldBegin()
913
      if ftype == TType.STOP:
914
        break
915
      if fid == 0:
916
        if ftype == TType.STRUCT:
917
          self.success = ShipmentStatusInfo()
918
          self.success.read(iprot)
919
        else:
920
          iprot.skip(ftype)
921
      else:
922
        iprot.skip(ftype)
923
      iprot.readFieldEnd()
924
    iprot.readStructEnd()
925
 
926
  def write(self, oprot):
927
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
928
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
929
      return
930
    oprot.writeStructBegin('getShipmentInfo_result')
931
    if self.success != None:
932
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
933
      self.success.write(oprot)
934
      oprot.writeFieldEnd()
935
    oprot.writeFieldStop()
936
    oprot.writeStructEnd()
937
 
938
  def __repr__(self):
939
    L = ['%s=%r' % (key, value)
940
      for key, value in self.__dict__.iteritems()]
941
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
942
 
943
  def __eq__(self, other):
944
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
945
 
946
  def __ne__(self, other):
947
    return not (self == other)
948
 
949
class getShipments_args:
950
  """
951
  Attributes:
952
   - warehouse_id
953
   - from_date
954
   - to_date
955
   - provider_id
956
  """
957
 
958
  thrift_spec = (
959
    None, # 0
960
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
961
    (2, TType.I64, 'from_date', None, None, ), # 2
962
    (3, TType.I64, 'to_date', None, None, ), # 3
963
    (4, TType.I64, 'provider_id', None, None, ), # 4
964
  )
965
 
966
  def __init__(self, warehouse_id=None, from_date=None, to_date=None, provider_id=None,):
967
    self.warehouse_id = warehouse_id
968
    self.from_date = from_date
969
    self.to_date = to_date
970
    self.provider_id = provider_id
971
 
972
  def read(self, iprot):
973
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
974
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
975
      return
976
    iprot.readStructBegin()
977
    while True:
978
      (fname, ftype, fid) = iprot.readFieldBegin()
979
      if ftype == TType.STOP:
980
        break
981
      if fid == 1:
982
        if ftype == TType.I64:
983
          self.warehouse_id = iprot.readI64();
984
        else:
985
          iprot.skip(ftype)
986
      elif fid == 2:
987
        if ftype == TType.I64:
988
          self.from_date = iprot.readI64();
989
        else:
990
          iprot.skip(ftype)
991
      elif fid == 3:
992
        if ftype == TType.I64:
993
          self.to_date = iprot.readI64();
994
        else:
995
          iprot.skip(ftype)
996
      elif fid == 4:
997
        if ftype == TType.I64:
998
          self.provider_id = iprot.readI64();
999
        else:
1000
          iprot.skip(ftype)
1001
      else:
1002
        iprot.skip(ftype)
1003
      iprot.readFieldEnd()
1004
    iprot.readStructEnd()
1005
 
1006
  def write(self, oprot):
1007
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1008
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1009
      return
1010
    oprot.writeStructBegin('getShipments_args')
1011
    if self.warehouse_id != None:
1012
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
1013
      oprot.writeI64(self.warehouse_id)
1014
      oprot.writeFieldEnd()
1015
    if self.from_date != None:
1016
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1017
      oprot.writeI64(self.from_date)
1018
      oprot.writeFieldEnd()
1019
    if self.to_date != None:
1020
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1021
      oprot.writeI64(self.to_date)
1022
      oprot.writeFieldEnd()
1023
    if self.provider_id != None:
1024
      oprot.writeFieldBegin('provider_id', TType.I64, 4)
1025
      oprot.writeI64(self.provider_id)
1026
      oprot.writeFieldEnd()
1027
    oprot.writeFieldStop()
1028
    oprot.writeStructEnd()
1029
 
1030
  def __repr__(self):
1031
    L = ['%s=%r' % (key, value)
1032
      for key, value in self.__dict__.iteritems()]
1033
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1034
 
1035
  def __eq__(self, other):
1036
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1037
 
1038
  def __ne__(self, other):
1039
    return not (self == other)
1040
 
1041
class getShipments_result:
1042
  """
1043
  Attributes:
1044
   - success
1045
  """
1046
 
1047
  thrift_spec = (
1048
    (0, TType.LIST, 'success', (TType.STRUCT,(Shipment, Shipment.thrift_spec)), None, ), # 0
1049
  )
1050
 
1051
  def __init__(self, success=None,):
1052
    self.success = success
1053
 
1054
  def read(self, iprot):
1055
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1056
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1057
      return
1058
    iprot.readStructBegin()
1059
    while True:
1060
      (fname, ftype, fid) = iprot.readFieldBegin()
1061
      if ftype == TType.STOP:
1062
        break
1063
      if fid == 0:
1064
        if ftype == TType.LIST:
1065
          self.success = []
1066
          (_etype24, _size21) = iprot.readListBegin()
1067
          for _i25 in xrange(_size21):
1068
            _elem26 = Shipment()
1069
            _elem26.read(iprot)
1070
            self.success.append(_elem26)
1071
          iprot.readListEnd()
1072
        else:
1073
          iprot.skip(ftype)
1074
      else:
1075
        iprot.skip(ftype)
1076
      iprot.readFieldEnd()
1077
    iprot.readStructEnd()
1078
 
1079
  def write(self, oprot):
1080
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1081
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1082
      return
1083
    oprot.writeStructBegin('getShipments_result')
1084
    if self.success != None:
1085
      oprot.writeFieldBegin('success', TType.LIST, 0)
1086
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1087
      for iter27 in self.success:
1088
        iter27.write(oprot)
1089
      oprot.writeListEnd()
1090
      oprot.writeFieldEnd()
1091
    oprot.writeFieldStop()
1092
    oprot.writeStructEnd()
1093
 
1094
  def __repr__(self):
1095
    L = ['%s=%r' % (key, value)
1096
      for key, value in self.__dict__.iteritems()]
1097
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1098
 
1099
  def __eq__(self, other):
1100
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1101
 
1102
  def __ne__(self, other):
1103
    return not (self == other)
1104
 
1105
class getTodaysShipments_args:
1106
  """
1107
  Attributes:
1108
   - warehouse_id
1109
   - provider_id
1110
  """
1111
 
1112
  thrift_spec = (
1113
    None, # 0
1114
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
1115
    (2, TType.I64, 'provider_id', None, None, ), # 2
1116
  )
1117
 
1118
  def __init__(self, warehouse_id=None, provider_id=None,):
1119
    self.warehouse_id = warehouse_id
1120
    self.provider_id = provider_id
1121
 
1122
  def read(self, iprot):
1123
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1124
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1125
      return
1126
    iprot.readStructBegin()
1127
    while True:
1128
      (fname, ftype, fid) = iprot.readFieldBegin()
1129
      if ftype == TType.STOP:
1130
        break
1131
      if fid == 1:
1132
        if ftype == TType.I64:
1133
          self.warehouse_id = iprot.readI64();
1134
        else:
1135
          iprot.skip(ftype)
1136
      elif fid == 2:
1137
        if ftype == TType.I64:
1138
          self.provider_id = iprot.readI64();
1139
        else:
1140
          iprot.skip(ftype)
1141
      else:
1142
        iprot.skip(ftype)
1143
      iprot.readFieldEnd()
1144
    iprot.readStructEnd()
1145
 
1146
  def write(self, oprot):
1147
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1148
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1149
      return
1150
    oprot.writeStructBegin('getTodaysShipments_args')
1151
    if self.warehouse_id != None:
1152
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
1153
      oprot.writeI64(self.warehouse_id)
1154
      oprot.writeFieldEnd()
1155
    if self.provider_id != None:
1156
      oprot.writeFieldBegin('provider_id', TType.I64, 2)
1157
      oprot.writeI64(self.provider_id)
1158
      oprot.writeFieldEnd()
1159
    oprot.writeFieldStop()
1160
    oprot.writeStructEnd()
1161
 
1162
  def __repr__(self):
1163
    L = ['%s=%r' % (key, value)
1164
      for key, value in self.__dict__.iteritems()]
1165
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1166
 
1167
  def __eq__(self, other):
1168
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1169
 
1170
  def __ne__(self, other):
1171
    return not (self == other)
1172
 
1173
class getTodaysShipments_result:
1174
  """
1175
  Attributes:
1176
   - success
1177
  """
1178
 
1179
  thrift_spec = (
1180
    (0, TType.LIST, 'success', (TType.STRUCT,(Shipment, Shipment.thrift_spec)), None, ), # 0
1181
  )
1182
 
1183
  def __init__(self, success=None,):
1184
    self.success = success
1185
 
1186
  def read(self, iprot):
1187
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1188
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1189
      return
1190
    iprot.readStructBegin()
1191
    while True:
1192
      (fname, ftype, fid) = iprot.readFieldBegin()
1193
      if ftype == TType.STOP:
1194
        break
1195
      if fid == 0:
1196
        if ftype == TType.LIST:
1197
          self.success = []
1198
          (_etype31, _size28) = iprot.readListBegin()
1199
          for _i32 in xrange(_size28):
1200
            _elem33 = Shipment()
1201
            _elem33.read(iprot)
1202
            self.success.append(_elem33)
1203
          iprot.readListEnd()
1204
        else:
1205
          iprot.skip(ftype)
1206
      else:
1207
        iprot.skip(ftype)
1208
      iprot.readFieldEnd()
1209
    iprot.readStructEnd()
1210
 
1211
  def write(self, oprot):
1212
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1213
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1214
      return
1215
    oprot.writeStructBegin('getTodaysShipments_result')
1216
    if self.success != None:
1217
      oprot.writeFieldBegin('success', TType.LIST, 0)
1218
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1219
      for iter34 in self.success:
1220
        iter34.write(oprot)
1221
      oprot.writeListEnd()
1222
      oprot.writeFieldEnd()
1223
    oprot.writeFieldStop()
1224
    oprot.writeStructEnd()
1225
 
1226
  def __repr__(self):
1227
    L = ['%s=%r' % (key, value)
1228
      for key, value in self.__dict__.iteritems()]
1229
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1230
 
1231
  def __eq__(self, other):
1232
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1233
 
1234
  def __ne__(self, other):
1235
    return not (self == other)
1236
 
1237