Subversion Repositories SmartDukaan

Rev

Rev 4934 | Rev 5527 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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