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