Subversion Repositories SmartDukaan

Rev

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