Subversion Repositories SmartDukaan

Rev

Rev 412 | Rev 472 | Go to most recent revision | Details | Compare with Previous | 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
 
442 rajveer 44
  def createShipment(self, shipment):
45
    """
46
    Parameters:
47
     - shipment
48
    """
49
    pass
50
 
51
  def updateShipmentStatus(self, awb, shipment_update):
52
    """
53
    Parameters:
54
     - awb
55
     - shipment_update
56
    """
57
    pass
58
 
412 ashish 59
  def getShipmentInfo(self, awb):
60
    """
61
    Parameters:
62
     - awb
63
    """
64
    pass
65
 
66
  def getShipments(self, warehouse_id, from_date, to_date, provider_id):
67
    """
68
    Parameters:
69
     - warehouse_id
70
     - from_date
71
     - to_date
72
     - provider_id
73
    """
74
    pass
75
 
76
  def getTodaysShipments(self, warehouse_id, provider_id):
77
    """
78
    Parameters:
79
     - warehouse_id
80
     - provider_id
81
    """
82
    pass
83
 
84
 
85
class Client(Iface):
86
  def __init__(self, iprot, oprot=None):
87
    self._iprot = self._oprot = iprot
88
    if oprot != None:
89
      self._oprot = oprot
90
    self._seqid = 0
91
 
92
  def addEmptyAWBs(self, numbers, provider_id):
93
    """
94
    Parameters:
95
     - numbers
96
     - provider_id
97
    """
98
    self.send_addEmptyAWBs(numbers, provider_id)
99
    self.recv_addEmptyAWBs()
100
 
101
  def send_addEmptyAWBs(self, numbers, provider_id):
102
    self._oprot.writeMessageBegin('addEmptyAWBs', TMessageType.CALL, self._seqid)
103
    args = addEmptyAWBs_args()
104
    args.numbers = numbers
105
    args.provider_id = provider_id
106
    args.write(self._oprot)
107
    self._oprot.writeMessageEnd()
108
    self._oprot.trans.flush()
109
 
110
  def recv_addEmptyAWBs(self, ):
111
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
112
    if mtype == TMessageType.EXCEPTION:
113
      x = TApplicationException()
114
      x.read(self._iprot)
115
      self._iprot.readMessageEnd()
116
      raise x
117
    result = addEmptyAWBs_result()
118
    result.read(self._iprot)
119
    self._iprot.readMessageEnd()
120
    return
121
 
122
  def getEmptyAWB(self, provider_id):
123
    """
124
    Parameters:
125
     - provider_id
126
    """
127
    self.send_getEmptyAWB(provider_id)
128
    return self.recv_getEmptyAWB()
129
 
130
  def send_getEmptyAWB(self, provider_id):
131
    self._oprot.writeMessageBegin('getEmptyAWB', TMessageType.CALL, self._seqid)
132
    args = getEmptyAWB_args()
133
    args.provider_id = provider_id
134
    args.write(self._oprot)
135
    self._oprot.writeMessageEnd()
136
    self._oprot.trans.flush()
137
 
138
  def recv_getEmptyAWB(self, ):
139
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
140
    if mtype == TMessageType.EXCEPTION:
141
      x = TApplicationException()
142
      x.read(self._iprot)
143
      self._iprot.readMessageEnd()
144
      raise x
145
    result = getEmptyAWB_result()
146
    result.read(self._iprot)
147
    self._iprot.readMessageEnd()
148
    if result.success != None:
149
      return result.success
150
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
151
 
152
  def getProviders(self, ):
153
    self.send_getProviders()
154
    return self.recv_getProviders()
155
 
156
  def send_getProviders(self, ):
157
    self._oprot.writeMessageBegin('getProviders', TMessageType.CALL, self._seqid)
158
    args = getProviders_args()
159
    args.write(self._oprot)
160
    self._oprot.writeMessageEnd()
161
    self._oprot.trans.flush()
162
 
163
  def recv_getProviders(self, ):
164
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
165
    if mtype == TMessageType.EXCEPTION:
166
      x = TApplicationException()
167
      x.read(self._iprot)
168
      self._iprot.readMessageEnd()
169
      raise x
170
    result = getProviders_result()
171
    result.read(self._iprot)
172
    self._iprot.readMessageEnd()
173
    if result.success != None:
174
      return result.success
175
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProviders failed: unknown result");
176
 
177
  def getProvider(self, provider_id):
178
    """
179
    Parameters:
180
     - provider_id
181
    """
182
    self.send_getProvider(provider_id)
183
    return self.recv_getProvider()
184
 
185
  def send_getProvider(self, provider_id):
186
    self._oprot.writeMessageBegin('getProvider', TMessageType.CALL, self._seqid)
187
    args = getProvider_args()
188
    args.provider_id = provider_id
189
    args.write(self._oprot)
190
    self._oprot.writeMessageEnd()
191
    self._oprot.trans.flush()
192
 
193
  def recv_getProvider(self, ):
194
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
195
    if mtype == TMessageType.EXCEPTION:
196
      x = TApplicationException()
197
      x.read(self._iprot)
198
      self._iprot.readMessageEnd()
199
      raise x
200
    result = getProvider_result()
201
    result.read(self._iprot)
202
    self._iprot.readMessageEnd()
203
    if result.success != None:
204
      return result.success
205
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProvider failed: unknown result");
206
 
442 rajveer 207
  def createShipment(self, shipment):
208
    """
209
    Parameters:
210
     - shipment
211
    """
212
    self.send_createShipment(shipment)
213
    self.recv_createShipment()
214
 
215
  def send_createShipment(self, shipment):
216
    self._oprot.writeMessageBegin('createShipment', TMessageType.CALL, self._seqid)
217
    args = createShipment_args()
218
    args.shipment = shipment
219
    args.write(self._oprot)
220
    self._oprot.writeMessageEnd()
221
    self._oprot.trans.flush()
222
 
223
  def recv_createShipment(self, ):
224
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
225
    if mtype == TMessageType.EXCEPTION:
226
      x = TApplicationException()
227
      x.read(self._iprot)
