Subversion Repositories SmartDukaan

Rev

Rev 472 | Rev 483 | 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:
472 rajveer 19
  def getLogisticsEstimation(self, itemId, destination_pin, provider_id):
20
    """
21
    Parameters:
22
     - itemId
23
     - destination_pin
24
     - provider_id
25
    """
26
    pass
27
 
477 rajveer 28
  def addDeliveryEstimate(self, warahouse_id, destination_pin, provider_id, delivery_time, reliability):
472 rajveer 29
    """
30
    Parameters:
31
     - warahouse_id
32
     - destination_pin
33
     - provider_id
34
     - delivery_time
477 rajveer 35
     - reliability
472 rajveer 36
    """
37
    pass
38
 
477 rajveer 39
  def addPincodeWarehouseMapping(self, pin_code, warehouse_id, warehouse_pin):
40
    """
41
    Parameters:
42
     - pin_code
43
     - warehouse_id
44
     - warehouse_pin
45
    """
46
    pass
47
 
412 ashish 48
  def addEmptyAWBs(self, numbers, provider_id):
49
    """
50
    Parameters:
51
     - numbers
52
     - provider_id
53
    """
54
    pass
55
 
56
  def getEmptyAWB(self, provider_id):
57
    """
58
    Parameters:
59
     - provider_id
60
    """
61
    pass
62
 
63
  def getProviders(self, ):
64
    pass
65
 
66
  def getProvider(self, provider_id):
67
    """
68
    Parameters:
69
     - provider_id
70
    """
71
    pass
72
 
442 rajveer 73
  def createShipment(self, shipment):
74
    """
75
    Parameters:
76
     - shipment
77
    """
78
    pass
79
 
80
  def updateShipmentStatus(self, awb, shipment_update):
81
    """
82
    Parameters:
83
     - awb
84
     - shipment_update
85
    """
86
    pass
87
 
412 ashish 88
  def getShipmentInfo(self, awb):
89
    """
90
    Parameters:
91
     - awb
92
    """
93
    pass
94
 
95
  def getShipments(self, warehouse_id, from_date, to_date, provider_id):
96
    """
97
    Parameters:
98
     - warehouse_id
99
     - from_date
100
     - to_date
101
     - provider_id
102
    """
103
    pass
104
 
105
  def getTodaysShipments(self, warehouse_id, provider_id):
106
    """
107
    Parameters:
108
     - warehouse_id
109
     - provider_id
110
    """
111
    pass
112
 
113
 
114
class Client(Iface):
115
  def __init__(self, iprot, oprot=None):
116
    self._iprot = self._oprot = iprot
117
    if oprot != None:
118
      self._oprot = oprot
119
    self._seqid = 0
120
 
472 rajveer 121
  def getLogisticsEstimation(self, itemId, destination_pin, provider_id):
122
    """
123
    Parameters:
124
     - itemId
125
     - destination_pin
126
     - provider_id
127
    """
128
    self.send_getLogisticsEstimation(itemId, destination_pin, provider_id)
129
    return self.recv_getLogisticsEstimation()
130
 
131
  def send_getLogisticsEstimation(self, itemId, destination_pin, provider_id):
132
    self._oprot.writeMessageBegin('getLogisticsEstimation', TMessageType.CALL, self._seqid)
133
    args = getLogisticsEstimation_args()
134
    args.itemId = itemId
135
    args.destination_pin = destination_pin
136
    args.provider_id = provider_id
137
    args.write(self._oprot)
138
    self._oprot.writeMessageEnd()
139
    self._oprot.trans.flush()
140
 
141
  def recv_getLogisticsEstimation(self, ):
142
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
143
    if mtype == TMessageType.EXCEPTION:
144
      x = TApplicationException()
145
      x.read(self._iprot)
146
      self._iprot.readMessageEnd()
147
      raise x
148
    result = getLogisticsEstimation_result()
149
    result.read(self._iprot)
150
    self._iprot.readMessageEnd()
151
    if result.success != None:
152
      return result.success
153
    if result.se != None:
154
      raise result.se
155
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
156
 
477 rajveer 157
  def addDeliveryEstimate(self, warahouse_id, destination_pin, provider_id, delivery_time, reliability):
472 rajveer 158
    """
159
    Parameters:
160
     - warahouse_id
161
     - destination_pin
162
     - provider_id
163
     - delivery_time
477 rajveer 164
     - reliability
472 rajveer 165
    """
477 rajveer 166
    self.send_addDeliveryEstimate(warahouse_id, destination_pin, provider_id, delivery_time, reliability)
472 rajveer 167
    self.recv_addDeliveryEstimate()
168
 
477 rajveer 169
  def send_addDeliveryEstimate(self, warahouse_id, destination_pin, provider_id, delivery_time, reliability):
472 rajveer 170
    self._oprot.writeMessageBegin('addDeliveryEstimate', TMessageType.CALL, self._seqid)
171
    args = addDeliveryEstimate_args()
172
    args.warahouse_id = warahouse_id
173
    args.destination_pin = destination_pin
174
    args.provider_id = provider_id
175
    args.delivery_time = delivery_time
477 rajveer 176
    args.reliability = reliability
472 rajveer 177
    args.write(self._oprot)
178
    self._oprot.writeMessageEnd()
179
    self._oprot.trans.flush()
180
 
181
  def recv_addDeliveryEstimate(self, ):
182
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
183
    if mtype == TMessageType.EXCEPTION:
184
      x = TApplicationException()
185
      x.read(self._iprot)
186
      self._iprot.readMessageEnd()
187
      raise x
188
    result = addDeliveryEstimate_result()
189
    result.read(self._iprot)
190
    self._iprot.readMessageEnd()
191
    return
192
 
477 rajveer 193
  def addPincodeWarehouseMapping(self, pin_code, warehouse_id, warehouse_pin):
194
    """
195
    Parameters:
196
     - pin_code
197
     - warehouse_id
198
     - warehouse_pin
199
    """
200
    self.send_addPincodeWarehouseMapping(pin_code, warehouse_id, warehouse_pin)
201
    self.recv_addPincodeWarehouseMapping()
202
 
203
  def send_addPincodeWarehouseMapping(self, pin_code, warehouse_id, warehouse_pin):
204
    self._oprot.writeMessageBegin('addPincodeWarehouseMapping', TMessageType.CALL, self._seqid)
205
    args = addPincodeWarehouseMapping_args()
206
    args.pin_code = pin_code
207
    args.warehouse_id = warehouse_id
208
    args.warehouse_pin = warehouse_pin
209
    args.write(self._oprot)
210
    self._oprot.writeMessageEnd()
211
    self._oprot.trans.flush()
212
 
213
  def recv_addPincodeWarehouseMapping(self, ):
214
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
215
    if mtype == TMessageType.EXCEPTION:
216
      x = TApplicationException()
217
      x.read(self._iprot)
218
      self._iprot.readMessageEnd()
219
      raise x
220
    result = addPincodeWarehouseMapping_result()
221
    result.read(self._iprot)
222
    self._iprot.readMessageEnd()
223
    return
224
 
412 ashish 225
  def addEmptyAWBs(self, numbers, provider_id):
226
    """
227
    Parameters:
228
     - numbers
229
     - provider_id
230
    """
231
    self.send_addEmptyAWBs(numbers, provider_id)
232
    self.recv_addEmptyAWBs()
233
 
234
  def send_addEmptyAWBs(self, numbers, provider_id):
235
    self._oprot.writeMessageBegin('addEmptyAWBs', TMessageType.CALL, self._seqid)
236
    args = addEmptyAWBs_args()
237
    args.numbers = numbers
238
    args.provider_id = provider_id
239
    args.write(self._oprot)
240
    self._oprot.writeMessageEnd()
241
    self._oprot.trans.flush()
242
 
243
  def recv_addEmptyAWBs(self, ):
244
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
245
    if mtype == TMessageType.EXCEPTION:
246
      x = TApplicationException()
247
      x.read(self._iprot)
248
      self._iprot.readMessageEnd()
249
      raise x
250
    result = addEmptyAWBs_result()
251
    result.read(self._iprot)
252
    self._iprot.readMessageEnd()
253
    return
254
 
255
  def getEmptyAWB(self, provider_id):
256
    """
257
    Parameters:
258
     - provider_id
259
    """
260
    self.send_getEmptyAWB(provider_id)
261
    return self.recv_getEmptyAWB()
262
 
263
  def send_getEmptyAWB(self, provider_id):
264
    self._oprot.writeMessageBegin('getEmptyAWB', TMessageType.CALL, self._seqid)
265
    args = getEmptyAWB_args()
266
    args.provider_id = provider_id
267
    args.write(self._oprot)
268
    self._oprot.writeMessageEnd()
269
    self._oprot.trans.flush()
270
 
271
  def recv_getEmptyAWB(self, ):
272
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
273
    if mtype == TMessageType.EXCEPTION:
274
      x = TApplicationException()
275
      x.read(self._iprot)
276
      self._iprot.readMessageEnd()
277
      raise x
278
    result = getEmptyAWB_result()
279
    result.read(self._iprot)
280
    self._iprot.readMessageEnd()
281
    if result.success != None:
282
      return result.success
283
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
284
 
285
  def getProviders(self, ):
286
    self.send_getProviders()
287
    return self.recv_getProviders()
288
 
289
  def send_getProviders(self, ):
290
    self._oprot.writeMessageBegin('getProviders', TMessageType.CALL, self._seqid)
291
    args = getProviders_args()
292
    args.write(self._oprot)
293
    self._oprot.writeMessageEnd()
294
    self._oprot.trans.flush()
295
 
296
  def recv_getProviders(self, ):
297
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
298
    if mtype == TMessageType.EXCEPTION:
299
      x = TApplicationException()
300
      x.read(self._iprot)
301
      self._iprot.readMessageEnd()
302
      raise x
303
    result = getProviders_result()
304
    result.read(self._iprot)
305
    self._iprot.readMessageEnd()
306
    if result.success != None:
307
      return result.success
308
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProviders failed: unknown result");
309
 
310
  def getProvider(self, provider_id):
311
    """
312
    Parameters:
313
     - provider_id
314
    """
315
    self.send_getProvider(provider_id)
316
    return self.recv_getProvider()
317
 
318
  def send_getProvider(self, provider_id):
319
    self._oprot.writeMessageBegin('getProvider', TMessageType.CALL, self._seqid)
320
    args = getProvider_args()
321
    args.provider_id = provider_id
322
    args.write(self._oprot)
323
    self._oprot.writeMessageEnd()
324
    self._oprot.trans.flush()
325
 
326
  def recv_getProvider(self, ):
327
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
328
    if mtype == TMessageType.EXCEPTION:
329
      x = TApplicationException()
330
      x.read(self._iprot)
331
      self._iprot.readMessageEnd()
332
      raise x
333
    result = getProvider_result()
334
    result.read(self._iprot)
335
    self._iprot.readMessageEnd()
336
    if result.success != None:
337
      return result.success
338
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProvider failed: unknown result");
339
 
442 rajveer 340
  def createShipment(self, shipment):
341
    """
342
    Parameters:
343
     - shipment
344
    """
345
    self.send_createShipment(shipment)
346
    self.recv_createShipment()
347
 
348
  def send_createShipment(self, shipment):
349
    self._oprot.writeMessageBegin('createShipment', TMessageType.CALL, self._seqid)
350
    args = createShipment_args()
351
    args.shipment = shipment
352
    args.write(self._oprot)
353
    self._oprot.writeMessageEnd()
354
    self._oprot.trans.flush()
355
 
356
  def recv_createShipment(self, ):
357
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
358
    if mtype == TMessageType.EXCEPTION:
359
      x = TApplicationException()
360
      x.read(self._iprot)
361
      self._iprot.readMessageEnd()
362
      raise x
363
    result = createShipment_result()
364
    result.read(self._iprot)
365
    self._iprot.readMessageEnd()
366
    return
367
 
368
  def updateShipmentStatus(self, awb, shipment_update):
369
    """
370
    Parameters:
371
     - awb
372
     - shipment_update
373
    """
374
    self.send_updateShipmentStatus(awb, shipment_update)
375
    self.recv_updateShipmentStatus()
376
 
377
  def send_updateShipmentStatus(self, awb, shipment_update):
378
    self._oprot.writeMessageBegin('updateShipmentStatus', TMessageType.CALL, self._seqid)
379
    args = updateShipmentStatus_args()
380
    args.awb = awb
381
    args.shipment_update = shipment_update
382
    args.write(self._oprot)
383
    self._oprot.writeMessageEnd()
384
    self._oprot.trans.flush()
385
 
386
  def recv_updateShipmentStatus(self, ):
387
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
388
    if mtype == TMessageType.EXCEPTION:
389
      x = TApplicationException()
390
      x.read(self._iprot)
391
      self._iprot.readMessageEnd()
392
      raise x
393
    result = updateShipmentStatus_result()
394
    result.read(self._iprot)
395
    self._iprot.readMessageEnd()
396
    return
397
 
412 ashish 398
  def getShipmentInfo(self, awb):
399
    """
400
    Parameters:
401
     - awb
402
    """
403
    self.send_getShipmentInfo(awb)
404
    return self.recv_getShipmentInfo()
405
 
406
  def send_getShipmentInfo(self, awb):
407
    self._oprot.writeMessageBegin('getShipmentInfo', TMessageType.CALL, self._seqid)
408
    args = getShipmentInfo_args()
409
    args.awb = awb
410
    args.write(self._oprot)
411
    self._oprot.writeMessageEnd()
412
    self._oprot.trans.flush()
413
 
414
  def recv_getShipmentInfo(self, ):
415
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
416
    if mtype == TMessageType.EXCEPTION:
417
      x = TApplicationException()
418
      x.read(self._iprot)
419
      self._iprot.readMessageEnd()
420
      raise x
421
    result = getShipmentInfo_result()
422
    result.read(self._iprot)
423
    self._iprot.readMessageEnd()
424
    if result.success != None:
425
      return result.success
426
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
427
 
428
  def getShipments(self, warehouse_id, from_date, to_date, provider_id):
429
    """
430
    Parameters:
431
     - warehouse_id
432
     - from_date
433
     - to_date
434
     - provider_id
435
    """
436
    self.send_getShipments(warehouse_id, from_date, to_date, provider_id)
437
    return self.recv_getShipments()
438
 
439
  def send_getShipments(self, warehouse_id, from_date, to_date, provider_id):
440
    self._oprot.writeMessageBegin('getShipments', TMessageType.CALL, self._seqid)
441
    args = getShipments_args()
442
    args.warehouse_id = warehouse_id
443
    args.from_date = from_date
444
    args.to_date = to_date
445
    args.provider_id = provider_id
446
    args.write(self._oprot)
447
    self._oprot.writeMessageEnd()
448
    self._oprot.trans.flush()
449
 
450
  def recv_getShipments(self, ):
451
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
452
    if mtype == TMessageType.EXCEPTION:
453
      x = TApplicationException()
454
      x.read(self._iprot)
455
      self._iprot.readMessageEnd()
456
      raise x
457
    result = getShipments_result()
458
    result.read(self._iprot)
459
    self._iprot.readMessageEnd()
460
    if result.success != None:
461
      return result.success
462
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShipments failed: unknown result");
463
 
464
  def getTodaysShipments(self, warehouse_id, provider_id):
465
    """
466
    Parameters:
467
     - warehouse_id
468
     - provider_id
469
    """
470
    self.send_getTodaysShipments(warehouse_id, provider_id)
471
    return self.recv_getTodaysShipments()
472
 
473
  def send_getTodaysShipments(self, warehouse_id, provider_id):
474
    self._oprot.writeMessageBegin('getTodaysShipments', TMessageType.CALL, self._seqid)
475
    args = getTodaysShipments_args()
476
    args.warehouse_id = warehouse_id
477
    args.provider_id = provider_id
478
    args.write(self._oprot)
479
    self._oprot.writeMessageEnd()
480
    self._oprot.trans.flush()
481
 
482
  def recv_getTodaysShipments(self, ):
483
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
484
    if mtype == TMessageType.EXCEPTION:
485
      x = TApplicationException()
486
      x.read(self._iprot)
487
      self._iprot.readMessageEnd()
488
      raise x
489
    result = getTodaysShipments_result()
490
    result.read(self._iprot)
491
    self._iprot.readMessageEnd()
492
    if result.success != None:
493
      return result.success
494
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTodaysShipments failed: unknown result");
495
 
496
 
497
class Processor(Iface, TProcessor):
498
  def __init__(self, handler):
499
    self._handler = handler
500
    self._processMap = {}
472 rajveer 501
    self._processMap["getLogisticsEstimation"] = Processor.process_getLogisticsEstimation
502
    self._processMap["addDeliveryEstimate"] = Processor.process_addDeliveryEstimate
477 rajveer 503
    self._processMap["addPincodeWarehouseMapping"] = Processor.process_addPincodeWarehouseMapping
412 ashish 504
    self._processMap["addEmptyAWBs"] = Processor.process_addEmptyAWBs
505
    self._processMap["getEmptyAWB"] = Processor.process_getEmptyAWB
506
    self._processMap["getProviders"] = Processor.process_getProviders
507
    self._processMap["getProvider"] = Processor.process_getProvider
442 rajveer 508
    self._processMap["createShipment"] = Processor.process_createShipment
509
    self._processMap["updateShipmentStatus"] = Processor.process_updateShipmentStatus
412 ashish 510
    self._processMap["getShipmentInfo"] = Processor.process_getShipmentInfo
511
    self._processMap["getShipments"] = Processor.process_getShipments
