Subversion Repositories SmartDukaan

Rev

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