Subversion Repositories SmartDukaan

Rev

Rev 483 | Rev 647 | 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:
644 chandransh 19
  def getLogisticsInfo(self, destination_pincode, item_id):
483 rajveer 20
    """
21
    Parameters:
22
     - destination_pincode
644 chandransh 23
     - item_id
483 rajveer 24
    """
25
    pass
26
 
644 chandransh 27
  def getLogisticsEstimation(self, itemId, destination_pin):
472 rajveer 28
    """
29
    Parameters:
30
     - itemId
31
     - destination_pin
32
    """
33
    pass
34
 
412 ashish 35
  def getEmptyAWB(self, provider_id):
36
    """
37
    Parameters:
38
     - provider_id
39
    """
40
    pass
41
 
42
  def getShipmentInfo(self, awb):
43
    """
44
    Parameters:
45
     - awb
46
    """
47
    pass
48
 
49
 
50
class Client(Iface):
51
  def __init__(self, iprot, oprot=None):
52
    self._iprot = self._oprot = iprot
53
    if oprot != None:
54
      self._oprot = oprot
55
    self._seqid = 0
56
 
644 chandransh 57
  def getLogisticsInfo(self, destination_pincode, item_id):
483 rajveer 58
    """
59
    Parameters:
60
     - destination_pincode
644 chandransh 61
     - item_id
483 rajveer 62
    """
644 chandransh 63
    self.send_getLogisticsInfo(destination_pincode, item_id)
483 rajveer 64
    return self.recv_getLogisticsInfo()
65
 
644 chandransh 66
  def send_getLogisticsInfo(self, destination_pincode, item_id):
483 rajveer 67
    self._oprot.writeMessageBegin('getLogisticsInfo', TMessageType.CALL, self._seqid)
68
    args = getLogisticsInfo_args()
69
    args.destination_pincode = destination_pincode
644 chandransh 70
    args.item_id = item_id
483 rajveer 71
    args.write(self._oprot)
72
    self._oprot.writeMessageEnd()
73
    self._oprot.trans.flush()
74
 
75
  def recv_getLogisticsInfo(self, ):
76
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
77
    if mtype == TMessageType.EXCEPTION:
78
      x = TApplicationException()
79
      x.read(self._iprot)
80
      self._iprot.readMessageEnd()
81
      raise x
82
    result = getLogisticsInfo_result()
83
    result.read(self._iprot)
84
    self._iprot.readMessageEnd()
85
    if result.success != None:
86
      return result.success
87
    if result.se != None:
88
      raise result.se
89
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsInfo failed: unknown result");
90
 
644 chandransh 91
  def getLogisticsEstimation(self, itemId, destination_pin):
472 rajveer 92
    """
93
    Parameters:
94
     - itemId
95
     - destination_pin
96
    """
644 chandransh 97
    self.send_getLogisticsEstimation(itemId, destination_pin)
472 rajveer 98
    return self.recv_getLogisticsEstimation()
99
 
644 chandransh 100
  def send_getLogisticsEstimation(self, itemId, destination_pin):
472 rajveer 101
    self._oprot.writeMessageBegin('getLogisticsEstimation', TMessageType.CALL, self._seqid)
102
    args = getLogisticsEstimation_args()
103
    args.itemId = itemId
104
    args.destination_pin = destination_pin
105
    args.write(self._oprot)
106
    self._oprot.writeMessageEnd()
107
    self._oprot.trans.flush()
108
 
109
  def recv_getLogisticsEstimation(self, ):
110
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
111
    if mtype == TMessageType.EXCEPTION:
112
      x = TApplicationException()
113
      x.read(self._iprot)
114
      self._iprot.readMessageEnd()
115
      raise x
116
    result = getLogisticsEstimation_result()
117
    result.read(self._iprot)
118
    self._iprot.readMessageEnd()
119
    if result.success != None:
120
      return result.success
121
    if result.se != None:
122
      raise result.se
123
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
124
 
412 ashish 125
  def getEmptyAWB(self, provider_id):
126
    """
127
    Parameters:
128
     - provider_id
129
    """
130
    self.send_getEmptyAWB(provider_id)
131
    return self.recv_getEmptyAWB()
132
 