228
      self._iprot.readMessageEnd()
229
      raise x
230
    result = createShipment_result()
231
    result.read(self._iprot)
232
    self._iprot.readMessageEnd()
233
    return
234
 
235
  def updateShipmentStatus(self, awb, shipment_update):
236
    """
237
    Parameters:
238
     - awb
239
     - shipment_update
240
    """
241
    self.send_updateShipmentStatus(awb, shipment_update)
242
    self.recv_updateShipmentStatus()
243
 
244
  def send_updateShipmentStatus(self, awb, shipment_update):
245
    self._oprot.writeMessageBegin('updateShipmentStatus', TMessageType.CALL, self._seqid)
246
    args = updateShipmentStatus_args()
247
    args.awb = awb
248
    args.shipment_update = shipment_update
249
    args.write(self._oprot)
250
    self._oprot.writeMessageEnd()
251
    self._oprot.trans.flush()
252
 
253
  def recv_updateShipmentStatus(self, ):
254
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
255
    if mtype == TMessageType.EXCEPTION:
256
      x = TApplicationException()
257
      x.read(self._iprot)
258
      self._iprot.readMessageEnd()
259
      raise x
260
    result = updateShipmentStatus_result()
261
    result.read(self._iprot)
262
    self._iprot.readMessageEnd()
263
    return
264
 
412 ashish 265
  def getShipmentInfo(self, awb):
266
    """
267
    Parameters:
268
     - awb
269
    """
270
    self.send_getShipmentInfo(awb)
271
    return self.recv_getShipmentInfo()
272
 
273
  def send_getShipmentInfo(self, awb):
274
    self._oprot.writeMessageBegin('getShipmentInfo', TMessageType.CALL, self._seqid)
275
    args = getShipmentInfo_args()
276
    args.awb = awb
277
    args.write(self._oprot)
278
    self._oprot.writeMessageEnd()
279
    self._oprot.trans.flush()
280
 
281
  def recv_getShipmentInfo(self, ):
282
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
283
    if mtype == TMessageType.EXCEPTION:
284
      x = TApplicationException()
285
      x.read(self._iprot)
286
      self._iprot.readMessageEnd()
287
      raise x
288
    result = getShipmentInfo_result()
289
    result.read(self._iprot)
290
    self._iprot.readMessageEnd()
291
    if result.success != None:
292
      return result.success
293
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
294
 
295
  def getShipments(self, warehouse_id, from_date, to_date, provider_id):
296
    """
297
    Parameters:
298
     - warehouse_id
299
     - from_date
300
     - to_date
301
     - provider_id
302
    """
303
    self.send_getShipments(warehouse_id, from_date, to_date, provider_id)
304
    return self.recv_getShipments()
305
 
306
  def send_getShipments(self, warehouse_id, from_date, to_date, provider_id):
307
    self._oprot.writeMessageBegin('getShipments', TMessageType.CALL, self._seqid)
308
    args = getShipments_args()
309
    args.warehouse_id = warehouse_id
310
    args.from_date = from_date
311
    args.to_date = to_date
312
    args.provider_id = provider_id
313
    args.write(self._oprot)
314
    self._oprot.writeMessageEnd()
315
    self._oprot.trans.flush()
316
 
317
  def recv_getShipments(self, ):
318
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
319
    if mtype == TMessageType.EXCEPTION:
320
      x = TApplicationException()
321
      x.read(self._iprot)
322
      self._iprot.readMessageEnd()
323
      raise x
324
    result = getShipments_result()
325
    result.read(self._iprot)
326
    self._iprot.readMessageEnd()
327
    if result.success != None:
328
      return result.success
329
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShipments failed: unknown result");
330
 
331
  def getTodaysShipments(self, warehouse_id, provider_id):
332
    """
333
    Parameters:
334
     - warehouse_id
335
     - provider_id
336
    """
337
    self.send_getTodaysShipments(warehouse_id, provider_id)
338
    return self.recv_getTodaysShipments()
339
 
340
  def send_getTodaysShipments(self, warehouse_id, provider_id):
341
    self._oprot.writeMessageBegin('getTodaysShipments', TMessageType.CALL, self._seqid)
342
    args = getTodaysShipments_args()
343
    args.warehouse_id = warehouse_id
344
    args.provider_id = provider_id
345
    args.write(self._oprot)
346
    self._oprot.writeMessageEnd()
347
    self._oprot.trans.flush()
348
 
349
  def recv_getTodaysShipments(self, ):
350
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
351
    if mtype == TMessageType.EXCEPTION:
352
      x = TApplicationException()
353
      x.read(self._iprot)
354
      self._iprot.readMessageEnd()
355
      raise x
356
    result = getTodaysShipments_result()
357
    result.read(self._iprot)
358
    self._iprot.readMessageEnd()
359
    if result.success != None:
360
      return result.success
361
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTodaysShipments failed: unknown result");
362
 
363
 
364
class Processor(Iface, TProcessor):
365
  def __init__(self, handler):
366
    self._handler = handler
367
    self._processMap = {}
368
    self._processMap["addEmptyAWBs"] = Processor.process_addEmptyAWBs
369
    self._processMap["getEmptyAWB"] = Processor.process_getEmptyAWB
370
    self._processMap["getProviders"] = Processor.process_getProviders
371
    self._processMap["getProvider"] = Processor.process_getProvider
442 rajveer 372
    self._processMap["createShipment"] = Processor.process_createShipment
373
    self._processMap["updateShipmentStatus"] = Processor.process_updateShipmentStatus
412 ashish 374
    self._processMap["getShipmentInfo"] = Processor.process_getShipmentInfo
375
    self._processMap["getShipments"] = Processor.process_getShipments
376
    self._processMap["getTodaysShipments"] = Processor.process_getTodaysShipments
377
 
378
  def process(self, iprot, oprot):
379
    (name, type, seqid) = iprot.readMessageBegin()
380
    if name not in self._processMap:
381
      iprot.skip(TType.STRUCT)
382
      iprot.readMessageEnd()
383
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
384
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
385
      x.write(oprot)
