Subversion Repositories SmartDukaan

Rev

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

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