133
  def send_getEmptyAWB(self, provider_id):
134
    self._oprot.writeMessageBegin('getEmptyAWB', TMessageType.CALL, self._seqid)
135
    args = getEmptyAWB_args()
136
    args.provider_id = provider_id
137
    args.write(self._oprot)
138
    self._oprot.writeMessageEnd()
139
    self._oprot.trans.flush()
140
 
141
  def recv_getEmptyAWB(self, ):
142
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
143
    if mtype == TMessageType.EXCEPTION:
144
      x = TApplicationException()
145
      x.read(self._iprot)
146
      self._iprot.readMessageEnd()
147
      raise x
148
    result = getEmptyAWB_result()
149
    result.read(self._iprot)
150
    self._iprot.readMessageEnd()
151
    if result.success != None:
152
      return result.success
153
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
154
 
155
  def getShipmentInfo(self, awb):
156
    """
157
    Parameters:
158
     - awb
159
    """
160
    self.send_getShipmentInfo(awb)
161
    return self.recv_getShipmentInfo()
162
 
163
  def send_getShipmentInfo(self, awb):
164
    self._oprot.writeMessageBegin('getShipmentInfo', TMessageType.CALL, self._seqid)
165
    args = getShipmentInfo_args()
166
    args.awb = awb
167
    args.write(self._oprot)
168
    self._oprot.writeMessageEnd()
169
    self._oprot.trans.flush()
170
 
171
  def recv_getShipmentInfo(self, ):
172
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
173
    if mtype == TMessageType.EXCEPTION:
174
      x = TApplicationException()
175
      x.read(self._iprot)
176
      self._iprot.readMessageEnd()
177
      raise x
178
    result = getShipmentInfo_result()
179
    result.read(self._iprot)
180
    self._iprot.readMessageEnd()
181
    if result.success != None:
182
      return result.success
183
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
184
 
185
 
186
class Processor(Iface, TProcessor):
187
  def __init__(self, handler):
188
    self._handler = handler
189
    self._processMap = {}
483 rajveer 190
    self._processMap["getLogisticsInfo"] = Processor.process_getLogisticsInfo
472 rajveer 191
    self._processMap["getLogisticsEstimation"] = Processor.process_getLogisticsEstimation
412 ashish 192
    self._processMap["getEmptyAWB"] = Processor.process_getEmptyAWB
193
    self._processMap["getShipmentInfo"] = Processor.process_getShipmentInfo
194
 
195
  def process(self, iprot, oprot):
196
    (name, type, seqid) = iprot.readMessageBegin()
197
    if name not in self._processMap:
198
      iprot.skip(TType.STRUCT)
199
      iprot.readMessageEnd()
200
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
201
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
202
      x.write(oprot)
203
      oprot.writeMessageEnd()
204
      oprot.trans.flush()
205
      return
206
    else:
207
      self._processMap[name](self, seqid, iprot, oprot)
208
    return True
209
 
483 rajveer 210
  def process_getLogisticsInfo(self, seqid, iprot, oprot):
211
    args = getLogisticsInfo_args()
212
    args.read(iprot)
213
    iprot.readMessageEnd()
214
    result = getLogisticsInfo_result()
215
    try:
644 chandransh 216
      result.success = self._handler.getLogisticsInfo(args.destination_pincode, args.item_id)
483 rajveer 217
    except LogisticsServiceException, se:
218
      result.se = se
219
    oprot.writeMessageBegin("getLogisticsInfo", TMessageType.REPLY, seqid)
220
    result.write(oprot)
221
    oprot.writeMessageEnd()
222
    oprot.trans.flush()
223
 
472 rajveer 224
  def process_getLogisticsEstimation(self, seqid, iprot, oprot):
225
    args = getLogisticsEstimation_args()
226
    args.read(iprot)
227
    iprot.readMessageEnd()
228
    result = getLogisticsEstimation_result()
229
    try:
644 chandransh 230
      result.success = self._handler.getLogisticsEstimation(args.itemId, args.destination_pin)
472 rajveer 231
    except LogisticsServiceException, se:
232
      result.se = se
233
    oprot.writeMessageBegin("getLogisticsEstimation", TMessageType.REPLY, seqid)
234
    result.write(oprot)
