TCLIService.py 121 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840
  1. #
  2. # Autogenerated by Thrift Compiler (0.13.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, TFrozenDict, TException, TApplicationException
  9. from thrift.protocol.TProtocol import TProtocolException
  10. from thrift.TRecursive import fix_spec
  11. import sys
  12. import logging
  13. from .ttypes import *
  14. from thrift.Thrift import TProcessor
  15. from thrift.transport import TTransport
  16. all_structs = []
  17. class Iface(object):
  18. def OpenSession(self, req):
  19. """
  20. Parameters:
  21. - req
  22. """
  23. pass
  24. def CloseSession(self, req):
  25. """
  26. Parameters:
  27. - req
  28. """
  29. pass
  30. def GetInfo(self, req):
  31. """
  32. Parameters:
  33. - req
  34. """
  35. pass
  36. def ExecuteStatement(self, req):
  37. """
  38. Parameters:
  39. - req
  40. """
  41. pass
  42. def GetTypeInfo(self, req):
  43. """
  44. Parameters:
  45. - req
  46. """
  47. pass
  48. def GetCatalogs(self, req):
  49. """
  50. Parameters:
  51. - req
  52. """
  53. pass
  54. def GetSchemas(self, req):
  55. """
  56. Parameters:
  57. - req
  58. """
  59. pass
  60. def GetTables(self, req):
  61. """
  62. Parameters:
  63. - req
  64. """
  65. pass
  66. def GetTableTypes(self, req):
  67. """
  68. Parameters:
  69. - req
  70. """
  71. pass
  72. def GetColumns(self, req):
  73. """
  74. Parameters:
  75. - req
  76. """
  77. pass
  78. def GetFunctions(self, req):
  79. """
  80. Parameters:
  81. - req
  82. """
  83. pass
  84. def GetOperationStatus(self, req):
  85. """
  86. Parameters:
  87. - req
  88. """
  89. pass
  90. def CancelOperation(self, req):
  91. """
  92. Parameters:
  93. - req
  94. """
  95. pass
  96. def CloseOperation(self, req):
  97. """
  98. Parameters:
  99. - req
  100. """
  101. pass
  102. def GetResultSetMetadata(self, req):
  103. """
  104. Parameters:
  105. - req
  106. """
  107. pass
  108. def FetchResults(self, req):
  109. """
  110. Parameters:
  111. - req
  112. """
  113. pass
  114. def GetDelegationToken(self, req):
  115. """
  116. Parameters:
  117. - req
  118. """
  119. pass
  120. def CancelDelegationToken(self, req):
  121. """
  122. Parameters:
  123. - req
  124. """
  125. pass
  126. def RenewDelegationToken(self, req):
  127. """
  128. Parameters:
  129. - req
  130. """
  131. pass
  132. def GetLog(self, req):
  133. """
  134. Parameters:
  135. - req
  136. """
  137. pass
  138. class Client(Iface):
  139. def __init__(self, iprot, oprot=None):
  140. self._iprot = self._oprot = iprot
  141. if oprot is not None:
  142. self._oprot = oprot
  143. self._seqid = 0
  144. def OpenSession(self, req):
  145. """
  146. Parameters:
  147. - req
  148. """
  149. self.send_OpenSession(req)
  150. return self.recv_OpenSession()
  151. def send_OpenSession(self, req):
  152. self._oprot.writeMessageBegin('OpenSession', TMessageType.CALL, self._seqid)
  153. args = OpenSession_args()
  154. args.req = req
  155. args.write(self._oprot)
  156. self._oprot.writeMessageEnd()
  157. self._oprot.trans.flush()
  158. def recv_OpenSession(self):
  159. iprot = self._iprot
  160. (fname, mtype, rseqid) = iprot.readMessageBegin()
  161. if mtype == TMessageType.EXCEPTION:
  162. x = TApplicationException()
  163. x.read(iprot)
  164. iprot.readMessageEnd()
  165. raise x
  166. result = OpenSession_result()
  167. result.read(iprot)
  168. iprot.readMessageEnd()
  169. if result.success is not None:
  170. return result.success
  171. raise TApplicationException(TApplicationException.MISSING_RESULT, "OpenSession failed: unknown result")
  172. def CloseSession(self, req):
  173. """
  174. Parameters:
  175. - req
  176. """
  177. self.send_CloseSession(req)
  178. return self.recv_CloseSession()
  179. def send_CloseSession(self, req):
  180. self._oprot.writeMessageBegin('CloseSession', TMessageType.CALL, self._seqid)
  181. args = CloseSession_args()
  182. args.req = req
  183. args.write(self._oprot)
  184. self._oprot.writeMessageEnd()
  185. self._oprot.trans.flush()
  186. def recv_CloseSession(self):
  187. iprot = self._iprot
  188. (fname, mtype, rseqid) = iprot.readMessageBegin()
  189. if mtype == TMessageType.EXCEPTION:
  190. x = TApplicationException()
  191. x.read(iprot)
  192. iprot.readMessageEnd()
  193. raise x
  194. result = CloseSession_result()
  195. result.read(iprot)
  196. iprot.readMessageEnd()
  197. if result.success is not None:
  198. return result.success
  199. raise TApplicationException(TApplicationException.MISSING_RESULT, "CloseSession failed: unknown result")
  200. def GetInfo(self, req):
  201. """
  202. Parameters:
  203. - req
  204. """
  205. self.send_GetInfo(req)
  206. return self.recv_GetInfo()
  207. def send_GetInfo(self, req):
  208. self._oprot.writeMessageBegin('GetInfo', TMessageType.CALL, self._seqid)
  209. args = GetInfo_args()
  210. args.req = req
  211. args.write(self._oprot)
  212. self._oprot.writeMessageEnd()
  213. self._oprot.trans.flush()
  214. def recv_GetInfo(self):
  215. iprot = self._iprot
  216. (fname, mtype, rseqid) = iprot.readMessageBegin()
  217. if mtype == TMessageType.EXCEPTION:
  218. x = TApplicationException()
  219. x.read(iprot)
  220. iprot.readMessageEnd()
  221. raise x
  222. result = GetInfo_result()
  223. result.read(iprot)
  224. iprot.readMessageEnd()
  225. if result.success is not None:
  226. return result.success
  227. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetInfo failed: unknown result")
  228. def ExecuteStatement(self, req):
  229. """
  230. Parameters:
  231. - req
  232. """
  233. self.send_ExecuteStatement(req)
  234. return self.recv_ExecuteStatement()
  235. def send_ExecuteStatement(self, req):
  236. self._oprot.writeMessageBegin('ExecuteStatement', TMessageType.CALL, self._seqid)
  237. args = ExecuteStatement_args()
  238. args.req = req
  239. args.write(self._oprot)
  240. self._oprot.writeMessageEnd()
  241. self._oprot.trans.flush()
  242. def recv_ExecuteStatement(self):
  243. iprot = self._iprot
  244. (fname, mtype, rseqid) = iprot.readMessageBegin()
  245. if mtype == TMessageType.EXCEPTION:
  246. x = TApplicationException()
  247. x.read(iprot)
  248. iprot.readMessageEnd()
  249. raise x
  250. result = ExecuteStatement_result()
  251. result.read(iprot)
  252. iprot.readMessageEnd()
  253. if result.success is not None:
  254. return result.success
  255. raise TApplicationException(TApplicationException.MISSING_RESULT, "ExecuteStatement failed: unknown result")
  256. def GetTypeInfo(self, req):
  257. """
  258. Parameters:
  259. - req
  260. """
  261. self.send_GetTypeInfo(req)
  262. return self.recv_GetTypeInfo()
  263. def send_GetTypeInfo(self, req):
  264. self._oprot.writeMessageBegin('GetTypeInfo', TMessageType.CALL, self._seqid)
  265. args = GetTypeInfo_args()
  266. args.req = req
  267. args.write(self._oprot)
  268. self._oprot.writeMessageEnd()
  269. self._oprot.trans.flush()
  270. def recv_GetTypeInfo(self):
  271. iprot = self._iprot
  272. (fname, mtype, rseqid) = iprot.readMessageBegin()
  273. if mtype == TMessageType.EXCEPTION:
  274. x = TApplicationException()
  275. x.read(iprot)
  276. iprot.readMessageEnd()
  277. raise x
  278. result = GetTypeInfo_result()
  279. result.read(iprot)
  280. iprot.readMessageEnd()
  281. if result.success is not None:
  282. return result.success
  283. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetTypeInfo failed: unknown result")
  284. def GetCatalogs(self, req):
  285. """
  286. Parameters:
  287. - req
  288. """
  289. self.send_GetCatalogs(req)
  290. return self.recv_GetCatalogs()
  291. def send_GetCatalogs(self, req):
  292. self._oprot.writeMessageBegin('GetCatalogs', TMessageType.CALL, self._seqid)
  293. args = GetCatalogs_args()
  294. args.req = req
  295. args.write(self._oprot)
  296. self._oprot.writeMessageEnd()
  297. self._oprot.trans.flush()
  298. def recv_GetCatalogs(self):
  299. iprot = self._iprot
  300. (fname, mtype, rseqid) = iprot.readMessageBegin()
  301. if mtype == TMessageType.EXCEPTION:
  302. x = TApplicationException()
  303. x.read(iprot)
  304. iprot.readMessageEnd()
  305. raise x
  306. result = GetCatalogs_result()
  307. result.read(iprot)
  308. iprot.readMessageEnd()
  309. if result.success is not None:
  310. return result.success
  311. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetCatalogs failed: unknown result")
  312. def GetSchemas(self, req):
  313. """
  314. Parameters:
  315. - req
  316. """
  317. self.send_GetSchemas(req)
  318. return self.recv_GetSchemas()
  319. def send_GetSchemas(self, req):
  320. self._oprot.writeMessageBegin('GetSchemas', TMessageType.CALL, self._seqid)
  321. args = GetSchemas_args()
  322. args.req = req
  323. args.write(self._oprot)
  324. self._oprot.writeMessageEnd()
  325. self._oprot.trans.flush()
  326. def recv_GetSchemas(self):
  327. iprot = self._iprot
  328. (fname, mtype, rseqid) = iprot.readMessageBegin()
  329. if mtype == TMessageType.EXCEPTION:
  330. x = TApplicationException()
  331. x.read(iprot)
  332. iprot.readMessageEnd()
  333. raise x
  334. result = GetSchemas_result()
  335. result.read(iprot)
  336. iprot.readMessageEnd()
  337. if result.success is not None:
  338. return result.success
  339. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetSchemas failed: unknown result")
  340. def GetTables(self, req):
  341. """
  342. Parameters:
  343. - req
  344. """
  345. self.send_GetTables(req)
  346. return self.recv_GetTables()
  347. def send_GetTables(self, req):
  348. self._oprot.writeMessageBegin('GetTables', TMessageType.CALL, self._seqid)
  349. args = GetTables_args()
  350. args.req = req
  351. args.write(self._oprot)
  352. self._oprot.writeMessageEnd()
  353. self._oprot.trans.flush()
  354. def recv_GetTables(self):
  355. iprot = self._iprot
  356. (fname, mtype, rseqid) = iprot.readMessageBegin()
  357. if mtype == TMessageType.EXCEPTION:
  358. x = TApplicationException()
  359. x.read(iprot)
  360. iprot.readMessageEnd()
  361. raise x
  362. result = GetTables_result()
  363. result.read(iprot)
  364. iprot.readMessageEnd()
  365. if result.success is not None:
  366. return result.success
  367. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetTables failed: unknown result")
  368. def GetTableTypes(self, req):
  369. """
  370. Parameters:
  371. - req
  372. """
  373. self.send_GetTableTypes(req)
  374. return self.recv_GetTableTypes()
  375. def send_GetTableTypes(self, req):
  376. self._oprot.writeMessageBegin('GetTableTypes', TMessageType.CALL, self._seqid)
  377. args = GetTableTypes_args()
  378. args.req = req
  379. args.write(self._oprot)
  380. self._oprot.writeMessageEnd()
  381. self._oprot.trans.flush()
  382. def recv_GetTableTypes(self):
  383. iprot = self._iprot
  384. (fname, mtype, rseqid) = iprot.readMessageBegin()
  385. if mtype == TMessageType.EXCEPTION:
  386. x = TApplicationException()
  387. x.read(iprot)
  388. iprot.readMessageEnd()
  389. raise x
  390. result = GetTableTypes_result()
  391. result.read(iprot)
  392. iprot.readMessageEnd()
  393. if result.success is not None:
  394. return result.success
  395. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetTableTypes failed: unknown result")
  396. def GetColumns(self, req):
  397. """
  398. Parameters:
  399. - req
  400. """
  401. self.send_GetColumns(req)
  402. return self.recv_GetColumns()
  403. def send_GetColumns(self, req):
  404. self._oprot.writeMessageBegin('GetColumns', TMessageType.CALL, self._seqid)
  405. args = GetColumns_args()
  406. args.req = req
  407. args.write(self._oprot)
  408. self._oprot.writeMessageEnd()
  409. self._oprot.trans.flush()
  410. def recv_GetColumns(self):
  411. iprot = self._iprot
  412. (fname, mtype, rseqid) = iprot.readMessageBegin()
  413. if mtype == TMessageType.EXCEPTION:
  414. x = TApplicationException()
  415. x.read(iprot)
  416. iprot.readMessageEnd()
  417. raise x
  418. result = GetColumns_result()
  419. result.read(iprot)
  420. iprot.readMessageEnd()
  421. if result.success is not None:
  422. return result.success
  423. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetColumns failed: unknown result")
  424. def GetFunctions(self, req):
  425. """
  426. Parameters:
  427. - req
  428. """
  429. self.send_GetFunctions(req)
  430. return self.recv_GetFunctions()
  431. def send_GetFunctions(self, req):
  432. self._oprot.writeMessageBegin('GetFunctions', TMessageType.CALL, self._seqid)
  433. args = GetFunctions_args()
  434. args.req = req
  435. args.write(self._oprot)
  436. self._oprot.writeMessageEnd()
  437. self._oprot.trans.flush()
  438. def recv_GetFunctions(self):
  439. iprot = self._iprot
  440. (fname, mtype, rseqid) = iprot.readMessageBegin()
  441. if mtype == TMessageType.EXCEPTION:
  442. x = TApplicationException()
  443. x.read(iprot)
  444. iprot.readMessageEnd()
  445. raise x
  446. result = GetFunctions_result()
  447. result.read(iprot)
  448. iprot.readMessageEnd()
  449. if result.success is not None:
  450. return result.success
  451. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetFunctions failed: unknown result")
  452. def GetOperationStatus(self, req):
  453. """
  454. Parameters:
  455. - req
  456. """
  457. self.send_GetOperationStatus(req)
  458. return self.recv_GetOperationStatus()
  459. def send_GetOperationStatus(self, req):
  460. self._oprot.writeMessageBegin('GetOperationStatus', TMessageType.CALL, self._seqid)
  461. args = GetOperationStatus_args()
  462. args.req = req
  463. args.write(self._oprot)
  464. self._oprot.writeMessageEnd()
  465. self._oprot.trans.flush()
  466. def recv_GetOperationStatus(self):
  467. iprot = self._iprot
  468. (fname, mtype, rseqid) = iprot.readMessageBegin()
  469. if mtype == TMessageType.EXCEPTION:
  470. x = TApplicationException()
  471. x.read(iprot)
  472. iprot.readMessageEnd()
  473. raise x
  474. result = GetOperationStatus_result()
  475. result.read(iprot)
  476. iprot.readMessageEnd()
  477. if result.success is not None:
  478. return result.success
  479. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetOperationStatus failed: unknown result")
  480. def CancelOperation(self, req):
  481. """
  482. Parameters:
  483. - req
  484. """
  485. self.send_CancelOperation(req)
  486. return self.recv_CancelOperation()
  487. def send_CancelOperation(self, req):
  488. self._oprot.writeMessageBegin('CancelOperation', TMessageType.CALL, self._seqid)
  489. args = CancelOperation_args()
  490. args.req = req
  491. args.write(self._oprot)
  492. self._oprot.writeMessageEnd()
  493. self._oprot.trans.flush()
  494. def recv_CancelOperation(self):
  495. iprot = self._iprot
  496. (fname, mtype, rseqid) = iprot.readMessageBegin()
  497. if mtype == TMessageType.EXCEPTION:
  498. x = TApplicationException()
  499. x.read(iprot)
  500. iprot.readMessageEnd()
  501. raise x
  502. result = CancelOperation_result()
  503. result.read(iprot)
  504. iprot.readMessageEnd()
  505. if result.success is not None:
  506. return result.success
  507. raise TApplicationException(TApplicationException.MISSING_RESULT, "CancelOperation failed: unknown result")
  508. def CloseOperation(self, req):
  509. """
  510. Parameters:
  511. - req
  512. """
  513. self.send_CloseOperation(req)
  514. return self.recv_CloseOperation()
  515. def send_CloseOperation(self, req):
  516. self._oprot.writeMessageBegin('CloseOperation', TMessageType.CALL, self._seqid)
  517. args = CloseOperation_args()
  518. args.req = req
  519. args.write(self._oprot)
  520. self._oprot.writeMessageEnd()
  521. self._oprot.trans.flush()
  522. def recv_CloseOperation(self):
  523. iprot = self._iprot
  524. (fname, mtype, rseqid) = iprot.readMessageBegin()
  525. if mtype == TMessageType.EXCEPTION:
  526. x = TApplicationException()
  527. x.read(iprot)
  528. iprot.readMessageEnd()
  529. raise x
  530. result = CloseOperation_result()
  531. result.read(iprot)
  532. iprot.readMessageEnd()
  533. if result.success is not None:
  534. return result.success
  535. raise TApplicationException(TApplicationException.MISSING_RESULT, "CloseOperation failed: unknown result")
  536. def GetResultSetMetadata(self, req):
  537. """
  538. Parameters:
  539. - req
  540. """
  541. self.send_GetResultSetMetadata(req)
  542. return self.recv_GetResultSetMetadata()
  543. def send_GetResultSetMetadata(self, req):
  544. self._oprot.writeMessageBegin('GetResultSetMetadata', TMessageType.CALL, self._seqid)
  545. args = GetResultSetMetadata_args()
  546. args.req = req
  547. args.write(self._oprot)
  548. self._oprot.writeMessageEnd()
  549. self._oprot.trans.flush()
  550. def recv_GetResultSetMetadata(self):
  551. iprot = self._iprot
  552. (fname, mtype, rseqid) = iprot.readMessageBegin()
  553. if mtype == TMessageType.EXCEPTION:
  554. x = TApplicationException()
  555. x.read(iprot)
  556. iprot.readMessageEnd()
  557. raise x
  558. result = GetResultSetMetadata_result()
  559. result.read(iprot)
  560. iprot.readMessageEnd()
  561. if result.success is not None:
  562. return result.success
  563. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetResultSetMetadata failed: unknown result")
  564. def FetchResults(self, req):
  565. """
  566. Parameters:
  567. - req
  568. """
  569. self.send_FetchResults(req)
  570. return self.recv_FetchResults()
  571. def send_FetchResults(self, req):
  572. self._oprot.writeMessageBegin('FetchResults', TMessageType.CALL, self._seqid)
  573. args = FetchResults_args()
  574. args.req = req
  575. args.write(self._oprot)
  576. self._oprot.writeMessageEnd()
  577. self._oprot.trans.flush()
  578. def recv_FetchResults(self):
  579. iprot = self._iprot
  580. (fname, mtype, rseqid) = iprot.readMessageBegin()
  581. if mtype == TMessageType.EXCEPTION:
  582. x = TApplicationException()
  583. x.read(iprot)
  584. iprot.readMessageEnd()
  585. raise x
  586. result = FetchResults_result()
  587. result.read(iprot)
  588. iprot.readMessageEnd()
  589. if result.success is not None:
  590. return result.success
  591. raise TApplicationException(TApplicationException.MISSING_RESULT, "FetchResults failed: unknown result")
  592. def GetDelegationToken(self, req):
  593. """
  594. Parameters:
  595. - req
  596. """
  597. self.send_GetDelegationToken(req)
  598. return self.recv_GetDelegationToken()
  599. def send_GetDelegationToken(self, req):
  600. self._oprot.writeMessageBegin('GetDelegationToken', TMessageType.CALL, self._seqid)
  601. args = GetDelegationToken_args()
  602. args.req = req
  603. args.write(self._oprot)
  604. self._oprot.writeMessageEnd()
  605. self._oprot.trans.flush()
  606. def recv_GetDelegationToken(self):
  607. iprot = self._iprot
  608. (fname, mtype, rseqid) = iprot.readMessageBegin()
  609. if mtype == TMessageType.EXCEPTION:
  610. x = TApplicationException()
  611. x.read(iprot)
  612. iprot.readMessageEnd()
  613. raise x
  614. result = GetDelegationToken_result()
  615. result.read(iprot)
  616. iprot.readMessageEnd()
  617. if result.success is not None:
  618. return result.success
  619. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetDelegationToken failed: unknown result")
  620. def CancelDelegationToken(self, req):
  621. """
  622. Parameters:
  623. - req
  624. """
  625. self.send_CancelDelegationToken(req)
  626. return self.recv_CancelDelegationToken()
  627. def send_CancelDelegationToken(self, req):
  628. self._oprot.writeMessageBegin('CancelDelegationToken', TMessageType.CALL, self._seqid)
  629. args = CancelDelegationToken_args()
  630. args.req = req
  631. args.write(self._oprot)
  632. self._oprot.writeMessageEnd()
  633. self._oprot.trans.flush()
  634. def recv_CancelDelegationToken(self):
  635. iprot = self._iprot
  636. (fname, mtype, rseqid) = iprot.readMessageBegin()
  637. if mtype == TMessageType.EXCEPTION:
  638. x = TApplicationException()
  639. x.read(iprot)
  640. iprot.readMessageEnd()
  641. raise x
  642. result = CancelDelegationToken_result()
  643. result.read(iprot)
  644. iprot.readMessageEnd()
  645. if result.success is not None:
  646. return result.success
  647. raise TApplicationException(TApplicationException.MISSING_RESULT, "CancelDelegationToken failed: unknown result")
  648. def RenewDelegationToken(self, req):
  649. """
  650. Parameters:
  651. - req
  652. """
  653. self.send_RenewDelegationToken(req)
  654. return self.recv_RenewDelegationToken()
  655. def send_RenewDelegationToken(self, req):
  656. self._oprot.writeMessageBegin('RenewDelegationToken', TMessageType.CALL, self._seqid)
  657. args = RenewDelegationToken_args()
  658. args.req = req
  659. args.write(self._oprot)
  660. self._oprot.writeMessageEnd()
  661. self._oprot.trans.flush()
  662. def recv_RenewDelegationToken(self):
  663. iprot = self._iprot
  664. (fname, mtype, rseqid) = iprot.readMessageBegin()
  665. if mtype == TMessageType.EXCEPTION:
  666. x = TApplicationException()
  667. x.read(iprot)
  668. iprot.readMessageEnd()
  669. raise x
  670. result = RenewDelegationToken_result()
  671. result.read(iprot)
  672. iprot.readMessageEnd()
  673. if result.success is not None:
  674. return result.success
  675. raise TApplicationException(TApplicationException.MISSING_RESULT, "RenewDelegationToken failed: unknown result")
  676. def GetLog(self, req):
  677. """
  678. Parameters:
  679. - req
  680. """
  681. self.send_GetLog(req)
  682. return self.recv_GetLog()
  683. def send_GetLog(self, req):
  684. self._oprot.writeMessageBegin('GetLog', TMessageType.CALL, self._seqid)
  685. args = GetLog_args()
  686. args.req = req
  687. args.write(self._oprot)
  688. self._oprot.writeMessageEnd()
  689. self._oprot.trans.flush()
  690. def recv_GetLog(self):
  691. iprot = self._iprot
  692. (fname, mtype, rseqid) = iprot.readMessageBegin()
  693. if mtype == TMessageType.EXCEPTION:
  694. x = TApplicationException()
  695. x.read(iprot)
  696. iprot.readMessageEnd()
  697. raise x
  698. result = GetLog_result()
  699. result.read(iprot)
  700. iprot.readMessageEnd()
  701. if result.success is not None:
  702. return result.success
  703. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetLog failed: unknown result")
  704. class Processor(Iface, TProcessor):
  705. def __init__(self, handler):
  706. self._handler = handler
  707. self._processMap = {}
  708. self._processMap["OpenSession"] = Processor.process_OpenSession
  709. self._processMap["CloseSession"] = Processor.process_CloseSession
  710. self._processMap["GetInfo"] = Processor.process_GetInfo
  711. self._processMap["ExecuteStatement"] = Processor.process_ExecuteStatement
  712. self._processMap["GetTypeInfo"] = Processor.process_GetTypeInfo
  713. self._processMap["GetCatalogs"] = Processor.process_GetCatalogs
  714. self._processMap["GetSchemas"] = Processor.process_GetSchemas
  715. self._processMap["GetTables"] = Processor.process_GetTables
  716. self._processMap["GetTableTypes"] = Processor.process_GetTableTypes
  717. self._processMap["GetColumns"] = Processor.process_GetColumns
  718. self._processMap["GetFunctions"] = Processor.process_GetFunctions
  719. self._processMap["GetOperationStatus"] = Processor.process_GetOperationStatus
  720. self._processMap["CancelOperation"] = Processor.process_CancelOperation
  721. self._processMap["CloseOperation"] = Processor.process_CloseOperation
  722. self._processMap["GetResultSetMetadata"] = Processor.process_GetResultSetMetadata
  723. self._processMap["FetchResults"] = Processor.process_FetchResults
  724. self._processMap["GetDelegationToken"] = Processor.process_GetDelegationToken
  725. self._processMap["CancelDelegationToken"] = Processor.process_CancelDelegationToken
  726. self._processMap["RenewDelegationToken"] = Processor.process_RenewDelegationToken
  727. self._processMap["GetLog"] = Processor.process_GetLog
  728. self._on_message_begin = None
  729. def on_message_begin(self, func):
  730. self._on_message_begin = func
  731. def process(self, iprot, oprot):
  732. (name, type, seqid) = iprot.readMessageBegin()
  733. if self._on_message_begin:
  734. self._on_message_begin(name, type, seqid)
  735. if name not in self._processMap:
  736. iprot.skip(TType.STRUCT)
  737. iprot.readMessageEnd()
  738. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  739. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  740. x.write(oprot)
  741. oprot.writeMessageEnd()
  742. oprot.trans.flush()
  743. return
  744. else:
  745. self._processMap[name](self, seqid, iprot, oprot)
  746. return True
  747. def process_OpenSession(self, seqid, iprot, oprot):
  748. args = OpenSession_args()
  749. args.read(iprot)
  750. iprot.readMessageEnd()
  751. result = OpenSession_result()
  752. try:
  753. result.success = self._handler.OpenSession(args.req)
  754. msg_type = TMessageType.REPLY
  755. except TTransport.TTransportException:
  756. raise
  757. except TApplicationException as ex:
  758. logging.exception('TApplication exception in handler')
  759. msg_type = TMessageType.EXCEPTION
  760. result = ex
  761. except Exception:
  762. logging.exception('Unexpected exception in handler')
  763. msg_type = TMessageType.EXCEPTION
  764. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  765. oprot.writeMessageBegin("OpenSession", msg_type, seqid)
  766. result.write(oprot)
  767. oprot.writeMessageEnd()
  768. oprot.trans.flush()
  769. def process_CloseSession(self, seqid, iprot, oprot):
  770. args = CloseSession_args()
  771. args.read(iprot)
  772. iprot.readMessageEnd()
  773. result = CloseSession_result()
  774. try:
  775. result.success = self._handler.CloseSession(args.req)
  776. msg_type = TMessageType.REPLY
  777. except TTransport.TTransportException:
  778. raise
  779. except TApplicationException as ex:
  780. logging.exception('TApplication exception in handler')
  781. msg_type = TMessageType.EXCEPTION
  782. result = ex
  783. except Exception:
  784. logging.exception('Unexpected exception in handler')
  785. msg_type = TMessageType.EXCEPTION
  786. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  787. oprot.writeMessageBegin("CloseSession", msg_type, seqid)
  788. result.write(oprot)
  789. oprot.writeMessageEnd()
  790. oprot.trans.flush()
  791. def process_GetInfo(self, seqid, iprot, oprot):
  792. args = GetInfo_args()
  793. args.read(iprot)
  794. iprot.readMessageEnd()
  795. result = GetInfo_result()
  796. try:
  797. result.success = self._handler.GetInfo(args.req)
  798. msg_type = TMessageType.REPLY
  799. except TTransport.TTransportException:
  800. raise
  801. except TApplicationException as ex:
  802. logging.exception('TApplication exception in handler')
  803. msg_type = TMessageType.EXCEPTION
  804. result = ex
  805. except Exception:
  806. logging.exception('Unexpected exception in handler')
  807. msg_type = TMessageType.EXCEPTION
  808. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  809. oprot.writeMessageBegin("GetInfo", msg_type, seqid)
  810. result.write(oprot)
  811. oprot.writeMessageEnd()
  812. oprot.trans.flush()
  813. def process_ExecuteStatement(self, seqid, iprot, oprot):
  814. args = ExecuteStatement_args()
  815. args.read(iprot)
  816. iprot.readMessageEnd()
  817. result = ExecuteStatement_result()
  818. try:
  819. result.success = self._handler.ExecuteStatement(args.req)
  820. msg_type = TMessageType.REPLY
  821. except TTransport.TTransportException:
  822. raise
  823. except TApplicationException as ex:
  824. logging.exception('TApplication exception in handler')
  825. msg_type = TMessageType.EXCEPTION
  826. result = ex
  827. except Exception:
  828. logging.exception('Unexpected exception in handler')
  829. msg_type = TMessageType.EXCEPTION
  830. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  831. oprot.writeMessageBegin("ExecuteStatement", msg_type, seqid)
  832. result.write(oprot)
  833. oprot.writeMessageEnd()
  834. oprot.trans.flush()
  835. def process_GetTypeInfo(self, seqid, iprot, oprot):
  836. args = GetTypeInfo_args()
  837. args.read(iprot)
  838. iprot.readMessageEnd()
  839. result = GetTypeInfo_result()
  840. try:
  841. result.success = self._handler.GetTypeInfo(args.req)
  842. msg_type = TMessageType.REPLY
  843. except TTransport.TTransportException:
  844. raise
  845. except TApplicationException as ex:
  846. logging.exception('TApplication exception in handler')
  847. msg_type = TMessageType.EXCEPTION
  848. result = ex
  849. except Exception:
  850. logging.exception('Unexpected exception in handler')
  851. msg_type = TMessageType.EXCEPTION
  852. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  853. oprot.writeMessageBegin("GetTypeInfo", msg_type, seqid)
  854. result.write(oprot)
  855. oprot.writeMessageEnd()
  856. oprot.trans.flush()
  857. def process_GetCatalogs(self, seqid, iprot, oprot):
  858. args = GetCatalogs_args()
  859. args.read(iprot)
  860. iprot.readMessageEnd()
  861. result = GetCatalogs_result()
  862. try:
  863. result.success = self._handler.GetCatalogs(args.req)
  864. msg_type = TMessageType.REPLY
  865. except TTransport.TTransportException:
  866. raise
  867. except TApplicationException as ex:
  868. logging.exception('TApplication exception in handler')
  869. msg_type = TMessageType.EXCEPTION
  870. result = ex
  871. except Exception:
  872. logging.exception('Unexpected exception in handler')
  873. msg_type = TMessageType.EXCEPTION
  874. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  875. oprot.writeMessageBegin("GetCatalogs", msg_type, seqid)
  876. result.write(oprot)
  877. oprot.writeMessageEnd()
  878. oprot.trans.flush()
  879. def process_GetSchemas(self, seqid, iprot, oprot):
  880. args = GetSchemas_args()
  881. args.read(iprot)
  882. iprot.readMessageEnd()
  883. result = GetSchemas_result()
  884. try:
  885. result.success = self._handler.GetSchemas(args.req)
  886. msg_type = TMessageType.REPLY
  887. except TTransport.TTransportException:
  888. raise
  889. except TApplicationException as ex:
  890. logging.exception('TApplication exception in handler')
  891. msg_type = TMessageType.EXCEPTION
  892. result = ex
  893. except Exception:
  894. logging.exception('Unexpected exception in handler')
  895. msg_type = TMessageType.EXCEPTION
  896. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  897. oprot.writeMessageBegin("GetSchemas", msg_type, seqid)
  898. result.write(oprot)
  899. oprot.writeMessageEnd()
  900. oprot.trans.flush()
  901. def process_GetTables(self, seqid, iprot, oprot):
  902. args = GetTables_args()
  903. args.read(iprot)
  904. iprot.readMessageEnd()
  905. result = GetTables_result()
  906. try:
  907. result.success = self._handler.GetTables(args.req)
  908. msg_type = TMessageType.REPLY
  909. except TTransport.TTransportException:
  910. raise
  911. except TApplicationException as ex:
  912. logging.exception('TApplication exception in handler')
  913. msg_type = TMessageType.EXCEPTION
  914. result = ex
  915. except Exception:
  916. logging.exception('Unexpected exception in handler')
  917. msg_type = TMessageType.EXCEPTION
  918. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  919. oprot.writeMessageBegin("GetTables", msg_type, seqid)
  920. result.write(oprot)
  921. oprot.writeMessageEnd()
  922. oprot.trans.flush()
  923. def process_GetTableTypes(self, seqid, iprot, oprot):
  924. args = GetTableTypes_args()
  925. args.read(iprot)
  926. iprot.readMessageEnd()
  927. result = GetTableTypes_result()
  928. try:
  929. result.success = self._handler.GetTableTypes(args.req)
  930. msg_type = TMessageType.REPLY
  931. except TTransport.TTransportException:
  932. raise
  933. except TApplicationException as ex:
  934. logging.exception('TApplication exception in handler')
  935. msg_type = TMessageType.EXCEPTION
  936. result = ex
  937. except Exception:
  938. logging.exception('Unexpected exception in handler')
  939. msg_type = TMessageType.EXCEPTION
  940. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  941. oprot.writeMessageBegin("GetTableTypes", msg_type, seqid)
  942. result.write(oprot)
  943. oprot.writeMessageEnd()
  944. oprot.trans.flush()
  945. def process_GetColumns(self, seqid, iprot, oprot):
  946. args = GetColumns_args()
  947. args.read(iprot)
  948. iprot.readMessageEnd()
  949. result = GetColumns_result()
  950. try:
  951. result.success = self._handler.GetColumns(args.req)
  952. msg_type = TMessageType.REPLY
  953. except TTransport.TTransportException:
  954. raise
  955. except TApplicationException as ex:
  956. logging.exception('TApplication exception in handler')
  957. msg_type = TMessageType.EXCEPTION
  958. result = ex
  959. except Exception:
  960. logging.exception('Unexpected exception in handler')
  961. msg_type = TMessageType.EXCEPTION
  962. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  963. oprot.writeMessageBegin("GetColumns", msg_type, seqid)
  964. result.write(oprot)
  965. oprot.writeMessageEnd()
  966. oprot.trans.flush()
  967. def process_GetFunctions(self, seqid, iprot, oprot):
  968. args = GetFunctions_args()
  969. args.read(iprot)
  970. iprot.readMessageEnd()
  971. result = GetFunctions_result()
  972. try:
  973. result.success = self._handler.GetFunctions(args.req)
  974. msg_type = TMessageType.REPLY
  975. except TTransport.TTransportException:
  976. raise
  977. except TApplicationException as ex:
  978. logging.exception('TApplication exception in handler')
  979. msg_type = TMessageType.EXCEPTION
  980. result = ex
  981. except Exception:
  982. logging.exception('Unexpected exception in handler')
  983. msg_type = TMessageType.EXCEPTION
  984. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  985. oprot.writeMessageBegin("GetFunctions", msg_type, seqid)
  986. result.write(oprot)
  987. oprot.writeMessageEnd()
  988. oprot.trans.flush()
  989. def process_GetOperationStatus(self, seqid, iprot, oprot):
  990. args = GetOperationStatus_args()
  991. args.read(iprot)
  992. iprot.readMessageEnd()
  993. result = GetOperationStatus_result()
  994. try:
  995. result.success = self._handler.GetOperationStatus(args.req)
  996. msg_type = TMessageType.REPLY
  997. except TTransport.TTransportException:
  998. raise
  999. except TApplicationException as ex:
  1000. logging.exception('TApplication exception in handler')
  1001. msg_type = TMessageType.EXCEPTION
  1002. result = ex
  1003. except Exception:
  1004. logging.exception('Unexpected exception in handler')
  1005. msg_type = TMessageType.EXCEPTION
  1006. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  1007. oprot.writeMessageBegin("GetOperationStatus", msg_type, seqid)
  1008. result.write(oprot)
  1009. oprot.writeMessageEnd()
  1010. oprot.trans.flush()
  1011. def process_CancelOperation(self, seqid, iprot, oprot):
  1012. args = CancelOperation_args()
  1013. args.read(iprot)
  1014. iprot.readMessageEnd()
  1015. result = CancelOperation_result()
  1016. try:
  1017. result.success = self._handler.CancelOperation(args.req)
  1018. msg_type = TMessageType.REPLY
  1019. except TTransport.TTransportException:
  1020. raise
  1021. except TApplicationException as ex:
  1022. logging.exception('TApplication exception in handler')
  1023. msg_type = TMessageType.EXCEPTION
  1024. result = ex
  1025. except Exception:
  1026. logging.exception('Unexpected exception in handler')
  1027. msg_type = TMessageType.EXCEPTION
  1028. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  1029. oprot.writeMessageBegin("CancelOperation", msg_type, seqid)
  1030. result.write(oprot)
  1031. oprot.writeMessageEnd()
  1032. oprot.trans.flush()
  1033. def process_CloseOperation(self, seqid, iprot, oprot):
  1034. args = CloseOperation_args()
  1035. args.read(iprot)
  1036. iprot.readMessageEnd()
  1037. result = CloseOperation_result()
  1038. try:
  1039. result.success = self._handler.CloseOperation(args.req)
  1040. msg_type = TMessageType.REPLY
  1041. except TTransport.TTransportException:
  1042. raise
  1043. except TApplicationException as ex:
  1044. logging.exception('TApplication exception in handler')
  1045. msg_type = TMessageType.EXCEPTION
  1046. result = ex
  1047. except Exception:
  1048. logging.exception('Unexpected exception in handler')
  1049. msg_type = TMessageType.EXCEPTION
  1050. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  1051. oprot.writeMessageBegin("CloseOperation", msg_type, seqid)
  1052. result.write(oprot)
  1053. oprot.writeMessageEnd()
  1054. oprot.trans.flush()
  1055. def process_GetResultSetMetadata(self, seqid, iprot, oprot):
  1056. args = GetResultSetMetadata_args()
  1057. args.read(iprot)
  1058. iprot.readMessageEnd()
  1059. result = GetResultSetMetadata_result()
  1060. try:
  1061. result.success = self._handler.GetResultSetMetadata(args.req)
  1062. msg_type = TMessageType.REPLY
  1063. except TTransport.TTransportException:
  1064. raise
  1065. except TApplicationException as ex:
  1066. logging.exception('TApplication exception in handler')
  1067. msg_type = TMessageType.EXCEPTION
  1068. result = ex
  1069. except Exception:
  1070. logging.exception('Unexpected exception in handler')
  1071. msg_type = TMessageType.EXCEPTION
  1072. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  1073. oprot.writeMessageBegin("GetResultSetMetadata", msg_type, seqid)
  1074. result.write(oprot)
  1075. oprot.writeMessageEnd()
  1076. oprot.trans.flush()
  1077. def process_FetchResults(self, seqid, iprot, oprot):
  1078. args = FetchResults_args()
  1079. args.read(iprot)
  1080. iprot.readMessageEnd()
  1081. result = FetchResults_result()
  1082. try:
  1083. result.success = self._handler.FetchResults(args.req)
  1084. msg_type = TMessageType.REPLY
  1085. except TTransport.TTransportException:
  1086. raise
  1087. except TApplicationException as ex:
  1088. logging.exception('TApplication exception in handler')
  1089. msg_type = TMessageType.EXCEPTION
  1090. result = ex
  1091. except Exception:
  1092. logging.exception('Unexpected exception in handler')
  1093. msg_type = TMessageType.EXCEPTION
  1094. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  1095. oprot.writeMessageBegin("FetchResults", msg_type, seqid)
  1096. result.write(oprot)
  1097. oprot.writeMessageEnd()
  1098. oprot.trans.flush()
  1099. def process_GetDelegationToken(self, seqid, iprot, oprot):
  1100. args = GetDelegationToken_args()
  1101. args.read(iprot)
  1102. iprot.readMessageEnd()
  1103. result = GetDelegationToken_result()
  1104. try:
  1105. result.success = self._handler.GetDelegationToken(args.req)
  1106. msg_type = TMessageType.REPLY
  1107. except TTransport.TTransportException:
  1108. raise
  1109. except TApplicationException as ex:
  1110. logging.exception('TApplication exception in handler')
  1111. msg_type = TMessageType.EXCEPTION
  1112. result = ex
  1113. except Exception:
  1114. logging.exception('Unexpected exception in handler')
  1115. msg_type = TMessageType.EXCEPTION
  1116. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  1117. oprot.writeMessageBegin("GetDelegationToken", msg_type, seqid)
  1118. result.write(oprot)
  1119. oprot.writeMessageEnd()
  1120. oprot.trans.flush()
  1121. def process_CancelDelegationToken(self, seqid, iprot, oprot):
  1122. args = CancelDelegationToken_args()
  1123. args.read(iprot)
  1124. iprot.readMessageEnd()
  1125. result = CancelDelegationToken_result()
  1126. try:
  1127. result.success = self._handler.CancelDelegationToken(args.req)
  1128. msg_type = TMessageType.REPLY
  1129. except TTransport.TTransportException:
  1130. raise
  1131. except TApplicationException as ex:
  1132. logging.exception('TApplication exception in handler')
  1133. msg_type = TMessageType.EXCEPTION
  1134. result = ex
  1135. except Exception:
  1136. logging.exception('Unexpected exception in handler')
  1137. msg_type = TMessageType.EXCEPTION
  1138. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  1139. oprot.writeMessageBegin("CancelDelegationToken", msg_type, seqid)
  1140. result.write(oprot)
  1141. oprot.writeMessageEnd()
  1142. oprot.trans.flush()
  1143. def process_RenewDelegationToken(self, seqid, iprot, oprot):
  1144. args = RenewDelegationToken_args()
  1145. args.read(iprot)
  1146. iprot.readMessageEnd()
  1147. result = RenewDelegationToken_result()
  1148. try:
  1149. result.success = self._handler.RenewDelegationToken(args.req)
  1150. msg_type = TMessageType.REPLY
  1151. except TTransport.TTransportException:
  1152. raise
  1153. except TApplicationException as ex:
  1154. logging.exception('TApplication exception in handler')
  1155. msg_type = TMessageType.EXCEPTION
  1156. result = ex
  1157. except Exception:
  1158. logging.exception('Unexpected exception in handler')
  1159. msg_type = TMessageType.EXCEPTION
  1160. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  1161. oprot.writeMessageBegin("RenewDelegationToken", msg_type, seqid)
  1162. result.write(oprot)
  1163. oprot.writeMessageEnd()
  1164. oprot.trans.flush()
  1165. def process_GetLog(self, seqid, iprot, oprot):
  1166. args = GetLog_args()
  1167. args.read(iprot)
  1168. iprot.readMessageEnd()
  1169. result = GetLog_result()
  1170. try:
  1171. result.success = self._handler.GetLog(args.req)
  1172. msg_type = TMessageType.REPLY
  1173. except TTransport.TTransportException:
  1174. raise
  1175. except TApplicationException as ex:
  1176. logging.exception('TApplication exception in handler')
  1177. msg_type = TMessageType.EXCEPTION
  1178. result = ex
  1179. except Exception:
  1180. logging.exception('Unexpected exception in handler')
  1181. msg_type = TMessageType.EXCEPTION
  1182. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  1183. oprot.writeMessageBegin("GetLog", msg_type, seqid)
  1184. result.write(oprot)
  1185. oprot.writeMessageEnd()
  1186. oprot.trans.flush()
  1187. # HELPER FUNCTIONS AND STRUCTURES
  1188. class OpenSession_args(object):
  1189. """
  1190. Attributes:
  1191. - req
  1192. """
  1193. def __init__(self, req=None,):
  1194. self.req = req
  1195. def read(self, iprot):
  1196. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1197. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1198. return
  1199. iprot.readStructBegin()
  1200. while True:
  1201. (fname, ftype, fid) = iprot.readFieldBegin()
  1202. if ftype == TType.STOP:
  1203. break
  1204. if fid == 1:
  1205. if ftype == TType.STRUCT:
  1206. self.req = TOpenSessionReq()
  1207. self.req.read(iprot)
  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._fast_encode is not None and self.thrift_spec is not None:
  1216. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1217. return
  1218. oprot.writeStructBegin('OpenSession_args')
  1219. if self.req is not None:
  1220. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  1221. self.req.write(oprot)
  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__.items()]
  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. all_structs.append(OpenSession_args)
  1236. OpenSession_args.thrift_spec = (
  1237. None, # 0
  1238. (1, TType.STRUCT, 'req', [TOpenSessionReq, None], None, ), # 1
  1239. )
  1240. class OpenSession_result(object):
  1241. """
  1242. Attributes:
  1243. - success
  1244. """
  1245. def __init__(self, success=None,):
  1246. self.success = success
  1247. def read(self, iprot):
  1248. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1249. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1250. return
  1251. iprot.readStructBegin()
  1252. while True:
  1253. (fname, ftype, fid) = iprot.readFieldBegin()
  1254. if ftype == TType.STOP:
  1255. break
  1256. if fid == 0:
  1257. if ftype == TType.STRUCT:
  1258. self.success = TOpenSessionResp()
  1259. self.success.read(iprot)
  1260. else:
  1261. iprot.skip(ftype)
  1262. else:
  1263. iprot.skip(ftype)
  1264. iprot.readFieldEnd()
  1265. iprot.readStructEnd()
  1266. def write(self, oprot):
  1267. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1268. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1269. return
  1270. oprot.writeStructBegin('OpenSession_result')
  1271. if self.success is not None:
  1272. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1273. self.success.write(oprot)
  1274. oprot.writeFieldEnd()
  1275. oprot.writeFieldStop()
  1276. oprot.writeStructEnd()
  1277. def validate(self):
  1278. return
  1279. def __repr__(self):
  1280. L = ['%s=%r' % (key, value)
  1281. for key, value in self.__dict__.items()]
  1282. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1283. def __eq__(self, other):
  1284. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1285. def __ne__(self, other):
  1286. return not (self == other)
  1287. all_structs.append(OpenSession_result)
  1288. OpenSession_result.thrift_spec = (
  1289. (0, TType.STRUCT, 'success', [TOpenSessionResp, None], None, ), # 0
  1290. )
  1291. class CloseSession_args(object):
  1292. """
  1293. Attributes:
  1294. - req
  1295. """
  1296. def __init__(self, req=None,):
  1297. self.req = req
  1298. def read(self, iprot):
  1299. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1300. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1301. return
  1302. iprot.readStructBegin()
  1303. while True:
  1304. (fname, ftype, fid) = iprot.readFieldBegin()
  1305. if ftype == TType.STOP:
  1306. break
  1307. if fid == 1:
  1308. if ftype == TType.STRUCT:
  1309. self.req = TCloseSessionReq()
  1310. self.req.read(iprot)
  1311. else:
  1312. iprot.skip(ftype)
  1313. else:
  1314. iprot.skip(ftype)
  1315. iprot.readFieldEnd()
  1316. iprot.readStructEnd()
  1317. def write(self, oprot):
  1318. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1319. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1320. return
  1321. oprot.writeStructBegin('CloseSession_args')
  1322. if self.req is not None:
  1323. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  1324. self.req.write(oprot)
  1325. oprot.writeFieldEnd()
  1326. oprot.writeFieldStop()
  1327. oprot.writeStructEnd()
  1328. def validate(self):
  1329. return
  1330. def __repr__(self):
  1331. L = ['%s=%r' % (key, value)
  1332. for key, value in self.__dict__.items()]
  1333. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1334. def __eq__(self, other):
  1335. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1336. def __ne__(self, other):
  1337. return not (self == other)
  1338. all_structs.append(CloseSession_args)
  1339. CloseSession_args.thrift_spec = (
  1340. None, # 0
  1341. (1, TType.STRUCT, 'req', [TCloseSessionReq, None], None, ), # 1
  1342. )
  1343. class CloseSession_result(object):
  1344. """
  1345. Attributes:
  1346. - success
  1347. """
  1348. def __init__(self, success=None,):
  1349. self.success = success
  1350. def read(self, iprot):
  1351. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1352. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1353. return
  1354. iprot.readStructBegin()
  1355. while True:
  1356. (fname, ftype, fid) = iprot.readFieldBegin()
  1357. if ftype == TType.STOP:
  1358. break
  1359. if fid == 0:
  1360. if ftype == TType.STRUCT:
  1361. self.success = TCloseSessionResp()
  1362. self.success.read(iprot)
  1363. else:
  1364. iprot.skip(ftype)
  1365. else:
  1366. iprot.skip(ftype)
  1367. iprot.readFieldEnd()
  1368. iprot.readStructEnd()
  1369. def write(self, oprot):
  1370. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1371. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1372. return
  1373. oprot.writeStructBegin('CloseSession_result')
  1374. if self.success is not None:
  1375. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1376. self.success.write(oprot)
  1377. oprot.writeFieldEnd()
  1378. oprot.writeFieldStop()
  1379. oprot.writeStructEnd()
  1380. def validate(self):
  1381. return
  1382. def __repr__(self):
  1383. L = ['%s=%r' % (key, value)
  1384. for key, value in self.__dict__.items()]
  1385. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1386. def __eq__(self, other):
  1387. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1388. def __ne__(self, other):
  1389. return not (self == other)
  1390. all_structs.append(CloseSession_result)
  1391. CloseSession_result.thrift_spec = (
  1392. (0, TType.STRUCT, 'success', [TCloseSessionResp, None], None, ), # 0
  1393. )
  1394. class GetInfo_args(object):
  1395. """
  1396. Attributes:
  1397. - req
  1398. """
  1399. def __init__(self, req=None,):
  1400. self.req = req
  1401. def read(self, iprot):
  1402. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1403. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1404. return
  1405. iprot.readStructBegin()
  1406. while True:
  1407. (fname, ftype, fid) = iprot.readFieldBegin()
  1408. if ftype == TType.STOP:
  1409. break
  1410. if fid == 1:
  1411. if ftype == TType.STRUCT:
  1412. self.req = TGetInfoReq()
  1413. self.req.read(iprot)
  1414. else:
  1415. iprot.skip(ftype)
  1416. else:
  1417. iprot.skip(ftype)
  1418. iprot.readFieldEnd()
  1419. iprot.readStructEnd()
  1420. def write(self, oprot):
  1421. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1422. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1423. return
  1424. oprot.writeStructBegin('GetInfo_args')
  1425. if self.req is not None:
  1426. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  1427. self.req.write(oprot)
  1428. oprot.writeFieldEnd()
  1429. oprot.writeFieldStop()
  1430. oprot.writeStructEnd()
  1431. def validate(self):
  1432. return
  1433. def __repr__(self):
  1434. L = ['%s=%r' % (key, value)
  1435. for key, value in self.__dict__.items()]
  1436. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1437. def __eq__(self, other):
  1438. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1439. def __ne__(self, other):
  1440. return not (self == other)
  1441. all_structs.append(GetInfo_args)
  1442. GetInfo_args.thrift_spec = (
  1443. None, # 0
  1444. (1, TType.STRUCT, 'req', [TGetInfoReq, None], None, ), # 1
  1445. )
  1446. class GetInfo_result(object):
  1447. """
  1448. Attributes:
  1449. - success
  1450. """
  1451. def __init__(self, success=None,):
  1452. self.success = success
  1453. def read(self, iprot):
  1454. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1455. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1456. return
  1457. iprot.readStructBegin()
  1458. while True:
  1459. (fname, ftype, fid) = iprot.readFieldBegin()
  1460. if ftype == TType.STOP:
  1461. break
  1462. if fid == 0:
  1463. if ftype == TType.STRUCT:
  1464. self.success = TGetInfoResp()
  1465. self.success.read(iprot)
  1466. else:
  1467. iprot.skip(ftype)
  1468. else:
  1469. iprot.skip(ftype)
  1470. iprot.readFieldEnd()
  1471. iprot.readStructEnd()
  1472. def write(self, oprot):
  1473. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1474. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1475. return
  1476. oprot.writeStructBegin('GetInfo_result')
  1477. if self.success is not None:
  1478. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1479. self.success.write(oprot)
  1480. oprot.writeFieldEnd()
  1481. oprot.writeFieldStop()
  1482. oprot.writeStructEnd()
  1483. def validate(self):
  1484. return
  1485. def __repr__(self):
  1486. L = ['%s=%r' % (key, value)
  1487. for key, value in self.__dict__.items()]
  1488. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1489. def __eq__(self, other):
  1490. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1491. def __ne__(self, other):
  1492. return not (self == other)
  1493. all_structs.append(GetInfo_result)
  1494. GetInfo_result.thrift_spec = (
  1495. (0, TType.STRUCT, 'success', [TGetInfoResp, None], None, ), # 0
  1496. )
  1497. class ExecuteStatement_args(object):
  1498. """
  1499. Attributes:
  1500. - req
  1501. """
  1502. def __init__(self, req=None,):
  1503. self.req = req
  1504. def read(self, iprot):
  1505. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1506. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1507. return
  1508. iprot.readStructBegin()
  1509. while True:
  1510. (fname, ftype, fid) = iprot.readFieldBegin()
  1511. if ftype == TType.STOP:
  1512. break
  1513. if fid == 1:
  1514. if ftype == TType.STRUCT:
  1515. self.req = TExecuteStatementReq()
  1516. self.req.read(iprot)
  1517. else:
  1518. iprot.skip(ftype)
  1519. else:
  1520. iprot.skip(ftype)
  1521. iprot.readFieldEnd()
  1522. iprot.readStructEnd()
  1523. def write(self, oprot):
  1524. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1525. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1526. return
  1527. oprot.writeStructBegin('ExecuteStatement_args')
  1528. if self.req is not None:
  1529. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  1530. self.req.write(oprot)
  1531. oprot.writeFieldEnd()
  1532. oprot.writeFieldStop()
  1533. oprot.writeStructEnd()
  1534. def validate(self):
  1535. return
  1536. def __repr__(self):
  1537. L = ['%s=%r' % (key, value)
  1538. for key, value in self.__dict__.items()]
  1539. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1540. def __eq__(self, other):
  1541. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1542. def __ne__(self, other):
  1543. return not (self == other)
  1544. all_structs.append(ExecuteStatement_args)
  1545. ExecuteStatement_args.thrift_spec = (
  1546. None, # 0
  1547. (1, TType.STRUCT, 'req', [TExecuteStatementReq, None], None, ), # 1
  1548. )
  1549. class ExecuteStatement_result(object):
  1550. """
  1551. Attributes:
  1552. - success
  1553. """
  1554. def __init__(self, success=None,):
  1555. self.success = success
  1556. def read(self, iprot):
  1557. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1558. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1559. return
  1560. iprot.readStructBegin()
  1561. while True:
  1562. (fname, ftype, fid) = iprot.readFieldBegin()
  1563. if ftype == TType.STOP:
  1564. break
  1565. if fid == 0:
  1566. if ftype == TType.STRUCT:
  1567. self.success = TExecuteStatementResp()
  1568. self.success.read(iprot)
  1569. else:
  1570. iprot.skip(ftype)
  1571. else:
  1572. iprot.skip(ftype)
  1573. iprot.readFieldEnd()
  1574. iprot.readStructEnd()
  1575. def write(self, oprot):
  1576. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1577. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1578. return
  1579. oprot.writeStructBegin('ExecuteStatement_result')
  1580. if self.success is not None:
  1581. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1582. self.success.write(oprot)
  1583. oprot.writeFieldEnd()
  1584. oprot.writeFieldStop()
  1585. oprot.writeStructEnd()
  1586. def validate(self):
  1587. return
  1588. def __repr__(self):
  1589. L = ['%s=%r' % (key, value)
  1590. for key, value in self.__dict__.items()]
  1591. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1592. def __eq__(self, other):
  1593. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1594. def __ne__(self, other):
  1595. return not (self == other)
  1596. all_structs.append(ExecuteStatement_result)
  1597. ExecuteStatement_result.thrift_spec = (
  1598. (0, TType.STRUCT, 'success', [TExecuteStatementResp, None], None, ), # 0
  1599. )
  1600. class GetTypeInfo_args(object):
  1601. """
  1602. Attributes:
  1603. - req
  1604. """
  1605. def __init__(self, req=None,):
  1606. self.req = req
  1607. def read(self, iprot):
  1608. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1609. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1610. return
  1611. iprot.readStructBegin()
  1612. while True:
  1613. (fname, ftype, fid) = iprot.readFieldBegin()
  1614. if ftype == TType.STOP:
  1615. break
  1616. if fid == 1:
  1617. if ftype == TType.STRUCT:
  1618. self.req = TGetTypeInfoReq()
  1619. self.req.read(iprot)
  1620. else:
  1621. iprot.skip(ftype)
  1622. else:
  1623. iprot.skip(ftype)
  1624. iprot.readFieldEnd()
  1625. iprot.readStructEnd()
  1626. def write(self, oprot):
  1627. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1628. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1629. return
  1630. oprot.writeStructBegin('GetTypeInfo_args')
  1631. if self.req is not None:
  1632. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  1633. self.req.write(oprot)
  1634. oprot.writeFieldEnd()
  1635. oprot.writeFieldStop()
  1636. oprot.writeStructEnd()
  1637. def validate(self):
  1638. return
  1639. def __repr__(self):
  1640. L = ['%s=%r' % (key, value)
  1641. for key, value in self.__dict__.items()]
  1642. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1643. def __eq__(self, other):
  1644. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1645. def __ne__(self, other):
  1646. return not (self == other)
  1647. all_structs.append(GetTypeInfo_args)
  1648. GetTypeInfo_args.thrift_spec = (
  1649. None, # 0
  1650. (1, TType.STRUCT, 'req', [TGetTypeInfoReq, None], None, ), # 1
  1651. )
  1652. class GetTypeInfo_result(object):
  1653. """
  1654. Attributes:
  1655. - success
  1656. """
  1657. def __init__(self, success=None,):
  1658. self.success = success
  1659. def read(self, iprot):
  1660. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1661. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1662. return
  1663. iprot.readStructBegin()
  1664. while True:
  1665. (fname, ftype, fid) = iprot.readFieldBegin()
  1666. if ftype == TType.STOP:
  1667. break
  1668. if fid == 0:
  1669. if ftype == TType.STRUCT:
  1670. self.success = TGetTypeInfoResp()
  1671. self.success.read(iprot)
  1672. else:
  1673. iprot.skip(ftype)
  1674. else:
  1675. iprot.skip(ftype)
  1676. iprot.readFieldEnd()
  1677. iprot.readStructEnd()
  1678. def write(self, oprot):
  1679. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1680. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1681. return
  1682. oprot.writeStructBegin('GetTypeInfo_result')
  1683. if self.success is not None:
  1684. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1685. self.success.write(oprot)
  1686. oprot.writeFieldEnd()
  1687. oprot.writeFieldStop()
  1688. oprot.writeStructEnd()
  1689. def validate(self):
  1690. return
  1691. def __repr__(self):
  1692. L = ['%s=%r' % (key, value)
  1693. for key, value in self.__dict__.items()]
  1694. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1695. def __eq__(self, other):
  1696. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1697. def __ne__(self, other):
  1698. return not (self == other)
  1699. all_structs.append(GetTypeInfo_result)
  1700. GetTypeInfo_result.thrift_spec = (
  1701. (0, TType.STRUCT, 'success', [TGetTypeInfoResp, None], None, ), # 0
  1702. )
  1703. class GetCatalogs_args(object):
  1704. """
  1705. Attributes:
  1706. - req
  1707. """
  1708. def __init__(self, req=None,):
  1709. self.req = req
  1710. def read(self, iprot):
  1711. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1712. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1713. return
  1714. iprot.readStructBegin()
  1715. while True:
  1716. (fname, ftype, fid) = iprot.readFieldBegin()
  1717. if ftype == TType.STOP:
  1718. break
  1719. if fid == 1:
  1720. if ftype == TType.STRUCT:
  1721. self.req = TGetCatalogsReq()
  1722. self.req.read(iprot)
  1723. else:
  1724. iprot.skip(ftype)
  1725. else:
  1726. iprot.skip(ftype)
  1727. iprot.readFieldEnd()
  1728. iprot.readStructEnd()
  1729. def write(self, oprot):
  1730. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1731. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1732. return
  1733. oprot.writeStructBegin('GetCatalogs_args')
  1734. if self.req is not None:
  1735. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  1736. self.req.write(oprot)
  1737. oprot.writeFieldEnd()
  1738. oprot.writeFieldStop()
  1739. oprot.writeStructEnd()
  1740. def validate(self):
  1741. return
  1742. def __repr__(self):
  1743. L = ['%s=%r' % (key, value)
  1744. for key, value in self.__dict__.items()]
  1745. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1746. def __eq__(self, other):
  1747. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1748. def __ne__(self, other):
  1749. return not (self == other)
  1750. all_structs.append(GetCatalogs_args)
  1751. GetCatalogs_args.thrift_spec = (
  1752. None, # 0
  1753. (1, TType.STRUCT, 'req', [TGetCatalogsReq, None], None, ), # 1
  1754. )
  1755. class GetCatalogs_result(object):
  1756. """
  1757. Attributes:
  1758. - success
  1759. """
  1760. def __init__(self, success=None,):
  1761. self.success = success
  1762. def read(self, iprot):
  1763. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1764. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1765. return
  1766. iprot.readStructBegin()
  1767. while True:
  1768. (fname, ftype, fid) = iprot.readFieldBegin()
  1769. if ftype == TType.STOP:
  1770. break
  1771. if fid == 0:
  1772. if ftype == TType.STRUCT:
  1773. self.success = TGetCatalogsResp()
  1774. self.success.read(iprot)
  1775. else:
  1776. iprot.skip(ftype)
  1777. else:
  1778. iprot.skip(ftype)
  1779. iprot.readFieldEnd()
  1780. iprot.readStructEnd()
  1781. def write(self, oprot):
  1782. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1783. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1784. return
  1785. oprot.writeStructBegin('GetCatalogs_result')
  1786. if self.success is not None:
  1787. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1788. self.success.write(oprot)
  1789. oprot.writeFieldEnd()
  1790. oprot.writeFieldStop()
  1791. oprot.writeStructEnd()
  1792. def validate(self):
  1793. return
  1794. def __repr__(self):
  1795. L = ['%s=%r' % (key, value)
  1796. for key, value in self.__dict__.items()]
  1797. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1798. def __eq__(self, other):
  1799. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1800. def __ne__(self, other):
  1801. return not (self == other)
  1802. all_structs.append(GetCatalogs_result)
  1803. GetCatalogs_result.thrift_spec = (
  1804. (0, TType.STRUCT, 'success', [TGetCatalogsResp, None], None, ), # 0
  1805. )
  1806. class GetSchemas_args(object):
  1807. """
  1808. Attributes:
  1809. - req
  1810. """
  1811. def __init__(self, req=None,):
  1812. self.req = req
  1813. def read(self, iprot):
  1814. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1815. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1816. return
  1817. iprot.readStructBegin()
  1818. while True:
  1819. (fname, ftype, fid) = iprot.readFieldBegin()
  1820. if ftype == TType.STOP:
  1821. break
  1822. if fid == 1:
  1823. if ftype == TType.STRUCT:
  1824. self.req = TGetSchemasReq()
  1825. self.req.read(iprot)
  1826. else:
  1827. iprot.skip(ftype)
  1828. else:
  1829. iprot.skip(ftype)
  1830. iprot.readFieldEnd()
  1831. iprot.readStructEnd()
  1832. def write(self, oprot):
  1833. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1834. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1835. return
  1836. oprot.writeStructBegin('GetSchemas_args')
  1837. if self.req is not None:
  1838. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  1839. self.req.write(oprot)
  1840. oprot.writeFieldEnd()
  1841. oprot.writeFieldStop()
  1842. oprot.writeStructEnd()
  1843. def validate(self):
  1844. return
  1845. def __repr__(self):
  1846. L = ['%s=%r' % (key, value)
  1847. for key, value in self.__dict__.items()]
  1848. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1849. def __eq__(self, other):
  1850. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1851. def __ne__(self, other):
  1852. return not (self == other)
  1853. all_structs.append(GetSchemas_args)
  1854. GetSchemas_args.thrift_spec = (
  1855. None, # 0
  1856. (1, TType.STRUCT, 'req', [TGetSchemasReq, None], None, ), # 1
  1857. )
  1858. class GetSchemas_result(object):
  1859. """
  1860. Attributes:
  1861. - success
  1862. """
  1863. def __init__(self, success=None,):
  1864. self.success = success
  1865. def read(self, iprot):
  1866. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1867. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1868. return
  1869. iprot.readStructBegin()
  1870. while True:
  1871. (fname, ftype, fid) = iprot.readFieldBegin()
  1872. if ftype == TType.STOP:
  1873. break
  1874. if fid == 0:
  1875. if ftype == TType.STRUCT:
  1876. self.success = TGetSchemasResp()
  1877. self.success.read(iprot)
  1878. else:
  1879. iprot.skip(ftype)
  1880. else:
  1881. iprot.skip(ftype)
  1882. iprot.readFieldEnd()
  1883. iprot.readStructEnd()
  1884. def write(self, oprot):
  1885. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1886. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1887. return
  1888. oprot.writeStructBegin('GetSchemas_result')
  1889. if self.success is not None:
  1890. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1891. self.success.write(oprot)
  1892. oprot.writeFieldEnd()
  1893. oprot.writeFieldStop()
  1894. oprot.writeStructEnd()
  1895. def validate(self):
  1896. return
  1897. def __repr__(self):
  1898. L = ['%s=%r' % (key, value)
  1899. for key, value in self.__dict__.items()]
  1900. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1901. def __eq__(self, other):
  1902. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1903. def __ne__(self, other):
  1904. return not (self == other)
  1905. all_structs.append(GetSchemas_result)
  1906. GetSchemas_result.thrift_spec = (
  1907. (0, TType.STRUCT, 'success', [TGetSchemasResp, None], None, ), # 0
  1908. )
  1909. class GetTables_args(object):
  1910. """
  1911. Attributes:
  1912. - req
  1913. """
  1914. def __init__(self, req=None,):
  1915. self.req = req
  1916. def read(self, iprot):
  1917. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1918. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1919. return
  1920. iprot.readStructBegin()
  1921. while True:
  1922. (fname, ftype, fid) = iprot.readFieldBegin()
  1923. if ftype == TType.STOP:
  1924. break
  1925. if fid == 1:
  1926. if ftype == TType.STRUCT:
  1927. self.req = TGetTablesReq()
  1928. self.req.read(iprot)
  1929. else:
  1930. iprot.skip(ftype)
  1931. else:
  1932. iprot.skip(ftype)
  1933. iprot.readFieldEnd()
  1934. iprot.readStructEnd()
  1935. def write(self, oprot):
  1936. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1937. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1938. return
  1939. oprot.writeStructBegin('GetTables_args')
  1940. if self.req is not None:
  1941. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  1942. self.req.write(oprot)
  1943. oprot.writeFieldEnd()
  1944. oprot.writeFieldStop()
  1945. oprot.writeStructEnd()
  1946. def validate(self):
  1947. return
  1948. def __repr__(self):
  1949. L = ['%s=%r' % (key, value)
  1950. for key, value in self.__dict__.items()]
  1951. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1952. def __eq__(self, other):
  1953. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1954. def __ne__(self, other):
  1955. return not (self == other)
  1956. all_structs.append(GetTables_args)
  1957. GetTables_args.thrift_spec = (
  1958. None, # 0
  1959. (1, TType.STRUCT, 'req', [TGetTablesReq, None], None, ), # 1
  1960. )
  1961. class GetTables_result(object):
  1962. """
  1963. Attributes:
  1964. - success
  1965. """
  1966. def __init__(self, success=None,):
  1967. self.success = success
  1968. def read(self, iprot):
  1969. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  1970. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  1971. return
  1972. iprot.readStructBegin()
  1973. while True:
  1974. (fname, ftype, fid) = iprot.readFieldBegin()
  1975. if ftype == TType.STOP:
  1976. break
  1977. if fid == 0:
  1978. if ftype == TType.STRUCT:
  1979. self.success = TGetTablesResp()
  1980. self.success.read(iprot)
  1981. else:
  1982. iprot.skip(ftype)
  1983. else:
  1984. iprot.skip(ftype)
  1985. iprot.readFieldEnd()
  1986. iprot.readStructEnd()
  1987. def write(self, oprot):
  1988. if oprot._fast_encode is not None and self.thrift_spec is not None:
  1989. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  1990. return
  1991. oprot.writeStructBegin('GetTables_result')
  1992. if self.success is not None:
  1993. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1994. self.success.write(oprot)
  1995. oprot.writeFieldEnd()
  1996. oprot.writeFieldStop()
  1997. oprot.writeStructEnd()
  1998. def validate(self):
  1999. return
  2000. def __repr__(self):
  2001. L = ['%s=%r' % (key, value)
  2002. for key, value in self.__dict__.items()]
  2003. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2004. def __eq__(self, other):
  2005. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2006. def __ne__(self, other):
  2007. return not (self == other)
  2008. all_structs.append(GetTables_result)
  2009. GetTables_result.thrift_spec = (
  2010. (0, TType.STRUCT, 'success', [TGetTablesResp, None], None, ), # 0
  2011. )
  2012. class GetTableTypes_args(object):
  2013. """
  2014. Attributes:
  2015. - req
  2016. """
  2017. def __init__(self, req=None,):
  2018. self.req = req
  2019. def read(self, iprot):
  2020. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2021. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2022. return
  2023. iprot.readStructBegin()
  2024. while True:
  2025. (fname, ftype, fid) = iprot.readFieldBegin()
  2026. if ftype == TType.STOP:
  2027. break
  2028. if fid == 1:
  2029. if ftype == TType.STRUCT:
  2030. self.req = TGetTableTypesReq()
  2031. self.req.read(iprot)
  2032. else:
  2033. iprot.skip(ftype)
  2034. else:
  2035. iprot.skip(ftype)
  2036. iprot.readFieldEnd()
  2037. iprot.readStructEnd()
  2038. def write(self, oprot):
  2039. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2040. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2041. return
  2042. oprot.writeStructBegin('GetTableTypes_args')
  2043. if self.req is not None:
  2044. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  2045. self.req.write(oprot)
  2046. oprot.writeFieldEnd()
  2047. oprot.writeFieldStop()
  2048. oprot.writeStructEnd()
  2049. def validate(self):
  2050. return
  2051. def __repr__(self):
  2052. L = ['%s=%r' % (key, value)
  2053. for key, value in self.__dict__.items()]
  2054. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2055. def __eq__(self, other):
  2056. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2057. def __ne__(self, other):
  2058. return not (self == other)
  2059. all_structs.append(GetTableTypes_args)
  2060. GetTableTypes_args.thrift_spec = (
  2061. None, # 0
  2062. (1, TType.STRUCT, 'req', [TGetTableTypesReq, None], None, ), # 1
  2063. )
  2064. class GetTableTypes_result(object):
  2065. """
  2066. Attributes:
  2067. - success
  2068. """
  2069. def __init__(self, success=None,):
  2070. self.success = success
  2071. def read(self, iprot):
  2072. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2073. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2074. return
  2075. iprot.readStructBegin()
  2076. while True:
  2077. (fname, ftype, fid) = iprot.readFieldBegin()
  2078. if ftype == TType.STOP:
  2079. break
  2080. if fid == 0:
  2081. if ftype == TType.STRUCT:
  2082. self.success = TGetTableTypesResp()
  2083. self.success.read(iprot)
  2084. else:
  2085. iprot.skip(ftype)
  2086. else:
  2087. iprot.skip(ftype)
  2088. iprot.readFieldEnd()
  2089. iprot.readStructEnd()
  2090. def write(self, oprot):
  2091. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2092. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2093. return
  2094. oprot.writeStructBegin('GetTableTypes_result')
  2095. if self.success is not None:
  2096. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  2097. self.success.write(oprot)
  2098. oprot.writeFieldEnd()
  2099. oprot.writeFieldStop()
  2100. oprot.writeStructEnd()
  2101. def validate(self):
  2102. return
  2103. def __repr__(self):
  2104. L = ['%s=%r' % (key, value)
  2105. for key, value in self.__dict__.items()]
  2106. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2107. def __eq__(self, other):
  2108. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2109. def __ne__(self, other):
  2110. return not (self == other)
  2111. all_structs.append(GetTableTypes_result)
  2112. GetTableTypes_result.thrift_spec = (
  2113. (0, TType.STRUCT, 'success', [TGetTableTypesResp, None], None, ), # 0
  2114. )
  2115. class GetColumns_args(object):
  2116. """
  2117. Attributes:
  2118. - req
  2119. """
  2120. def __init__(self, req=None,):
  2121. self.req = req
  2122. def read(self, iprot):
  2123. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2124. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2125. return
  2126. iprot.readStructBegin()
  2127. while True:
  2128. (fname, ftype, fid) = iprot.readFieldBegin()
  2129. if ftype == TType.STOP:
  2130. break
  2131. if fid == 1:
  2132. if ftype == TType.STRUCT:
  2133. self.req = TGetColumnsReq()
  2134. self.req.read(iprot)
  2135. else:
  2136. iprot.skip(ftype)
  2137. else:
  2138. iprot.skip(ftype)
  2139. iprot.readFieldEnd()
  2140. iprot.readStructEnd()
  2141. def write(self, oprot):
  2142. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2143. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2144. return
  2145. oprot.writeStructBegin('GetColumns_args')
  2146. if self.req is not None:
  2147. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  2148. self.req.write(oprot)
  2149. oprot.writeFieldEnd()
  2150. oprot.writeFieldStop()
  2151. oprot.writeStructEnd()
  2152. def validate(self):
  2153. return
  2154. def __repr__(self):
  2155. L = ['%s=%r' % (key, value)
  2156. for key, value in self.__dict__.items()]
  2157. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2158. def __eq__(self, other):
  2159. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2160. def __ne__(self, other):
  2161. return not (self == other)
  2162. all_structs.append(GetColumns_args)
  2163. GetColumns_args.thrift_spec = (
  2164. None, # 0
  2165. (1, TType.STRUCT, 'req', [TGetColumnsReq, None], None, ), # 1
  2166. )
  2167. class GetColumns_result(object):
  2168. """
  2169. Attributes:
  2170. - success
  2171. """
  2172. def __init__(self, success=None,):
  2173. self.success = success
  2174. def read(self, iprot):
  2175. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2176. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2177. return
  2178. iprot.readStructBegin()
  2179. while True:
  2180. (fname, ftype, fid) = iprot.readFieldBegin()
  2181. if ftype == TType.STOP:
  2182. break
  2183. if fid == 0:
  2184. if ftype == TType.STRUCT:
  2185. self.success = TGetColumnsResp()
  2186. self.success.read(iprot)
  2187. else:
  2188. iprot.skip(ftype)
  2189. else:
  2190. iprot.skip(ftype)
  2191. iprot.readFieldEnd()
  2192. iprot.readStructEnd()
  2193. def write(self, oprot):
  2194. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2195. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2196. return
  2197. oprot.writeStructBegin('GetColumns_result')
  2198. if self.success is not None:
  2199. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  2200. self.success.write(oprot)
  2201. oprot.writeFieldEnd()
  2202. oprot.writeFieldStop()
  2203. oprot.writeStructEnd()
  2204. def validate(self):
  2205. return
  2206. def __repr__(self):
  2207. L = ['%s=%r' % (key, value)
  2208. for key, value in self.__dict__.items()]
  2209. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2210. def __eq__(self, other):
  2211. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2212. def __ne__(self, other):
  2213. return not (self == other)
  2214. all_structs.append(GetColumns_result)
  2215. GetColumns_result.thrift_spec = (
  2216. (0, TType.STRUCT, 'success', [TGetColumnsResp, None], None, ), # 0
  2217. )
  2218. class GetFunctions_args(object):
  2219. """
  2220. Attributes:
  2221. - req
  2222. """
  2223. def __init__(self, req=None,):
  2224. self.req = req
  2225. def read(self, iprot):
  2226. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2227. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2228. return
  2229. iprot.readStructBegin()
  2230. while True:
  2231. (fname, ftype, fid) = iprot.readFieldBegin()
  2232. if ftype == TType.STOP:
  2233. break
  2234. if fid == 1:
  2235. if ftype == TType.STRUCT:
  2236. self.req = TGetFunctionsReq()
  2237. self.req.read(iprot)
  2238. else:
  2239. iprot.skip(ftype)
  2240. else:
  2241. iprot.skip(ftype)
  2242. iprot.readFieldEnd()
  2243. iprot.readStructEnd()
  2244. def write(self, oprot):
  2245. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2246. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2247. return
  2248. oprot.writeStructBegin('GetFunctions_args')
  2249. if self.req is not None:
  2250. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  2251. self.req.write(oprot)
  2252. oprot.writeFieldEnd()
  2253. oprot.writeFieldStop()
  2254. oprot.writeStructEnd()
  2255. def validate(self):
  2256. return
  2257. def __repr__(self):
  2258. L = ['%s=%r' % (key, value)
  2259. for key, value in self.__dict__.items()]
  2260. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2261. def __eq__(self, other):
  2262. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2263. def __ne__(self, other):
  2264. return not (self == other)
  2265. all_structs.append(GetFunctions_args)
  2266. GetFunctions_args.thrift_spec = (
  2267. None, # 0
  2268. (1, TType.STRUCT, 'req', [TGetFunctionsReq, None], None, ), # 1
  2269. )
  2270. class GetFunctions_result(object):
  2271. """
  2272. Attributes:
  2273. - success
  2274. """
  2275. def __init__(self, success=None,):
  2276. self.success = success
  2277. def read(self, iprot):
  2278. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2279. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2280. return
  2281. iprot.readStructBegin()
  2282. while True:
  2283. (fname, ftype, fid) = iprot.readFieldBegin()
  2284. if ftype == TType.STOP:
  2285. break
  2286. if fid == 0:
  2287. if ftype == TType.STRUCT:
  2288. self.success = TGetFunctionsResp()
  2289. self.success.read(iprot)
  2290. else:
  2291. iprot.skip(ftype)
  2292. else:
  2293. iprot.skip(ftype)
  2294. iprot.readFieldEnd()
  2295. iprot.readStructEnd()
  2296. def write(self, oprot):
  2297. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2298. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2299. return
  2300. oprot.writeStructBegin('GetFunctions_result')
  2301. if self.success is not None:
  2302. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  2303. self.success.write(oprot)
  2304. oprot.writeFieldEnd()
  2305. oprot.writeFieldStop()
  2306. oprot.writeStructEnd()
  2307. def validate(self):
  2308. return
  2309. def __repr__(self):
  2310. L = ['%s=%r' % (key, value)
  2311. for key, value in self.__dict__.items()]
  2312. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2313. def __eq__(self, other):
  2314. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2315. def __ne__(self, other):
  2316. return not (self == other)
  2317. all_structs.append(GetFunctions_result)
  2318. GetFunctions_result.thrift_spec = (
  2319. (0, TType.STRUCT, 'success', [TGetFunctionsResp, None], None, ), # 0
  2320. )
  2321. class GetOperationStatus_args(object):
  2322. """
  2323. Attributes:
  2324. - req
  2325. """
  2326. def __init__(self, req=None,):
  2327. self.req = req
  2328. def read(self, iprot):
  2329. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2330. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2331. return
  2332. iprot.readStructBegin()
  2333. while True:
  2334. (fname, ftype, fid) = iprot.readFieldBegin()
  2335. if ftype == TType.STOP:
  2336. break
  2337. if fid == 1:
  2338. if ftype == TType.STRUCT:
  2339. self.req = TGetOperationStatusReq()
  2340. self.req.read(iprot)
  2341. else:
  2342. iprot.skip(ftype)
  2343. else:
  2344. iprot.skip(ftype)
  2345. iprot.readFieldEnd()
  2346. iprot.readStructEnd()
  2347. def write(self, oprot):
  2348. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2349. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2350. return
  2351. oprot.writeStructBegin('GetOperationStatus_args')
  2352. if self.req is not None:
  2353. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  2354. self.req.write(oprot)
  2355. oprot.writeFieldEnd()
  2356. oprot.writeFieldStop()
  2357. oprot.writeStructEnd()
  2358. def validate(self):
  2359. return
  2360. def __repr__(self):
  2361. L = ['%s=%r' % (key, value)
  2362. for key, value in self.__dict__.items()]
  2363. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2364. def __eq__(self, other):
  2365. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2366. def __ne__(self, other):
  2367. return not (self == other)
  2368. all_structs.append(GetOperationStatus_args)
  2369. GetOperationStatus_args.thrift_spec = (
  2370. None, # 0
  2371. (1, TType.STRUCT, 'req', [TGetOperationStatusReq, None], None, ), # 1
  2372. )
  2373. class GetOperationStatus_result(object):
  2374. """
  2375. Attributes:
  2376. - success
  2377. """
  2378. def __init__(self, success=None,):
  2379. self.success = success
  2380. def read(self, iprot):
  2381. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2382. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2383. return
  2384. iprot.readStructBegin()
  2385. while True:
  2386. (fname, ftype, fid) = iprot.readFieldBegin()
  2387. if ftype == TType.STOP:
  2388. break
  2389. if fid == 0:
  2390. if ftype == TType.STRUCT:
  2391. self.success = TGetOperationStatusResp()
  2392. self.success.read(iprot)
  2393. else:
  2394. iprot.skip(ftype)
  2395. else:
  2396. iprot.skip(ftype)
  2397. iprot.readFieldEnd()
  2398. iprot.readStructEnd()
  2399. def write(self, oprot):
  2400. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2401. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2402. return
  2403. oprot.writeStructBegin('GetOperationStatus_result')
  2404. if self.success is not None:
  2405. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  2406. self.success.write(oprot)
  2407. oprot.writeFieldEnd()
  2408. oprot.writeFieldStop()
  2409. oprot.writeStructEnd()
  2410. def validate(self):
  2411. return
  2412. def __repr__(self):
  2413. L = ['%s=%r' % (key, value)
  2414. for key, value in self.__dict__.items()]
  2415. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2416. def __eq__(self, other):
  2417. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2418. def __ne__(self, other):
  2419. return not (self == other)
  2420. all_structs.append(GetOperationStatus_result)
  2421. GetOperationStatus_result.thrift_spec = (
  2422. (0, TType.STRUCT, 'success', [TGetOperationStatusResp, None], None, ), # 0
  2423. )
  2424. class CancelOperation_args(object):
  2425. """
  2426. Attributes:
  2427. - req
  2428. """
  2429. def __init__(self, req=None,):
  2430. self.req = req
  2431. def read(self, iprot):
  2432. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2433. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2434. return
  2435. iprot.readStructBegin()
  2436. while True:
  2437. (fname, ftype, fid) = iprot.readFieldBegin()
  2438. if ftype == TType.STOP:
  2439. break
  2440. if fid == 1:
  2441. if ftype == TType.STRUCT:
  2442. self.req = TCancelOperationReq()
  2443. self.req.read(iprot)
  2444. else:
  2445. iprot.skip(ftype)
  2446. else:
  2447. iprot.skip(ftype)
  2448. iprot.readFieldEnd()
  2449. iprot.readStructEnd()
  2450. def write(self, oprot):
  2451. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2452. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2453. return
  2454. oprot.writeStructBegin('CancelOperation_args')
  2455. if self.req is not None:
  2456. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  2457. self.req.write(oprot)
  2458. oprot.writeFieldEnd()
  2459. oprot.writeFieldStop()
  2460. oprot.writeStructEnd()
  2461. def validate(self):
  2462. return
  2463. def __repr__(self):
  2464. L = ['%s=%r' % (key, value)
  2465. for key, value in self.__dict__.items()]
  2466. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2467. def __eq__(self, other):
  2468. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2469. def __ne__(self, other):
  2470. return not (self == other)
  2471. all_structs.append(CancelOperation_args)
  2472. CancelOperation_args.thrift_spec = (
  2473. None, # 0
  2474. (1, TType.STRUCT, 'req', [TCancelOperationReq, None], None, ), # 1
  2475. )
  2476. class CancelOperation_result(object):
  2477. """
  2478. Attributes:
  2479. - success
  2480. """
  2481. def __init__(self, success=None,):
  2482. self.success = success
  2483. def read(self, iprot):
  2484. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2485. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2486. return
  2487. iprot.readStructBegin()
  2488. while True:
  2489. (fname, ftype, fid) = iprot.readFieldBegin()
  2490. if ftype == TType.STOP:
  2491. break
  2492. if fid == 0:
  2493. if ftype == TType.STRUCT:
  2494. self.success = TCancelOperationResp()
  2495. self.success.read(iprot)
  2496. else:
  2497. iprot.skip(ftype)
  2498. else:
  2499. iprot.skip(ftype)
  2500. iprot.readFieldEnd()
  2501. iprot.readStructEnd()
  2502. def write(self, oprot):
  2503. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2504. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2505. return
  2506. oprot.writeStructBegin('CancelOperation_result')
  2507. if self.success is not None:
  2508. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  2509. self.success.write(oprot)
  2510. oprot.writeFieldEnd()
  2511. oprot.writeFieldStop()
  2512. oprot.writeStructEnd()
  2513. def validate(self):
  2514. return
  2515. def __repr__(self):
  2516. L = ['%s=%r' % (key, value)
  2517. for key, value in self.__dict__.items()]
  2518. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2519. def __eq__(self, other):
  2520. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2521. def __ne__(self, other):
  2522. return not (self == other)
  2523. all_structs.append(CancelOperation_result)
  2524. CancelOperation_result.thrift_spec = (
  2525. (0, TType.STRUCT, 'success', [TCancelOperationResp, None], None, ), # 0
  2526. )
  2527. class CloseOperation_args(object):
  2528. """
  2529. Attributes:
  2530. - req
  2531. """
  2532. def __init__(self, req=None,):
  2533. self.req = req
  2534. def read(self, iprot):
  2535. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2536. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2537. return
  2538. iprot.readStructBegin()
  2539. while True:
  2540. (fname, ftype, fid) = iprot.readFieldBegin()
  2541. if ftype == TType.STOP:
  2542. break
  2543. if fid == 1:
  2544. if ftype == TType.STRUCT:
  2545. self.req = TCloseOperationReq()
  2546. self.req.read(iprot)
  2547. else:
  2548. iprot.skip(ftype)
  2549. else:
  2550. iprot.skip(ftype)
  2551. iprot.readFieldEnd()
  2552. iprot.readStructEnd()
  2553. def write(self, oprot):
  2554. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2555. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2556. return
  2557. oprot.writeStructBegin('CloseOperation_args')
  2558. if self.req is not None:
  2559. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  2560. self.req.write(oprot)
  2561. oprot.writeFieldEnd()
  2562. oprot.writeFieldStop()
  2563. oprot.writeStructEnd()
  2564. def validate(self):
  2565. return
  2566. def __repr__(self):
  2567. L = ['%s=%r' % (key, value)
  2568. for key, value in self.__dict__.items()]
  2569. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2570. def __eq__(self, other):
  2571. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2572. def __ne__(self, other):
  2573. return not (self == other)
  2574. all_structs.append(CloseOperation_args)
  2575. CloseOperation_args.thrift_spec = (
  2576. None, # 0
  2577. (1, TType.STRUCT, 'req', [TCloseOperationReq, None], None, ), # 1
  2578. )
  2579. class CloseOperation_result(object):
  2580. """
  2581. Attributes:
  2582. - success
  2583. """
  2584. def __init__(self, success=None,):
  2585. self.success = success
  2586. def read(self, iprot):
  2587. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2588. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2589. return
  2590. iprot.readStructBegin()
  2591. while True:
  2592. (fname, ftype, fid) = iprot.readFieldBegin()
  2593. if ftype == TType.STOP:
  2594. break
  2595. if fid == 0:
  2596. if ftype == TType.STRUCT:
  2597. self.success = TCloseOperationResp()
  2598. self.success.read(iprot)
  2599. else:
  2600. iprot.skip(ftype)
  2601. else:
  2602. iprot.skip(ftype)
  2603. iprot.readFieldEnd()
  2604. iprot.readStructEnd()
  2605. def write(self, oprot):
  2606. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2607. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2608. return
  2609. oprot.writeStructBegin('CloseOperation_result')
  2610. if self.success is not None:
  2611. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  2612. self.success.write(oprot)
  2613. oprot.writeFieldEnd()
  2614. oprot.writeFieldStop()
  2615. oprot.writeStructEnd()
  2616. def validate(self):
  2617. return
  2618. def __repr__(self):
  2619. L = ['%s=%r' % (key, value)
  2620. for key, value in self.__dict__.items()]
  2621. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2622. def __eq__(self, other):
  2623. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2624. def __ne__(self, other):
  2625. return not (self == other)
  2626. all_structs.append(CloseOperation_result)
  2627. CloseOperation_result.thrift_spec = (
  2628. (0, TType.STRUCT, 'success', [TCloseOperationResp, None], None, ), # 0
  2629. )
  2630. class GetResultSetMetadata_args(object):
  2631. """
  2632. Attributes:
  2633. - req
  2634. """
  2635. def __init__(self, req=None,):
  2636. self.req = req
  2637. def read(self, iprot):
  2638. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2639. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2640. return
  2641. iprot.readStructBegin()
  2642. while True:
  2643. (fname, ftype, fid) = iprot.readFieldBegin()
  2644. if ftype == TType.STOP:
  2645. break
  2646. if fid == 1:
  2647. if ftype == TType.STRUCT:
  2648. self.req = TGetResultSetMetadataReq()
  2649. self.req.read(iprot)
  2650. else:
  2651. iprot.skip(ftype)
  2652. else:
  2653. iprot.skip(ftype)
  2654. iprot.readFieldEnd()
  2655. iprot.readStructEnd()
  2656. def write(self, oprot):
  2657. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2658. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2659. return
  2660. oprot.writeStructBegin('GetResultSetMetadata_args')
  2661. if self.req is not None:
  2662. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  2663. self.req.write(oprot)
  2664. oprot.writeFieldEnd()
  2665. oprot.writeFieldStop()
  2666. oprot.writeStructEnd()
  2667. def validate(self):
  2668. return
  2669. def __repr__(self):
  2670. L = ['%s=%r' % (key, value)
  2671. for key, value in self.__dict__.items()]
  2672. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2673. def __eq__(self, other):
  2674. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2675. def __ne__(self, other):
  2676. return not (self == other)
  2677. all_structs.append(GetResultSetMetadata_args)
  2678. GetResultSetMetadata_args.thrift_spec = (
  2679. None, # 0
  2680. (1, TType.STRUCT, 'req', [TGetResultSetMetadataReq, None], None, ), # 1
  2681. )
  2682. class GetResultSetMetadata_result(object):
  2683. """
  2684. Attributes:
  2685. - success
  2686. """
  2687. def __init__(self, success=None,):
  2688. self.success = success
  2689. def read(self, iprot):
  2690. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2691. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2692. return
  2693. iprot.readStructBegin()
  2694. while True:
  2695. (fname, ftype, fid) = iprot.readFieldBegin()
  2696. if ftype == TType.STOP:
  2697. break
  2698. if fid == 0:
  2699. if ftype == TType.STRUCT:
  2700. self.success = TGetResultSetMetadataResp()
  2701. self.success.read(iprot)
  2702. else:
  2703. iprot.skip(ftype)
  2704. else:
  2705. iprot.skip(ftype)
  2706. iprot.readFieldEnd()
  2707. iprot.readStructEnd()
  2708. def write(self, oprot):
  2709. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2710. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2711. return
  2712. oprot.writeStructBegin('GetResultSetMetadata_result')
  2713. if self.success is not None:
  2714. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  2715. self.success.write(oprot)
  2716. oprot.writeFieldEnd()
  2717. oprot.writeFieldStop()
  2718. oprot.writeStructEnd()
  2719. def validate(self):
  2720. return
  2721. def __repr__(self):
  2722. L = ['%s=%r' % (key, value)
  2723. for key, value in self.__dict__.items()]
  2724. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2725. def __eq__(self, other):
  2726. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2727. def __ne__(self, other):
  2728. return not (self == other)
  2729. all_structs.append(GetResultSetMetadata_result)
  2730. GetResultSetMetadata_result.thrift_spec = (
  2731. (0, TType.STRUCT, 'success', [TGetResultSetMetadataResp, None], None, ), # 0
  2732. )
  2733. class FetchResults_args(object):
  2734. """
  2735. Attributes:
  2736. - req
  2737. """
  2738. def __init__(self, req=None,):
  2739. self.req = req
  2740. def read(self, iprot):
  2741. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2742. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2743. return
  2744. iprot.readStructBegin()
  2745. while True:
  2746. (fname, ftype, fid) = iprot.readFieldBegin()
  2747. if ftype == TType.STOP:
  2748. break
  2749. if fid == 1:
  2750. if ftype == TType.STRUCT:
  2751. self.req = TFetchResultsReq()
  2752. self.req.read(iprot)
  2753. else:
  2754. iprot.skip(ftype)
  2755. else:
  2756. iprot.skip(ftype)
  2757. iprot.readFieldEnd()
  2758. iprot.readStructEnd()
  2759. def write(self, oprot):
  2760. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2761. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2762. return
  2763. oprot.writeStructBegin('FetchResults_args')
  2764. if self.req is not None:
  2765. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  2766. self.req.write(oprot)
  2767. oprot.writeFieldEnd()
  2768. oprot.writeFieldStop()
  2769. oprot.writeStructEnd()
  2770. def validate(self):
  2771. return
  2772. def __repr__(self):
  2773. L = ['%s=%r' % (key, value)
  2774. for key, value in self.__dict__.items()]
  2775. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2776. def __eq__(self, other):
  2777. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2778. def __ne__(self, other):
  2779. return not (self == other)
  2780. all_structs.append(FetchResults_args)
  2781. FetchResults_args.thrift_spec = (
  2782. None, # 0
  2783. (1, TType.STRUCT, 'req', [TFetchResultsReq, None], None, ), # 1
  2784. )
  2785. class FetchResults_result(object):
  2786. """
  2787. Attributes:
  2788. - success
  2789. """
  2790. def __init__(self, success=None,):
  2791. self.success = success
  2792. def read(self, iprot):
  2793. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2794. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2795. return
  2796. iprot.readStructBegin()
  2797. while True:
  2798. (fname, ftype, fid) = iprot.readFieldBegin()
  2799. if ftype == TType.STOP:
  2800. break
  2801. if fid == 0:
  2802. if ftype == TType.STRUCT:
  2803. self.success = TFetchResultsResp()
  2804. self.success.read(iprot)
  2805. else:
  2806. iprot.skip(ftype)
  2807. else:
  2808. iprot.skip(ftype)
  2809. iprot.readFieldEnd()
  2810. iprot.readStructEnd()
  2811. def write(self, oprot):
  2812. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2813. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2814. return
  2815. oprot.writeStructBegin('FetchResults_result')
  2816. if self.success is not None:
  2817. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  2818. self.success.write(oprot)
  2819. oprot.writeFieldEnd()
  2820. oprot.writeFieldStop()
  2821. oprot.writeStructEnd()
  2822. def validate(self):
  2823. return
  2824. def __repr__(self):
  2825. L = ['%s=%r' % (key, value)
  2826. for key, value in self.__dict__.items()]
  2827. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2828. def __eq__(self, other):
  2829. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2830. def __ne__(self, other):
  2831. return not (self == other)
  2832. all_structs.append(FetchResults_result)
  2833. FetchResults_result.thrift_spec = (
  2834. (0, TType.STRUCT, 'success', [TFetchResultsResp, None], None, ), # 0
  2835. )
  2836. class GetDelegationToken_args(object):
  2837. """
  2838. Attributes:
  2839. - req
  2840. """
  2841. def __init__(self, req=None,):
  2842. self.req = req
  2843. def read(self, iprot):
  2844. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2845. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2846. return
  2847. iprot.readStructBegin()
  2848. while True:
  2849. (fname, ftype, fid) = iprot.readFieldBegin()
  2850. if ftype == TType.STOP:
  2851. break
  2852. if fid == 1:
  2853. if ftype == TType.STRUCT:
  2854. self.req = TGetDelegationTokenReq()
  2855. self.req.read(iprot)
  2856. else:
  2857. iprot.skip(ftype)
  2858. else:
  2859. iprot.skip(ftype)
  2860. iprot.readFieldEnd()
  2861. iprot.readStructEnd()
  2862. def write(self, oprot):
  2863. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2864. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2865. return
  2866. oprot.writeStructBegin('GetDelegationToken_args')
  2867. if self.req is not None:
  2868. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  2869. self.req.write(oprot)
  2870. oprot.writeFieldEnd()
  2871. oprot.writeFieldStop()
  2872. oprot.writeStructEnd()
  2873. def validate(self):
  2874. return
  2875. def __repr__(self):
  2876. L = ['%s=%r' % (key, value)
  2877. for key, value in self.__dict__.items()]
  2878. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2879. def __eq__(self, other):
  2880. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2881. def __ne__(self, other):
  2882. return not (self == other)
  2883. all_structs.append(GetDelegationToken_args)
  2884. GetDelegationToken_args.thrift_spec = (
  2885. None, # 0
  2886. (1, TType.STRUCT, 'req', [TGetDelegationTokenReq, None], None, ), # 1
  2887. )
  2888. class GetDelegationToken_result(object):
  2889. """
  2890. Attributes:
  2891. - success
  2892. """
  2893. def __init__(self, success=None,):
  2894. self.success = success
  2895. def read(self, iprot):
  2896. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2897. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2898. return
  2899. iprot.readStructBegin()
  2900. while True:
  2901. (fname, ftype, fid) = iprot.readFieldBegin()
  2902. if ftype == TType.STOP:
  2903. break
  2904. if fid == 0:
  2905. if ftype == TType.STRUCT:
  2906. self.success = TGetDelegationTokenResp()
  2907. self.success.read(iprot)
  2908. else:
  2909. iprot.skip(ftype)
  2910. else:
  2911. iprot.skip(ftype)
  2912. iprot.readFieldEnd()
  2913. iprot.readStructEnd()
  2914. def write(self, oprot):
  2915. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2916. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2917. return
  2918. oprot.writeStructBegin('GetDelegationToken_result')
  2919. if self.success is not None:
  2920. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  2921. self.success.write(oprot)
  2922. oprot.writeFieldEnd()
  2923. oprot.writeFieldStop()
  2924. oprot.writeStructEnd()
  2925. def validate(self):
  2926. return
  2927. def __repr__(self):
  2928. L = ['%s=%r' % (key, value)
  2929. for key, value in self.__dict__.items()]
  2930. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2931. def __eq__(self, other):
  2932. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2933. def __ne__(self, other):
  2934. return not (self == other)
  2935. all_structs.append(GetDelegationToken_result)
  2936. GetDelegationToken_result.thrift_spec = (
  2937. (0, TType.STRUCT, 'success', [TGetDelegationTokenResp, None], None, ), # 0
  2938. )
  2939. class CancelDelegationToken_args(object):
  2940. """
  2941. Attributes:
  2942. - req
  2943. """
  2944. def __init__(self, req=None,):
  2945. self.req = req
  2946. def read(self, iprot):
  2947. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  2948. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  2949. return
  2950. iprot.readStructBegin()
  2951. while True:
  2952. (fname, ftype, fid) = iprot.readFieldBegin()
  2953. if ftype == TType.STOP:
  2954. break
  2955. if fid == 1:
  2956. if ftype == TType.STRUCT:
  2957. self.req = TCancelDelegationTokenReq()
  2958. self.req.read(iprot)
  2959. else:
  2960. iprot.skip(ftype)
  2961. else:
  2962. iprot.skip(ftype)
  2963. iprot.readFieldEnd()
  2964. iprot.readStructEnd()
  2965. def write(self, oprot):
  2966. if oprot._fast_encode is not None and self.thrift_spec is not None:
  2967. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  2968. return
  2969. oprot.writeStructBegin('CancelDelegationToken_args')
  2970. if self.req is not None:
  2971. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  2972. self.req.write(oprot)
  2973. oprot.writeFieldEnd()
  2974. oprot.writeFieldStop()
  2975. oprot.writeStructEnd()
  2976. def validate(self):
  2977. return
  2978. def __repr__(self):
  2979. L = ['%s=%r' % (key, value)
  2980. for key, value in self.__dict__.items()]
  2981. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2982. def __eq__(self, other):
  2983. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2984. def __ne__(self, other):
  2985. return not (self == other)
  2986. all_structs.append(CancelDelegationToken_args)
  2987. CancelDelegationToken_args.thrift_spec = (
  2988. None, # 0
  2989. (1, TType.STRUCT, 'req', [TCancelDelegationTokenReq, None], None, ), # 1
  2990. )
  2991. class CancelDelegationToken_result(object):
  2992. """
  2993. Attributes:
  2994. - success
  2995. """
  2996. def __init__(self, success=None,):
  2997. self.success = success
  2998. def read(self, iprot):
  2999. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  3000. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  3001. return
  3002. iprot.readStructBegin()
  3003. while True:
  3004. (fname, ftype, fid) = iprot.readFieldBegin()
  3005. if ftype == TType.STOP:
  3006. break
  3007. if fid == 0:
  3008. if ftype == TType.STRUCT:
  3009. self.success = TCancelDelegationTokenResp()
  3010. self.success.read(iprot)
  3011. else:
  3012. iprot.skip(ftype)
  3013. else:
  3014. iprot.skip(ftype)
  3015. iprot.readFieldEnd()
  3016. iprot.readStructEnd()
  3017. def write(self, oprot):
  3018. if oprot._fast_encode is not None and self.thrift_spec is not None:
  3019. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  3020. return
  3021. oprot.writeStructBegin('CancelDelegationToken_result')
  3022. if self.success is not None:
  3023. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3024. self.success.write(oprot)
  3025. oprot.writeFieldEnd()
  3026. oprot.writeFieldStop()
  3027. oprot.writeStructEnd()
  3028. def validate(self):
  3029. return
  3030. def __repr__(self):
  3031. L = ['%s=%r' % (key, value)
  3032. for key, value in self.__dict__.items()]
  3033. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3034. def __eq__(self, other):
  3035. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3036. def __ne__(self, other):
  3037. return not (self == other)
  3038. all_structs.append(CancelDelegationToken_result)
  3039. CancelDelegationToken_result.thrift_spec = (
  3040. (0, TType.STRUCT, 'success', [TCancelDelegationTokenResp, None], None, ), # 0
  3041. )
  3042. class RenewDelegationToken_args(object):
  3043. """
  3044. Attributes:
  3045. - req
  3046. """
  3047. def __init__(self, req=None,):
  3048. self.req = req
  3049. def read(self, iprot):
  3050. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  3051. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  3052. return
  3053. iprot.readStructBegin()
  3054. while True:
  3055. (fname, ftype, fid) = iprot.readFieldBegin()
  3056. if ftype == TType.STOP:
  3057. break
  3058. if fid == 1:
  3059. if ftype == TType.STRUCT:
  3060. self.req = TRenewDelegationTokenReq()
  3061. self.req.read(iprot)
  3062. else:
  3063. iprot.skip(ftype)
  3064. else:
  3065. iprot.skip(ftype)
  3066. iprot.readFieldEnd()
  3067. iprot.readStructEnd()
  3068. def write(self, oprot):
  3069. if oprot._fast_encode is not None and self.thrift_spec is not None:
  3070. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  3071. return
  3072. oprot.writeStructBegin('RenewDelegationToken_args')
  3073. if self.req is not None:
  3074. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  3075. self.req.write(oprot)
  3076. oprot.writeFieldEnd()
  3077. oprot.writeFieldStop()
  3078. oprot.writeStructEnd()
  3079. def validate(self):
  3080. return
  3081. def __repr__(self):
  3082. L = ['%s=%r' % (key, value)
  3083. for key, value in self.__dict__.items()]
  3084. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3085. def __eq__(self, other):
  3086. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3087. def __ne__(self, other):
  3088. return not (self == other)
  3089. all_structs.append(RenewDelegationToken_args)
  3090. RenewDelegationToken_args.thrift_spec = (
  3091. None, # 0
  3092. (1, TType.STRUCT, 'req', [TRenewDelegationTokenReq, None], None, ), # 1
  3093. )
  3094. class RenewDelegationToken_result(object):
  3095. """
  3096. Attributes:
  3097. - success
  3098. """
  3099. def __init__(self, success=None,):
  3100. self.success = success
  3101. def read(self, iprot):
  3102. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  3103. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  3104. return
  3105. iprot.readStructBegin()
  3106. while True:
  3107. (fname, ftype, fid) = iprot.readFieldBegin()
  3108. if ftype == TType.STOP:
  3109. break
  3110. if fid == 0:
  3111. if ftype == TType.STRUCT:
  3112. self.success = TRenewDelegationTokenResp()
  3113. self.success.read(iprot)
  3114. else:
  3115. iprot.skip(ftype)
  3116. else:
  3117. iprot.skip(ftype)
  3118. iprot.readFieldEnd()
  3119. iprot.readStructEnd()
  3120. def write(self, oprot):
  3121. if oprot._fast_encode is not None and self.thrift_spec is not None:
  3122. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  3123. return
  3124. oprot.writeStructBegin('RenewDelegationToken_result')
  3125. if self.success is not None:
  3126. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3127. self.success.write(oprot)
  3128. oprot.writeFieldEnd()
  3129. oprot.writeFieldStop()
  3130. oprot.writeStructEnd()
  3131. def validate(self):
  3132. return
  3133. def __repr__(self):
  3134. L = ['%s=%r' % (key, value)
  3135. for key, value in self.__dict__.items()]
  3136. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3137. def __eq__(self, other):
  3138. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3139. def __ne__(self, other):
  3140. return not (self == other)
  3141. all_structs.append(RenewDelegationToken_result)
  3142. RenewDelegationToken_result.thrift_spec = (
  3143. (0, TType.STRUCT, 'success', [TRenewDelegationTokenResp, None], None, ), # 0
  3144. )
  3145. class GetLog_args(object):
  3146. """
  3147. Attributes:
  3148. - req
  3149. """
  3150. def __init__(self, req=None,):
  3151. self.req = req
  3152. def read(self, iprot):
  3153. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  3154. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  3155. return
  3156. iprot.readStructBegin()
  3157. while True:
  3158. (fname, ftype, fid) = iprot.readFieldBegin()
  3159. if ftype == TType.STOP:
  3160. break
  3161. if fid == 1:
  3162. if ftype == TType.STRUCT:
  3163. self.req = TGetLogReq()
  3164. self.req.read(iprot)
  3165. else:
  3166. iprot.skip(ftype)
  3167. else:
  3168. iprot.skip(ftype)
  3169. iprot.readFieldEnd()
  3170. iprot.readStructEnd()
  3171. def write(self, oprot):
  3172. if oprot._fast_encode is not None and self.thrift_spec is not None:
  3173. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  3174. return
  3175. oprot.writeStructBegin('GetLog_args')
  3176. if self.req is not None:
  3177. oprot.writeFieldBegin('req', TType.STRUCT, 1)
  3178. self.req.write(oprot)
  3179. oprot.writeFieldEnd()
  3180. oprot.writeFieldStop()
  3181. oprot.writeStructEnd()
  3182. def validate(self):
  3183. return
  3184. def __repr__(self):
  3185. L = ['%s=%r' % (key, value)
  3186. for key, value in self.__dict__.items()]
  3187. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3188. def __eq__(self, other):
  3189. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3190. def __ne__(self, other):
  3191. return not (self == other)
  3192. all_structs.append(GetLog_args)
  3193. GetLog_args.thrift_spec = (
  3194. None, # 0
  3195. (1, TType.STRUCT, 'req', [TGetLogReq, None], None, ), # 1
  3196. )
  3197. class GetLog_result(object):
  3198. """
  3199. Attributes:
  3200. - success
  3201. """
  3202. def __init__(self, success=None,):
  3203. self.success = success
  3204. def read(self, iprot):
  3205. if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
  3206. iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
  3207. return
  3208. iprot.readStructBegin()
  3209. while True:
  3210. (fname, ftype, fid) = iprot.readFieldBegin()
  3211. if ftype == TType.STOP:
  3212. break
  3213. if fid == 0:
  3214. if ftype == TType.STRUCT:
  3215. self.success = TGetLogResp()
  3216. self.success.read(iprot)
  3217. else:
  3218. iprot.skip(ftype)
  3219. else:
  3220. iprot.skip(ftype)
  3221. iprot.readFieldEnd()
  3222. iprot.readStructEnd()
  3223. def write(self, oprot):
  3224. if oprot._fast_encode is not None and self.thrift_spec is not None:
  3225. oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
  3226. return
  3227. oprot.writeStructBegin('GetLog_result')
  3228. if self.success is not None:
  3229. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3230. self.success.write(oprot)
  3231. oprot.writeFieldEnd()
  3232. oprot.writeFieldStop()
  3233. oprot.writeStructEnd()
  3234. def validate(self):
  3235. return
  3236. def __repr__(self):
  3237. L = ['%s=%r' % (key, value)
  3238. for key, value in self.__dict__.items()]
  3239. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3240. def __eq__(self, other):
  3241. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3242. def __ne__(self, other):
  3243. return not (self == other)
  3244. all_structs.append(GetLog_result)
  3245. GetLog_result.thrift_spec = (
  3246. (0, TType.STRUCT, 'success', [TGetLogResp, None], None, ), # 0
  3247. )
  3248. fix_spec(all_structs)
  3249. del all_structs