Subversion Repositories SmartDukaan

Rev

Rev 732 | Rev 1137 | 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:
765 rajveer 19
  def closeSession(self, ):
20
    """
21
    For closing the open session in sqlalchemy
22
    """
23
    pass
24
 
669 chandransh 25
  def getProvider(self, providerId):
26
    """
27
    Returns a provider for a given provider ID. Throws an exception if none found.
28
 
29
    Parameters:
30
     - providerId
31
    """
32
    pass
33
 
675 chandransh 34
  def getAllProviders(self, ):
35
    """
36
    Returns a list containing all the providers.
37
    """
38
    pass
39
 
647 chandransh 40
  def getLogisticsEstimation(self, itemId, destination_pin):
483 rajveer 41
    """
647 chandransh 42
    Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
43
    Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
44
    is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised.
45
 
483 rajveer 46
    Parameters:
647 chandransh 47
     - itemId
48
     - destination_pin
483 rajveer 49
    """
50
    pass
51
 
647 chandransh 52
  def getLogisticsInfo(self, destination_pincode, item_id):
472 rajveer 53
    """
647 chandransh 54
    Same as above excpet that an airway bill number is also allocated and returned.
55
 
472 rajveer 56
    Parameters:
647 chandransh 57
     - destination_pincode
58
     - item_id
472 rajveer 59
    """
60
    pass
61
 
647 chandransh 62
  def getEmptyAWB(self, providerId):
412 ashish 63
    """
647 chandransh 64
    Returns an unused AWB number for the given provider.
65
 
412 ashish 66
    Parameters:
647 chandransh 67
     - providerId
412 ashish 68
    """
69
    pass
70
 
647 chandransh 71
  def getShipmentInfo(self, awb, providerId):
412 ashish 72
    """
647 chandransh 73
    Returns the list of updates for the given AWB number and provider id. The list is empty if there are no updates yet.
74
 
412 ashish 75
    Parameters:
76
     - awb
647 chandransh 77
     - providerId
412 ashish 78
    """
79
    pass
80
 
732 chandransh 81
  def getDestinationCode(self, providerId, pinCode):
82
    """
83
    Returns the short three letter code of a pincode for the given provider.
84
       Raises an exception if the pin code is not serviced by the given provider.
85
 
86
    Parameters:
87
     - providerId
88
     - pinCode
89
    """
90
    pass
412 ashish 91
 
732 chandransh 92
 
412 ashish 93
class Client(Iface):
94
  def __init__(self, iprot, oprot=None):
95
    self._iprot = self._oprot = iprot
96
    if oprot != None:
97
      self._oprot = oprot
98
    self._seqid = 0
99
 
765 rajveer 100
  def closeSession(self, ):
101
    """
102
    For closing the open session in sqlalchemy
103
    """
104
    self.send_closeSession()
105
    self.recv_closeSession()
106
 
107
  def send_closeSession(self, ):
108
    self._oprot.writeMessageBegin('closeSession', TMessageType.CALL, self._seqid)
109
    args = closeSession_args()
110
    args.write(self._oprot)
111
    self._oprot.writeMessageEnd()
112
    self._oprot.trans.flush()
113
 
114
  def recv_closeSession(self, ):
115
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
116
    if mtype == TMessageType.EXCEPTION:
117
      x = TApplicationException()
118
      x.read(self._iprot)
119
      self._iprot.readMessageEnd()
120
      raise x
121
    result = closeSession_result()
122
    result.read(self._iprot)
123
    self._iprot.readMessageEnd()
124
    return
125
 
669 chandransh 126
  def getProvider(self, providerId):
127
    """
128
    Returns a provider for a given provider ID. Throws an exception if none found.
129
 
130
    Parameters:
131
     - providerId
132
    """
133
    self.send_getProvider(providerId)
134
    return self.recv_getProvider()
135
 
136
  def send_getProvider(self, providerId):
137
    self._oprot.writeMessageBegin('getProvider', TMessageType.CALL, self._seqid)
138
    args = getProvider_args()
139
    args.providerId = providerId
140
    args.write(self._oprot)
141
    self._oprot.writeMessageEnd()
142
    self._oprot.trans.flush()
143
 
144
  def recv_getProvider(self, ):
145
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
146
    if mtype == TMessageType.EXCEPTION:
147
      x = TApplicationException()
148
      x.read(self._iprot)
149
      self._iprot.readMessageEnd()
150
      raise x
151
    result = getProvider_result()
152
    result.read(self._iprot)
153
    self._iprot.readMessageEnd()
154
    if result.success != None:
155
      return result.success
156
    if result.lse != None:
157
      raise result.lse
158
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProvider failed: unknown result");
159
 
675 chandransh 160
  def getAllProviders(self, ):
161
    """
162
    Returns a list containing all the providers.
163
    """
164
    self.send_getAllProviders()
165
    return self.recv_getAllProviders()
166
 
167
  def send_getAllProviders(self, ):
168
    self._oprot.writeMessageBegin('getAllProviders', TMessageType.CALL, self._seqid)
169
    args = getAllProviders_args()
170
    args.write(self._oprot)
171
    self._oprot.writeMessageEnd()
172
    self._oprot.trans.flush()
173
 
174
  def recv_getAllProviders(self, ):
175
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
176
    if mtype == TMessageType.EXCEPTION:
177
      x = TApplicationException()
178
      x.read(self._iprot)
179
      self._iprot.readMessageEnd()
180
      raise x
181
    result = getAllProviders_result()
182
    result.read(self._iprot)
183
    self._iprot.readMessageEnd()
184
    if result.success != None:
185
      return result.success
186
    if result.lse != None:
187
      raise result.lse
188
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllProviders failed: unknown result");
189
 
647 chandransh 190
  def getLogisticsEstimation(self, itemId, destination_pin):
483 rajveer 191
    """
647 chandransh 192
    Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
193
    Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
194
    is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised.
195
 
483 rajveer 196
    Parameters:
647 chandransh 197
     - itemId
198
     - destination_pin
483 rajveer 199
    """
647 chandransh 200
    self.send_getLogisticsEstimation(itemId, destination_pin)
201
    return self.recv_getLogisticsEstimation()
483 rajveer 202
 
647 chandransh 203
  def send_getLogisticsEstimation(self, itemId, destination_pin):
204
    self._oprot.writeMessageBegin('getLogisticsEstimation', TMessageType.CALL, self._seqid)
205
    args = getLogisticsEstimation_args()
