Subversion Repositories SmartDukaan

Rev

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