235
    oprot.writeMessageEnd()
236
    oprot.trans.flush()
237
 
412 ashish 238
  def process_getEmptyAWB(self, seqid, iprot, oprot):
239
    args = getEmptyAWB_args()
240
    args.read(iprot)
241
    iprot.readMessageEnd()
242
    result = getEmptyAWB_result()
243
    result.success = self._handler.getEmptyAWB(args.provider_id)
244
    oprot.writeMessageBegin("getEmptyAWB", TMessageType.REPLY, seqid)
245
    result.write(oprot)
246
    oprot.writeMessageEnd()
247
    oprot.trans.flush()
248
 
249
  def process_getShipmentInfo(self, seqid, iprot, oprot):
250
    args = getShipmentInfo_args()
251
    args.read(iprot)
252
    iprot.readMessageEnd()
253
    result = getShipmentInfo_result()
254
    result.success = self._handler.getShipmentInfo(args.awb)
255
    oprot.writeMessageBegin("getShipmentInfo", TMessageType.REPLY, seqid)
256
    result.write(oprot)
257
    oprot.writeMessageEnd()
258
    oprot.trans.flush()
259
 
260
 
261
# HELPER FUNCTIONS AND STRUCTURES
262
 
483 rajveer 263
class getLogisticsInfo_args:
264
  """
265
  Attributes:
266
   - destination_pincode
644 chandransh 267
   - item_id
483 rajveer 268
  """
269
 
270
  thrift_spec = (
271
    None, # 0
272
    (1, TType.STRING, 'destination_pincode', None, None, ), # 1
644 chandransh 273
    (2, TType.STRING, 'item_id', None, None, ), # 2
483 rajveer 274
  )
275
 
644 chandransh 276
  def __init__(self, destination_pincode=None, item_id=None,):
483 rajveer 277
    self.destination_pincode = destination_pincode
644 chandransh 278
    self.item_id = item_id
483 rajveer 279
 
280
  def read(self, iprot):
281
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
282
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
283
      return
284
    iprot.readStructBegin()
285
    while True:
286
      (fname, ftype, fid) = iprot.readFieldBegin()
287
      if ftype == TType.STOP:
288
        break
289
      if fid == 1:
290
        if ftype == TType.STRING:
291
          self.destination_pincode = iprot.readString();
292
        else:
293
          iprot.skip(ftype)
294
      elif fid == 2:
295
        if ftype == TType.STRING:
644 chandransh 296
          self.item_id = iprot.readString();
483 rajveer 297
        else:
298
          iprot.skip(ftype)
299
      else:
300
        iprot.skip(ftype)
301
      iprot.readFieldEnd()
302
    iprot.readStructEnd()
303
 
304
  def write(self, oprot):
305
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
306
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
307
      return
308
    oprot.writeStructBegin('getLogisticsInfo_args')
309
    if self.destination_pincode != None:
310
      oprot.writeFieldBegin('destination_pincode', TType.STRING, 1)
311
      oprot.writeString(self.destination_pincode)
312
      oprot.writeFieldEnd()
644 chandransh 313
    if self.item_id != None:
314
      oprot.writeFieldBegin('item_id', TType.STRING, 2)
315
      oprot.writeString(self.item_id)
483 rajveer 316
      oprot.writeFieldEnd()
317
    oprot.writeFieldStop()
318
    oprot.writeStructEnd()
319
 
320
  def __repr__(self):
321
    L = ['%s=%r' % (key, value)
322
      for key, value in self.__dict__.iteritems()]
323
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
324
 
325
  def __eq__(self, other):
326
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
327
 
328
  def __ne__(self, other):
329
    return not (self == other)
330
 
331
class getLogisticsInfo_result:
332
  """
333
  Attributes:
334
   - success
335
   - se
336
  """
337
 
338
  thrift_spec = (
339
    (0, TType.STRUCT, 'success', (LogisticsInfo, LogisticsInfo.thrift_spec), None, ), # 0
340
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
341
  )
342
 
343
  def __init__(self, success=None, se=None,):
344
    self.success = success
345
    self.se = se
346
 
347
  def read(self, iprot):
348
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
349
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
350
      return
351
    iprot.readStructBegin()
352
    while True:
353
      (fname, ftype, fid) = iprot.readFieldBegin()
354
      if ftype == TType.STOP:
355
        break
356
      if fid == 0:
357
        if ftype == TType.STRUCT:
358
          self.success = LogisticsInfo()
359
          self.success.read(iprot)
360
        else:
361
          iprot.skip(ftype)
362
      elif fid == 1:
363
        if ftype == TType.STRUCT:
364
          self.se = LogisticsServiceException()
365
          self.se.read(iprot)
366
        else:
367
          iprot.skip(ftype)
368
      else:
369
        iprot.skip(ftype)
370
      iprot.readFieldEnd()
371
    iprot.readStructEnd()
372
 
373
  def write(self, oprot):
374
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
375
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
376
      return
377
    oprot.writeStructBegin('getLogisticsInfo_result')
378
    if self.success != None:
379
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
380
      self.success.write(oprot)
381
      oprot.writeFieldEnd()
382
    if self.se != None:
383
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
384
      self.se.write(oprot)
385
      oprot.writeFieldEnd()
386
    oprot.writeFieldStop()
387
    oprot.writeStructEnd()
388
 
389
  def __repr__(self):
390
    L = ['%s=%r' % (key, value)
391
      for key, value in self.__dict__.iteritems()]
392
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
393
 
394
  def __eq__(self, other):
395
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
396
 
397
  def __ne__(self, other):
398
    return not (self == other)
399
 
472 rajveer 400
class getLogisticsEstimation_args:
401
  """
402
  Attributes:
403
   - itemId
404
   - destination_pin
405
  """
406
 
407
  thrift_spec = (
408
    None, # 0
409
    (1, TType.I64, 'itemId', None, None, ), # 1
410
    (2, TType.STRING, 'destination_pin', None, None, ), # 2
411
  )
412
 
644 chandransh 413
  def __init__(self, itemId=None, destination_pin=None,):
472 rajveer 414
    self.itemId = itemId
415
    self.destination_pin = destination_pin
416
 
417
  def read(self, iprot):
418
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
419
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
420
      return
421
    iprot.readStructBegin()
422
    while True:
423
      (fname, ftype, fid) = iprot.readFieldBegin()
424
      if ftype == TType.STOP:
425
        break
426
      if fid == 1:
427
        if ftype == TType.I64:
428
          self.itemId = iprot.readI64();
429
        else:
430
          iprot.skip(ftype)
431
      elif fid == 2:
432
        if ftype == TType.STRING:
433
          self.destination_pin = iprot.readString();
434
        else:
435
          iprot.skip(ftype)
436
      else:
437
        iprot.skip(ftype)
438
      iprot.readFieldEnd()
439
    iprot.readStructEnd()
440
 
441
  def write(self, oprot):
442
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
443
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
444
      return
445
    oprot.writeStructBegin('getLogisticsEstimation_args')
446
    if self.itemId != None:
447
      oprot.writeFieldBegin('itemId', TType.I64, 1)
448
      oprot.writeI64(self.itemId)
449
      oprot.writeFieldEnd()
450
    if self.destination_pin != None:
451
      oprot.writeFieldBegin('destination_pin', TType.STRING, 2)
452
      oprot.writeString(self.destination_pin)
453
      oprot.writeFieldEnd()
454
    oprot.writeFieldStop()
455
    oprot.writeStructEnd()
456
 
457
  def __repr__(self):
458
    L = ['%s=%r' % (key, value)
459
      for key, value in self.__dict__.iteritems()]
460
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
461
 
462
  def __eq__(self, other):
463
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
464
 
465
  def __ne__(self, other):
466
    return not (self == other)
467
 
468
class getLogisticsEstimation_result:
469
  """
470
  Attributes:
471
   - success
472
   - se
473
  """
474
 
475
  thrift_spec = (
644 chandransh 476
    (0, TType.STRUCT, 'success', (LogisticsInfo, LogisticsInfo.thrift_spec), None, ), # 0
472 rajveer 477
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
478
  )
479
 
480
  def __init__(self, success=None, se=None,):
481
    self.success = success
482
    self.se = se
483
 
484
  def read(self, iprot):
485
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
486
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
487
      return
488
    iprot.readStructBegin()
