Subversion Repositories SmartDukaan

Rev

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