TCLIService.py 147 KB

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