512
    self._processMap["getTodaysShipments"] = Processor.process_getTodaysShipments
513
 
514
  def process(self, iprot, oprot):
515
    (name, type, seqid) = iprot.readMessageBegin()
516
    if name not in self._processMap:
517
      iprot.skip(TType.STRUCT)
518
      iprot.readMessageEnd()
519
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
520
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
521
      x.write(oprot)
522
      oprot.writeMessageEnd()
523
      oprot.trans.flush()
524
      return
525
    else:
526
      self._processMap[name](self, seqid, iprot, oprot)
527
    return True
528
 
472 rajveer 529
  def process_getLogisticsEstimation(self, seqid, iprot, oprot):
530
    args = getLogisticsEstimation_args()
531
    args.read(iprot)
532
    iprot.readMessageEnd()
533
    result = getLogisticsEstimation_result()
534
    try:
535
      result.success = self._handler.getLogisticsEstimation(args.itemId, args.destination_pin, args.provider_id)
536
    except LogisticsServiceException, se:
537
      result.se = se
538
    oprot.writeMessageBegin("getLogisticsEstimation", TMessageType.REPLY, seqid)
539
    result.write(oprot)
540
    oprot.writeMessageEnd()
541
    oprot.trans.flush()
542
 
543
  def process_addDeliveryEstimate(self, seqid, iprot, oprot):
544
    args = addDeliveryEstimate_args()
545
    args.read(iprot)
546
    iprot.readMessageEnd()
547
    result = addDeliveryEstimate_result()
477 rajveer 548
    self._handler.addDeliveryEstimate(args.warahouse_id, args.destination_pin, args.provider_id, args.delivery_time, args.reliability)
472 rajveer 549
    oprot.writeMessageBegin("addDeliveryEstimate", TMessageType.REPLY, seqid)
550
    result.write(oprot)
551
    oprot.writeMessageEnd()
552
    oprot.trans.flush()
553
 
477 rajveer 554
  def process_addPincodeWarehouseMapping(self, seqid, iprot, oprot):
555
    args = addPincodeWarehouseMapping_args()
556
    args.read(iprot)
557
    iprot.readMessageEnd()
558
    result = addPincodeWarehouseMapping_result()
559
    self._handler.addPincodeWarehouseMapping(args.pin_code, args.warehouse_id, args.warehouse_pin)
560
    oprot.writeMessageBegin("addPincodeWarehouseMapping", TMessageType.REPLY, seqid)
561
    result.write(oprot)
562
    oprot.writeMessageEnd()
563
    oprot.trans.flush()
564
 
412 ashish 565
  def process_addEmptyAWBs(self, seqid, iprot, oprot):
566
    args = addEmptyAWBs_args()
567
    args.read(iprot)
568
    iprot.readMessageEnd()
569
    result = addEmptyAWBs_result()
570
    self._handler.addEmptyAWBs(args.numbers, args.provider_id)
571
    oprot.writeMessageBegin("addEmptyAWBs", TMessageType.REPLY, seqid)
572
    result.write(oprot)
573
    oprot.writeMessageEnd()
574
    oprot.trans.flush()
575
 
576
  def process_getEmptyAWB(self, seqid, iprot, oprot):
577
    args = getEmptyAWB_args()
578
    args.read(iprot)
579
    iprot.readMessageEnd()
580
    result = getEmptyAWB_result()
581
    result.success = self._handler.getEmptyAWB(args.provider_id)
582
    oprot.writeMessageBegin("getEmptyAWB", TMessageType.REPLY, seqid)
583
    result.write(oprot)
584
    oprot.writeMessageEnd()
585
    oprot.trans.flush()
586
 
587
  def process_getProviders(self, seqid, iprot, oprot):
588
    args = getProviders_args()
589
    args.read(iprot)
590
    iprot.readMessageEnd()
591
    result = getProviders_result()
592
    result.success = self._handler.getProviders()
593
    oprot.writeMessageBegin("getProviders", TMessageType.REPLY, seqid)
594
    result.write(oprot)
595
    oprot.writeMessageEnd()
596
    oprot.trans.flush()
597
 
598
  def process_getProvider(self, seqid, iprot, oprot):
599
    args = getProvider_args()
600
    args.read(iprot)
601
    iprot.readMessageEnd()
602
    result = getProvider_result()
603
    result.success = self._handler.getProvider(args.provider_id)
604
    oprot.writeMessageBegin("getProvider", TMessageType.REPLY, seqid)
605
    result.write(oprot)
606
    oprot.writeMessageEnd()
607
    oprot.trans.flush()
608
 
442 rajveer 609
  def process_createShipment(self, seqid, iprot, oprot):
610
    args = createShipment_args()
611
    args.read(iprot)
612
    iprot.readMessageEnd()
613
    result = createShipment_result()
614
    self._handler.createShipment(args.shipment)
615
    oprot.writeMessageBegin("createShipment", TMessageType.REPLY, seqid)
616
    result.write(oprot)
617
    oprot.writeMessageEnd()
618
    oprot.trans.flush()
619
 
620
  def process_updateShipmentStatus(self, seqid, iprot, oprot):
621
    args = updateShipmentStatus_args()
622
    args.read(iprot)
623
    iprot.readMessageEnd()
624
    result = updateShipmentStatus_result()
625
    self._handler.updateShipmentStatus(args.awb, args.shipment_update)
626
    oprot.writeMessageBegin("updateShipmentStatus", TMessageType.REPLY, seqid)
627
    result.write(oprot)
628
    oprot.writeMessageEnd()
629
    oprot.trans.flush()
630
 
412 ashish 631
  def process_getShipmentInfo(self, seqid, iprot, oprot):
632
    args = getShipmentInfo_args()
633
    args.read(iprot)
634
    iprot.readMessageEnd()
635
    result = getShipmentInfo_result()
636
    result.success = self._handler.getShipmentInfo(args.awb)
637
    oprot.writeMessageBegin("getShipmentInfo", TMessageType.REPLY, seqid)
638
    result.write(oprot)
639
    oprot.writeMessageEnd()
640
    oprot.trans.flush()
641
 
642
  def process_getShipments(self, seqid, iprot, oprot):
643
    args = getShipments_args()
644
    args.read(iprot)
645
    iprot.readMessageEnd()
646
    result = getShipments_result()
647
    result.success = self._handler.getShipments(args.warehouse_id, args.from_date, args.to_date, args.provider_id)
648
    oprot.writeMessageBegin("getShipments", TMessageType.REPLY, seqid)
649
    result.write(oprot)
650
    oprot.writeMessageEnd()
651
    oprot.trans.flush()
652
 
653
  def process_getTodaysShipments(self, seqid, iprot, oprot):
654
    args = getTodaysShipments_args()
655
    args.read(iprot)
656
    iprot.readMessageEnd()
657
    result = getTodaysShipments_result()
658
    result.success = self._handler.getTodaysShipments(args.warehouse_id, args.provider_id)
659
    oprot.writeMessageBegin("getTodaysShipments", TMessageType.REPLY, seqid)
660
    result.write(oprot)
661
    oprot.writeMessageEnd()
662
    oprot.trans.flush()
663
 
664
 
665
# HELPER FUNCTIONS AND STRUCTURES
666
 
472 rajveer 667
class getLogisticsEstimation_args:
668
  """
669
  Attributes:
670
   - itemId
671
   - destination_pin
672
   - provider_id
673
  """
674
 
675
  thrift_spec = (
676
    None, # 0
677
    (1, TType.I64, 'itemId', None, None, ), # 1
678
    (2, TType.STRING, 'destination_pin', None, None, ), # 2
679
    (3, TType.I64, 'provider_id', None, None, ), # 3
680
  )
681
 
682
  def __init__(self, itemId=None, destination_pin=None, provider_id=None,):
683
    self.itemId = itemId
684
    self.destination_pin = destination_pin
685
    self.provider_id = provider_id
686
 
687
  def read(self, iprot):
688
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
689
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
690
      return
691
    iprot.readStructBegin()
692
    while True:
693
      (fname, ftype, fid) = iprot.readFieldBegin()
694
      if ftype == TType.STOP:
695
        break
696
      if fid == 1:
697
        if ftype == TType.I64:
698
          self.itemId = iprot.readI64();
699
        else:
700
          iprot.skip(ftype)
701
      elif fid == 2:
702
        if ftype == TType.STRING:
703
          self.destination_pin = iprot.readString();
704
        else:
705
          iprot.skip(ftype)
706
      elif fid == 3:
707
        if ftype == TType.I64:
708
          self.provider_id = iprot.readI64();
709
        else:
710
          iprot.skip(ftype)
711
      else:
712
        iprot.skip(ftype)
713
      iprot.readFieldEnd()
714
    iprot.readStructEnd()
715
 
716
  def write(self, oprot):
717
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
718
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
719
      return
720
    oprot.writeStructBegin('getLogisticsEstimation_args')
