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