386
      oprot.writeMessageEnd()
387
      oprot.trans.flush()
388
      return
389
    else:
390
      self._processMap[name](self, seqid, iprot, oprot)
391
    return True
392
 
393
  def process_addEmptyAWBs(self, seqid, iprot, oprot):
394
    args = addEmptyAWBs_args()
395
    args.read(iprot)
396
    iprot.readMessageEnd()
397
    result = addEmptyAWBs_result()
398
    self._handler.addEmptyAWBs(args.numbers, args.provider_id)
399
    oprot.writeMessageBegin("addEmptyAWBs", TMessageType.REPLY, seqid)
400
    result.write(oprot)
401
    oprot.writeMessageEnd()
402
    oprot.trans.flush()
403
 
404
  def process_getEmptyAWB(self, seqid, iprot, oprot):
405
    args = getEmptyAWB_args()
406
    args.read(iprot)
407
    iprot.readMessageEnd()
408
    result = getEmptyAWB_result()
409
    result.success = self._handler.getEmptyAWB(args.provider_id)
410
    oprot.writeMessageBegin("getEmptyAWB", TMessageType.REPLY, seqid)
411
    result.write(oprot)
412
    oprot.writeMessageEnd()
413
    oprot.trans.flush()
414
 
415
  def process_getProviders(self, seqid, iprot, oprot):
416
    args = getProviders_args()
417
    args.read(iprot)
418
    iprot.readMessageEnd()
419
    result = getProviders_result()
420
    result.success = self._handler.getProviders()
421
    oprot.writeMessageBegin("getProviders", TMessageType.REPLY, seqid)
422
    result.write(oprot)
423
    oprot.writeMessageEnd()
424
    oprot.trans.flush()
425
 
426
  def process_getProvider(self, seqid, iprot, oprot):
427
    args = getProvider_args()
428
    args.read(iprot)
429
    iprot.readMessageEnd()
430
    result = getProvider_result()
431
    result.success = self._handler.getProvider(args.provider_id)
432
    oprot.writeMessageBegin("getProvider", TMessageType.REPLY, seqid)
433
    result.write(oprot)
434
    oprot.writeMessageEnd()
435
    oprot.trans.flush()
436
 
442 rajveer 437
  def process_createShipment(self, seqid, iprot, oprot):
438
    args = createShipment_args()
439
    args.read(iprot)
440
    iprot.readMessageEnd()
441
    result = createShipment_result()
442
    self._handler.createShipment(args.shipment)
443
    oprot.writeMessageBegin("createShipment", TMessageType.REPLY, seqid)
444
    result.write(oprot)
445
    oprot.writeMessageEnd()
446
    oprot.trans.flush()
447
 
448
  def process_updateShipmentStatus(self, seqid, iprot, oprot):
449
    args = updateShipmentStatus_args()
450
    args.read(iprot)
451
    iprot.readMessageEnd()
452
    result = updateShipmentStatus_result()
453
    self._handler.updateShipmentStatus(args.awb, args.shipment_update)
454
    oprot.writeMessageBegin("updateShipmentStatus", TMessageType.REPLY, seqid)
455
    result.write(oprot)
456
    oprot.writeMessageEnd()
457
    oprot.trans.flush()
458
 
412 ashish 459
  def process_getShipmentInfo(self, seqid, iprot, oprot):
460
    args = getShipmentInfo_args()
461
    args.read(iprot)
462
    iprot.readMessageEnd()
463
    result = getShipmentInfo_result()
464
    result.success = self._handler.getShipmentInfo(args.awb)
465
    oprot.writeMessageBegin("getShipmentInfo", TMessageType.REPLY, seqid)
466
    result.write(oprot)
467
    oprot.writeMessageEnd()
468
    oprot.trans.flush()
469
 
470
  def process_getShipments(self, seqid, iprot, oprot):
471
    args = getShipments_args()
472
    args.read(iprot)
473
    iprot.readMessageEnd()
474
    result = getShipments_result()
475
    result.success = self._handler.getShipments(args.warehouse_id, args.from_date, args.to_date, args.provider_id)
476
    oprot.writeMessageBegin("getShipments", TMessageType.REPLY, seqid)
477
    result.write(oprot)
478
    oprot.writeMessageEnd()
479
    oprot.trans.flush()
480
 
481
  def process_getTodaysShipments(self, seqid, iprot, oprot):
482
    args = getTodaysShipments_args()
483
    args.read(iprot)
484
    iprot.readMessageEnd()
485
    result = getTodaysShipments_result()
486
    result.success = self._handler.getTodaysShipments(args.warehouse_id, args.provider_id)
487
    oprot.writeMessageBegin("getTodaysShipments", TMessageType.REPLY, seqid)
488
    result.write(oprot)
489
    oprot.writeMessageEnd()
490
    oprot.trans.flush()
491
 
492
 
493
# HELPER FUNCTIONS AND STRUCTURES
494
 
495
class addEmptyAWBs_args:
496
  """
497
  Attributes:
498
   - numbers
499
   - provider_id
500
  """
501
 
502
  thrift_spec = (
503
    None, # 0
504
    (1, TType.LIST, 'numbers', (TType.STRING,None), None, ), # 1
505
    (2, TType.I64, 'provider_id', None, None, ), # 2
506
  )
507
 
508
  def __init__(self, numbers=None, provider_id=None,):
509
    self.numbers = numbers
510
    self.provider_id = provider_id
511
 
512
  def read(self, iprot):
513
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
514
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
515
      return
516
    iprot.readStructBegin()
517
    while True:
518
      (fname, ftype, fid) = iprot.readFieldBegin()
519
      if ftype == TType.STOP:
520
        break
521
      if fid == 1:
522
        if ftype == TType.LIST:
523
          self.numbers = []
524
          (_etype10, _size7) = iprot.readListBegin()
525
          for _i11 in xrange(_size7):
526
            _elem12 = iprot.readString();
527
            self.numbers.append(_elem12)
528
          iprot.readListEnd()
529
        else:
530
          iprot.skip(ftype)
531
      elif fid == 2:
532
        if ftype == TType.I64:
533
          self.provider_id = iprot.readI64();
534
        else:
535
          iprot.skip(ftype)
536
      else:
537
        iprot.skip(ftype)
538
      iprot.readFieldEnd()
539
    iprot.readStructEnd()
540
 
541
  def write(self, oprot):
542
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
543
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
544
      return
545
    oprot.writeStructBegin('addEmptyAWBs_args')
546
    if self.numbers != None:
547
      oprot.writeFieldBegin('numbers', TType.LIST, 1)
548
      oprot.writeListBegin(TType.STRING, len(self.numbers))
549
      for iter13 in self.numbers:
550
        oprot.writeString(iter13)
551
      oprot.writeListEnd()
552
      oprot.writeFieldEnd()
553
    if self.provider_id != None:
554
      oprot.writeFieldBegin('provider_id', TType.I64, 2)
555
      oprot.writeI64(self.provider_id)
556
      oprot.writeFieldEnd()
557
    oprot.writeFieldStop()
558
    oprot.writeStructEnd()
559
 
560
  def __repr__(self):
561
    L = ['%s=%r' % (key, value)
562
      for key, value in self.__dict__.iteritems()]
563
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
564
 
565
  def __eq__(self, other):
566
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
567
 
568
  def __ne__(self, other):
569
    return not (self == other)
570
 
571
class addEmptyAWBs_result:
572
 
573
  thrift_spec = (
574
  )
575
 
576
  def read(self, iprot):
577
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
578
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
579
      return
580
    iprot.readStructBegin()
581
    while True:
582
      (fname, ftype, fid) = iprot.readFieldBegin()
583
      if ftype == TType.STOP:
584
        break
585
      else:
586
        iprot.skip(ftype)
587
      iprot.readFieldEnd()
588
    iprot.readStructEnd()
589
 
590
  def write(self, oprot):
591
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
592
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
593
      return
594
    oprot.writeStructBegin('addEmptyAWBs_result')
595
    oprot.writeFieldStop()
596
    oprot.writeStructEnd()
597
 
598
  def __repr__(self):
599
    L = ['%s=%r' % (key, value)
600
      for key, value in self.__dict__.iteritems()]
601
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
602
 
603
  def __eq__(self, other):
604
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
605
 
606
  def __ne__(self, other):
607
    return not (self == other)
608
 
609
class getEmptyAWB_args:
610
  """
611
  Attributes:
612
   - provider_id
613
  """
614
 
615
  thrift_spec = (
616
    None, # 0
617
    (1, TType.I64, 'provider_id', None, None, ), # 1
618
  )
619
 
620
  def __init__(self, provider_id=None,):
621
    self.provider_id = provider_id
622
 
623
  def read(self, iprot):
624
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
625
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
626
      return
627
    iprot.readStructBegin()
628
    while True:
629
      (fname, ftype, fid) = iprot.readFieldBegin()
630
      if ftype == TType.STOP:
631
        break
632
      if fid == 1:
633
        if ftype == TType.I64:
634
          self.provider_id = iprot.readI64();
635
        else:
636
          iprot.skip(ftype)
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('getEmptyAWB_args')
647
    if self.provider_id != None:
648
      oprot.writeFieldBegin('provider_id', TType.I64, 1)
649
      oprot.writeI64(self.provider_id)
650
      oprot.writeFieldEnd()
651
    oprot.writeFieldStop()
652
    oprot.writeStructEnd()
653
 
654
  def __repr__(self):
655
    L = ['%s=%r' % (key, value)
656
      for key, value in self.__dict__.iteritems()]
657
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
658
 
659
  def __eq__(self, other):
660
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
661
 
662
  def __ne__(self, other):
663
    return not (self == other)
664
 
665
class getEmptyAWB_result:
666
  """
667
  Attributes:
668
   - success
669
  """
670
 
671
  thrift_spec = (
672
    (0, TType.STRING, 'success', None, None, ), # 0
673
  )
674
 
675
  def __init__(self, success=None,):
676
    self.success = success
677
 
678
  def read(self, iprot):
679
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
680
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
681
      return
682
    iprot.readStructBegin()
683
    while True:
684
      (fname, ftype, fid) = iprot.readFieldBegin()
685
      if ftype == TType.STOP:
686
        break
687
      if fid == 0:
688
        if ftype == TType.STRING:
689
          self.success = iprot.readString();
690
        else:
691
          iprot.skip(ftype)
692
      else:
693
        iprot.skip(ftype)
694
      iprot.readFieldEnd()
695
    iprot.readStructEnd()
696
 
697
  def write(self, oprot):
698
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
699
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
700
      return
701
    oprot.writeStructBegin('getEmptyAWB_result')
702
    if self.success != None:
703
      oprot.writeFieldBegin('success', TType.STRING, 0)
704
      oprot.writeString(self.success)
705
      oprot.writeFieldEnd()
706
    oprot.writeFieldStop()
707
    oprot.writeStructEnd()
708
 
709
  def __repr__(self):
710
    L = ['%s=%r' % (key, value)
711
      for key, value in self.__dict__.iteritems()]
712
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
713
 
714
  def __eq__(self, other):
715
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
716
 
717
  def __ne__(self, other):
718
    return not (self == other)
719
 
720
class getProviders_args:
721
 
722
  thrift_spec = (
723
  )
724
 
725
  def read(self, iprot):
726
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
727
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
728
      return
729
    iprot.readStructBegin()
730
    while True:
731
      (fname, ftype, fid) = iprot.readFieldBegin()
732
      if ftype == TType.STOP:
733
        break
734
      else:
735
        iprot.skip(ftype)
736
      iprot.readFieldEnd()
737
    iprot.readStructEnd()
738
 
739
  def write(self, oprot):
740
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
741
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
742
      return
743
    oprot.writeStructBegin('getProviders_args')
744
    oprot.writeFieldStop()
745
    oprot.writeStructEnd()
746
 
747
  def __repr__(self):
748
    L = ['%s=%r' % (key, value)
749
      for key, value in self.__dict__.iteritems()]