206
    args.itemId = itemId
207
    args.destination_pin = destination_pin
483 rajveer 208
    args.write(self._oprot)
209
    self._oprot.writeMessageEnd()
210
    self._oprot.trans.flush()
211
 
647 chandransh 212
  def recv_getLogisticsEstimation(self, ):
483 rajveer 213
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
214
    if mtype == TMessageType.EXCEPTION:
215
      x = TApplicationException()
216
      x.read(self._iprot)
217
      self._iprot.readMessageEnd()
218
      raise x
647 chandransh 219
    result = getLogisticsEstimation_result()
483 rajveer 220
    result.read(self._iprot)
221
    self._iprot.readMessageEnd()
222
    if result.success != None:
223
      return result.success
224
    if result.se != None:
225
      raise result.se
647 chandransh 226
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
483 rajveer 227
 
647 chandransh 228
  def getLogisticsInfo(self, destination_pincode, item_id):
472 rajveer 229
    """
647 chandransh 230
    Same as above excpet that an airway bill number is also allocated and returned.
231
 
472 rajveer 232
    Parameters:
647 chandransh 233
     - destination_pincode
234
     - item_id
472 rajveer 235
    """
647 chandransh 236
    self.send_getLogisticsInfo(destination_pincode, item_id)
237
    return self.recv_getLogisticsInfo()
472 rajveer 238
 
647 chandransh 239
  def send_getLogisticsInfo(self, destination_pincode, item_id):
240
    self._oprot.writeMessageBegin('getLogisticsInfo', TMessageType.CALL, self._seqid)
241
    args = getLogisticsInfo_args()
242
    args.destination_pincode = destination_pincode
243
    args.item_id = item_id
472 rajveer 244
    args.write(self._oprot)
245
    self._oprot.writeMessageEnd()
246
    self._oprot.trans.flush()
247
 
647 chandransh 248
  def recv_getLogisticsInfo(self, ):
472 rajveer 249
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
250
    if mtype == TMessageType.EXCEPTION:
251
      x = TApplicationException()
252
      x.read(self._iprot)
253
      self._iprot.readMessageEnd()
254
      raise x
647 chandransh 255
    result = getLogisticsInfo_result()
472 rajveer 256
    result.read(self._iprot)
257
    self._iprot.readMessageEnd()
258
    if result.success != None:
259
      return result.success
260
    if result.se != None:
261
      raise result.se
647 chandransh 262
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsInfo failed: unknown result");
472 rajveer 263
 
647 chandransh 264
  def getEmptyAWB(self, providerId):
412 ashish 265
    """
647 chandransh 266
    Returns an unused AWB number for the given provider.
267
 
412 ashish 268
    Parameters:
647 chandransh 269
     - providerId
412 ashish 270
    """
647 chandransh 271
    self.send_getEmptyAWB(providerId)
412 ashish 272
    return self.recv_getEmptyAWB()
273
 
647 chandransh 274
  def send_getEmptyAWB(self, providerId):
412 ashish 275
    self._oprot.writeMessageBegin('getEmptyAWB', TMessageType.CALL, self._seqid)
276
    args = getEmptyAWB_args()
647 chandransh 277
    args.providerId = providerId
412 ashish 278
    args.write(self._oprot)
279
    self._oprot.writeMessageEnd()
280
    self._oprot.trans.flush()
281
 
282
  def recv_getEmptyAWB(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 = getEmptyAWB_result()
290
    result.read(self._iprot)
291
    self._iprot.readMessageEnd()
292
    if result.success != None:
293
      return result.success
647 chandransh 294
    if result.se != None:
295
      raise result.se
412 ashish 296
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
297
 
647 chandransh 298
  def getShipmentInfo(self, awb, providerId):
412 ashish 299
    """
647 chandransh 300
    Returns the list of updates for the given AWB number and provider id. The list is empty if there are no updates yet.
301
 
412 ashish 302
    Parameters:
303
     - awb
647 chandransh 304
     - providerId
412 ashish 305
    """
647 chandransh 306
    self.send_getShipmentInfo(awb, providerId)
412 ashish 307
    return self.recv_getShipmentInfo()
308
 
647 chandransh 309
  def send_getShipmentInfo(self, awb, providerId):
412 ashish 310
    self._oprot.writeMessageBegin('getShipmentInfo', TMessageType.CALL, self._seqid)
311
    args = getShipmentInfo_args()
312
    args.awb = awb
647 chandransh 313
    args.providerId = providerId
412 ashish 314
    args.write(self._oprot)
315
    self._oprot.writeMessageEnd()
316
    self._oprot.trans.flush()
317
 
318
  def recv_getShipmentInfo(self, ):
319
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
320
    if mtype == TMessageType.EXCEPTION:
321
      x = TApplicationException()
322
      x.read(self._iprot)
323
      self._iprot.readMessageEnd()
324
      raise x
325
    result = getShipmentInfo_result()
326
    result.read(self._iprot)
327
    self._iprot.readMessageEnd()
328
    if result.success != None:
329
      return result.success
647 chandransh 330
    if result.se != None:
331
      raise result.se
412 ashish 332
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
333
 
732 chandransh 334
  def getDestinationCode(self, providerId, pinCode):
335
    """
336
    Returns the short three letter code of a pincode for the given provider.
337
       Raises an exception if the pin code is not serviced by the given provider.
338
 
339
    Parameters:
340
     - providerId
341
     - pinCode
342
    """
343
    self.send_getDestinationCode(providerId, pinCode)
344
    return self.recv_getDestinationCode()
412 ashish 345
 
732 chandransh 346
  def send_getDestinationCode(self, providerId, pinCode):
347
    self._oprot.writeMessageBegin('getDestinationCode', TMessageType.CALL, self._seqid)
348
    args = getDestinationCode_args()
349
    args.providerId = providerId
350
    args.pinCode = pinCode
351
    args.write(self._oprot)
352
    self._oprot.writeMessageEnd()
353
    self._oprot.trans.flush()
354
 
355
  def recv_getDestinationCode(self, ):
356
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
357
    if mtype == TMessageType.EXCEPTION:
358
      x = TApplicationException()
359
      x.read(self._iprot)
360
      self._iprot.readMessageEnd()
361
      raise x
362
    result = getDestinationCode_result()
363
    result.read(self._iprot)
364
    self._iprot.readMessageEnd()
365
    if result.success != None:
366
      return result.success
367
    if result.se != None:
368
      raise result.se
369
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDestinationCode failed: unknown result");
370
 
371
 
412 ashish 372
class Processor(Iface, TProcessor):
373
  def __init__(self, handler):
374
    self._handler = handler
375
    self._processMap = {}
765 rajveer 376
    self._processMap["closeSession"] = Processor.process_closeSession
669 chandransh 377
    self._processMap["getProvider"] = Processor.process_getProvider
675 chandransh 378
    self._processMap["getAllProviders"] = Processor.process_getAllProviders
647 chandransh 379
    self._processMap["getLogisticsEstimation"] = Processor.process_getLogisticsEstimation
483 rajveer 380
    self._processMap["getLogisticsInfo"] = Processor.process_getLogisticsInfo
412 ashish 381
    self._processMap["getEmptyAWB"] = Processor.process_getEmptyAWB
382
    self._processMap["getShipmentInfo"] = Processor.process_getShipmentInfo
732 chandransh 383
    self._processMap["getDestinationCode"] = Processor.process_getDestinationCode
412 ashish 384
 
385
  def process(self, iprot, oprot):
386
    (name, type, seqid) = iprot.readMessageBegin()
387
    if name not in self._processMap:
388
      iprot.skip(TType.STRUCT)
389
      iprot.readMessageEnd()
390
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
391
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
392
      x.write(oprot)
393
      oprot.writeMessageEnd()
394
      oprot.trans.flush()
395
      return
396
    else:
397
      self._processMap[name](self, seqid, iprot, oprot)
398
    return True
399
 
765 rajveer 400
  def process_closeSession(self, seqid, iprot, oprot):
401
    args = closeSession_args()
402
    args.read(iprot)
403
    iprot.readMessageEnd()
404
    result = closeSession_result()
405
    self._handler.closeSession()
406
    oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)