721
    if self.itemId != None:
722
      oprot.writeFieldBegin('itemId', TType.I64, 1)
723
      oprot.writeI64(self.itemId)
724
      oprot.writeFieldEnd()
725
    if self.destination_pin != None:
726
      oprot.writeFieldBegin('destination_pin', TType.STRING, 2)
727
      oprot.writeString(self.destination_pin)
728
      oprot.writeFieldEnd()
729
    if self.provider_id != None:
730
      oprot.writeFieldBegin('provider_id', TType.I64, 3)
731
      oprot.writeI64(self.provider_id)
732
      oprot.writeFieldEnd()
733
    oprot.writeFieldStop()
734
    oprot.writeStructEnd()
735
 
736
  def __repr__(self):
737
    L = ['%s=%r' % (key, value)
738
      for key, value in self.__dict__.iteritems()]
739
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
740
 
741
  def __eq__(self, other):
742
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
743
 
744
  def __ne__(self, other):
745
    return not (self == other)
746
 
747
class getLogisticsEstimation_result:
748
  """
749
  Attributes:
750
   - success
751
   - se
752
  """
753
 
754
  thrift_spec = (
755
    (0, TType.STRUCT, 'success', (ItemLogistics, ItemLogistics.thrift_spec), None, ), # 0
756
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
757
  )
758
 
759
  def __init__(self, success=None, se=None,):
760
    self.success = success
761
    self.se = se
762
 
763
  def read(self, iprot):
764
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
765
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
766
      return
767
    iprot.readStructBegin()
768
    while True:
769
      (fname, ftype, fid) = iprot.readFieldBegin()
770
      if ftype == TType.STOP:
771
        break
772
      if fid == 0:
773
        if ftype == TType.STRUCT:
774
          self.success = ItemLogistics()
775
          self.success.read(iprot)
776
        else:
777
          iprot.skip(ftype)
778
      elif fid == 1:
779
        if ftype == TType.STRUCT:
780
          self.se = LogisticsServiceException()
781
          self.se.read(iprot)
782
        else:
783
          iprot.skip(ftype)
784
      else:
785
        iprot.skip(ftype)
786
      iprot.readFieldEnd()
787
    iprot.readStructEnd()
788
 
789
  def write(self, oprot):
790
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
791
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
792
      return
793
    oprot.writeStructBegin('getLogisticsEstimation_result')
794
    if self.success != None:
795
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
796
      self.success.write(oprot)
797
      oprot.writeFieldEnd()
798
    if self.se != None:
799
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
800
      self.se.write(oprot)
801
      oprot.writeFieldEnd()
802
    oprot.writeFieldStop()
803
    oprot.writeStructEnd()
804
 
805
  def __repr__(self):
806
    L = ['%s=%r' % (key, value)
807
      for key, value in self.__dict__.iteritems()]
808
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
809
 
810
  def __eq__(self, other):
811
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
812
 
813
  def __ne__(self, other):
814
    return not (self == other)
815
 
816
class addDeliveryEstimate_args:
817
  """
818
  Attributes:
819
   - warahouse_id
820
   - destination_pin
821
   - provider_id
822
   - delivery_time
477 rajveer 823
   - reliability
472 rajveer 824
  """
825
 
826
  thrift_spec = (
827
    None, # 0
828
    (1, TType.I64, 'warahouse_id', None, None, ), # 1
829
    (2, TType.STRING, 'destination_pin', None, None, ), # 2
830
    (3, TType.I64, 'provider_id', None, None, ), # 3
831
    (4, TType.I64, 'delivery_time', None, None, ), # 4
477 rajveer 832
    (5, TType.I64, 'reliability', None, None, ), # 5
472 rajveer 833
  )
834
 
477 rajveer 835
  def __init__(self, warahouse_id=None, destination_pin=None, provider_id=None, delivery_time=None, reliability=None,):
472 rajveer 836
    self.warahouse_id = warahouse_id
837
    self.destination_pin = destination_pin
838
    self.provider_id = provider_id
839
    self.delivery_time = delivery_time
477 rajveer 840
    self.reliability = reliability
472 rajveer 841
 
842
  def read(self, iprot):
843
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
844
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
845
      return
846
    iprot.readStructBegin()
847
    while True:
848
      (fname, ftype, fid) = iprot.readFieldBegin()
849
      if ftype == TType.STOP:
850
        break
851
      if fid == 1:
852
        if ftype == TType.I64:
853
          self.warahouse_id = iprot.readI64();
854
        else:
855
          iprot.skip(ftype)
856
      elif fid == 2:
857
        if ftype == TType.STRING:
858
          self.destination_pin = iprot.readString();
859
        else:
860
          iprot.skip(ftype)
861
      elif fid == 3:
862
        if ftype == TType.I64:
863
          self.provider_id = iprot.readI64();
864
        else:
865
          iprot.skip(ftype)
866
      elif fid == 4:
867
        if ftype == TType.I64:
868
          self.delivery_time = iprot.readI64();
869
        else:
870
          iprot.skip(ftype)
477 rajveer 871
      elif fid == 5:
872
        if ftype == TType.I64:
873
          self.reliability = iprot.readI64();
874
        else:
875
          iprot.skip(ftype)
472 rajveer 876
      else:
877
        iprot.skip(ftype)
878
      iprot.readFieldEnd()
879
    iprot.readStructEnd()
880
 
881
  def write(self, oprot):
882
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
883
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
884
      return
885
    oprot.writeStructBegin('addDeliveryEstimate_args')
886
    if self.warahouse_id != None:
887
      oprot.writeFieldBegin('warahouse_id', TType.I64, 1)
888
      oprot.writeI64(self.warahouse_id)
889
      oprot.writeFieldEnd()
890
    if self.destination_pin != None:
891
      oprot.writeFieldBegin('destination_pin', TType.STRING, 2)
892
      oprot.writeString(self.destination_pin)
893
      oprot.writeFieldEnd()
894
    if self.provider_id != None:
895
      oprot.writeFieldBegin('provider_id', TType.I64, 3)
896
      oprot.writeI64(self.provider_id)
897
      oprot.writeFieldEnd()
898
    if self.delivery_time != None:
899
      oprot.writeFieldBegin('delivery_time', TType.I64, 4)
900
      oprot.writeI64(self.delivery_time)
901
      oprot.writeFieldEnd()
477 rajveer 902
    if self.reliability != None:
903
      oprot.writeFieldBegin('reliability', TType.I64, 5)
904
      oprot.writeI64(self.reliability)
905
      oprot.writeFieldEnd()
472 rajveer 906
    oprot.writeFieldStop()
907
    oprot.writeStructEnd()
908
 
909
  def __repr__(self):
910
    L = ['%s=%r' % (key, value)
911
      for key, value in self.__dict__.iteritems()]
912
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
913
 
914
  def __eq__(self, other):
915
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
916
 
917
  def __ne__(self, other):
918
    return not (self == other)
919
 
920
class addDeliveryEstimate_result:
921
 
922
  thrift_spec = (
923
  )
924
 
925
  def read(self, iprot):
926
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
927
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
928
      return
929
    iprot.readStructBegin()
930
    while True:
931
      (fname, ftype, fid) = iprot.readFieldBegin()
932
      if ftype == TType.STOP:
933
        break
934
      else:
935
        iprot.skip(ftype)
936
      iprot.readFieldEnd()
937
    iprot.readStructEnd()
938
 
939
  def write(self, oprot):
940
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
941
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
942
      return
943
    oprot.writeStructBegin('addDeliveryEstimate_result')
944
    oprot.writeFieldStop()
945
    oprot.writeStructEnd()
946
 
947
  def __repr__(self):
948
    L = ['%s=%r' % (key, value)
949
      for key, value in self.__dict__.iteritems()]
950
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
951
 
952
  def __eq__(self, other):
953
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
954
 
955
  def __ne__(self, other):
956
    return not (self == other)
957
 
477 rajveer 958
class addPincodeWarehouseMapping_args:
959
  """
960
  Attributes:
961
   - pin_code
962
   - warehouse_id
963
   - warehouse_pin
964
  """
965
 
966
  thrift_spec = (
967
    None, # 0
968
    (1, TType.STRING, 'pin_code', None, None, ), # 1
969
    (2, TType.I64, 'warehouse_id', None, None, ), # 2
970
    (3, TType.STRING, 'warehouse_pin', None, None, ), # 3
971
  )
972
 
973
  def __init__(self, pin_code=None, warehouse_id=None, warehouse_pin=None,):
974
    self.pin_code = pin_code
975
    self.warehouse_id = warehouse_id
976
    self.warehouse_pin = warehouse_pin
977
 
978
  def read(self, iprot):
979
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
980
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
981
      return
982
    iprot.readStructBegin()
983
    while True:
984
      (fname, ftype, fid) = iprot.readFieldBegin()
985
      if ftype == TType.STOP:
986
        break
987
      if fid == 1:
988
        if ftype == TType.STRING:
989
          self.pin_code = iprot.readString();
990
        else:
991
          iprot.skip(ftype)
992
      elif fid == 2:
993
        if ftype == TType.I64:
994
          self.warehouse_id = iprot.readI64();
995
        else:
996
          iprot.skip(ftype)
997
      elif fid == 3:
998
        if ftype == TType.STRING:
999
          self.warehouse_pin = iprot.readString();
1000
        else:
1001
          iprot.skip(ftype)
1002
      else:
1003
        iprot.skip(ftype)
1004
      iprot.readFieldEnd()
1005
    iprot.readStructEnd()
1006
 
1007
  def write(self, oprot):
1008
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1009
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1010
      return
1011
    oprot.writeStructBegin('addPincodeWarehouseMapping_args')
1012
    if self.pin_code != None:
1013
      oprot.writeFieldBegin('pin_code', TType.STRING, 1)
1014
      oprot.writeString(self.pin_code)
1015
      oprot.writeFieldEnd()
1016
    if self.warehouse_id != None:
1017
      oprot.writeFieldBegin('warehouse_id', TType.I64, 2)
1018
      oprot.writeI64(self.warehouse_id)
1019
      oprot.writeFieldEnd()
1020
    if self.warehouse_pin != None:
1021
      oprot.writeFieldBegin('warehouse_pin', TType.STRING, 3)
1022
      oprot.writeString(self.warehouse_pin)
1023
      oprot.writeFieldEnd()
1024
    oprot.writeFieldStop()
1025
    oprot.writeStructEnd()
1026
 
1027
  def __repr__(self):
1028
    L = ['%s=%r' % (key, value)
1029
      for key, value in self.__dict__.iteritems()]
1030
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1031
 
1032
  def __eq__(self, other):
1033
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1034
 
1035
  def __ne__(self, other):
1036
    return not (self == other)
1037
 
1038
class addPincodeWarehouseMapping_result:
1039
 
1040
  thrift_spec = (
1041
  )
1042
 
1043
  def read(self, iprot):
1044
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1045
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1046
      return
1047
    iprot.readStructBegin()
1048
    while True:
1049
      (fname, ftype, fid) = iprot.readFieldBegin()
1050
      if ftype == TType.STOP:
1051
        break
1052
      else:
1053
        iprot.skip(ftype)
1054
      iprot.readFieldEnd()
1055
    iprot.readStructEnd()
1056
 
1057
  def write(self, oprot):
1058
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1059
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1060
      return
1061
    oprot.writeStructBegin('addPincodeWarehouseMapping_result')
1062
    oprot.writeFieldStop()
1063
    oprot.writeStructEnd()
1064
 
1065
  def __repr__(self):
1066
    L = ['%s=%r' % (key, value)
1067
      for key, value in self.__dict__.iteritems()]
1068
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1069
 
1070
  def __eq__(self, other):
1071
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1072
 
1073
  def __ne__(self, other):
1074
    return not (self == other)
1075
 
412 ashish 1076
class addEmptyAWBs_args:
1077
  """
1078
  Attributes:
1079
   - numbers
1080
   - provider_id
1081
  """
1082
 
1083
  thrift_spec = (
1084
    None, # 0
1085
    (1, TType.LIST, 'numbers', (TType.STRING,None), None, ), # 1
1086
    (2, TType.I64, 'provider_id', None, None, ), # 2
1087
  )
1088
 
1089
  def __init__(self, numbers=None, provider_id=None,):
1090
    self.numbers = numbers
1091
    self.provider_id = provider_id
1092
 
1093
  def read(self, iprot):
1094
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1095
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1096
      return
1097
    iprot.readStructBegin()
1098
    while True:
1099
      (fname, ftype, fid) = iprot.readFieldBegin()
1100
      if ftype == TType.STOP:
1101
        break
1102
      if fid == 1:
1103
        if ftype == TType.LIST:
1104
          self.numbers = []
1105
          (_etype10, _size7) = iprot.readListBegin()
1106
          for _i11 in xrange(_size7):
1107
            _elem12 = iprot.readString();
1108
            self.numbers.append(_elem12)
1109
          iprot.readListEnd()
1110
        else:
1111
          iprot.skip(ftype)
1112
      elif fid == 2:
1113
        if ftype == TType.I64:
1114
          self.provider_id = iprot.readI64();
1115
        else:
1116
          iprot.skip(ftype)
1117
      else:
1118
        iprot.skip(ftype)
1119
      iprot.readFieldEnd()
1120
    iprot.readStructEnd()
1121
 
1122
  def write(self, oprot):
1123
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1124
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1125
      return
1126
    oprot.writeStructBegin('addEmptyAWBs_args')
1127
    if self.numbers != None:
1128
      oprot.writeFieldBegin('numbers', TType.LIST, 1)
1129
      oprot.writeListBegin(TType.STRING, len(self.numbers))
1130
      for iter13 in self.numbers:
1131
        oprot.writeString(iter13)
1132
      oprot.writeListEnd()
1133
      oprot.writeFieldEnd()
1134
    if self.provider_id != None:
1135
      oprot.writeFieldBegin('provider_id', TType.I64, 2)
1136
      oprot.writeI64(self.provider_id)
1137
      oprot.writeFieldEnd()
1138
    oprot.writeFieldStop()
1139
    oprot.writeStructEnd()
1140
 
1141
  def __repr__(self):
1142
    L = ['%s=%r' % (key, value)
1143
      for key, value in self.__dict__.iteritems()]
1144
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1145
 
1146
  def __eq__(self, other):
1147
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1148
 
1149
  def __ne__(self, other):
1150
    return not (self == other)
1151
 
1152
class addEmptyAWBs_result:
1153
 
1154
  thrift_spec = (
1155
  )
1156
 
1157
  def read(self, iprot):
1158
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1159
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1160
      return
1161
    iprot.readStructBegin()
1162
    while True:
1163
      (fname, ftype, fid) = iprot.readFieldBegin()
1164
      if ftype == TType.STOP:
1165
        break
1166
      else:
1167
        iprot.skip(ftype)
1168
      iprot.readFieldEnd()
1169
    iprot.readStructEnd()
1170
 
1171
  def write(self, oprot):
1172
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1173
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1174
      return
1175
    oprot.writeStructBegin('addEmptyAWBs_result')
1176
    oprot.writeFieldStop()
1177
    oprot.writeStructEnd()
1178
 
1179
  def __repr__(self):
1180
    L = ['%s=%r' % (key, value)
1181
      for key, value in self.__dict__.iteritems()]
1182
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1183
 
1184
  def __eq__(self, other):
1185
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1186
 
1187
  def __ne__(self, other):
1188
    return not (self == other)
1189
 
1190
class getEmptyAWB_args:
1191
  """
1192
  Attributes:
1193
   - provider_id
1194
  """
1195
 
1196
  thrift_spec = (
1197
    None, # 0
1198
    (1, TType.I64, 'provider_id', None, None, ), # 1
1199
  )
1200
 
1201
  def __init__(self, provider_id=None,):
1202
    self.provider_id = provider_id
1203
 
1204
  def read(self, iprot):
1205
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1206
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1207
      return
1208
    iprot.readStructBegin()
1209
    while True:
1210
      (fname, ftype, fid) = iprot.readFieldBegin()
1211
      if ftype == TType.STOP:
1212
        break
1213
      if fid == 1:
1214
        if ftype == TType.I64:
1215
          self.provider_id = iprot.readI64();
1216
        else:
1217
          iprot.skip(ftype)
1218
      else:
1219
        iprot.skip(ftype)
1220
      iprot.readFieldEnd()
1221
    iprot.readStructEnd()
1222
 
1223
  def write(self, oprot):
1224
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1225
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1226
      return
1227
    oprot.writeStructBegin('getEmptyAWB_args')
1228
    if self.provider_id != None:
1229
      oprot.writeFieldBegin('provider_id', TType.I64, 1)
1230
      oprot.writeI64(self.provider_id)
1231
      oprot.writeFieldEnd()
1232
    oprot.writeFieldStop()
1233
    oprot.writeStructEnd()
1234
 
1235
  def __repr__(self):
1236
    L = ['%s=%r' % (key, value)
1237
      for key, value in self.__dict__.iteritems()]
1238
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1239
 
1240
  def __eq__(self, other):
1241
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1242
 
1243
  def __ne__(self, other):
1244
    return not (self == other)
1245
 
1246
class getEmptyAWB_result:
1247
  """
1248
  Attributes:
1249
   - success
1250
  """
1251
 
1252
  thrift_spec = (
1253
    (0, TType.STRING, 'success', None, None, ), # 0
1254
  )
1255
 
1256
  def __init__(self, success=None,):
1257
    self.success = success
1258
 
1259
  def read(self, iprot):
1260
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1261
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1262
      return
1263
    iprot.readStructBegin()