750
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
751
 
752
  def __eq__(self, other):
753
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
754
 
755
  def __ne__(self, other):
756
    return not (self == other)
757
 
758
class getProviders_result:
759
  """
760
  Attributes:
761
   - success
762
  """
763
 
764
  thrift_spec = (
765
    (0, TType.LIST, 'success', (TType.STRUCT,(Provider, Provider.thrift_spec)), None, ), # 0
766
  )
767
 
768
  def __init__(self, success=None,):
769
    self.success = success
770
 
771
  def read(self, iprot):
772
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
773
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
774
      return
775
    iprot.readStructBegin()
776
    while True:
777
      (fname, ftype, fid) = iprot.readFieldBegin()
778
      if ftype == TType.STOP:
779
        break
780
      if fid == 0:
781
        if ftype == TType.LIST:
782
          self.success = []
783
          (_etype17, _size14) = iprot.readListBegin()
784
          for _i18 in xrange(_size14):
785
            _elem19 = Provider()
786
            _elem19.read(iprot)
787
            self.success.append(_elem19)
788
          iprot.readListEnd()
789
        else:
790
          iprot.skip(ftype)
791
      else:
792
        iprot.skip(ftype)
793
      iprot.readFieldEnd()
794
    iprot.readStructEnd()
795
 
796
  def write(self, oprot):
797
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
798
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
799
      return
800
    oprot.writeStructBegin('getProviders_result')
801
    if self.success != None:
802
      oprot.writeFieldBegin('success', TType.LIST, 0)
803
      oprot.writeListBegin(TType.STRUCT, len(self.success))
804
      for iter20 in self.success:
805
        iter20.write(oprot)
806
      oprot.writeListEnd()
807
      oprot.writeFieldEnd()
808
    oprot.writeFieldStop()
809
    oprot.writeStructEnd()
810
 
811
  def __repr__(self):
812
    L = ['%s=%r' % (key, value)
813
      for key, value in self.__dict__.iteritems()]
814
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
815
 
816
  def __eq__(self, other):
817
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
818
 
819
  def __ne__(self, other):
820
    return not (self == other)
821
 
822
class getProvider_args:
823
  """
824
  Attributes:
825
   - provider_id
826
  """
827
 
828
  thrift_spec = (
829
    None, # 0
830
    (1, TType.I64, 'provider_id', None, None, ), # 1
831
  )
832
 
833
  def __init__(self, provider_id=None,):
834
    self.provider_id = provider_id
835
 
836
  def read(self, iprot):
837
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
838
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
839
      return
840
    iprot.readStructBegin()
841
    while True:
842
      (fname, ftype, fid) = iprot.readFieldBegin()
843
      if ftype == TType.STOP:
844
        break
845
      if fid == 1:
846
        if ftype == TType.I64:
847
          self.provider_id = iprot.readI64();
848
        else:
849
          iprot.skip(ftype)
850
      else:
851
        iprot.skip(ftype)
852
      iprot.readFieldEnd()
853
    iprot.readStructEnd()
854
 
855
  def write(self, oprot):
856
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
857
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
858
      return
859
    oprot.writeStructBegin('getProvider_args')
860
    if self.provider_id != None:
861
      oprot.writeFieldBegin('provider_id', TType.I64, 1)
862
      oprot.writeI64(self.provider_id)
863
      oprot.writeFieldEnd()
864
    oprot.writeFieldStop()
865
    oprot.writeStructEnd()
866
 
867
  def __repr__(self):
868
    L = ['%s=%r' % (key, value)
869
      for key, value in self.__dict__.iteritems()]
870
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
871
 
872
  def __eq__(self, other):
873
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
874
 
875
  def __ne__(self, other):
876
    return not (self == other)
877
 
878
class getProvider_result:
879
  """
880
  Attributes:
881
   - success
882
  """
883
 
884
  thrift_spec = (
885
    (0, TType.STRUCT, 'success', (Provider, Provider.thrift_spec), None, ), # 0
886
  )
887
 
888
  def __init__(self, success=None,):
889
    self.success = success
890
 
891
  def read(self, iprot):
892
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
893
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
894
      return
895
    iprot.readStructBegin()
896
    while True:
897
      (fname, ftype, fid) = iprot.readFieldBegin()
898
      if ftype == TType.STOP:
899
        break
900
      if fid == 0:
901
        if ftype == TType.STRUCT:
902
          self.success = Provider()
903
          self.success.read(iprot)
904
        else:
905
          iprot.skip(ftype)
906
      else:
907
        iprot.skip(ftype)
908
      iprot.readFieldEnd()
909
    iprot.readStructEnd()
910
 
911
  def write(self, oprot):
912
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
913
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
914
      return
915
    oprot.writeStructBegin('getProvider_result')
916
    if self.success != None:
917
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
918
      self.success.write(oprot)
919
      oprot.writeFieldEnd()
920
    oprot.writeFieldStop()
921
    oprot.writeStructEnd()
922
 
923
  def __repr__(self):
924
    L = ['%s=%r' % (key, value)
925
      for key, value in self.__dict__.iteritems()]
926
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
927
 
928
  def __eq__(self, other):
929
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
930
 
931
  def __ne__(self, other):
932
    return not (self == other)
933
 
442 rajveer 934
class createShipment_args:
935
  """
936
  Attributes:
937
   - shipment
938
  """
939
 
940
  thrift_spec = (
941
    None, # 0
942
    (1, TType.STRUCT, 'shipment', (Shipment, Shipment.thrift_spec), None, ), # 1
943
  )
944
 
945
  def __init__(self, shipment=None,):
946
    self.shipment = shipment
947
 
948
  def read(self, iprot):
949
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
950
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
951
      return
952
    iprot.readStructBegin()
953
    while True:
954
      (fname, ftype, fid) = iprot.readFieldBegin()
955
      if ftype == TType.STOP:
956
        break
957
      if fid == 1:
958
        if ftype == TType.STRUCT:
959
          self.shipment = Shipment()
960
          self.shipment.read(iprot)
961
        else:
962
          iprot.skip(ftype)