407
    result.write(oprot)
408
    oprot.writeMessageEnd()
409
    oprot.trans.flush()
410
 
669 chandransh 411
  def process_getProvider(self, seqid, iprot, oprot):
412
    args = getProvider_args()
413
    args.read(iprot)
414
    iprot.readMessageEnd()
415
    result = getProvider_result()
416
    try:
417
      result.success = self._handler.getProvider(args.providerId)
418
    except LogisticsServiceException, lse:
419
      result.lse = lse
420
    oprot.writeMessageBegin("getProvider", TMessageType.REPLY, seqid)
421
    result.write(oprot)
422
    oprot.writeMessageEnd()
423
    oprot.trans.flush()
424
 
675 chandransh 425
  def process_getAllProviders(self, seqid, iprot, oprot):
426
    args = getAllProviders_args()
427
    args.read(iprot)
428
    iprot.readMessageEnd()
429
    result = getAllProviders_result()
430
    try:
431
      result.success = self._handler.getAllProviders()
432
    except LogisticsServiceException, lse:
433
      result.lse = lse
434
    oprot.writeMessageBegin("getAllProviders", TMessageType.REPLY, seqid)
435
    result.write(oprot)
436
    oprot.writeMessageEnd()
437
    oprot.trans.flush()
438
 
647 chandransh 439
  def process_getLogisticsEstimation(self, seqid, iprot, oprot):
440
    args = getLogisticsEstimation_args()
483 rajveer 441
    args.read(iprot)
442
    iprot.readMessageEnd()
647 chandransh 443
    result = getLogisticsEstimation_result()
483 rajveer 444
    try:
647 chandransh 445
      result.success = self._handler.getLogisticsEstimation(args.itemId, args.destination_pin)
483 rajveer 446
    except LogisticsServiceException, se:
447
      result.se = se
647 chandransh 448
    oprot.writeMessageBegin("getLogisticsEstimation", TMessageType.REPLY, seqid)
483 rajveer 449
    result.write(oprot)
450
    oprot.writeMessageEnd()
451
    oprot.trans.flush()
452
 
647 chandransh 453
  def process_getLogisticsInfo(self, seqid, iprot, oprot):
454
    args = getLogisticsInfo_args()
472 rajveer 455
    args.read(iprot)
456
    iprot.readMessageEnd()
647 chandransh 457
    result = getLogisticsInfo_result()
472 rajveer 458
    try:
647 chandransh 459
      result.success = self._handler.getLogisticsInfo(args.destination_pincode, args.item_id)
472 rajveer 460
    except LogisticsServiceException, se:
461
      result.se = se
647 chandransh 462
    oprot.writeMessageBegin("getLogisticsInfo", TMessageType.REPLY, seqid)
472 rajveer 463
    result.write(oprot)
464
    oprot.writeMessageEnd()
465
    oprot.trans.flush()
466
 
412 ashish 467
  def process_getEmptyAWB(self, seqid, iprot, oprot):
468
    args = getEmptyAWB_args()
469
    args.read(iprot)
470
    iprot.readMessageEnd()
471
    result = getEmptyAWB_result()
647 chandransh 472
    try:
473
      result.success = self._handler.getEmptyAWB(args.providerId)
474
    except LogisticsServiceException, se:
475
      result.se = se
412 ashish 476
    oprot.writeMessageBegin("getEmptyAWB", TMessageType.REPLY, seqid)
477
    result.write(oprot)
478
    oprot.writeMessageEnd()
479
    oprot.trans.flush()
480
 
481
  def process_getShipmentInfo(self, seqid, iprot, oprot):
482
    args = getShipmentInfo_args()
483
    args.read(iprot)
484
    iprot.readMessageEnd()
485
    result = getShipmentInfo_result()
647 chandransh 486
    try:
487
      result.success = self._handler.getShipmentInfo(args.awb, args.providerId)
488
    except LogisticsServiceException, se:
489
      result.se = se
412 ashish 490
    oprot.writeMessageBegin("getShipmentInfo", TMessageType.REPLY, seqid)
491
    result.write(oprot)
492
    oprot.writeMessageEnd()
493
    oprot.trans.flush()
494
 
732 chandransh 495
  def process_getDestinationCode(self, seqid, iprot, oprot):
496
    args = getDestinationCode_args()
497
    args.read(iprot)
498
    iprot.readMessageEnd()
499
    result = getDestinationCode_result()
500
    try:
501
      result.success = self._handler.getDestinationCode(args.providerId, args.pinCode)
502
    except LogisticsServiceException, se:
503
      result.se = se
504
    oprot.writeMessageBegin("getDestinationCode", TMessageType.REPLY, seqid)