1264
    while True:
1265
      (fname, ftype, fid) = iprot.readFieldBegin()
1266
      if ftype == TType.STOP:
1267
        break
1268
      if fid == 0:
1269
        if ftype == TType.STRING:
1270
          self.success = iprot.readString();
1271
        else:
1272
          iprot.skip(ftype)
1273
      else:
1274
        iprot.skip(ftype)
1275
      iprot.readFieldEnd()
1276
    iprot.readStructEnd()
1277
 
1278
  def write(self, oprot):
1279
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1280
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1281
      return
1282
    oprot.writeStructBegin('getEmptyAWB_result')
1283
    if self.success != None:
1284
      oprot.writeFieldBegin('success', TType.STRING, 0)
1285
      oprot.writeString(self.success)
1286
      oprot.writeFieldEnd()
1287
    oprot.writeFieldStop()
1288
    oprot.writeStructEnd()
1289
 
1290
  def __repr__(self):
1291
    L = ['%s=%r' % (key, value)
1292
      for key, value in self.__dict__.iteritems()]
1293
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1294
 
1295
  def __eq__(self, other):
1296
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1297
 
1298
  def __ne__(self, other):
1299
    return not (self == other)
1300
 
1301
class getProviders_args:
1302
 
1303
  thrift_spec = (
1304
  )
1305
 
1306
  def read(self, iprot):
1307
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1308
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1309
      return
1310
    iprot.readStructBegin()
1311
    while True:
1312
      (fname, ftype, fid) = iprot.readFieldBegin()
1313
      if ftype == TType.STOP:
1314
        break
1315
      else:
1316
        iprot.skip(ftype)
1317
      iprot.readFieldEnd()
1318
    iprot.readStructEnd()
1319
 
1320
  def write(self, oprot):
1321
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1322
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1323
      return
1324
    oprot.writeStructBegin('getProviders_args')
1325
    oprot.writeFieldStop()
1326
    oprot.writeStructEnd()
1327
 
1328
  def __repr__(self):
1329
    L = ['%s=%r' % (key, value)
1330
      for key, value in self.__dict__.iteritems()]
1331
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1332
 
1333
  def __eq__(self, other):
1334
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1335
 
1336
  def __ne__(self, other):
1337
    return not (self == other)
1338
 
1339
class getProviders_result:
1340
  """
1341
  Attributes:
1342
   - success
1343
  """
1344
 
1345
  thrift_spec = (
1346
    (0, TType.LIST, 'success', (TType.STRUCT,(Provider, Provider.thrift_spec)), None, ), # 0
1347
  )
1348
 
1349
  def __init__(self, success=None,):
1350
    self.success = success
1351
 
1352
  def read(self, iprot):
1353
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1354
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1355
      return
1356
    iprot.readStructBegin()
1357
    while True:
1358
      (fname, ftype, fid) = iprot.readFieldBegin()
1359
      if ftype == TType.STOP:
1360
        break
1361
      if fid == 0:
1362
        if ftype == TType.LIST:
1363
          self.success = []
1364
          (_etype17, _size14) = iprot.readListBegin()
1365
          for _i18 in xrange(_size14):
1366
            _elem19 = Provider()
1367
            _elem19.read(iprot)
1368
            self.success.append(_elem19)
1369
          iprot.readListEnd()
1370
        else:
1371
          iprot.skip(ftype)
1372
      else:
1373
        iprot.skip(ftype)
1374
      iprot.readFieldEnd()
1375
    iprot.readStructEnd()
1376
 
1377
  def write(self, oprot):
1378
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1379
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1380
      return
1381
    oprot.writeStructBegin('getProviders_result')
1382
    if self.success != None:
1383
      oprot.writeFieldBegin('success', TType.LIST, 0)
1384
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1385
      for iter20 in self.success:
1386
        iter20.write(oprot)
1387
      oprot.writeListEnd()
1388
      oprot.writeFieldEnd()
1389
    oprot.writeFieldStop()
1390
    oprot.writeStructEnd()
1391
 
1392
  def __repr__(self):
1393
    L = ['%s=%r' % (key, value)
1394
      for key, value in self.__dict__.iteritems()]
1395
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1396
 
1397
  def __eq__(self, other):
1398
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1399
 
1400
  def __ne__(self, other):
1401
    return not (self == other)
1402
 
1403
class getProvider_args:
1404
  """
1405
  Attributes:
1406
   - provider_id
1407
  """
1408
 
1409
  thrift_spec = (
1410
    None, # 0
1411
    (1, TType.I64, 'provider_id', None, None, ), # 1
1412
  )
1413
 
1414
  def __init__(self, provider_id=None,):
1415
    self.provider_id = provider_id
1416
 
1417
  def read(self, iprot):
1418
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1419
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1420
      return
1421
    iprot.readStructBegin()
1422
    while True:
1423
      (fname, ftype, fid) = iprot.readFieldBegin()
1424
      if ftype == TType.STOP:
1425
        break
1426
      if fid == 1:
1427
        if ftype == TType.I64:
1428
          self.provider_id = iprot.readI64();
1429
        else:
1430
          iprot.skip(ftype)
1431
      else:
1432
        iprot.skip(ftype)
1433
      iprot.readFieldEnd()
1434
    iprot.readStructEnd()
1435
 
1436
  def write(self, oprot):
1437
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1438
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1439
      return
1440
    oprot.writeStructBegin('getProvider_args')
1441
    if self.provider_id != None:
1442
      oprot.writeFieldBegin('provider_id', TType.I64, 1)
1443
      oprot.writeI64(self.provider_id)
1444
      oprot.writeFieldEnd()
1445
    oprot.writeFieldStop()
1446
    oprot.writeStructEnd()
1447
 
1448
  def __repr__(self):
1449
    L = ['%s=%r' % (key, value)
1450
      for key, value in self.__dict__.iteritems()]
1451
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1452
 
1453
  def __eq__(self, other):
1454
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1455
 
1456
  def __ne__(self, other):
1457
    return not (self == other)
1458
 
1459
class getProvider_result:
1460
  """
1461
  Attributes:
1462
   - success
1463
  """
1464
 
1465
  thrift_spec = (
1466
    (0, TType.STRUCT, 'success', (Provider, Provider.thrift_spec), None, ), # 0
1467
  )
1468
 
1469
  def __init__(self, success=None,):
1470
    self.success = success
1471
 
1472
  def read(self, iprot):
1473
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1474
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1475
      return
1476
    iprot.readStructBegin()
1477
    while True:
1478
      (fname, ftype, fid) = iprot.readFieldBegin()
1479
      if ftype == TType.STOP:
1480
        break
1481
      if fid == 0:
1482
        if ftype == TType.STRUCT:
1483
          self.success = Provider()
1484
          self.success.read(iprot)
1485
        else:
1486
          iprot.skip(ftype)
1487
      else:
1488
        iprot.skip(ftype)
1489
      iprot.readFieldEnd()
1490
    iprot.readStructEnd()
1491
 
1492
  def write(self, oprot):
1493
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1494
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1495
      return
1496
    oprot.writeStructBegin('getProvider_result')
1497
    if self.success != None:
1498
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1499
      self.success.write(oprot)
1500
      oprot.writeFieldEnd()
1501
    oprot.writeFieldStop()
1502
    oprot.writeStructEnd()
1503
 
1504
  def __repr__(self):
1505
    L = ['%s=%r' % (key, value)
1506
      for key, value in self.__dict__.iteritems()]
1507
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1508
 
1509
  def __eq__(self, other):
1510
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1511
 
1512
  def __ne__(self, other):
1513
    return not (self == other)
1514
 
442 rajveer 1515
class createShipment_args:
1516
  """
1517
  Attributes:
1518
   - shipment
1519
  """
1520
 
1521
  thrift_spec = (
1522
    None, # 0
1523
    (1, TType.STRUCT, 'shipment', (Shipment, Shipment.thrift_spec), None, ), # 1
1524
  )
1525
 
1526
  def __init__(self, shipment=None,):
1527
    self.shipment = shipment
1528
 
1529
  def read(self, iprot):
1530
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1531
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1532
      return
1533
    iprot.readStructBegin()
1534
    while True:
1535
      (fname, ftype, fid) = iprot.readFieldBegin()
1536
      if ftype == TType.STOP:
1537
        break
1538
      if fid == 1:
1539
        if ftype == TType.STRUCT:
1540
          self.shipment = Shipment()
1541
          self.shipment.read(iprot)
1542
        else:
1543
          iprot.skip(ftype)
1544
      else:
1545
        iprot.skip(ftype)
1546
      iprot.readFieldEnd()
1547
    iprot.readStructEnd()
1548
 
1549
  def write(self, oprot):
1550
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1551
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1552
      return
1553
    oprot.writeStructBegin('createShipment_args')
1554
    if self.shipment != None:
1555
      oprot.writeFieldBegin('shipment', TType.STRUCT, 1)