963
      else:
964
        iprot.skip(ftype)
965
      iprot.readFieldEnd()
966
    iprot.readStructEnd()
967
 
968
  def write(self, oprot):
969
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
970
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
971
      return
972
    oprot.writeStructBegin('createShipment_args')
973
    if self.shipment != None:
974
      oprot.writeFieldBegin('shipment', TType.STRUCT, 1)
975
      self.shipment.write(oprot)
976
      oprot.writeFieldEnd()
977
    oprot.writeFieldStop()
978
    oprot.writeStructEnd()
979
 
980
  def __repr__(self):
981
    L = ['%s=%r' % (key, value)
982
      for key, value in self.__dict__.iteritems()]
983
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
984
 
985
  def __eq__(self, other):
986
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
987
 
988
  def __ne__(self, other):
989
    return not (self == other)
990
 
991
class createShipment_result:
992
 
993
  thrift_spec = (
994
  )
995
 
996
  def read(self, iprot):
997
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
998
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
999
      return
1000
    iprot.readStructBegin()
1001
    while True:
1002
      (fname, ftype, fid) = iprot.readFieldBegin()
1003
      if ftype == TType.STOP:
1004
        break
1005
      else:
1006
        iprot.skip(ftype)
1007
      iprot.readFieldEnd()
1008
    iprot.readStructEnd()
1009
 
1010
  def write(self, oprot):
1011
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1012
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1013
      return
1014
    oprot.writeStructBegin('createShipment_result')
1015
    oprot.writeFieldStop()
1016
    oprot.writeStructEnd()
1017
 
1018
  def __repr__(self):
1019
    L = ['%s=%r' % (key, value)
1020
      for key, value in self.__dict__.iteritems()]
1021
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1022
 
1023
  def __eq__(self, other):
1024
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1025
 
1026
  def __ne__(self, other):
1027
    return not (self == other)
1028
 
1029
class updateShipmentStatus_args:
1030
  """
1031
  Attributes:
1032
   - awb
1033
   - shipment_update
1034
  """
1035
 
1036
  thrift_spec = (
1037
    None, # 0
1038
    (1, TType.STRING, 'awb', None, None, ), # 1
1039
    (2, TType.STRUCT, 'shipment_update', (ShipmentUpdate, ShipmentUpdate.thrift_spec), None, ), # 2
1040
  )
1041
 
1042
  def __init__(self, awb=None, shipment_update=None,):
1043
    self.awb = awb
1044
    self.shipment_update = shipment_update
1045
 
1046
  def read(self, iprot):
1047
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1048
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1049
      return
1050
    iprot.readStructBegin()
1051
    while True:
1052
      (fname, ftype, fid) = iprot.readFieldBegin()
1053
      if ftype == TType.STOP:
1054
        break
1055
      if fid == 1:
1056
        if ftype == TType.STRING:
1057
          self.awb = iprot.readString();
1058
        else:
1059
          iprot.skip(ftype)
1060
      elif fid == 2:
1061
        if ftype == TType.STRUCT:
1062
          self.shipment_update = ShipmentUpdate()
1063
          self.shipment_update.read(iprot)
1064
        else:
1065
          iprot.skip(ftype)
1066
      else:
1067
        iprot.skip(ftype)
1068
      iprot.readFieldEnd()
1069
    iprot.readStructEnd()
1070
 
1071
  def write(self, oprot):
1072
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1073
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1074
      return
1075
    oprot.writeStructBegin('updateShipmentStatus_args')
1076
    if self.awb != None:
1077
      oprot.writeFieldBegin('awb', TType.STRING, 1)
1078
      oprot.writeString(self.awb)
1079
      oprot.writeFieldEnd()
1080
    if self.shipment_update != None:
1081
      oprot.writeFieldBegin('shipment_update', TType.STRUCT, 2)
1082
      self.shipment_update.write(oprot)
1083
      oprot.writeFieldEnd()
1084
    oprot.writeFieldStop()
1085
    oprot.writeStructEnd()
1086
 
1087
  def __repr__(self):
1088
    L = ['%s=%r' % (key, value)
1089
      for key, value in self.__dict__.iteritems()]
1090
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1091
 
1092
  def __eq__(self, other):
1093
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1094
 
1095
  def __ne__(self, other):
1096
    return not (self == other)
1097
 
1098
class updateShipmentStatus_result:
1099
 
1100
  thrift_spec = (
1101
  )
1102
 
1103
  def read(self, iprot):
1104
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1105
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1106
      return
1107
    iprot.readStructBegin()
1108
    while True:
1109
      (fname, ftype, fid) = iprot.readFieldBegin()
1110
      if ftype == TType.STOP:
1111
        break
1112
      else:
1113
        iprot.skip(ftype)
1114
      iprot.readFieldEnd()
1115
    iprot.readStructEnd()
1116
 
1117
  def write(self, oprot):
1118
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1119
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1120
      return
1121
    oprot.writeStructBegin('updateShipmentStatus_result')
1122
    oprot.writeFieldStop()
1123
    oprot.writeStructEnd()
1124
 
1125
  def __repr__(self):
1126
    L = ['%s=%r' % (key, value)
1127
      for key, value in self.__dict__.iteritems()]
1128
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1129
 
1130
  def __eq__(self, other):
1131
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1132
 
1133
  def __ne__(self, other):
1134
    return not (self == other)
1135
 
412 ashish 1136
class getShipmentInfo_args:
1137
  """
1138
  Attributes:
1139
   - awb
1140
  """
1141
 
1142
  thrift_spec = (
1143
    None, # 0
1144
    (1, TType.STRING, 'awb', None, None, ), # 1
1145
  )
1146
 
1147
  def __init__(self, awb=None,):
1148
    self.awb = awb
1149
 
1150
  def read(self, iprot):
1151
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1152
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1153
      return
1154
    iprot.readStructBegin()
1155
    while True:
1156
      (fname, ftype, fid) = iprot.readFieldBegin()
1157
      if ftype == TType.STOP:
1158
        break
1159
      if fid == 1:
1160
        if ftype == TType.STRING:
1161
          self.awb = iprot.readString();
1162
        else:
1163
          iprot.skip(ftype)
1164
      else:
1165
        iprot.skip(ftype)
1166
      iprot.readFieldEnd()
1167
    iprot.readStructEnd()
1168
 
1169
  def write(self, oprot):
1170
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1171
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1172
      return
1173
    oprot.writeStructBegin('getShipmentInfo_args')
1174
    if self.awb != None:
1175
      oprot.writeFieldBegin('awb', TType.STRING, 1)
1176
      oprot.writeString(self.awb)
1177
      oprot.writeFieldEnd()
1178
    oprot.writeFieldStop()
1179
    oprot.writeStructEnd()
1180
 
1181
  def __repr__(self):
1182
    L = ['%s=%r' % (key, value)
1183
      for key, value in self.__dict__.iteritems()]
1184
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1185
 
1186
  def __eq__(self, other):
1187
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1188
 
1189
  def __ne__(self, other):
1190
    return not (self == other)
1191
 
1192
class getShipmentInfo_result:
1193
  """
1194
  Attributes:
1195
   - success
1196
  """
1197
 
1198
  thrift_spec = (
1199
    (0, TType.STRUCT, 'success', (ShipmentStatusInfo, ShipmentStatusInfo.thrift_spec), None, ), # 0
1200
  )
1201
 
1202
  def __init__(self, success=None,):
1203
    self.success = success
1204
 
1205
  def read(self, iprot):
1206
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1207
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1208
      return
1209
    iprot.readStructBegin()
1210
    while True:
1211
      (fname, ftype, fid) = iprot.readFieldBegin()
1212
      if ftype == TType.STOP:
1213
        break
1214
      if fid == 0:
1215
        if ftype == TType.STRUCT:
1216
          self.success = ShipmentStatusInfo()
1217
          self.success.read(iprot)
1218
        else:
1219
          iprot.skip(ftype)
1220
      else:
1221
        iprot.skip(ftype)
1222
      iprot.readFieldEnd()
1223
    iprot.readStructEnd()
1224
 
1225
  def write(self, oprot):
1226
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1227
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1228
      return
1229
    oprot.writeStructBegin('getShipmentInfo_result')
1230
    if self.success != None:
1231
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1232
      self.success.write(oprot)
1233
      oprot.writeFieldEnd()
1234
    oprot.writeFieldStop()
1235
    oprot.writeStructEnd()
1236
 
1237
  def __repr__(self):
1238
    L = ['%s=%r' % (key, value)
1239
      for key, value in self.__dict__.iteritems()]
1240
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1241
 
1242
  def __eq__(self, other):
1243
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1244
 
1245
  def __ne__(self, other):
1246
    return not (self == other)
1247
 
1248
class getShipments_args:
1249
  """
1250
  Attributes:
1251
   - warehouse_id
1252
   - from_date
1253
   - to_date
1254
   - provider_id
1255
  """
1256
 
1257
  thrift_spec = (
1258
    None, # 0
1259
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
1260
    (2, TType.I64, 'from_date', None, None, ), # 2
1261
    (3, TType.I64, 'to_date', None, None, ), # 3
1262
    (4, TType.I64, 'provider_id', None, None, ), # 4
1263
  )
1264
 
1265
  def __init__(self, warehouse_id=None, from_date=None, to_date=None, provider_id=None,):
1266
    self.warehouse_id = warehouse_id
1267
    self.from_date = from_date
1268
    self.to_date = to_date
1269
    self.provider_id = provider_id
1270
 
1271
  def read(self, iprot):
1272
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1273
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1274
      return
1275
    iprot.readStructBegin()
1276
    while True:
1277
      (fname, ftype, fid) = iprot.readFieldBegin()
1278
      if ftype == TType.STOP:
1279
        break
1280
      if fid == 1:
1281
        if ftype == TType.I64:
1282
          self.warehouse_id = iprot.readI64();
1283
        else:
1284
          iprot.skip(ftype)
1285
      elif fid == 2:
1286
        if ftype == TType.I64:
1287
          self.from_date = iprot.readI64();
1288
        else:
1289
          iprot.skip(ftype)
1290
      elif fid == 3:
1291
        if ftype == TType.I64:
1292
          self.to_date = iprot.readI64();
1293
        else:
1294
          iprot.skip(ftype)
1295
      elif fid == 4:
1296
        if ftype == TType.I64:
1297
          self.provider_id = iprot.readI64();
1298
        else:
1299
          iprot.skip(ftype)
1300
      else:
1301
        iprot.skip(ftype)
1302
      iprot.readFieldEnd()
1303
    iprot.readStructEnd()
1304
 
1305
  def write(self, oprot):
1306
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1307
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1308
      return
1309
    oprot.writeStructBegin('getShipments_args')
1310
    if self.warehouse_id != None:
1311
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
1312
      oprot.writeI64(self.warehouse_id)
1313
      oprot.writeFieldEnd()
1314
    if self.from_date != None:
1315
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1316
      oprot.writeI64(self.from_date)
1317
      oprot.writeFieldEnd()
1318
    if self.to_date != None:
1319
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1320
      oprot.writeI64(self.to_date)
1321
      oprot.writeFieldEnd()
1322
    if self.provider_id != None:
1323
      oprot.writeFieldBegin('provider_id', TType.I64, 4)
1324
      oprot.writeI64(self.provider_id)
1325
      oprot.writeFieldEnd()
1326
    oprot.writeFieldStop()
1327
    oprot.writeStructEnd()
1328
 
1329
  def __repr__(self):
1330
    L = ['%s=%r' % (key, value)
1331
      for key, value in self.__dict__.iteritems()]
1332
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1333
 
1334
  def __eq__(self, other):
1335
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1336
 
1337
  def __ne__(self, other):
1338
    return not (self == other)
1339
 
1340
class getShipments_result:
1341
  """
1342
  Attributes:
1343
   - success
1344
  """
1345
 
1346
  thrift_spec = (
1347
    (0, TType.LIST, 'success', (TType.STRUCT,(Shipment, Shipment.thrift_spec)), None, ), # 0
1348
  )