505
    result.write(oprot)
506
    oprot.writeMessageEnd()
507
    oprot.trans.flush()
412 ashish 508
 
732 chandransh 509
 
412 ashish 510
# HELPER FUNCTIONS AND STRUCTURES
511
 
765 rajveer 512
class closeSession_args:
513
 
514
  thrift_spec = (
515
  )
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
      else:
527
        iprot.skip(ftype)
528
      iprot.readFieldEnd()
529
    iprot.readStructEnd()
530
 
531
  def write(self, oprot):
532
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
533
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
534
      return
535
    oprot.writeStructBegin('closeSession_args')
536
    oprot.writeFieldStop()
537
    oprot.writeStructEnd()
538
 
539
  def __repr__(self):
540
    L = ['%s=%r' % (key, value)
541
      for key, value in self.__dict__.iteritems()]
542
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
543
 
544
  def __eq__(self, other):
545
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
546
 
547
  def __ne__(self, other):
548
    return not (self == other)
549
 
550
class closeSession_result:
551
 
552
  thrift_spec = (
553
  )
554
 
555
  def read(self, iprot):
556
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
557
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
558
      return
559
    iprot.readStructBegin()
560
    while True:
561
      (fname, ftype, fid) = iprot.readFieldBegin()
562
      if ftype == TType.STOP:
563
        break
564
      else:
565
        iprot.skip(ftype)
566
      iprot.readFieldEnd()
567
    iprot.readStructEnd()
568
 
569
  def write(self, oprot):
570
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
571
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
572
      return
573
    oprot.writeStructBegin('closeSession_result')
574
    oprot.writeFieldStop()
575
    oprot.writeStructEnd()
576
 
577
  def __repr__(self):
578
    L = ['%s=%r' % (key, value)
579
      for key, value in self.__dict__.iteritems()]
580
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
581
 
582
  def __eq__(self, other):
583
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
584
 
585
  def __ne__(self, other):
586
    return not (self == other)
587
 
669 chandransh 588
class getProvider_args:
589
  """
590
  Attributes:
591
   - providerId
592
  """
593
 
594
  thrift_spec = (
595
    None, # 0
596
    (1, TType.I64, 'providerId', None, None, ), # 1
597
  )
598
 
599
  def __init__(self, providerId=None,):
600
    self.providerId = providerId
601
 
602
  def read(self, iprot):
603
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
604
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
605
      return
606
    iprot.readStructBegin()
607
    while True:
608
      (fname, ftype, fid) = iprot.readFieldBegin()
609
      if ftype == TType.STOP:
610
        break
611
      if fid == 1:
612
        if ftype == TType.I64:
613
          self.providerId = iprot.readI64();
614
        else:
615
          iprot.skip(ftype)
616
      else:
617
        iprot.skip(ftype)
618
      iprot.readFieldEnd()
619
    iprot.readStructEnd()
620
 
621
  def write(self, oprot):
622
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
623
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
624
      return
625
    oprot.writeStructBegin('getProvider_args')
626
    if self.providerId != None:
627
      oprot.writeFieldBegin('providerId', TType.I64, 1)
628
      oprot.writeI64(self.providerId)
629
      oprot.writeFieldEnd()
630
    oprot.writeFieldStop()
631
    oprot.writeStructEnd()
632
 
633
  def __repr__(self):
634
    L = ['%s=%r' % (key, value)
635
      for key, value in self.__dict__.iteritems()]
636
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
637
 
638
  def __eq__(self, other):
639
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
640
 
641
  def __ne__(self, other):
642
    return not (self == other)
643
 
644
class getProvider_result:
645
  """
646
  Attributes:
647
   - success
648
   - lse
649
  """
650
 