1556
      self.shipment.write(oprot)
1557
      oprot.writeFieldEnd()
1558
    oprot.writeFieldStop()
1559
    oprot.writeStructEnd()
1560
 
1561
  def __repr__(self):
1562
    L = ['%s=%r' % (key, value)
1563
      for key, value in self.__dict__.iteritems()]
1564
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1565
 
1566
  def __eq__(self, other):
1567
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1568
 
1569
  def __ne__(self, other):
1570
    return not (self == other)
1571
 
1572
class createShipment_result:
1573
 
1574
  thrift_spec = (
1575
  )
1576
 
1577
  def read(self, iprot):
1578
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1579
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1580
      return
1581
    iprot.readStructBegin()
1582
    while True:
1583
      (fname, ftype, fid) = iprot.readFieldBegin()
1584
      if ftype == TType.STOP:
1585
        break
1586
      else:
1587
        iprot.skip(ftype)
1588
      iprot.readFieldEnd()
1589
    iprot.readStructEnd()
1590
 
1591
  def write(self, oprot):
1592
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1593
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1594
      return
1595
    oprot.writeStructBegin('createShipment_result')
1596
    oprot.writeFieldStop()
1597
    oprot.writeStructEnd()
1598
 
1599
  def __repr__(self):
1600
    L = ['%s=%r' % (key, value)
1601
      for key, value in self.__dict__.iteritems()]
1602
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1603
 
1604
  def __eq__(self, other):
1605
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1606
 
1607
  def __ne__(self, other):
1608
    return not (self == other)
1609
 
1610
class updateShipmentStatus_args:
1611
  """
1612
  Attributes:
1613
   - awb
1614
   - shipment_update
1615
  """
1616
 
1617
  thrift_spec = (
1618
    None, # 0
1619
    (1, TType.STRING, 'awb', None, None, ), # 1
1620
    (2, TType.STRUCT, 'shipment_update', (ShipmentUpdate, ShipmentUpdate.thrift_spec), None, ), # 2
1621
  )
1622
 
1623
  def __init__(self, awb=None, shipment_update=None,):
1624
    self.awb = awb
1625
    self.shipment_update = shipment_update
1626
 
1627
  def read(self, iprot):
1628
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1629
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1630
      return
1631
    iprot.readStructBegin()
1632
    while True:
1633
      (fname, ftype, fid) = iprot.readFieldBegin()
1634
      if ftype == TType.STOP:
1635
        break
1636
      if fid == 1:
1637
        if ftype == TType.STRING:
1638
          self.awb = iprot.readString();
1639
        else:
1640
          iprot.skip(ftype)
1641
      elif fid == 2:
1642
        if ftype == TType.STRUCT:
1643
          self.shipment_update = ShipmentUpdate()
1644
          self.shipment_update.read(iprot)
1645
        else:
1646
          iprot.skip(ftype)
1647
      else:
1648
        iprot.skip(ftype)
1649
      iprot.readFieldEnd()
1650
    iprot.readStructEnd()
1651
 
1652
  def write(self, oprot):
1653
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1654
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1655
      return
1656
    oprot.writeStructBegin('updateShipmentStatus_args')
1657
    if self.awb != None:
1658
      oprot.writeFieldBegin('awb', TType.STRING, 1)
1659
      oprot.writeString(self.awb)
1660
      oprot.writeFieldEnd()
1661
    if self.shipment_update != None:
1662
      oprot.writeFieldBegin('shipment_update', TType.STRUCT, 2)
1663
      self.shipment_update.write(oprot)
1664
      oprot.writeFieldEnd()
1665
    oprot.writeFieldStop()
1666
    oprot.writeStructEnd()
1667
 
1668
  def __repr__(self):
1669
    L = ['%s=%r' % (key, value)
1670
      for key, value in self.__dict__.iteritems()]
1671
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1672
 
1673
  def __eq__(self, other):
1674
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1675
 
1676
  def __ne__(self, other):
1677
    return not (self == other)
1678
 
1679
class updateShipmentStatus_result:
1680
 
1681
  thrift_spec = (
1682
  )
1683
 
1684
  def read(self, iprot):
1685
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1686
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1687
      return
1688
    iprot.readStructBegin()
1689
    while True:
1690
      (fname, ftype, fid) = iprot.readFieldBegin()
1691
      if ftype == TType.STOP:
1692
        break
1693
      else:
1694
        iprot.skip(ftype)
1695
      iprot.readFieldEnd()
1696
    iprot.readStructEnd()
1697
 
1698
  def write(self, oprot):
1699
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1700
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1701
      return
1702
    oprot.writeStructBegin('updateShipmentStatus_result')
1703
    oprot.writeFieldStop()
1704
    oprot.writeStructEnd()
1705
 
1706
  def __repr__(self):
1707
    L = ['%s=%r' % (key, value)
1708
      for key, value in self.__dict__.iteritems()]
1709
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1710
 
1711
  def __eq__(self, other):
1712
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1713
 
1714
  def __ne__(self, other):
1715
    return not (self == other)
1716
 
412 ashish 1717
class getShipmentInfo_args:
1718
  """
1719
  Attributes:
1720
   - awb
1721
  """
1722
 
1723
  thrift_spec = (
1724
    None, # 0
1725
    (1, TType.STRING, 'awb', None, None, ), # 1
1726
  )
1727
 
1728
  def __init__(self, awb=None,):
1729
    self.awb = awb
1730
 
1731
  def read(self, iprot):
1732
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1733
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1734
      return
1735
    iprot.readStructBegin()
1736
    while True:
1737
      (fname, ftype, fid) = iprot.readFieldBegin()
1738
      if ftype == TType.STOP:
1739
        break
1740
      if fid == 1:
1741
        if ftype == TType.STRING:
1742
          self.awb = iprot.readString();
1743
        else:
1744
          iprot.skip(ftype)
1745
      else:
1746
        iprot.skip(ftype)
1747
      iprot.readFieldEnd()
1748
    iprot.readStructEnd()
1749
 
1750
  def write(self, oprot):
1751
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1752
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1753
      return
1754
    oprot.writeStructBegin('getShipmentInfo_args')
1755
    if self.awb != None:
1756
      oprot.writeFieldBegin('awb', TType.STRING, 1)
1757
      oprot.writeString(self.awb)
1758
      oprot.writeFieldEnd()
1759
    oprot.writeFieldStop()
1760
    oprot.writeStructEnd()
1761
 
1762
  def __repr__(self):
1763
    L = ['%s=%r' % (key, value)
1764
      for key, value in self.__dict__.iteritems()]
1765
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1766
 
1767
  def __eq__(self, other):
1768
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1769
 
1770
  def __ne__(self, other):
1771
    return not (self == other)
1772
 
1773
class getShipmentInfo_result:
1774
  """
1775
  Attributes:
1776
   - success
1777
  """
1778
 
1779
  thrift_spec = (
1780
    (0, TType.STRUCT, 'success', (ShipmentStatusInfo, ShipmentStatusInfo.thrift_spec), None, ), # 0
1781
  )
1782
 
1783
  def __init__(self, success=None,):
1784
    self.success = success
1785
 
1786
  def read(self, iprot):
1787
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1788
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1789
      return
1790
    iprot.readStructBegin()
1791
    while True:
1792
      (fname, ftype, fid) = iprot.readFieldBegin()
1793
      if ftype == TType.STOP:
1794
        break
1795
      if fid == 0:
1796
        if ftype == TType.STRUCT:
1797
          self.success = ShipmentStatusInfo()
1798
          self.success.read(iprot)
1799
        else:
1800
          iprot.skip(ftype)
1801
      else:
1802
        iprot.skip(ftype)
1803
      iprot.readFieldEnd()
1804
    iprot.readStructEnd()
1805
 
1806
  def write(self, oprot):
1807
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1808
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1809
      return
1810
    oprot.writeStructBegin('getShipmentInfo_result')
1811
    if self.success != None:
1812
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1813
      self.success.write(oprot)
1814
      oprot.writeFieldEnd()
1815
    oprot.writeFieldStop()
1816
    oprot.writeStructEnd()
1817
 
1818
  def __repr__(self):
1819
    L = ['%s=%r' % (key, value)
1820
      for key, value in self.__dict__.iteritems()]
1821
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1822
 
1823
  def __eq__(self, other):
1824
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1825
 
1826
  def __ne__(self, other):
1827
    return not (self == other)
1828
 
1829
class getShipments_args:
1830
  """
1831
  Attributes:
1832
   - warehouse_id
1833
   - from_date
1834
   - to_date
1835
   - provider_id
1836
  """
1837
 
1838
  thrift_spec = (
1839
    None, # 0
1840
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
1841
    (2, TType.I64, 'from_date', None, None, ), # 2
1842
    (3, TType.I64, 'to_date', None, None, ), # 3
1843
    (4, TType.I64, 'provider_id', None, None, ), # 4
1844
  )
