Subversion Repositories SmartDukaan

Rev

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

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