651
  thrift_spec = (
652
    (0, TType.STRUCT, 'success', (Provider, Provider.thrift_spec), None, ), # 0
653
    (1, TType.STRUCT, 'lse', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
654
  )
655
 
656
  def __init__(self, success=None, lse=None,):
657
    self.success = success
658
    self.lse = lse
659
 
660
  def read(self, iprot):
661
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
662
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
663
      return
664
    iprot.readStructBegin()
665
    while True:
666
      (fname, ftype, fid) = iprot.readFieldBegin()
667
      if ftype == TType.STOP:
668
        break
669
      if fid == 0:
670
        if ftype == TType.STRUCT:
671
          self.success = Provider()
672
          self.success.read(iprot)
673
        else:
674
          iprot.skip(ftype)
675
      elif fid == 1:
676
        if ftype == TType.STRUCT:
677
          self.lse = LogisticsServiceException()
678
          self.lse.read(iprot)
679
        else:
680
          iprot.skip(ftype)
681
      else:
682
        iprot.skip(ftype)
683
      iprot.readFieldEnd()
684
    iprot.readStructEnd()
685
 
686
  def write(self, oprot):
687
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
688
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
689
      return
690
    oprot.writeStructBegin('getProvider_result')
691
    if self.success != None:
692
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
693
      self.success.write(oprot)
694
      oprot.writeFieldEnd()
695
    if self.lse != None:
696
      oprot.writeFieldBegin('lse', TType.STRUCT, 1)
697
      self.lse.write(oprot)
698
      oprot.writeFieldEnd()
699
    oprot.writeFieldStop()
700
    oprot.writeStructEnd()
701
 
702
  def __repr__(self):
703
    L = ['%s=%r' % (key, value)
704
      for key, value in self.__dict__.iteritems()]
705
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
706
 
707
  def __eq__(self, other):
708
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
709
 
710
  def __ne__(self, other):
711
    return not (self == other)
712
 
675 chandransh 713
class getAllProviders_args:
714
 
715
  thrift_spec = (
716
  )
717
 
718
  def read(self, iprot):
719
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
720
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
721
      return
722
    iprot.readStructBegin()
723
    while True:
724
      (fname, ftype, fid) = iprot.readFieldBegin()
725
      if ftype == TType.STOP:
726
        break
727
      else:
728
        iprot.skip(ftype)
729
      iprot.readFieldEnd()
730
    iprot.readStructEnd()
731
 
732
  def write(self, oprot):
733
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
734
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
735
      return
736
    oprot.writeStructBegin('getAllProviders_args')
737
    oprot.writeFieldStop()
738
    oprot.writeStructEnd()
739
 
740
  def __repr__(self):
741
    L = ['%s=%r' % (key, value)
742
      for key, value in self.__dict__.iteritems()]
743
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
744
 
745
  def __eq__(self, other):
746
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
747
 
748
  def __ne__(self, other):
749
    return not (self == other)
750
 
751
class getAllProviders_result:
752
  """
753
  Attributes:
754
   - success
755
   - lse
756
  """
757
 
758
  thrift_spec = (
759
    (0, TType.LIST, 'success', (TType.STRUCT,(Provider, Provider.thrift_spec)), None, ), # 0
760
    (1, TType.STRUCT, 'lse', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
761
  )
762
 
763
  def __init__(self, success=None, lse=None,):
764
    self.success = success
765
    self.lse = lse
766
 
767
  def read(self, iprot):
768
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
769
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
770
      return
771
    iprot.readStructBegin()
772
    while True:
773
      (fname, ftype, fid) = iprot.readFieldBegin()
774
      if ftype == TType.STOP:
775
        break
776
      if fid == 0:
777
        if ftype == TType.LIST:
778
          self.success = []
779
          (_etype3, _size0) = iprot.readListBegin()
780
          for _i4 in xrange(_size0):
781
            _elem5 = Provider()
782
            _elem5.read(iprot)
783
            self.success.append(_elem5)
784
          iprot.readListEnd()
785
        else:
786
          iprot.skip(ftype)
787
      elif fid == 1:
788
        if ftype == TType.STRUCT:
789
          self.lse = LogisticsServiceException()
790
          self.lse.read(iprot)
791
        else:
792
          iprot.skip(ftype)
793
      else:
794
        iprot.skip(ftype)
795
      iprot.readFieldEnd()
796
    iprot.readStructEnd()
797
 
798
  def write(self, oprot):
799
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
800
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
801
      return
802
    oprot.writeStructBegin('getAllProviders_result')
803
    if self.success != None:
804
      oprot.writeFieldBegin('success', TType.LIST, 0)
805
      oprot.writeListBegin(TType.STRUCT, len(self.success))
806
      for iter6 in self.success:
807
        iter6.write(oprot)
808
      oprot.writeListEnd()
809
      oprot.writeFieldEnd()
810
    if self.lse != None:
811
      oprot.writeFieldBegin('lse', TType.STRUCT, 1)
812
      self.lse.write(oprot)
813
      oprot.writeFieldEnd()
814
    oprot.writeFieldStop()
815
    oprot.writeStructEnd()
816
 
817
  def __repr__(self):
818
    L = ['%s=%r' % (key, value)
819
      for key, value in self.__dict__.iteritems()]
820
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
821
 
822
  def __eq__(self, other):
823
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
824
 
825
  def __ne__(self, other):
826
    return not (self == other)
827
 
647 chandransh 828
class getLogisticsEstimation_args:
483 rajveer 829
  """
830
  Attributes:
647 chandransh 831
   - itemId
832
   - destination_pin
483 rajveer 833
  """
834
 
835
  thrift_spec = (
836
    None, # 0
647 chandransh 837
    (1, TType.I64, 'itemId', None, None, ), # 1
838
    (2, TType.STRING, 'destination_pin', None, None, ), # 2
483 rajveer 839
  )
840
 
647 chandransh 841
  def __init__(self, itemId=None, destination_pin=None,):
842
    self.itemId = itemId
843
    self.destination_pin = destination_pin
483 rajveer 844
 
845
  def read(self, iprot):
846
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
847
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
848
      return
849
    iprot.readStructBegin()
850
    while True:
851
      (fname, ftype, fid) = iprot.readFieldBegin()
852
      if ftype == TType.STOP:
853
        break
854
      if fid == 1:
647 chandransh 855
        if ftype == TType.I64:
856
          self.itemId = iprot.readI64();
483 rajveer 857
        else:
858
          iprot.skip(ftype)
859
      elif fid == 2:
860
        if ftype == TType.STRING:
647 chandransh 861
          self.destination_pin = iprot.readString();
483 rajveer 862
        else:
863
          iprot.skip(ftype)
864
      else:
865
        iprot.skip(ftype)
866
      iprot.readFieldEnd()
867
    iprot.readStructEnd()
868
 
869
  def write(self, oprot):
870
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
871
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
872
      return
647 chandransh 873
    oprot.writeStructBegin('getLogisticsEstimation_args')
874
    if self.itemId != None:
875
      oprot.writeFieldBegin('itemId', TType.I64, 1)
876
      oprot.writeI64(self.itemId)
483 rajveer 877
      oprot.writeFieldEnd()
647 chandransh 878
    if self.destination_pin != None:
879
      oprot.writeFieldBegin('destination_pin', TType.STRING, 2)
880
      oprot.writeString(self.destination_pin)
483 rajveer 881
      oprot.writeFieldEnd()
882
    oprot.writeFieldStop()
883
    oprot.writeStructEnd()
884
 
885
  def __repr__(self):
886
    L = ['%s=%r' % (key, value)
887
      for key, value in self.__dict__.iteritems()]
888
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
889
 
890
  def __eq__(self, other):
891
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
892
 
893
  def __ne__(self, other):
894
    return not (self == other)
895
 
647 chandransh 896
class getLogisticsEstimation_result:
483 rajveer 897
  """
898
  Attributes:
899
   - success
900
   - se
901
  """
902
 
903
  thrift_spec = (
904
    (0, TType.STRUCT, 'success', (LogisticsInfo, LogisticsInfo.thrift_spec), None, ), # 0
905
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
906
  )
907
 
908
  def __init__(self, success=None, se=None,):
909
    self.success = success
910
    self.se = se
911
 
912
  def read(self, iprot):
913
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
914
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
915
      return
916
    iprot.readStructBegin()
917
    while True:
918
      (fname, ftype, fid) = iprot.readFieldBegin()
919
      if ftype == TType.STOP:
920
        break
921
      if fid == 0:
922
        if ftype == TType.STRUCT:
923
          self.success = LogisticsInfo()
924
          self.success.read(iprot)
925
        else:
926
          iprot.skip(ftype)
927
      elif fid == 1:
928
        if ftype == TType.STRUCT:
929
          self.se = LogisticsServiceException()
930
          self.se.read(iprot)
931
        else:
932
          iprot.skip(ftype)
933
      else:
934
        iprot.skip(ftype)
935
      iprot.readFieldEnd()
936
    iprot.readStructEnd()
937
 
938
  def write(self, oprot):
939
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
940
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
941
      return
647 chandransh 942
    oprot.writeStructBegin('getLogisticsEstimation_result')
483 rajveer 943
    if self.success != None:
944
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
945
      self.success.write(oprot)
946
      oprot.writeFieldEnd()
947
    if self.se != None:
948
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
949
      self.se.write(oprot)
950
      oprot.writeFieldEnd()
951
    oprot.writeFieldStop()
952
    oprot.writeStructEnd()
953
 
954
  def __repr__(self):
955
    L = ['%s=%r' % (key, value)
956
      for key, value in self.__dict__.iteritems()]
957
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
958
 
959
  def __eq__(self, other):
960
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
961
 
962
  def __ne__(self, other):
963
    return not (self == other)
964
 
647 chandransh 965
class getLogisticsInfo_args:
472 rajveer 966
  """
967
  Attributes:
647 chandransh 968
   - destination_pincode
969
   - item_id
472 rajveer 970
  """
971
 
972
  thrift_spec = (
973
    None, # 0
647 chandransh 974
    (1, TType.STRING, 'destination_pincode', None, None, ), # 1
716 rajveer 975
    (2, TType.I64, 'item_id', None, None, ), # 2
472 rajveer 976
  )
977
 
647 chandransh 978
  def __init__(self, destination_pincode=None, item_id=None,):
979
    self.destination_pincode = destination_pincode
980
    self.item_id = item_id
472 rajveer 981
 
982
  def read(self, iprot):
983
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
984
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
985
      return
986
    iprot.readStructBegin()
987
    while True:
988
      (fname, ftype, fid) = iprot.readFieldBegin()
989
      if ftype == TType.STOP:
990
        break
991
      if fid == 1:
647 chandransh 992
        if ftype == TType.STRING:
993
          self.destination_pincode = iprot.readString();
472 rajveer 994
        else:
995
          iprot.skip(ftype)
996
      elif fid == 2:
716 rajveer 997
        if ftype == TType.I64:
998
          self.item_id = iprot.readI64();
472 rajveer 999
        else:
1000
          iprot.skip(ftype)
1001
      else:
1002
        iprot.skip(ftype)
1003
      iprot.readFieldEnd()
1004
    iprot.readStructEnd()
1005
 
1006
  def write(self, oprot):
1007
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1008
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1009
      return
647 chandransh 1010
    oprot.writeStructBegin('getLogisticsInfo_args')
1011
    if self.destination_pincode != None:
1012
      oprot.writeFieldBegin('destination_pincode', TType.STRING, 1)
1013
      oprot.writeString(self.destination_pincode)
472 rajveer 1014
      oprot.writeFieldEnd()
647 chandransh 1015
    if self.item_id != None:
716 rajveer 1016
      oprot.writeFieldBegin('item_id', TType.I64, 2)
1017
      oprot.writeI64(self.item_id)
472 rajveer 1018
      oprot.writeFieldEnd()
1019
    oprot.writeFieldStop()
1020
    oprot.writeStructEnd()
1021
 
1022
  def __repr__(self):
1023
    L = ['%s=%r' % (key, value)
1024
      for key, value in self.__dict__.iteritems()]
1025
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1026
 
1027
  def __eq__(self, other):
1028
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1029
 
1030
  def __ne__(self, other):
1031
    return not (self == other)
1032
 
647 chandransh 1033
class getLogisticsInfo_result:
472 rajveer 1034
  """
1035
  Attributes:
1036
   - success
1037
   - se
1038
  """
1039
 
1040
  thrift_spec = (
644 chandransh 1041
    (0, TType.STRUCT, 'success', (LogisticsInfo, LogisticsInfo.thrift_spec), None, ), # 0
472 rajveer 1042
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
1043
  )
1044
 
1045
  def __init__(self, success=None, se=None,):
1046
    self.success = success
1047
    self.se = se
1048
 
1049
  def read(self, iprot):
1050
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1051
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1052
      return
1053
    iprot.readStructBegin()
1054
    while True:
1055
      (fname, ftype, fid) = iprot.readFieldBegin()
1056
      if ftype == TType.STOP:
1057
        break
1058
      if fid == 0:
1059
        if ftype == TType.STRUCT:
644 chandransh 1060
          self.success = LogisticsInfo()
472 rajveer 1061
          self.success.read(iprot)
1062
        else:
1063
          iprot.skip(ftype)
1064
      elif fid == 1:
1065
        if ftype == TType.STRUCT:
1066
          self.se = LogisticsServiceException()
1067
          self.se.read(iprot)
1068
        else:
1069
          iprot.skip(ftype)
1070
      else:
1071
        iprot.skip(ftype)
1072
      iprot.readFieldEnd()
1073
    iprot.readStructEnd()
1074
 
1075
  def write(self, oprot):
1076
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1077
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1078
      return
647 chandransh 1079
    oprot.writeStructBegin('getLogisticsInfo_result')
472 rajveer 1080
    if self.success != None:
1081
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1082
      self.success.write(oprot)
1083
      oprot.writeFieldEnd()
1084
    if self.se != None:
1085
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1086
      self.se.write(oprot)
1087
      oprot.writeFieldEnd()
1088
    oprot.writeFieldStop()
1089
    oprot.writeStructEnd()
1090
 
1091
  def __repr__(self):
1092
    L = ['%s=%r' % (key, value)
1093
      for key, value in self.__dict__.iteritems()]
1094
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1095
 
1096
  def __eq__(self, other):
1097
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1098
 
1099
  def __ne__(self, other):
1100
    return not (self == other)
1101
 
412 ashish 1102
class getEmptyAWB_args:
1103
  """
1104
  Attributes:
647 chandransh 1105
   - providerId
412 ashish 1106
  """
1107
 
1108
  thrift_spec = (
1109
    None, # 0
647 chandransh 1110
    (1, TType.I64, 'providerId', None, None, ), # 1
412 ashish 1111
  )
1112
 
647 chandransh 1113
  def __init__(self, providerId=None,):
1114
    self.providerId = providerId
412 ashish 1115
 
1116
  def read(self, iprot):
1117
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1118
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1119
      return
1120
    iprot.readStructBegin()
1121
    while True:
1122
      (fname, ftype, fid) = iprot.readFieldBegin()
1123
      if ftype == TType.STOP:
1124
        break
1125
      if fid == 1:
1126
        if ftype == TType.I64:
647 chandransh 1127
          self.providerId = iprot.readI64();
412 ashish 1128
        else:
1129
          iprot.skip(ftype)
1130
      else:
1131
        iprot.skip(ftype)
1132
      iprot.readFieldEnd()
1133
    iprot.readStructEnd()
1134
 
1135
  def write(self, oprot):
1136
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1137
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1138
      return
1139
    oprot.writeStructBegin('getEmptyAWB_args')
647 chandransh 1140
    if self.providerId != None:
1141
      oprot.writeFieldBegin('providerId', TType.I64, 1)
1142
      oprot.writeI64(self.providerId)
412 ashish 1143
      oprot.writeFieldEnd()
1144
    oprot.writeFieldStop()
1145
    oprot.writeStructEnd()
1146
 
1147
  def __repr__(self):
1148
    L = ['%s=%r' % (key, value)
1149
      for key, value in self.__dict__.iteritems()]
1150
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1151
 
1152
  def __eq__(self, other):
1153
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1154
 
1155
  def __ne__(self, other):
1156
    return not (self == other)
1157
 
1158
class getEmptyAWB_result:
1159
  """
1160
  Attributes:
1161
   - success
647 chandransh 1162
   - se
412 ashish 1163
  """
1164
 
1165
  thrift_spec = (
1166
    (0, TType.STRING, 'success', None, None, ), # 0
647 chandransh 1167
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
412 ashish 1168
  )
1169
 
647 chandransh 1170
  def __init__(self, success=None, se=None,):
412 ashish 1171
    self.success = success
647 chandransh 1172
    self.se = se
412 ashish 1173
 
1174
  def read(self, iprot):
1175
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1176
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1177
      return
1178
    iprot.readStructBegin()
1179
    while True:
1180
      (fname, ftype, fid) = iprot.readFieldBegin()
1181
      if ftype == TType.STOP:
1182
        break
1183
      if fid == 0:
1184
        if ftype == TType.STRING:
1185
          self.success = iprot.readString();
1186
        else:
1187
          iprot.skip(ftype)
647 chandransh 1188
      elif fid == 1:
1189
        if ftype == TType.STRUCT:
1190
          self.se = LogisticsServiceException()
1191
          self.se.read(iprot)
1192
        else:
1193
          iprot.skip(ftype)
412 ashish 1194
      else:
1195
        iprot.skip(ftype)
1196
      iprot.readFieldEnd()
1197
    iprot.readStructEnd()
1198
 
1199
  def write(self, oprot):
1200
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1201
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1202
      return
1203
    oprot.writeStructBegin('getEmptyAWB_result')
1204
    if self.success != None:
1205
      oprot.writeFieldBegin('success', TType.STRING, 0)
1206
      oprot.writeString(self.success)
1207
      oprot.writeFieldEnd()
647 chandransh 1208
    if self.se != None:
1209
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1210
      self.se.write(oprot)
1211
      oprot.writeFieldEnd()
412 ashish 1212
    oprot.writeFieldStop()
1213
    oprot.writeStructEnd()
1214
 
1215
  def __repr__(self):
1216
    L = ['%s=%r' % (key, value)
1217
      for key, value in self.__dict__.iteritems()]
1218
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1219
 
1220
  def __eq__(self, other):
1221
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1222
 
1223
  def __ne__(self, other):
1224
    return not (self == other)
1225
 
1226
class getShipmentInfo_args:
1227
  """
1228
  Attributes:
1229
   - awb
647 chandransh 1230
   - providerId
412 ashish 1231
  """
1232
 
1233
  thrift_spec = (
1234
    None, # 0
1235
    (1, TType.STRING, 'awb', None, None, ), # 1
647 chandransh 1236
    (2, TType.I64, 'providerId', None, None, ), # 2
412 ashish 1237
  )
1238
 
647 chandransh 1239
  def __init__(self, awb=None, providerId=None,):
412 ashish 1240
    self.awb = awb
647 chandransh 1241
    self.providerId = providerId
412 ashish 1242
 
1243
  def read(self, iprot):
1244
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1245
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1246
      return
1247
    iprot.readStructBegin()
1248
    while True:
1249
      (fname, ftype, fid) = iprot.readFieldBegin()
1250
      if ftype == TType.STOP:
1251
        break
1252
      if fid == 1:
1253
        if ftype == TType.STRING:
1254
          self.awb = iprot.readString();
1255
        else:
1256
          iprot.skip(ftype)
647 chandransh 1257
      elif fid == 2:
1258
        if ftype == TType.I64:
1259
          self.providerId = iprot.readI64();
1260
        else:
1261
          iprot.skip(ftype)
412 ashish 1262
      else:
1263
        iprot.skip(ftype)
1264
      iprot.readFieldEnd()
1265
    iprot.readStructEnd()
1266
 
1267
  def write(self, oprot):
1268
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1269
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1270
      return
1271
    oprot.writeStructBegin('getShipmentInfo_args')
1272
    if self.awb != None:
1273
      oprot.writeFieldBegin('awb', TType.STRING, 1)
1274
      oprot.writeString(self.awb)
1275
      oprot.writeFieldEnd()
647 chandransh 1276
    if self.providerId != None:
1277
      oprot.writeFieldBegin('providerId', TType.I64, 2)
1278
      oprot.writeI64(self.providerId)
1279
      oprot.writeFieldEnd()
412 ashish 1280
    oprot.writeFieldStop()
1281
    oprot.writeStructEnd()
1282
 
1283
  def __repr__(self):
1284
    L = ['%s=%r' % (key, value)
1285
      for key, value in self.__dict__.iteritems()]
1286
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1287
 
1288
  def __eq__(self, other):
1289
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1290
 
1291
  def __ne__(self, other):
1292
    return not (self == other)
1293
 
1294
class getShipmentInfo_result:
1295
  """
1296
  Attributes:
1297
   - success
647 chandransh 1298
   - se
412 ashish 1299
  """
1300
 
1301
  thrift_spec = (
644 chandransh 1302
    (0, TType.LIST, 'success', (TType.STRUCT,(AwbUpdate, AwbUpdate.thrift_spec)), None, ), # 0
647 chandransh 1303
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
412 ashish 1304
  )
1305
 
647 chandransh 1306
  def __init__(self, success=None, se=None,):
412 ashish 1307
    self.success = success
647 chandransh 1308
    self.se = se
412 ashish 1309
 
1310
  def read(self, iprot):
1311
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1312
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1313
      return
1314
    iprot.readStructBegin()
1315
    while True:
1316
      (fname, ftype, fid) = iprot.readFieldBegin()
1317
      if ftype == TType.STOP:
1318
        break
1319
      if fid == 0:
1320
        if ftype == TType.LIST:
1321
          self.success = []
675 chandransh 1322
          (_etype10, _size7) = iprot.readListBegin()
1323
          for _i11 in xrange(_size7):
1324
            _elem12 = AwbUpdate()
1325
            _elem12.read(iprot)
1326
            self.success.append(_elem12)
412 ashish 1327
          iprot.readListEnd()
1328
        else:
1329
          iprot.skip(ftype)
647 chandransh 1330
      elif fid == 1:
1331
        if ftype == TType.STRUCT:
1332
          self.se = LogisticsServiceException()
1333
          self.se.read(iprot)
1334
        else:
1335
          iprot.skip(ftype)
412 ashish 1336
      else:
1337
        iprot.skip(ftype)
1338
      iprot.readFieldEnd()
1339
    iprot.readStructEnd()
1340
 
1341
  def write(self, oprot):
1342
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1343
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1344
      return
644 chandransh 1345
    oprot.writeStructBegin('getShipmentInfo_result')
412 ashish 1346
    if self.success != None:
1347
      oprot.writeFieldBegin('success', TType.LIST, 0)
1348
      oprot.writeListBegin(TType.STRUCT, len(self.success))
675 chandransh 1349
      for iter13 in self.success:
1350
        iter13.write(oprot)
412 ashish 1351
      oprot.writeListEnd()
1352
      oprot.writeFieldEnd()
647 chandransh 1353
    if self.se != None:
1354
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1355
      self.se.write(oprot)
1356
      oprot.writeFieldEnd()
412 ashish 1357
    oprot.writeFieldStop()
1358
    oprot.writeStructEnd()
1359
 
1360
  def __repr__(self):
1361
    L = ['%s=%r' % (key, value)
1362
      for key, value in self.__dict__.iteritems()]
1363
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1364
 
1365
  def __eq__(self, other):
1366
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1367
 
1368
  def __ne__(self, other):
1369
    return not (self == other)
1370
 
732 chandransh 1371
class getDestinationCode_args:
1372
  """
1373
  Attributes:
1374
   - providerId
1375
   - pinCode
1376
  """
412 ashish 1377
 
732 chandransh 1378
  thrift_spec = (
1379
    None, # 0
1380
    (1, TType.I64, 'providerId', None, None, ), # 1
1381
    (2, TType.STRING, 'pinCode', None, None, ), # 2
1382
  )
1383
 
1384
  def __init__(self, providerId=None, pinCode=None,):
1385
    self.providerId = providerId
1386
    self.pinCode = pinCode
1387
 
1388
  def read(self, iprot):
1389
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1390
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1391
      return
1392
    iprot.readStructBegin()
1393
    while True:
1394
      (fname, ftype, fid) = iprot.readFieldBegin()
1395
      if ftype == TType.STOP:
1396
        break
1397
      if fid == 1:
1398
        if ftype == TType.I64:
1399
          self.providerId = iprot.readI64();
1400
        else:
1401
          iprot.skip(ftype)
1402
      elif fid == 2:
1403
        if ftype == TType.STRING:
1404
          self.pinCode = iprot.readString();
1405
        else:
1406
          iprot.skip(ftype)
1407
      else:
1408
        iprot.skip(ftype)
1409
      iprot.readFieldEnd()
1410
    iprot.readStructEnd()
1411
 
1412
  def write(self, oprot):
1413
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1414
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1415
      return
1416
    oprot.writeStructBegin('getDestinationCode_args')
1417
    if self.providerId != None:
1418
      oprot.writeFieldBegin('providerId', TType.I64, 1)
1419
      oprot.writeI64(self.providerId)
1420
      oprot.writeFieldEnd()
1421
    if self.pinCode != None:
1422
      oprot.writeFieldBegin('pinCode', TType.STRING, 2)
1423
      oprot.writeString(self.pinCode)
1424
      oprot.writeFieldEnd()
1425
    oprot.writeFieldStop()
1426
    oprot.writeStructEnd()
1427
 
1428
  def __repr__(self):
1429
    L = ['%s=%r' % (key, value)
1430
      for key, value in self.__dict__.iteritems()]
1431
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1432
 
1433
  def __eq__(self, other):
1434
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1435
 
1436
  def __ne__(self, other):
1437
    return not (self == other)
1438
 
1439
class getDestinationCode_result:
1440
  """
1441
  Attributes:
1442
   - success
1443
   - se
1444
  """
1445
 
1446
  thrift_spec = (
1447
    (0, TType.STRING, 'success', None, None, ), # 0
1448
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
1449
  )
1450
 
1451
  def __init__(self, success=None, se=None,):
1452
    self.success = success
1453
    self.se = se
1454
 
1455
  def read(self, iprot):
1456
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1457
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1458
      return
1459
    iprot.readStructBegin()
1460
    while True:
1461
      (fname, ftype, fid) = iprot.readFieldBegin()
1462
      if ftype == TType.STOP:
1463
        break
1464
      if fid == 0:
1465
        if ftype == TType.STRING:
1466
          self.success = iprot.readString();
1467
        else:
1468
          iprot.skip(ftype)
1469
      elif fid == 1:
1470
        if ftype == TType.STRUCT:
1471
          self.se = LogisticsServiceException()
1472
          self.se.read(iprot)
1473
        else:
1474
          iprot.skip(ftype)
1475
      else:
1476
        iprot.skip(ftype)
1477
      iprot.readFieldEnd()
1478
    iprot.readStructEnd()
1479
 
1480
  def write(self, oprot):
1481
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1482
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1483
      return
1484
    oprot.writeStructBegin('getDestinationCode_result')
1485
    if self.success != None:
1486
      oprot.writeFieldBegin('success', TType.STRING, 0)
1487
      oprot.writeString(self.success)
1488
      oprot.writeFieldEnd()
1489
    if self.se != None:
1490
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1491
      self.se.write(oprot)
1492
      oprot.writeFieldEnd()
1493
    oprot.writeFieldStop()
1494
    oprot.writeStructEnd()
1495
 
1496
  def __repr__(self):
1497
    L = ['%s=%r' % (key, value)
1498
      for key, value in self.__dict__.iteritems()]
1499
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1500
 
1501
  def __eq__(self, other):
1502
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1503
 
1504
  def __ne__(self, other):
1505
    return not (self == other)
1506
 
1507