1349
 
1350
  def __init__(self, success=None,):
1351
    self.success = success
1352
 
1353
  def read(self, iprot):
1354
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1355
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1356
      return
1357
    iprot.readStructBegin()
1358
    while True:
1359
      (fname, ftype, fid) = iprot.readFieldBegin()
1360
      if ftype == TType.STOP:
1361
        break
1362
      if fid == 0:
1363
        if ftype == TType.LIST:
1364
          self.success = []
1365
          (_etype24, _size21) = iprot.readListBegin()
1366
          for _i25 in xrange(_size21):
1367
            _elem26 = Shipment()
1368
            _elem26.read(iprot)
1369
            self.success.append(_elem26)
1370
          iprot.readListEnd()
1371
        else:
1372
          iprot.skip(ftype)
1373
      else:
1374
        iprot.skip(ftype)
1375
      iprot.readFieldEnd()
1376
    iprot.readStructEnd()
1377
 
1378
  def write(self, oprot):
1379
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1380
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1381
      return
1382
    oprot.writeStructBegin('getShipments_result')
1383
    if self.success != None:
1384
      oprot.writeFieldBegin('success', TType.LIST, 0)
1385
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1386
      for iter27 in self.success:
1387
        iter27.write(oprot)
1388
      oprot.writeListEnd()
1389
      oprot.writeFieldEnd()
1390
    oprot.writeFieldStop()
1391
    oprot.writeStructEnd()
1392
 
1393
  def __repr__(self):
1394
    L = ['%s=%r' % (key, value)
1395
      for key, value in self.__dict__.iteritems()]
1396
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1397
 
1398
  def __eq__(self, other):
1399
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1400
 
1401
  def __ne__(self, other):
1402
    return not (self == other)
1403
 
1404
class getTodaysShipments_args:
1405
  """
1406
  Attributes:
1407
   - warehouse_id
1408
   - provider_id
1409
  """
1410
 
1411
  thrift_spec = (
1412
    None, # 0
1413
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
1414
    (2, TType.I64, 'provider_id', None, None, ), # 2
1415
  )
1416
 
1417
  def __init__(self, warehouse_id=None, provider_id=None,):
1418
    self.warehouse_id = warehouse_id
1419
    self.provider_id = provider_id
1420
 
1421
  def read(self, iprot):
1422
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1423
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1424
      return
1425
    iprot.readStructBegin()
1426
    while True:
1427
      (fname, ftype, fid) = iprot.readFieldBegin()
1428
      if ftype == TType.STOP:
1429
        break
1430
      if fid == 1:
1431
        if ftype == TType.I64:
1432
          self.warehouse_id = iprot.readI64();
1433
        else:
1434
          iprot.skip(ftype)
1435
      elif fid == 2:
1436
        if ftype == TType.I64:
1437
          self.provider_id = iprot.readI64();
1438
        else:
1439
          iprot.skip(ftype)
1440
      else:
1441
        iprot.skip(ftype)
1442
      iprot.readFieldEnd()
1443
    iprot.readStructEnd()
1444
 
1445
  def write(self, oprot):
1446
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1447
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1448
      return
1449
    oprot.writeStructBegin('getTodaysShipments_args')
1450
    if self.warehouse_id != None:
1451
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
1452
      oprot.writeI64(self.warehouse_id)
1453
      oprot.writeFieldEnd()
1454
    if self.provider_id != None:
1455
      oprot.writeFieldBegin('provider_id', TType.I64, 2)
1456
      oprot.writeI64(self.provider_id)
1457
      oprot.writeFieldEnd()
1458
    oprot.writeFieldStop()
1459
    oprot.writeStructEnd()
1460
 
1461
  def __repr__(self):
1462
    L = ['%s=%r' % (key, value)
1463
      for key, value in self.__dict__.iteritems()]
1464
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1465
 
1466
  def __eq__(self, other):
1467
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1468
 
1469
  def __ne__(self, other):
1470
    return not (self == other)
1471
 
1472
class getTodaysShipments_result:
1473
  """
1474
  Attributes:
1475
   - success
1476
  """
1477
 
1478
  thrift_spec = (
1479
    (0, TType.LIST, 'success', (TType.STRUCT,(Shipment, Shipment.thrift_spec)), None, ), # 0
1480
  )
1481
 
1482
  def __init__(self, success=None,):
1483
    self.success = success
1484
 
1485
  def read(self, iprot):
1486
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1487
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1488
      return
1489
    iprot.readStructBegin()
1490
    while True:
1491
      (fname, ftype, fid) = iprot.readFieldBegin()
1492
      if ftype == TType.STOP:
1493
        break
1494
      if fid == 0:
1495
        if ftype == TType.LIST:
1496
          self.success = []
1497
          (_etype31, _size28) = iprot.readListBegin()
1498
          for _i32 in xrange(_size28):
1499
            _elem33 = Shipment()
1500
            _elem33.read(iprot)
1501
            self.success.append(_elem33)
1502
          iprot.readListEnd()
1503
        else:
1504
          iprot.skip(ftype)
1505
      else:
1506
        iprot.skip(ftype)
1507
      iprot.readFieldEnd()
1508
    iprot.readStructEnd()
1509
 
1510
  def write(self, oprot):
1511
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1512
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1513
      return
1514
    oprot.writeStructBegin('getTodaysShipments_result')
1515
    if self.success != None:
1516
      oprot.writeFieldBegin('success', TType.LIST, 0)
1517
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1518
      for iter34 in self.success:
1519
        iter34.write(oprot)
1520
      oprot.writeListEnd()
1521
      oprot.writeFieldEnd()
1522
    oprot.writeFieldStop()
1523
    oprot.writeStructEnd()
1524
 
1525
  def __repr__(self):
1526
    L = ['%s=%r' % (key, value)
1527
      for key, value in self.__dict__.iteritems()]
1528
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1529
 
1530
  def __eq__(self, other):
1531
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1532
 
1533
  def __ne__(self, other):
1534
    return not (self == other)
1535
 
1536