489
    while True:
490
      (fname, ftype, fid) = iprot.readFieldBegin()
491
      if ftype == TType.STOP:
492
        break
493
      if fid == 0:
494
        if ftype == TType.STRUCT:
644 chandransh 495
          self.success = LogisticsInfo()
472 rajveer 496
          self.success.read(iprot)
497
        else:
498
          iprot.skip(ftype)
499
      elif fid == 1:
500
        if ftype == TType.STRUCT:
501
          self.se = LogisticsServiceException()
502
          self.se.read(iprot)
503
        else:
504
          iprot.skip(ftype)
505
      else:
506
        iprot.skip(ftype)
507
      iprot.readFieldEnd()
508
    iprot.readStructEnd()
509
 
510
  def write(self, oprot):
511
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
512
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
513
      return
514
    oprot.writeStructBegin('getLogisticsEstimation_result')
515
    if self.success != None:
516
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
517
      self.success.write(oprot)
518
      oprot.writeFieldEnd()
519
    if self.se != None:
520
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
521
      self.se.write(oprot)
522
      oprot.writeFieldEnd()
523
    oprot.writeFieldStop()
524
    oprot.writeStructEnd()
525
 
526
  def __repr__(self):
527
    L = ['%s=%r' % (key, value)
528
      for key, value in self.__dict__.iteritems()]
529
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
530
 
531
  def __eq__(self, other):
532
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
533
 
534
  def __ne__(self, other):
535
    return not (self == other)
536
 
412 ashish 537
class getEmptyAWB_args:
538
  """
539
  Attributes:
540
   - provider_id
541
  """
542
 
543
  thrift_spec = (
544
    None, # 0
545
    (1, TType.I64, 'provider_id', None, None, ), # 1
546
  )
547
 
548
  def __init__(self, provider_id=None,):
549
    self.provider_id = provider_id
550
 
551
  def read(self, iprot):
552
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
553
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
554
      return
555
    iprot.readStructBegin()
556
    while True:
557
      (fname, ftype, fid) = iprot.readFieldBegin()
558
      if ftype == TType.STOP:
559
        break
560
      if fid == 1:
561
        if ftype == TType.I64:
562
          self.provider_id = iprot.readI64();
563
        else:
564
          iprot.skip(ftype)
565
      else:
566
        iprot.skip(ftype)
567
      iprot.readFieldEnd()
568
    iprot.readStructEnd()
569
 
570
  def write(self, oprot):
571
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
572
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
573
      return
574
    oprot.writeStructBegin('getEmptyAWB_args')
575
    if self.provider_id != None:
576
      oprot.writeFieldBegin('provider_id', TType.I64, 1)
577
      oprot.writeI64(self.provider_id)
578
      oprot.writeFieldEnd()
579
    oprot.writeFieldStop()
580
    oprot.writeStructEnd()
581
 
582
  def __repr__(self):
583
    L = ['%s=%r' % (key, value)
584
      for key, value in self.__dict__.iteritems()]
585
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
586
 
587
  def __eq__(self, other):
588
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
589
 
590
  def __ne__(self, other):
591
    return not (self == other)
592
 
593
class getEmptyAWB_result:
594
  """
595
  Attributes:
596
   - success
597
  """
598
 
599
  thrift_spec = (
600
    (0, TType.STRING, 'success', None, None, ), # 0
601
  )
602
 
603
  def __init__(self, success=None,):
604
    self.success = success
605
 
606
  def read(self, iprot):
607
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
608
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
609
      return
610
    iprot.readStructBegin()
611
    while True:
612
      (fname, ftype, fid) = iprot.readFieldBegin()
613
      if ftype == TType.STOP:
614
        break
615
      if fid == 0:
616
        if ftype == TType.STRING:
617
          self.success = iprot.readString();
618
        else:
619
          iprot.skip(ftype)
620
      else:
621
        iprot.skip(ftype)
622
      iprot.readFieldEnd()
623
    iprot.readStructEnd()
624
 
625
  def write(self, oprot):
626
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
627
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
628
      return
629
    oprot.writeStructBegin('getEmptyAWB_result')
630
    if self.success != None:
631
      oprot.writeFieldBegin('success', TType.STRING, 0)
