FacebookService.py 57 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930
  1. #
  2. # Autogenerated by Thrift Compiler (0.9.0)
  3. #
  4. # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. #
  6. # options string: py:new_style
  7. #
  8. from thrift.Thrift import TType, TMessageType, TException, TApplicationException
  9. from ttypes import *
  10. from thrift.Thrift import TProcessor
  11. from thrift.transport import TTransport
  12. from thrift.protocol import TBinaryProtocol, TProtocol
  13. try:
  14. from thrift.protocol import fastbinary
  15. except:
  16. fastbinary = None
  17. class Iface(object):
  18. """
  19. Standard base service
  20. """
  21. def getName(self, ):
  22. """
  23. Returns a descriptive name of the service
  24. """
  25. pass
  26. def getVersion(self, ):
  27. """
  28. Returns the version of the service
  29. """
  30. pass
  31. def getStatus(self, ):
  32. """
  33. Gets the status of this service
  34. """
  35. pass
  36. def getStatusDetails(self, ):
  37. """
  38. User friendly description of status, such as why the service is in
  39. the dead or warning state, or what is being started or stopped.
  40. """
  41. pass
  42. def getCounters(self, ):
  43. """
  44. Gets the counters for this service
  45. """
  46. pass
  47. def getCounter(self, key):
  48. """
  49. Gets the value of a single counter
  50. Parameters:
  51. - key
  52. """
  53. pass
  54. def setOption(self, key, value):
  55. """
  56. Sets an option
  57. Parameters:
  58. - key
  59. - value
  60. """
  61. pass
  62. def getOption(self, key):
  63. """
  64. Gets an option
  65. Parameters:
  66. - key
  67. """
  68. pass
  69. def getOptions(self, ):
  70. """
  71. Gets all options
  72. """
  73. pass
  74. def getCpuProfile(self, profileDurationInSec):
  75. """
  76. Returns a CPU profile over the given time interval (client and server
  77. must agree on the profile format).
  78. Parameters:
  79. - profileDurationInSec
  80. """
  81. pass
  82. def aliveSince(self, ):
  83. """
  84. Returns the unix time that the server has been running since
  85. """
  86. pass
  87. def reinitialize(self, ):
  88. """
  89. Tell the server to reload its configuration, reopen log files, etc
  90. """
  91. pass
  92. def shutdown(self, ):
  93. """
  94. Suggest a shutdown to the server
  95. """
  96. pass
  97. class Client(Iface):
  98. """
  99. Standard base service
  100. """
  101. def __init__(self, iprot, oprot=None):
  102. self._iprot = self._oprot = iprot
  103. if oprot is not None:
  104. self._oprot = oprot
  105. self._seqid = 0
  106. def getName(self, ):
  107. """
  108. Returns a descriptive name of the service
  109. """
  110. self.send_getName()
  111. return self.recv_getName()
  112. def send_getName(self, ):
  113. self._oprot.writeMessageBegin('getName', TMessageType.CALL, self._seqid)
  114. args = getName_args()
  115. args.write(self._oprot)
  116. self._oprot.writeMessageEnd()
  117. self._oprot.trans.flush()
  118. def recv_getName(self, ):
  119. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  120. if mtype == TMessageType.EXCEPTION:
  121. x = TApplicationException()
  122. x.read(self._iprot)
  123. self._iprot.readMessageEnd()
  124. raise x
  125. result = getName_result()
  126. result.read(self._iprot)
  127. self._iprot.readMessageEnd()
  128. if result.success is not None:
  129. return result.success
  130. raise TApplicationException(TApplicationException.MISSING_RESULT, "getName failed: unknown result");
  131. def getVersion(self, ):
  132. """
  133. Returns the version of the service
  134. """
  135. self.send_getVersion()
  136. return self.recv_getVersion()
  137. def send_getVersion(self, ):
  138. self._oprot.writeMessageBegin('getVersion', TMessageType.CALL, self._seqid)
  139. args = getVersion_args()
  140. args.write(self._oprot)
  141. self._oprot.writeMessageEnd()
  142. self._oprot.trans.flush()
  143. def recv_getVersion(self, ):
  144. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  145. if mtype == TMessageType.EXCEPTION:
  146. x = TApplicationException()
  147. x.read(self._iprot)
  148. self._iprot.readMessageEnd()
  149. raise x
  150. result = getVersion_result()
  151. result.read(self._iprot)
  152. self._iprot.readMessageEnd()
  153. if result.success is not None:
  154. return result.success
  155. raise TApplicationException(TApplicationException.MISSING_RESULT, "getVersion failed: unknown result");
  156. def getStatus(self, ):
  157. """
  158. Gets the status of this service
  159. """
  160. self.send_getStatus()
  161. return self.recv_getStatus()
  162. def send_getStatus(self, ):
  163. self._oprot.writeMessageBegin('getStatus', TMessageType.CALL, self._seqid)
  164. args = getStatus_args()
  165. args.write(self._oprot)
  166. self._oprot.writeMessageEnd()
  167. self._oprot.trans.flush()
  168. def recv_getStatus(self, ):
  169. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  170. if mtype == TMessageType.EXCEPTION:
  171. x = TApplicationException()
  172. x.read(self._iprot)
  173. self._iprot.readMessageEnd()
  174. raise x
  175. result = getStatus_result()
  176. result.read(self._iprot)
  177. self._iprot.readMessageEnd()
  178. if result.success is not None:
  179. return result.success
  180. raise TApplicationException(TApplicationException.MISSING_RESULT, "getStatus failed: unknown result");
  181. def getStatusDetails(self, ):
  182. """
  183. User friendly description of status, such as why the service is in
  184. the dead or warning state, or what is being started or stopped.
  185. """
  186. self.send_getStatusDetails()
  187. return self.recv_getStatusDetails()
  188. def send_getStatusDetails(self, ):
  189. self._oprot.writeMessageBegin('getStatusDetails', TMessageType.CALL, self._seqid)
  190. args = getStatusDetails_args()
  191. args.write(self._oprot)
  192. self._oprot.writeMessageEnd()
  193. self._oprot.trans.flush()
  194. def recv_getStatusDetails(self, ):
  195. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  196. if mtype == TMessageType.EXCEPTION:
  197. x = TApplicationException()
  198. x.read(self._iprot)
  199. self._iprot.readMessageEnd()
  200. raise x
  201. result = getStatusDetails_result()
  202. result.read(self._iprot)
  203. self._iprot.readMessageEnd()
  204. if result.success is not None:
  205. return result.success
  206. raise TApplicationException(TApplicationException.MISSING_RESULT, "getStatusDetails failed: unknown result");
  207. def getCounters(self, ):
  208. """
  209. Gets the counters for this service
  210. """
  211. self.send_getCounters()
  212. return self.recv_getCounters()
  213. def send_getCounters(self, ):
  214. self._oprot.writeMessageBegin('getCounters', TMessageType.CALL, self._seqid)
  215. args = getCounters_args()
  216. args.write(self._oprot)
  217. self._oprot.writeMessageEnd()
  218. self._oprot.trans.flush()
  219. def recv_getCounters(self, ):
  220. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  221. if mtype == TMessageType.EXCEPTION:
  222. x = TApplicationException()
  223. x.read(self._iprot)
  224. self._iprot.readMessageEnd()
  225. raise x
  226. result = getCounters_result()
  227. result.read(self._iprot)
  228. self._iprot.readMessageEnd()
  229. if result.success is not None:
  230. return result.success
  231. raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounters failed: unknown result");
  232. def getCounter(self, key):
  233. """
  234. Gets the value of a single counter
  235. Parameters:
  236. - key
  237. """
  238. self.send_getCounter(key)
  239. return self.recv_getCounter()
  240. def send_getCounter(self, key):
  241. self._oprot.writeMessageBegin('getCounter', TMessageType.CALL, self._seqid)
  242. args = getCounter_args()
  243. args.key = key
  244. args.write(self._oprot)
  245. self._oprot.writeMessageEnd()
  246. self._oprot.trans.flush()
  247. def recv_getCounter(self, ):
  248. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  249. if mtype == TMessageType.EXCEPTION:
  250. x = TApplicationException()
  251. x.read(self._iprot)
  252. self._iprot.readMessageEnd()
  253. raise x
  254. result = getCounter_result()
  255. result.read(self._iprot)
  256. self._iprot.readMessageEnd()
  257. if result.success is not None:
  258. return result.success
  259. raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounter failed: unknown result");
  260. def setOption(self, key, value):
  261. """
  262. Sets an option
  263. Parameters:
  264. - key
  265. - value
  266. """
  267. self.send_setOption(key, value)
  268. self.recv_setOption()
  269. def send_setOption(self, key, value):
  270. self._oprot.writeMessageBegin('setOption', TMessageType.CALL, self._seqid)
  271. args = setOption_args()
  272. args.key = key
  273. args.value = value
  274. args.write(self._oprot)
  275. self._oprot.writeMessageEnd()
  276. self._oprot.trans.flush()
  277. def recv_setOption(self, ):
  278. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  279. if mtype == TMessageType.EXCEPTION:
  280. x = TApplicationException()
  281. x.read(self._iprot)
  282. self._iprot.readMessageEnd()
  283. raise x
  284. result = setOption_result()
  285. result.read(self._iprot)
  286. self._iprot.readMessageEnd()
  287. return
  288. def getOption(self, key):
  289. """
  290. Gets an option
  291. Parameters:
  292. - key
  293. """
  294. self.send_getOption(key)
  295. return self.recv_getOption()
  296. def send_getOption(self, key):
  297. self._oprot.writeMessageBegin('getOption', TMessageType.CALL, self._seqid)
  298. args = getOption_args()
  299. args.key = key
  300. args.write(self._oprot)
  301. self._oprot.writeMessageEnd()
  302. self._oprot.trans.flush()
  303. def recv_getOption(self, ):
  304. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  305. if mtype == TMessageType.EXCEPTION:
  306. x = TApplicationException()
  307. x.read(self._iprot)
  308. self._iprot.readMessageEnd()
  309. raise x
  310. result = getOption_result()
  311. result.read(self._iprot)
  312. self._iprot.readMessageEnd()
  313. if result.success is not None:
  314. return result.success
  315. raise TApplicationException(TApplicationException.MISSING_RESULT, "getOption failed: unknown result");
  316. def getOptions(self, ):
  317. """
  318. Gets all options
  319. """
  320. self.send_getOptions()
  321. return self.recv_getOptions()
  322. def send_getOptions(self, ):
  323. self._oprot.writeMessageBegin('getOptions', TMessageType.CALL, self._seqid)
  324. args = getOptions_args()
  325. args.write(self._oprot)
  326. self._oprot.writeMessageEnd()
  327. self._oprot.trans.flush()
  328. def recv_getOptions(self, ):
  329. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  330. if mtype == TMessageType.EXCEPTION:
  331. x = TApplicationException()
  332. x.read(self._iprot)
  333. self._iprot.readMessageEnd()
  334. raise x
  335. result = getOptions_result()
  336. result.read(self._iprot)
  337. self._iprot.readMessageEnd()
  338. if result.success is not None:
  339. return result.success
  340. raise TApplicationException(TApplicationException.MISSING_RESULT, "getOptions failed: unknown result");
  341. def getCpuProfile(self, profileDurationInSec):
  342. """
  343. Returns a CPU profile over the given time interval (client and server
  344. must agree on the profile format).
  345. Parameters:
  346. - profileDurationInSec
  347. """
  348. self.send_getCpuProfile(profileDurationInSec)
  349. return self.recv_getCpuProfile()
  350. def send_getCpuProfile(self, profileDurationInSec):
  351. self._oprot.writeMessageBegin('getCpuProfile', TMessageType.CALL, self._seqid)
  352. args = getCpuProfile_args()
  353. args.profileDurationInSec = profileDurationInSec
  354. args.write(self._oprot)
  355. self._oprot.writeMessageEnd()
  356. self._oprot.trans.flush()
  357. def recv_getCpuProfile(self, ):
  358. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  359. if mtype == TMessageType.EXCEPTION:
  360. x = TApplicationException()
  361. x.read(self._iprot)
  362. self._iprot.readMessageEnd()
  363. raise x
  364. result = getCpuProfile_result()
  365. result.read(self._iprot)
  366. self._iprot.readMessageEnd()
  367. if result.success is not None:
  368. return result.success
  369. raise TApplicationException(TApplicationException.MISSING_RESULT, "getCpuProfile failed: unknown result");
  370. def aliveSince(self, ):
  371. """
  372. Returns the unix time that the server has been running since
  373. """
  374. self.send_aliveSince()
  375. return self.recv_aliveSince()
  376. def send_aliveSince(self, ):
  377. self._oprot.writeMessageBegin('aliveSince', TMessageType.CALL, self._seqid)
  378. args = aliveSince_args()
  379. args.write(self._oprot)
  380. self._oprot.writeMessageEnd()
  381. self._oprot.trans.flush()
  382. def recv_aliveSince(self, ):
  383. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  384. if mtype == TMessageType.EXCEPTION:
  385. x = TApplicationException()
  386. x.read(self._iprot)
  387. self._iprot.readMessageEnd()
  388. raise x
  389. result = aliveSince_result()
  390. result.read(self._iprot)
  391. self._iprot.readMessageEnd()
  392. if result.success is not None:
  393. return result.success
  394. raise TApplicationException(TApplicationException.MISSING_RESULT, "aliveSince failed: unknown result");
  395. def reinitialize(self, ):
  396. """
  397. Tell the server to reload its configuration, reopen log files, etc
  398. """
  399. self.send_reinitialize()
  400. def send_reinitialize(self, ):
  401. self._oprot.writeMessageBegin('reinitialize', TMessageType.CALL, self._seqid)
  402. args = reinitialize_args()
  403. args.write(self._oprot)
  404. self._oprot.writeMessageEnd()
  405. self._oprot.trans.flush()
  406. def shutdown(self, ):
  407. """
  408. Suggest a shutdown to the server
  409. """
  410. self.send_shutdown()
  411. def send_shutdown(self, ):
  412. self._oprot.writeMessageBegin('shutdown', TMessageType.CALL, self._seqid)
  413. args = shutdown_args()
  414. args.write(self._oprot)
  415. self._oprot.writeMessageEnd()
  416. self._oprot.trans.flush()
  417. class Processor(Iface, TProcessor):
  418. def __init__(self, handler):
  419. self._handler = handler
  420. self._processMap = {}
  421. self._processMap["getName"] = Processor.process_getName
  422. self._processMap["getVersion"] = Processor.process_getVersion
  423. self._processMap["getStatus"] = Processor.process_getStatus
  424. self._processMap["getStatusDetails"] = Processor.process_getStatusDetails
  425. self._processMap["getCounters"] = Processor.process_getCounters
  426. self._processMap["getCounter"] = Processor.process_getCounter
  427. self._processMap["setOption"] = Processor.process_setOption
  428. self._processMap["getOption"] = Processor.process_getOption
  429. self._processMap["getOptions"] = Processor.process_getOptions
  430. self._processMap["getCpuProfile"] = Processor.process_getCpuProfile
  431. self._processMap["aliveSince"] = Processor.process_aliveSince
  432. self._processMap["reinitialize"] = Processor.process_reinitialize
  433. self._processMap["shutdown"] = Processor.process_shutdown
  434. def process(self, iprot, oprot):
  435. (name, type, seqid) = iprot.readMessageBegin()
  436. if name not in self._processMap:
  437. iprot.skip(TType.STRUCT)
  438. iprot.readMessageEnd()
  439. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  440. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  441. x.write(oprot)
  442. oprot.writeMessageEnd()
  443. oprot.trans.flush()
  444. return
  445. else:
  446. self._processMap[name](self, seqid, iprot, oprot)
  447. return True
  448. def process_getName(self, seqid, iprot, oprot):
  449. args = getName_args()
  450. args.read(iprot)
  451. iprot.readMessageEnd()
  452. result = getName_result()
  453. result.success = self._handler.getName()
  454. oprot.writeMessageBegin("getName", TMessageType.REPLY, seqid)
  455. result.write(oprot)
  456. oprot.writeMessageEnd()
  457. oprot.trans.flush()
  458. def process_getVersion(self, seqid, iprot, oprot):
  459. args = getVersion_args()
  460. args.read(iprot)
  461. iprot.readMessageEnd()
  462. result = getVersion_result()
  463. result.success = self._handler.getVersion()
  464. oprot.writeMessageBegin("getVersion", TMessageType.REPLY, seqid)
  465. result.write(oprot)
  466. oprot.writeMessageEnd()
  467. oprot.trans.flush()
  468. def process_getStatus(self, seqid, iprot, oprot):
  469. args = getStatus_args()
  470. args.read(iprot)
  471. iprot.readMessageEnd()
  472. result = getStatus_result()
  473. result.success = self._handler.getStatus()
  474. oprot.writeMessageBegin("getStatus", TMessageType.REPLY, seqid)
  475. result.write(oprot)
  476. oprot.writeMessageEnd()
  477. oprot.trans.flush()
  478. def process_getStatusDetails(self, seqid, iprot, oprot):
  479. args = getStatusDetails_args()
  480. args.read(iprot)
  481. iprot.readMessageEnd()
  482. result = getStatusDetails_result()
  483. result.success = self._handler.getStatusDetails()
  484. oprot.writeMessageBegin("getStatusDetails", TMessageType.REPLY, seqid)
  485. result.write(oprot)
  486. oprot.writeMessageEnd()
  487. oprot.trans.flush()
  488. def process_getCounters(self, seqid, iprot, oprot):
  489. args = getCounters_args()
  490. args.read(iprot)
  491. iprot.readMessageEnd()
  492. result = getCounters_result()
  493. result.success = self._handler.getCounters()
  494. oprot.writeMessageBegin("getCounters", TMessageType.REPLY, seqid)
  495. result.write(oprot)
  496. oprot.writeMessageEnd()
  497. oprot.trans.flush()
  498. def process_getCounter(self, seqid, iprot, oprot):
  499. args = getCounter_args()
  500. args.read(iprot)
  501. iprot.readMessageEnd()
  502. result = getCounter_result()
  503. result.success = self._handler.getCounter(args.key)
  504. oprot.writeMessageBegin("getCounter", TMessageType.REPLY, seqid)
  505. result.write(oprot)
  506. oprot.writeMessageEnd()
  507. oprot.trans.flush()
  508. def process_setOption(self, seqid, iprot, oprot):
  509. args = setOption_args()
  510. args.read(iprot)
  511. iprot.readMessageEnd()
  512. result = setOption_result()
  513. self._handler.setOption(args.key, args.value)
  514. oprot.writeMessageBegin("setOption", TMessageType.REPLY, seqid)
  515. result.write(oprot)
  516. oprot.writeMessageEnd()
  517. oprot.trans.flush()
  518. def process_getOption(self, seqid, iprot, oprot):
  519. args = getOption_args()
  520. args.read(iprot)
  521. iprot.readMessageEnd()
  522. result = getOption_result()
  523. result.success = self._handler.getOption(args.key)
  524. oprot.writeMessageBegin("getOption", TMessageType.REPLY, seqid)
  525. result.write(oprot)
  526. oprot.writeMessageEnd()
  527. oprot.trans.flush()
  528. def process_getOptions(self, seqid, iprot, oprot):
  529. args = getOptions_args()
  530. args.read(iprot)
  531. iprot.readMessageEnd()
  532. result = getOptions_result()
  533. result.success = self._handler.getOptions()
  534. oprot.writeMessageBegin("getOptions", TMessageType.REPLY, seqid)
  535. result.write(oprot)
  536. oprot.writeMessageEnd()
  537. oprot.trans.flush()
  538. def process_getCpuProfile(self, seqid, iprot, oprot):
  539. args = getCpuProfile_args()
  540. args.read(iprot)
  541. iprot.readMessageEnd()
  542. result = getCpuProfile_result()
  543. result.success = self._handler.getCpuProfile(args.profileDurationInSec)
  544. oprot.writeMessageBegin("getCpuProfile", TMessageType.REPLY, seqid)
  545. result.write(oprot)
  546. oprot.writeMessageEnd()
  547. oprot.trans.flush()
  548. def process_aliveSince(self, seqid, iprot, oprot):
  549. args = aliveSince_args()
  550. args.read(iprot)
  551. iprot.readMessageEnd()
  552. result = aliveSince_result()
  553. result.success = self._handler.aliveSince()
  554. oprot.writeMessageBegin("aliveSince", TMessageType.REPLY, seqid)
  555. result.write(oprot)
  556. oprot.writeMessageEnd()
  557. oprot.trans.flush()
  558. def process_reinitialize(self, seqid, iprot, oprot):
  559. args = reinitialize_args()
  560. args.read(iprot)
  561. iprot.readMessageEnd()
  562. self._handler.reinitialize()
  563. return
  564. def process_shutdown(self, seqid, iprot, oprot):
  565. args = shutdown_args()
  566. args.read(iprot)
  567. iprot.readMessageEnd()
  568. self._handler.shutdown()
  569. return
  570. # HELPER FUNCTIONS AND STRUCTURES
  571. class getName_args(object):
  572. thrift_spec = (
  573. )
  574. def read(self, iprot):
  575. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  576. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  577. return
  578. iprot.readStructBegin()
  579. while True:
  580. (fname, ftype, fid) = iprot.readFieldBegin()
  581. if ftype == TType.STOP:
  582. break
  583. else:
  584. iprot.skip(ftype)
  585. iprot.readFieldEnd()
  586. iprot.readStructEnd()
  587. def write(self, oprot):
  588. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  589. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  590. return
  591. oprot.writeStructBegin('getName_args')
  592. oprot.writeFieldStop()
  593. oprot.writeStructEnd()
  594. def validate(self):
  595. return
  596. def __repr__(self):
  597. L = ['%s=%r' % (key, value)
  598. for key, value in self.__dict__.iteritems()]
  599. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  600. def __eq__(self, other):
  601. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  602. def __ne__(self, other):
  603. return not (self == other)
  604. class getName_result(object):
  605. """
  606. Attributes:
  607. - success
  608. """
  609. thrift_spec = (
  610. (0, TType.STRING, 'success', None, None, ), # 0
  611. )
  612. def __init__(self, success=None,):
  613. self.success = success
  614. def read(self, iprot):
  615. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  616. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  617. return
  618. iprot.readStructBegin()
  619. while True:
  620. (fname, ftype, fid) = iprot.readFieldBegin()
  621. if ftype == TType.STOP:
  622. break
  623. if fid == 0:
  624. if ftype == TType.STRING:
  625. self.success = iprot.readString();
  626. else:
  627. iprot.skip(ftype)
  628. else:
  629. iprot.skip(ftype)
  630. iprot.readFieldEnd()
  631. iprot.readStructEnd()
  632. def write(self, oprot):
  633. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  634. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  635. return
  636. oprot.writeStructBegin('getName_result')
  637. if self.success is not None:
  638. oprot.writeFieldBegin('success', TType.STRING, 0)
  639. oprot.writeString(self.success)
  640. oprot.writeFieldEnd()
  641. oprot.writeFieldStop()
  642. oprot.writeStructEnd()
  643. def validate(self):
  644. return
  645. def __repr__(self):
  646. L = ['%s=%r' % (key, value)
  647. for key, value in self.__dict__.iteritems()]
  648. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  649. def __eq__(self, other):
  650. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  651. def __ne__(self, other):
  652. return not (self == other)
  653. class getVersion_args(object):
  654. thrift_spec = (
  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. else:
  666. iprot.skip(ftype)
  667. iprot.readFieldEnd()
  668. iprot.readStructEnd()
  669. def write(self, oprot):
  670. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  671. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  672. return
  673. oprot.writeStructBegin('getVersion_args')
  674. oprot.writeFieldStop()
  675. oprot.writeStructEnd()
  676. def validate(self):
  677. return
  678. def __repr__(self):
  679. L = ['%s=%r' % (key, value)
  680. for key, value in self.__dict__.iteritems()]
  681. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  682. def __eq__(self, other):
  683. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  684. def __ne__(self, other):
  685. return not (self == other)
  686. class getVersion_result(object):
  687. """
  688. Attributes:
  689. - success
  690. """
  691. thrift_spec = (
  692. (0, TType.STRING, 'success', None, None, ), # 0
  693. )
  694. def __init__(self, success=None,):
  695. self.success = success
  696. def read(self, iprot):
  697. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  698. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  699. return
  700. iprot.readStructBegin()
  701. while True:
  702. (fname, ftype, fid) = iprot.readFieldBegin()
  703. if ftype == TType.STOP:
  704. break
  705. if fid == 0:
  706. if ftype == TType.STRING:
  707. self.success = iprot.readString();
  708. else:
  709. iprot.skip(ftype)
  710. else:
  711. iprot.skip(ftype)
  712. iprot.readFieldEnd()
  713. iprot.readStructEnd()
  714. def write(self, oprot):
  715. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  716. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  717. return
  718. oprot.writeStructBegin('getVersion_result')
  719. if self.success is not None:
  720. oprot.writeFieldBegin('success', TType.STRING, 0)
  721. oprot.writeString(self.success)
  722. oprot.writeFieldEnd()
  723. oprot.writeFieldStop()
  724. oprot.writeStructEnd()
  725. def validate(self):
  726. return
  727. def __repr__(self):
  728. L = ['%s=%r' % (key, value)
  729. for key, value in self.__dict__.iteritems()]
  730. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  731. def __eq__(self, other):
  732. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  733. def __ne__(self, other):
  734. return not (self == other)
  735. class getStatus_args(object):
  736. thrift_spec = (
  737. )
  738. def read(self, iprot):
  739. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  740. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  741. return
  742. iprot.readStructBegin()
  743. while True:
  744. (fname, ftype, fid) = iprot.readFieldBegin()
  745. if ftype == TType.STOP:
  746. break
  747. else:
  748. iprot.skip(ftype)
  749. iprot.readFieldEnd()
  750. iprot.readStructEnd()
  751. def write(self, oprot):
  752. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  753. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  754. return
  755. oprot.writeStructBegin('getStatus_args')
  756. oprot.writeFieldStop()
  757. oprot.writeStructEnd()
  758. def validate(self):
  759. return
  760. def __repr__(self):
  761. L = ['%s=%r' % (key, value)
  762. for key, value in self.__dict__.iteritems()]
  763. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  764. def __eq__(self, other):
  765. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  766. def __ne__(self, other):
  767. return not (self == other)
  768. class getStatus_result(object):
  769. """
  770. Attributes:
  771. - success
  772. """
  773. thrift_spec = (
  774. (0, TType.I32, 'success', None, None, ), # 0
  775. )
  776. def __init__(self, success=None,):
  777. self.success = success
  778. def read(self, iprot):
  779. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  780. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  781. return
  782. iprot.readStructBegin()
  783. while True:
  784. (fname, ftype, fid) = iprot.readFieldBegin()
  785. if ftype == TType.STOP:
  786. break
  787. if fid == 0:
  788. if ftype == TType.I32:
  789. self.success = iprot.readI32();
  790. else:
  791. iprot.skip(ftype)
  792. else:
  793. iprot.skip(ftype)
  794. iprot.readFieldEnd()
  795. iprot.readStructEnd()
  796. def write(self, oprot):
  797. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  798. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  799. return
  800. oprot.writeStructBegin('getStatus_result')
  801. if self.success is not None:
  802. oprot.writeFieldBegin('success', TType.I32, 0)
  803. oprot.writeI32(self.success)
  804. oprot.writeFieldEnd()
  805. oprot.writeFieldStop()
  806. oprot.writeStructEnd()
  807. def validate(self):
  808. return
  809. def __repr__(self):
  810. L = ['%s=%r' % (key, value)
  811. for key, value in self.__dict__.iteritems()]
  812. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  813. def __eq__(self, other):
  814. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  815. def __ne__(self, other):
  816. return not (self == other)
  817. class getStatusDetails_args(object):
  818. thrift_spec = (
  819. )
  820. def read(self, iprot):
  821. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  822. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  823. return
  824. iprot.readStructBegin()
  825. while True:
  826. (fname, ftype, fid) = iprot.readFieldBegin()
  827. if ftype == TType.STOP:
  828. break
  829. else:
  830. iprot.skip(ftype)
  831. iprot.readFieldEnd()
  832. iprot.readStructEnd()
  833. def write(self, oprot):
  834. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  835. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  836. return
  837. oprot.writeStructBegin('getStatusDetails_args')
  838. oprot.writeFieldStop()
  839. oprot.writeStructEnd()
  840. def validate(self):
  841. return
  842. def __repr__(self):
  843. L = ['%s=%r' % (key, value)
  844. for key, value in self.__dict__.iteritems()]
  845. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  846. def __eq__(self, other):
  847. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  848. def __ne__(self, other):
  849. return not (self == other)
  850. class getStatusDetails_result(object):
  851. """
  852. Attributes:
  853. - success
  854. """
  855. thrift_spec = (
  856. (0, TType.STRING, 'success', None, None, ), # 0
  857. )
  858. def __init__(self, success=None,):
  859. self.success = success
  860. def read(self, iprot):
  861. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  862. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  863. return
  864. iprot.readStructBegin()
  865. while True:
  866. (fname, ftype, fid) = iprot.readFieldBegin()
  867. if ftype == TType.STOP:
  868. break
  869. if fid == 0:
  870. if ftype == TType.STRING:
  871. self.success = iprot.readString();
  872. else:
  873. iprot.skip(ftype)
  874. else:
  875. iprot.skip(ftype)
  876. iprot.readFieldEnd()
  877. iprot.readStructEnd()
  878. def write(self, oprot):
  879. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  880. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  881. return
  882. oprot.writeStructBegin('getStatusDetails_result')
  883. if self.success is not None:
  884. oprot.writeFieldBegin('success', TType.STRING, 0)
  885. oprot.writeString(self.success)
  886. oprot.writeFieldEnd()
  887. oprot.writeFieldStop()
  888. oprot.writeStructEnd()
  889. def validate(self):
  890. return
  891. def __repr__(self):
  892. L = ['%s=%r' % (key, value)
  893. for key, value in self.__dict__.iteritems()]
  894. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  895. def __eq__(self, other):
  896. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  897. def __ne__(self, other):
  898. return not (self == other)
  899. class getCounters_args(object):
  900. thrift_spec = (
  901. )
  902. def read(self, iprot):
  903. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  904. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  905. return
  906. iprot.readStructBegin()
  907. while True:
  908. (fname, ftype, fid) = iprot.readFieldBegin()
  909. if ftype == TType.STOP:
  910. break
  911. else:
  912. iprot.skip(ftype)
  913. iprot.readFieldEnd()
  914. iprot.readStructEnd()
  915. def write(self, oprot):
  916. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  917. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  918. return
  919. oprot.writeStructBegin('getCounters_args')
  920. oprot.writeFieldStop()
  921. oprot.writeStructEnd()
  922. def validate(self):
  923. return
  924. def __repr__(self):
  925. L = ['%s=%r' % (key, value)
  926. for key, value in self.__dict__.iteritems()]
  927. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  928. def __eq__(self, other):
  929. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  930. def __ne__(self, other):
  931. return not (self == other)
  932. class getCounters_result(object):
  933. """
  934. Attributes:
  935. - success
  936. """
  937. thrift_spec = (
  938. (0, TType.MAP, 'success', (TType.STRING,None,TType.I64,None), None, ), # 0
  939. )
  940. def __init__(self, success=None,):
  941. self.success = success
  942. def read(self, iprot):
  943. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  944. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  945. return
  946. iprot.readStructBegin()
  947. while True:
  948. (fname, ftype, fid) = iprot.readFieldBegin()
  949. if ftype == TType.STOP:
  950. break
  951. if fid == 0:
  952. if ftype == TType.MAP:
  953. self.success = {}
  954. (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin()
  955. for _i4 in xrange(_size0):
  956. _key5 = iprot.readString();
  957. _val6 = iprot.readI64();
  958. self.success[_key5] = _val6
  959. iprot.readMapEnd()
  960. else:
  961. iprot.skip(ftype)
  962. else:
  963. iprot.skip(ftype)
  964. iprot.readFieldEnd()
  965. iprot.readStructEnd()
  966. def write(self, oprot):
  967. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  968. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  969. return
  970. oprot.writeStructBegin('getCounters_result')
  971. if self.success is not None:
  972. oprot.writeFieldBegin('success', TType.MAP, 0)
  973. oprot.writeMapBegin(TType.STRING, TType.I64, len(self.success))
  974. for kiter7,viter8 in self.success.items():
  975. oprot.writeString(kiter7)
  976. oprot.writeI64(viter8)
  977. oprot.writeMapEnd()
  978. oprot.writeFieldEnd()
  979. oprot.writeFieldStop()
  980. oprot.writeStructEnd()
  981. def validate(self):
  982. return
  983. def __repr__(self):
  984. L = ['%s=%r' % (key, value)
  985. for key, value in self.__dict__.iteritems()]
  986. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  987. def __eq__(self, other):
  988. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  989. def __ne__(self, other):
  990. return not (self == other)
  991. class getCounter_args(object):
  992. """
  993. Attributes:
  994. - key
  995. """
  996. thrift_spec = (
  997. None, # 0
  998. (1, TType.STRING, 'key', None, None, ), # 1
  999. )
  1000. def __init__(self, key=None,):
  1001. self.key = key
  1002. def read(self, iprot):
  1003. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1004. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1005. return
  1006. iprot.readStructBegin()
  1007. while True:
  1008. (fname, ftype, fid) = iprot.readFieldBegin()
  1009. if ftype == TType.STOP:
  1010. break
  1011. if fid == 1:
  1012. if ftype == TType.STRING:
  1013. self.key = iprot.readString();
  1014. else:
  1015. iprot.skip(ftype)
  1016. else:
  1017. iprot.skip(ftype)
  1018. iprot.readFieldEnd()
  1019. iprot.readStructEnd()
  1020. def write(self, oprot):
  1021. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1022. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1023. return
  1024. oprot.writeStructBegin('getCounter_args')
  1025. if self.key is not None:
  1026. oprot.writeFieldBegin('key', TType.STRING, 1)
  1027. oprot.writeString(self.key)
  1028. oprot.writeFieldEnd()
  1029. oprot.writeFieldStop()
  1030. oprot.writeStructEnd()
  1031. def validate(self):
  1032. return
  1033. def __repr__(self):
  1034. L = ['%s=%r' % (key, value)
  1035. for key, value in self.__dict__.iteritems()]
  1036. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1037. def __eq__(self, other):
  1038. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1039. def __ne__(self, other):
  1040. return not (self == other)
  1041. class getCounter_result(object):
  1042. """
  1043. Attributes:
  1044. - success
  1045. """
  1046. thrift_spec = (
  1047. (0, TType.I64, 'success', None, None, ), # 0
  1048. )
  1049. def __init__(self, success=None,):
  1050. self.success = success
  1051. def read(self, iprot):
  1052. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1053. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1054. return
  1055. iprot.readStructBegin()
  1056. while True:
  1057. (fname, ftype, fid) = iprot.readFieldBegin()
  1058. if ftype == TType.STOP:
  1059. break
  1060. if fid == 0:
  1061. if ftype == TType.I64:
  1062. self.success = iprot.readI64();
  1063. else:
  1064. iprot.skip(ftype)
  1065. else:
  1066. iprot.skip(ftype)
  1067. iprot.readFieldEnd()
  1068. iprot.readStructEnd()
  1069. def write(self, oprot):
  1070. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1071. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1072. return
  1073. oprot.writeStructBegin('getCounter_result')
  1074. if self.success is not None:
  1075. oprot.writeFieldBegin('success', TType.I64, 0)
  1076. oprot.writeI64(self.success)
  1077. oprot.writeFieldEnd()
  1078. oprot.writeFieldStop()
  1079. oprot.writeStructEnd()
  1080. def validate(self):
  1081. return
  1082. def __repr__(self):
  1083. L = ['%s=%r' % (key, value)
  1084. for key, value in self.__dict__.iteritems()]
  1085. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1086. def __eq__(self, other):
  1087. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1088. def __ne__(self, other):
  1089. return not (self == other)
  1090. class setOption_args(object):
  1091. """
  1092. Attributes:
  1093. - key
  1094. - value
  1095. """
  1096. thrift_spec = (
  1097. None, # 0
  1098. (1, TType.STRING, 'key', None, None, ), # 1
  1099. (2, TType.STRING, 'value', None, None, ), # 2
  1100. )
  1101. def __init__(self, key=None, value=None,):
  1102. self.key = key
  1103. self.value = value
  1104. def read(self, iprot):
  1105. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1106. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1107. return
  1108. iprot.readStructBegin()
  1109. while True:
  1110. (fname, ftype, fid) = iprot.readFieldBegin()
  1111. if ftype == TType.STOP:
  1112. break
  1113. if fid == 1:
  1114. if ftype == TType.STRING:
  1115. self.key = iprot.readString();
  1116. else:
  1117. iprot.skip(ftype)
  1118. elif fid == 2:
  1119. if ftype == TType.STRING:
  1120. self.value = iprot.readString();
  1121. else:
  1122. iprot.skip(ftype)
  1123. else:
  1124. iprot.skip(ftype)
  1125. iprot.readFieldEnd()
  1126. iprot.readStructEnd()
  1127. def write(self, oprot):
  1128. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1129. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1130. return
  1131. oprot.writeStructBegin('setOption_args')
  1132. if self.key is not None:
  1133. oprot.writeFieldBegin('key', TType.STRING, 1)
  1134. oprot.writeString(self.key)
  1135. oprot.writeFieldEnd()
  1136. if self.value is not None:
  1137. oprot.writeFieldBegin('value', TType.STRING, 2)
  1138. oprot.writeString(self.value)
  1139. oprot.writeFieldEnd()
  1140. oprot.writeFieldStop()
  1141. oprot.writeStructEnd()
  1142. def validate(self):
  1143. return
  1144. def __repr__(self):
  1145. L = ['%s=%r' % (key, value)
  1146. for key, value in self.__dict__.iteritems()]
  1147. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1148. def __eq__(self, other):
  1149. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1150. def __ne__(self, other):
  1151. return not (self == other)
  1152. class setOption_result(object):
  1153. thrift_spec = (
  1154. )
  1155. def read(self, iprot):
  1156. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1157. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1158. return
  1159. iprot.readStructBegin()
  1160. while True:
  1161. (fname, ftype, fid) = iprot.readFieldBegin()
  1162. if ftype == TType.STOP:
  1163. break
  1164. else:
  1165. iprot.skip(ftype)
  1166. iprot.readFieldEnd()
  1167. iprot.readStructEnd()
  1168. def write(self, oprot):
  1169. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1170. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1171. return
  1172. oprot.writeStructBegin('setOption_result')
  1173. oprot.writeFieldStop()
  1174. oprot.writeStructEnd()
  1175. def validate(self):
  1176. return
  1177. def __repr__(self):
  1178. L = ['%s=%r' % (key, value)
  1179. for key, value in self.__dict__.iteritems()]
  1180. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1181. def __eq__(self, other):
  1182. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1183. def __ne__(self, other):
  1184. return not (self == other)
  1185. class getOption_args(object):
  1186. """
  1187. Attributes:
  1188. - key
  1189. """
  1190. thrift_spec = (
  1191. None, # 0
  1192. (1, TType.STRING, 'key', None, None, ), # 1
  1193. )
  1194. def __init__(self, key=None,):
  1195. self.key = key
  1196. def read(self, iprot):
  1197. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1198. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1199. return
  1200. iprot.readStructBegin()
  1201. while True:
  1202. (fname, ftype, fid) = iprot.readFieldBegin()
  1203. if ftype == TType.STOP:
  1204. break
  1205. if fid == 1:
  1206. if ftype == TType.STRING:
  1207. self.key = iprot.readString();
  1208. else:
  1209. iprot.skip(ftype)
  1210. else:
  1211. iprot.skip(ftype)
  1212. iprot.readFieldEnd()
  1213. iprot.readStructEnd()
  1214. def write(self, oprot):
  1215. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1216. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1217. return
  1218. oprot.writeStructBegin('getOption_args')
  1219. if self.key is not None:
  1220. oprot.writeFieldBegin('key', TType.STRING, 1)
  1221. oprot.writeString(self.key)
  1222. oprot.writeFieldEnd()
  1223. oprot.writeFieldStop()
  1224. oprot.writeStructEnd()
  1225. def validate(self):
  1226. return
  1227. def __repr__(self):
  1228. L = ['%s=%r' % (key, value)
  1229. for key, value in self.__dict__.iteritems()]
  1230. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1231. def __eq__(self, other):
  1232. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1233. def __ne__(self, other):
  1234. return not (self == other)
  1235. class getOption_result(object):
  1236. """
  1237. Attributes:
  1238. - success
  1239. """
  1240. thrift_spec = (
  1241. (0, TType.STRING, 'success', None, None, ), # 0
  1242. )
  1243. def __init__(self, success=None,):
  1244. self.success = success
  1245. def read(self, iprot):
  1246. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1247. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1248. return
  1249. iprot.readStructBegin()
  1250. while True:
  1251. (fname, ftype, fid) = iprot.readFieldBegin()
  1252. if ftype == TType.STOP:
  1253. break
  1254. if fid == 0:
  1255. if ftype == TType.STRING:
  1256. self.success = iprot.readString();
  1257. else:
  1258. iprot.skip(ftype)
  1259. else:
  1260. iprot.skip(ftype)
  1261. iprot.readFieldEnd()
  1262. iprot.readStructEnd()
  1263. def write(self, oprot):
  1264. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1265. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1266. return
  1267. oprot.writeStructBegin('getOption_result')
  1268. if self.success is not None:
  1269. oprot.writeFieldBegin('success', TType.STRING, 0)
  1270. oprot.writeString(self.success)
  1271. oprot.writeFieldEnd()
  1272. oprot.writeFieldStop()
  1273. oprot.writeStructEnd()
  1274. def validate(self):
  1275. return
  1276. def __repr__(self):
  1277. L = ['%s=%r' % (key, value)
  1278. for key, value in self.__dict__.iteritems()]
  1279. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1280. def __eq__(self, other):
  1281. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1282. def __ne__(self, other):
  1283. return not (self == other)
  1284. class getOptions_args(object):
  1285. thrift_spec = (
  1286. )
  1287. def read(self, iprot):
  1288. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1289. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1290. return
  1291. iprot.readStructBegin()
  1292. while True:
  1293. (fname, ftype, fid) = iprot.readFieldBegin()
  1294. if ftype == TType.STOP:
  1295. break
  1296. else:
  1297. iprot.skip(ftype)
  1298. iprot.readFieldEnd()
  1299. iprot.readStructEnd()
  1300. def write(self, oprot):
  1301. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1302. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1303. return
  1304. oprot.writeStructBegin('getOptions_args')
  1305. oprot.writeFieldStop()
  1306. oprot.writeStructEnd()
  1307. def validate(self):
  1308. return
  1309. def __repr__(self):
  1310. L = ['%s=%r' % (key, value)
  1311. for key, value in self.__dict__.iteritems()]
  1312. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1313. def __eq__(self, other):
  1314. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1315. def __ne__(self, other):
  1316. return not (self == other)
  1317. class getOptions_result(object):
  1318. """
  1319. Attributes:
  1320. - success
  1321. """
  1322. thrift_spec = (
  1323. (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
  1324. )
  1325. def __init__(self, success=None,):
  1326. self.success = success
  1327. def read(self, iprot):
  1328. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1329. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1330. return
  1331. iprot.readStructBegin()
  1332. while True:
  1333. (fname, ftype, fid) = iprot.readFieldBegin()
  1334. if ftype == TType.STOP:
  1335. break
  1336. if fid == 0:
  1337. if ftype == TType.MAP:
  1338. self.success = {}
  1339. (_ktype10, _vtype11, _size9 ) = iprot.readMapBegin()
  1340. for _i13 in xrange(_size9):
  1341. _key14 = iprot.readString();
  1342. _val15 = iprot.readString();
  1343. self.success[_key14] = _val15
  1344. iprot.readMapEnd()
  1345. else:
  1346. iprot.skip(ftype)
  1347. else:
  1348. iprot.skip(ftype)
  1349. iprot.readFieldEnd()
  1350. iprot.readStructEnd()
  1351. def write(self, oprot):
  1352. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1353. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1354. return
  1355. oprot.writeStructBegin('getOptions_result')
  1356. if self.success is not None:
  1357. oprot.writeFieldBegin('success', TType.MAP, 0)
  1358. oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
  1359. for kiter16,viter17 in self.success.items():
  1360. oprot.writeString(kiter16)
  1361. oprot.writeString(viter17)
  1362. oprot.writeMapEnd()
  1363. oprot.writeFieldEnd()
  1364. oprot.writeFieldStop()
  1365. oprot.writeStructEnd()
  1366. def validate(self):
  1367. return
  1368. def __repr__(self):
  1369. L = ['%s=%r' % (key, value)
  1370. for key, value in self.__dict__.iteritems()]
  1371. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1372. def __eq__(self, other):
  1373. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1374. def __ne__(self, other):
  1375. return not (self == other)
  1376. class getCpuProfile_args(object):
  1377. """
  1378. Attributes:
  1379. - profileDurationInSec
  1380. """
  1381. thrift_spec = (
  1382. None, # 0
  1383. (1, TType.I32, 'profileDurationInSec', None, None, ), # 1
  1384. )
  1385. def __init__(self, profileDurationInSec=None,):
  1386. self.profileDurationInSec = profileDurationInSec
  1387. def read(self, iprot):
  1388. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1389. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1390. return
  1391. iprot.readStructBegin()
  1392. while True:
  1393. (fname, ftype, fid) = iprot.readFieldBegin()
  1394. if ftype == TType.STOP:
  1395. break
  1396. if fid == 1:
  1397. if ftype == TType.I32:
  1398. self.profileDurationInSec = iprot.readI32();
  1399. else:
  1400. iprot.skip(ftype)
  1401. else:
  1402. iprot.skip(ftype)
  1403. iprot.readFieldEnd()
  1404. iprot.readStructEnd()
  1405. def write(self, oprot):
  1406. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1407. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1408. return
  1409. oprot.writeStructBegin('getCpuProfile_args')
  1410. if self.profileDurationInSec is not None:
  1411. oprot.writeFieldBegin('profileDurationInSec', TType.I32, 1)
  1412. oprot.writeI32(self.profileDurationInSec)
  1413. oprot.writeFieldEnd()
  1414. oprot.writeFieldStop()
  1415. oprot.writeStructEnd()
  1416. def validate(self):
  1417. return
  1418. def __repr__(self):
  1419. L = ['%s=%r' % (key, value)
  1420. for key, value in self.__dict__.iteritems()]
  1421. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1422. def __eq__(self, other):
  1423. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1424. def __ne__(self, other):
  1425. return not (self == other)
  1426. class getCpuProfile_result(object):
  1427. """
  1428. Attributes:
  1429. - success
  1430. """
  1431. thrift_spec = (
  1432. (0, TType.STRING, 'success', None, None, ), # 0
  1433. )
  1434. def __init__(self, success=None,):
  1435. self.success = success
  1436. def read(self, iprot):
  1437. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1438. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1439. return
  1440. iprot.readStructBegin()
  1441. while True:
  1442. (fname, ftype, fid) = iprot.readFieldBegin()
  1443. if ftype == TType.STOP:
  1444. break
  1445. if fid == 0:
  1446. if ftype == TType.STRING:
  1447. self.success = iprot.readString();
  1448. else:
  1449. iprot.skip(ftype)
  1450. else:
  1451. iprot.skip(ftype)
  1452. iprot.readFieldEnd()
  1453. iprot.readStructEnd()
  1454. def write(self, oprot):
  1455. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1456. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1457. return
  1458. oprot.writeStructBegin('getCpuProfile_result')
  1459. if self.success is not None:
  1460. oprot.writeFieldBegin('success', TType.STRING, 0)
  1461. oprot.writeString(self.success)
  1462. oprot.writeFieldEnd()
  1463. oprot.writeFieldStop()
  1464. oprot.writeStructEnd()
  1465. def validate(self):
  1466. return
  1467. def __repr__(self):
  1468. L = ['%s=%r' % (key, value)
  1469. for key, value in self.__dict__.iteritems()]
  1470. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1471. def __eq__(self, other):
  1472. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1473. def __ne__(self, other):
  1474. return not (self == other)
  1475. class aliveSince_args(object):
  1476. thrift_spec = (
  1477. )
  1478. def read(self, iprot):
  1479. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1480. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1481. return
  1482. iprot.readStructBegin()
  1483. while True:
  1484. (fname, ftype, fid) = iprot.readFieldBegin()
  1485. if ftype == TType.STOP:
  1486. break
  1487. else:
  1488. iprot.skip(ftype)
  1489. iprot.readFieldEnd()
  1490. iprot.readStructEnd()
  1491. def write(self, oprot):
  1492. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1493. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1494. return
  1495. oprot.writeStructBegin('aliveSince_args')
  1496. oprot.writeFieldStop()
  1497. oprot.writeStructEnd()
  1498. def validate(self):
  1499. return
  1500. def __repr__(self):
  1501. L = ['%s=%r' % (key, value)
  1502. for key, value in self.__dict__.iteritems()]
  1503. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1504. def __eq__(self, other):
  1505. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1506. def __ne__(self, other):
  1507. return not (self == other)
  1508. class aliveSince_result(object):
  1509. """
  1510. Attributes:
  1511. - success
  1512. """
  1513. thrift_spec = (
  1514. (0, TType.I64, 'success', None, None, ), # 0
  1515. )
  1516. def __init__(self, success=None,):
  1517. self.success = success
  1518. def read(self, iprot):
  1519. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1520. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1521. return
  1522. iprot.readStructBegin()
  1523. while True:
  1524. (fname, ftype, fid) = iprot.readFieldBegin()
  1525. if ftype == TType.STOP:
  1526. break
  1527. if fid == 0:
  1528. if ftype == TType.I64:
  1529. self.success = iprot.readI64();
  1530. else:
  1531. iprot.skip(ftype)
  1532. else:
  1533. iprot.skip(ftype)
  1534. iprot.readFieldEnd()
  1535. iprot.readStructEnd()
  1536. def write(self, oprot):
  1537. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1538. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1539. return
  1540. oprot.writeStructBegin('aliveSince_result')
  1541. if self.success is not None:
  1542. oprot.writeFieldBegin('success', TType.I64, 0)
  1543. oprot.writeI64(self.success)
  1544. oprot.writeFieldEnd()
  1545. oprot.writeFieldStop()
  1546. oprot.writeStructEnd()
  1547. def validate(self):
  1548. return
  1549. def __repr__(self):
  1550. L = ['%s=%r' % (key, value)
  1551. for key, value in self.__dict__.iteritems()]
  1552. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1553. def __eq__(self, other):
  1554. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1555. def __ne__(self, other):
  1556. return not (self == other)
  1557. class reinitialize_args(object):
  1558. thrift_spec = (
  1559. )
  1560. def read(self, iprot):
  1561. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1562. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1563. return
  1564. iprot.readStructBegin()
  1565. while True:
  1566. (fname, ftype, fid) = iprot.readFieldBegin()
  1567. if ftype == TType.STOP:
  1568. break
  1569. else:
  1570. iprot.skip(ftype)
  1571. iprot.readFieldEnd()
  1572. iprot.readStructEnd()
  1573. def write(self, oprot):
  1574. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1575. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1576. return
  1577. oprot.writeStructBegin('reinitialize_args')
  1578. oprot.writeFieldStop()
  1579. oprot.writeStructEnd()
  1580. def validate(self):
  1581. return
  1582. def __repr__(self):
  1583. L = ['%s=%r' % (key, value)
  1584. for key, value in self.__dict__.iteritems()]
  1585. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1586. def __eq__(self, other):
  1587. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1588. def __ne__(self, other):
  1589. return not (self == other)
  1590. class shutdown_args(object):
  1591. thrift_spec = (
  1592. )
  1593. def read(self, iprot):
  1594. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1595. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1596. return
  1597. iprot.readStructBegin()
  1598. while True:
  1599. (fname, ftype, fid) = iprot.readFieldBegin()
  1600. if ftype == TType.STOP:
  1601. break
  1602. else:
  1603. iprot.skip(ftype)
  1604. iprot.readFieldEnd()
  1605. iprot.readStructEnd()
  1606. def write(self, oprot):
  1607. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1608. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1609. return
  1610. oprot.writeStructBegin('shutdown_args')
  1611. oprot.writeFieldStop()
  1612. oprot.writeStructEnd()
  1613. def validate(self):
  1614. return
  1615. def __repr__(self):
  1616. L = ['%s=%r' % (key, value)
  1617. for key, value in self.__dict__.iteritems()]
  1618. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1619. def __eq__(self, other):
  1620. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1621. def __ne__(self, other):
  1622. return not (self == other)