1845
 
1846
  def __init__(self, warehouse_id=None, from_date=None, to_date=None, provider_id=None,):
1847
    self.warehouse_id = warehouse_id
1848
    self.from_date = from_date
1849
    self.to_date = to_date
1850
    self.provider_id = provider_id
1851
 
1852
  def read(self, iprot):
1853
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1854
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1855
      return
1856
    iprot.readStructBegin()
1857
    while True:
1858
      (fname, ftype, fid) = iprot.readFieldBegin()
1859
      if ftype == TType.STOP:
1860
        break
1861
      if fid == 1:
1862
        if ftype == TType.I64:
1863
          self.warehouse_id = iprot.readI64();
1864
        else:
1865
          iprot.skip(ftype)
1866
      elif fid == 2:
1867
        if ftype == TType.I64:
1868
          self.from_date = iprot.readI64();
1869
        else:
1870
          iprot.skip(ftype)
1871
      elif fid == 3:
1872
        if ftype == TType.I64:
1873
          self.to_date = iprot.readI64();
1874
        else:
1875
          iprot.skip(ftype)
1876
      elif fid == 4:
1877
        if ftype == TType.I64:
1878
          self.provider_id = iprot.readI64();
1879
        else:
1880
          iprot.skip(ftype)
1881
      else:
1882
        iprot.skip(ftype)
1883
      iprot.readFieldEnd()
1884
    iprot.readStructEnd()
1885
 
1886
  def write(self, oprot):
1887
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1888
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1889
      return
1890
    oprot.writeStructBegin('getShipments_args')
1891
    if self.warehouse_id != None:
1892
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
1893
      oprot.writeI64(self.warehouse_id)
1894
      oprot.writeFieldEnd()
1895
    if self.from_date != None:
1896
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1897
      oprot.writeI64(self.from_date)
1898
      oprot.writeFieldEnd()
1899
    if self.to_date != None:
1900
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1901
      oprot.writeI64(self.to_date)
1902
      oprot.writeFieldEnd()
1903
    if self.provider_id != None:
1904
      oprot.writeFieldBegin('provider_id', TType.I64, 4)
1905
      oprot.writeI64(self.provider_id)
1906
      oprot.writeFieldEnd()
1907
    oprot.writeFieldStop()
1908
    oprot.writeStructEnd()
1909
 
1910
  def __repr__(self):
1911
    L = ['%s=%r' % (key, value)
1912
      for key, value in self.__dict__.iteritems()]
1913
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1914
 
1915
  def __eq__(self, other):
1916
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1917
 
1918
  def __ne__(self, other):
1919
    return not (self == other)
1920
 
1921
class getShipments_result:
1922
  """
1923
  Attributes:
1924
   - success
1925
  """
1926
 
1927
  thrift_spec = (
1928
    (0, TType.LIST, 'success', (TType.STRUCT,(Shipment, Shipment.thrift_spec)), None, ), # 0
1929
  )
1930
 
1931
  def __init__(self, success=None,):
1932
    self.success = success
1933
 
1934
  def read(self, iprot):
1935
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1936
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1937
      return
1938
    iprot.readStructBegin()
1939
    while True:
1940
      (fname, ftype, fid) = iprot.readFieldBegin()
1941
      if ftype == TType.STOP:
1942
        break
1943
      if fid == 0:
1944
        if ftype == TType.LIST:
1945
          self.success = []
1946
          (_etype24, _size21) = iprot.readListBegin()
1947
          for _i25 in xrange(_size21):
1948
            _elem26 = Shipment()
1949
            _elem26.read(iprot)
1950
            self.success.append(_elem26)
1951
          iprot.readListEnd()
1952
        else:
1953
          iprot.skip(ftype)
1954
      else:
1955
        iprot.skip(ftype)
1956
      iprot.readFieldEnd()
1957
    iprot.readStructEnd()
1958
 
1959
  def write(self, oprot):
1960
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1961
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1962
      return
1963
    oprot.writeStructBegin('getShipments_result')
1964
    if self.success != None:
1965
      oprot.writeFieldBegin('success', TType.LIST, 0)
1966
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1967
      for iter27 in self.success:
1968
        iter27.write(oprot)
1969
      oprot.writeListEnd()
1970
      oprot.writeFieldEnd()
1971
    oprot.writeFieldStop()
1972
    oprot.writeStructEnd()
1973
 
1974
  def __repr__(self):
1975
    L = ['%s=%r' % (key, value)
1976
      for key, value in self.__dict__.iteritems()]
1977
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1978
 
1979
  def __eq__(self, other):
1980
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1981
 
1982
  def __ne__(self, other):
1983
    return not (self == other)
1984
 
1985
class getTodaysShipments_args:
1986
  """
1987
  Attributes:
1988
   - warehouse_id
1989
   - provider_id
1990
  """
1991
 
1992
  thrift_spec = (
1993
    None, # 0
1994
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
1995
    (2, TType.I64, 'provider_id', None, None, ), # 2
1996
  )
1997
 
1998
  def __init__(self, warehouse_id=None, provider_id=None,):
1999
    self.warehouse_id = warehouse_id
2000
    self.provider_id = provider_id
2001
 
2002
  def read(self, iprot):
2003
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2004
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2005
      return
2006
    iprot.readStructBegin()
2007
    while True:
2008
      (fname, ftype, fid) = iprot.readFieldBegin()
2009
      if ftype == TType.STOP:
2010
        break
2011
      if fid == 1:
2012
        if ftype == TType.I64:
2013
          self.warehouse_id = iprot.readI64();
2014
        else:
2015
          iprot.skip(ftype)
2016
      elif fid == 2:
2017
        if ftype == TType.I64:
2018
          self.provider_id = iprot.readI64();
2019
        else:
2020
          iprot.skip(ftype)
2021
      else:
2022
        iprot.skip(ftype)
2023
      iprot.readFieldEnd()
2024
    iprot.readStructEnd()
2025
 
2026
  def write(self, oprot):
2027
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2028
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2029
      return
2030
    oprot.writeStructBegin('getTodaysShipments_args')
2031
    if self.warehouse_id != None:
2032
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
2033
      oprot.writeI64(self.warehouse_id)
2034
      oprot.writeFieldEnd()
2035
    if self.provider_id != None:
2036
      oprot.writeFieldBegin('provider_id', TType.I64, 2)
2037
      oprot.writeI64(self.provider_id)
2038
      oprot.writeFieldEnd()
2039
    oprot.writeFieldStop()
2040
    oprot.writeStructEnd()
2041
 
2042
  def __repr__(self):
2043
    L = ['%s=%r' % (key, value)
2044
      for key, value in self.__dict__.iteritems()]
2045
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2046
 
2047
  def __eq__(self, other):
2048
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2049
 
2050
  def __ne__(self, other):
2051
    return not (self == other)
2052
 
2053
class getTodaysShipments_result:
2054
  """
2055
  Attributes:
2056
   - success
2057
  """
2058
 
2059
  thrift_spec = (
2060
    (0, TType.LIST, 'success', (TType.STRUCT,(Shipment, Shipment.thrift_spec)), None, ), # 0
2061
  )
2062
 
2063
  def __init__(self, success=None,):
2064
    self.success = success
2065
 
2066
  def read(self, iprot):
2067
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2068
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2069
      return
2070
    iprot.readStructBegin()
2071
    while True:
2072
      (fname, ftype, fid) = iprot.readFieldBegin()
2073
      if ftype == TType.STOP:
2074
        break
2075
      if fid == 0:
2076
        if ftype == TType.LIST:
2077
          self.success = []
2078
          (_etype31, _size28) = iprot.readListBegin()
2079
          for _i32 in xrange(_size28):
2080
            _elem33 = Shipment()
2081
            _elem33.read(iprot)
2082
            self.success.append(_elem33)
2083
          iprot.readListEnd()
2084
        else:
2085
          iprot.skip(ftype)
2086
      else:
2087
        iprot.skip(ftype)
2088
      iprot.readFieldEnd()
2089
    iprot.readStructEnd()
2090
 
2091
  def write(self, oprot):
2092
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2093
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2094
      return
2095
    oprot.writeStructBegin('getTodaysShipments_result')
2096
    if self.success != None:
2097
      oprot.writeFieldBegin('success', TType.LIST, 0)
2098
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2099
      for iter34 in self.success:
2100
        iter34.write(oprot)
2101
      oprot.writeListEnd()
2102
      oprot.writeFieldEnd()
2103
    oprot.writeFieldStop()
2104
    oprot.writeStructEnd()
2105
 
2106
  def __repr__(self):
2107
    L = ['%s=%r' % (key, value)
2108
      for key, value in self.__dict__.iteritems()]
2109
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2110
 
2111
  def __eq__(self, other):
2112
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2113
 
2114
  def __ne__(self, other):
2115
    return not (self == other)
2116
 
2117