632
      oprot.writeString(self.success)
633
      oprot.writeFieldEnd()
634
    oprot.writeFieldStop()
635
    oprot.writeStructEnd()
636
 
637
  def __repr__(self):
638
    L = ['%s=%r' % (key, value)
639
      for key, value in self.__dict__.iteritems()]
640
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
641
 
642
  def __eq__(self, other):
643
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
644
 
645
  def __ne__(self, other):
646
    return not (self == other)
647
 
648
class getShipmentInfo_args:
649
  """
650
  Attributes:
651
   - awb
652
  """
653
 
654
  thrift_spec = (
655
    None, # 0
656
    (1, TType.STRING, 'awb', None, None, ), # 1
657
  )
658
 
659
  def __init__(self, awb=None,):
660
    self.awb = awb
661
 
662
  def read(self, iprot):
663
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
664
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
665
      return
666
    iprot.readStructBegin()
667
    while True:
668
      (fname, ftype, fid) = iprot.readFieldBegin()
669
      if ftype == TType.STOP:
670
        break
671
      if fid == 1:
672
        if ftype == TType.STRING:
673
          self.awb = iprot.readString();
674
        else:
675
          iprot.skip(ftype)
676
      else:
677
        iprot.skip(ftype)
678
      iprot.readFieldEnd()
679
    iprot.readStructEnd()
680
 
681
  def write(self, oprot):
682
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
683
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
684
      return
685
    oprot.writeStructBegin('getShipmentInfo_args')
686
    if self.awb != None:
687
      oprot.writeFieldBegin('awb', TType.STRING, 1)
688
      oprot.writeString(self.awb)
689
      oprot.writeFieldEnd()
690
    oprot.writeFieldStop()
691
    oprot.writeStructEnd()
692
 
693
  def __repr__(self):
694
    L = ['%s=%r' % (key, value)
695
      for key, value in self.__dict__.iteritems()]
696
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
697
 
698
  def __eq__(self, other):
699
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
700
 
701
  def __ne__(self, other):
702
    return not (self == other)
703
 
704
class getShipmentInfo_result:
705
  """
706
  Attributes:
707
   - success
708
  """
709
 
710
  thrift_spec = (
644 chandransh 711
    (0, TType.LIST, 'success', (TType.STRUCT,(AwbUpdate, AwbUpdate.thrift_spec)), None, ), # 0
412 ashish 712
  )
713
 
714
  def __init__(self, success=None,):
715
    self.success = success
716
 
717
  def read(self, iprot):
718
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
719
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
720
      return
721
    iprot.readStructBegin()
722
    while True:
723
      (fname, ftype, fid) = iprot.readFieldBegin()
724
      if ftype == TType.STOP:
725
        break
726
      if fid == 0:
727
        if ftype == TType.LIST:
728
          self.success = []
644 chandransh 729
          (_etype3, _size0) = iprot.readListBegin()
730
          for _i4 in xrange(_size0):
731
            _elem5 = AwbUpdate()
732
            _elem5.read(iprot)
733
            self.success.append(_elem5)
412 ashish 734
          iprot.readListEnd()
735
        else:
736
          iprot.skip(ftype)
737
      else:
738
        iprot.skip(ftype)
739
      iprot.readFieldEnd()
740
    iprot.readStructEnd()
741
 
742
  def write(self, oprot):
743
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
744
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
745
      return
644 chandransh 746
    oprot.writeStructBegin('getShipmentInfo_result')
412 ashish 747
    if self.success != None:
748
      oprot.writeFieldBegin('success', TType.LIST, 0)
749
      oprot.writeListBegin(TType.STRUCT, len(self.success))
644 chandransh 750
      for iter6 in self.success:
751
        iter6.write(oprot)
412 ashish 752
      oprot.writeListEnd()
753
      oprot.writeFieldEnd()
754
    oprot.writeFieldStop()
755
    oprot.writeStructEnd()
756
 
757
  def __repr__(self):
758
    L = ['%s=%r' % (key, value)
759
      for key, value in self.__dict__.iteritems()]
760
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
761
 
762
  def __eq__(self, other):
763
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
764
 
765
  def __ne__(self, other):
766
    return not (self == other)
767
 
768