SentryPolicyService.py 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261
  1. #
  2. # Autogenerated by Thrift Compiler (0.9.0)
  3. #
  4. # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. #
  6. # options string: py:new_style
  7. #
  8. from thrift.Thrift import TType, TMessageType, TException, TApplicationException
  9. from ttypes import *
  10. from thrift.Thrift import TProcessor
  11. from thrift.transport import TTransport
  12. from thrift.protocol import TBinaryProtocol, TProtocol
  13. try:
  14. from thrift.protocol import fastbinary
  15. except:
  16. fastbinary = None
  17. class Iface(object):
  18. def create_sentry_role(self, request):
  19. """
  20. Parameters:
  21. - request
  22. """
  23. pass
  24. def drop_sentry_role(self, request):
  25. """
  26. Parameters:
  27. - request
  28. """
  29. pass
  30. def alter_sentry_role_grant_privilege(self, request):
  31. """
  32. Parameters:
  33. - request
  34. """
  35. pass
  36. def alter_sentry_role_revoke_privilege(self, request):
  37. """
  38. Parameters:
  39. - request
  40. """
  41. pass
  42. def alter_sentry_role_add_groups(self, request):
  43. """
  44. Parameters:
  45. - request
  46. """
  47. pass
  48. def alter_sentry_role_delete_groups(self, request):
  49. """
  50. Parameters:
  51. - request
  52. """
  53. pass
  54. def list_sentry_roles_by_group(self, request):
  55. """
  56. Parameters:
  57. - request
  58. """
  59. pass
  60. def list_sentry_privileges_by_role(self, request):
  61. """
  62. Parameters:
  63. - request
  64. """
  65. pass
  66. def list_sentry_privileges_for_provider(self, request):
  67. """
  68. Parameters:
  69. - request
  70. """
  71. pass
  72. def drop_sentry_privilege(self, request):
  73. """
  74. Parameters:
  75. - request
  76. """
  77. pass
  78. def rename_sentry_privilege(self, request):
  79. """
  80. Parameters:
  81. - request
  82. """
  83. pass
  84. def list_sentry_privileges_by_authorizable(self, request):
  85. """
  86. Parameters:
  87. - request
  88. """
  89. pass
  90. def get_sentry_config_value(self, request):
  91. """
  92. Parameters:
  93. - request
  94. """
  95. pass
  96. class Client(Iface):
  97. def __init__(self, iprot, oprot=None):
  98. self._iprot = self._oprot = iprot
  99. if oprot is not None:
  100. self._oprot = oprot
  101. self._seqid = 0
  102. def create_sentry_role(self, request):
  103. """
  104. Parameters:
  105. - request
  106. """
  107. self.send_create_sentry_role(request)
  108. return self.recv_create_sentry_role()
  109. def send_create_sentry_role(self, request):
  110. self._oprot.writeMessageBegin('create_sentry_role', TMessageType.CALL, self._seqid)
  111. args = create_sentry_role_args()
  112. args.request = request
  113. args.write(self._oprot)
  114. self._oprot.writeMessageEnd()
  115. self._oprot.trans.flush()
  116. def recv_create_sentry_role(self, ):
  117. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  118. if mtype == TMessageType.EXCEPTION:
  119. x = TApplicationException()
  120. x.read(self._iprot)
  121. self._iprot.readMessageEnd()
  122. raise x
  123. result = create_sentry_role_result()
  124. result.read(self._iprot)
  125. self._iprot.readMessageEnd()
  126. if result.success is not None:
  127. return result.success
  128. raise TApplicationException(TApplicationException.MISSING_RESULT, "create_sentry_role failed: unknown result");
  129. def drop_sentry_role(self, request):
  130. """
  131. Parameters:
  132. - request
  133. """
  134. self.send_drop_sentry_role(request)
  135. return self.recv_drop_sentry_role()
  136. def send_drop_sentry_role(self, request):
  137. self._oprot.writeMessageBegin('drop_sentry_role', TMessageType.CALL, self._seqid)
  138. args = drop_sentry_role_args()
  139. args.request = request
  140. args.write(self._oprot)
  141. self._oprot.writeMessageEnd()
  142. self._oprot.trans.flush()
  143. def recv_drop_sentry_role(self, ):
  144. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  145. if mtype == TMessageType.EXCEPTION:
  146. x = TApplicationException()
  147. x.read(self._iprot)
  148. self._iprot.readMessageEnd()
  149. raise x
  150. result = drop_sentry_role_result()
  151. result.read(self._iprot)
  152. self._iprot.readMessageEnd()
  153. if result.success is not None:
  154. return result.success
  155. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_sentry_role failed: unknown result");
  156. def alter_sentry_role_grant_privilege(self, request):
  157. """
  158. Parameters:
  159. - request
  160. """
  161. self.send_alter_sentry_role_grant_privilege(request)
  162. return self.recv_alter_sentry_role_grant_privilege()
  163. def send_alter_sentry_role_grant_privilege(self, request):
  164. self._oprot.writeMessageBegin('alter_sentry_role_grant_privilege', TMessageType.CALL, self._seqid)
  165. args = alter_sentry_role_grant_privilege_args()
  166. args.request = request
  167. args.write(self._oprot)
  168. self._oprot.writeMessageEnd()
  169. self._oprot.trans.flush()
  170. def recv_alter_sentry_role_grant_privilege(self, ):
  171. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  172. if mtype == TMessageType.EXCEPTION:
  173. x = TApplicationException()
  174. x.read(self._iprot)
  175. self._iprot.readMessageEnd()
  176. raise x
  177. result = alter_sentry_role_grant_privilege_result()
  178. result.read(self._iprot)
  179. self._iprot.readMessageEnd()
  180. if result.success is not None:
  181. return result.success
  182. raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_sentry_role_grant_privilege failed: unknown result");
  183. def alter_sentry_role_revoke_privilege(self, request):
  184. """
  185. Parameters:
  186. - request
  187. """
  188. self.send_alter_sentry_role_revoke_privilege(request)
  189. return self.recv_alter_sentry_role_revoke_privilege()
  190. def send_alter_sentry_role_revoke_privilege(self, request):
  191. self._oprot.writeMessageBegin('alter_sentry_role_revoke_privilege', TMessageType.CALL, self._seqid)
  192. args = alter_sentry_role_revoke_privilege_args()
  193. args.request = request
  194. args.write(self._oprot)
  195. self._oprot.writeMessageEnd()
  196. self._oprot.trans.flush()
  197. def recv_alter_sentry_role_revoke_privilege(self, ):
  198. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  199. if mtype == TMessageType.EXCEPTION:
  200. x = TApplicationException()
  201. x.read(self._iprot)
  202. self._iprot.readMessageEnd()
  203. raise x
  204. result = alter_sentry_role_revoke_privilege_result()
  205. result.read(self._iprot)
  206. self._iprot.readMessageEnd()
  207. if result.success is not None:
  208. return result.success
  209. raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_sentry_role_revoke_privilege failed: unknown result");
  210. def alter_sentry_role_add_groups(self, request):
  211. """
  212. Parameters:
  213. - request
  214. """
  215. self.send_alter_sentry_role_add_groups(request)
  216. return self.recv_alter_sentry_role_add_groups()
  217. def send_alter_sentry_role_add_groups(self, request):
  218. self._oprot.writeMessageBegin('alter_sentry_role_add_groups', TMessageType.CALL, self._seqid)
  219. args = alter_sentry_role_add_groups_args()
  220. args.request = request
  221. args.write(self._oprot)
  222. self._oprot.writeMessageEnd()
  223. self._oprot.trans.flush()
  224. def recv_alter_sentry_role_add_groups(self, ):
  225. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  226. if mtype == TMessageType.EXCEPTION:
  227. x = TApplicationException()
  228. x.read(self._iprot)
  229. self._iprot.readMessageEnd()
  230. raise x
  231. result = alter_sentry_role_add_groups_result()
  232. result.read(self._iprot)
  233. self._iprot.readMessageEnd()
  234. if result.success is not None:
  235. return result.success
  236. raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_sentry_role_add_groups failed: unknown result");
  237. def alter_sentry_role_delete_groups(self, request):
  238. """
  239. Parameters:
  240. - request
  241. """
  242. self.send_alter_sentry_role_delete_groups(request)
  243. return self.recv_alter_sentry_role_delete_groups()
  244. def send_alter_sentry_role_delete_groups(self, request):
  245. self._oprot.writeMessageBegin('alter_sentry_role_delete_groups', TMessageType.CALL, self._seqid)
  246. args = alter_sentry_role_delete_groups_args()
  247. args.request = request
  248. args.write(self._oprot)
  249. self._oprot.writeMessageEnd()
  250. self._oprot.trans.flush()
  251. def recv_alter_sentry_role_delete_groups(self, ):
  252. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  253. if mtype == TMessageType.EXCEPTION:
  254. x = TApplicationException()
  255. x.read(self._iprot)
  256. self._iprot.readMessageEnd()
  257. raise x
  258. result = alter_sentry_role_delete_groups_result()
  259. result.read(self._iprot)
  260. self._iprot.readMessageEnd()
  261. if result.success is not None:
  262. return result.success
  263. raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_sentry_role_delete_groups failed: unknown result");
  264. def list_sentry_roles_by_group(self, request):
  265. """
  266. Parameters:
  267. - request
  268. """
  269. self.send_list_sentry_roles_by_group(request)
  270. return self.recv_list_sentry_roles_by_group()
  271. def send_list_sentry_roles_by_group(self, request):
  272. self._oprot.writeMessageBegin('list_sentry_roles_by_group', TMessageType.CALL, self._seqid)
  273. args = list_sentry_roles_by_group_args()
  274. args.request = request
  275. args.write(self._oprot)
  276. self._oprot.writeMessageEnd()
  277. self._oprot.trans.flush()
  278. def recv_list_sentry_roles_by_group(self, ):
  279. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  280. if mtype == TMessageType.EXCEPTION:
  281. x = TApplicationException()
  282. x.read(self._iprot)
  283. self._iprot.readMessageEnd()
  284. raise x
  285. result = list_sentry_roles_by_group_result()
  286. result.read(self._iprot)
  287. self._iprot.readMessageEnd()
  288. if result.success is not None:
  289. return result.success
  290. raise TApplicationException(TApplicationException.MISSING_RESULT, "list_sentry_roles_by_group failed: unknown result");
  291. def list_sentry_privileges_by_role(self, request):
  292. """
  293. Parameters:
  294. - request
  295. """
  296. self.send_list_sentry_privileges_by_role(request)
  297. return self.recv_list_sentry_privileges_by_role()
  298. def send_list_sentry_privileges_by_role(self, request):
  299. self._oprot.writeMessageBegin('list_sentry_privileges_by_role', TMessageType.CALL, self._seqid)
  300. args = list_sentry_privileges_by_role_args()
  301. args.request = request
  302. args.write(self._oprot)
  303. self._oprot.writeMessageEnd()
  304. self._oprot.trans.flush()
  305. def recv_list_sentry_privileges_by_role(self, ):
  306. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  307. if mtype == TMessageType.EXCEPTION:
  308. x = TApplicationException()
  309. x.read(self._iprot)
  310. self._iprot.readMessageEnd()
  311. raise x
  312. result = list_sentry_privileges_by_role_result()
  313. result.read(self._iprot)
  314. self._iprot.readMessageEnd()
  315. if result.success is not None:
  316. return result.success
  317. raise TApplicationException(TApplicationException.MISSING_RESULT, "list_sentry_privileges_by_role failed: unknown result");
  318. def list_sentry_privileges_for_provider(self, request):
  319. """
  320. Parameters:
  321. - request
  322. """
  323. self.send_list_sentry_privileges_for_provider(request)
  324. return self.recv_list_sentry_privileges_for_provider()
  325. def send_list_sentry_privileges_for_provider(self, request):
  326. self._oprot.writeMessageBegin('list_sentry_privileges_for_provider', TMessageType.CALL, self._seqid)
  327. args = list_sentry_privileges_for_provider_args()
  328. args.request = request
  329. args.write(self._oprot)
  330. self._oprot.writeMessageEnd()
  331. self._oprot.trans.flush()
  332. def recv_list_sentry_privileges_for_provider(self, ):
  333. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  334. if mtype == TMessageType.EXCEPTION:
  335. x = TApplicationException()
  336. x.read(self._iprot)
  337. self._iprot.readMessageEnd()
  338. raise x
  339. result = list_sentry_privileges_for_provider_result()
  340. result.read(self._iprot)
  341. self._iprot.readMessageEnd()
  342. if result.success is not None:
  343. return result.success
  344. raise TApplicationException(TApplicationException.MISSING_RESULT, "list_sentry_privileges_for_provider failed: unknown result");
  345. def drop_sentry_privilege(self, request):
  346. """
  347. Parameters:
  348. - request
  349. """
  350. self.send_drop_sentry_privilege(request)
  351. return self.recv_drop_sentry_privilege()
  352. def send_drop_sentry_privilege(self, request):
  353. self._oprot.writeMessageBegin('drop_sentry_privilege', TMessageType.CALL, self._seqid)
  354. args = drop_sentry_privilege_args()
  355. args.request = request
  356. args.write(self._oprot)
  357. self._oprot.writeMessageEnd()
  358. self._oprot.trans.flush()
  359. def recv_drop_sentry_privilege(self, ):
  360. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  361. if mtype == TMessageType.EXCEPTION:
  362. x = TApplicationException()
  363. x.read(self._iprot)
  364. self._iprot.readMessageEnd()
  365. raise x
  366. result = drop_sentry_privilege_result()
  367. result.read(self._iprot)
  368. self._iprot.readMessageEnd()
  369. if result.success is not None:
  370. return result.success
  371. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_sentry_privilege failed: unknown result");
  372. def rename_sentry_privilege(self, request):
  373. """
  374. Parameters:
  375. - request
  376. """
  377. self.send_rename_sentry_privilege(request)
  378. return self.recv_rename_sentry_privilege()
  379. def send_rename_sentry_privilege(self, request):
  380. self._oprot.writeMessageBegin('rename_sentry_privilege', TMessageType.CALL, self._seqid)
  381. args = rename_sentry_privilege_args()
  382. args.request = request
  383. args.write(self._oprot)
  384. self._oprot.writeMessageEnd()
  385. self._oprot.trans.flush()
  386. def recv_rename_sentry_privilege(self, ):
  387. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  388. if mtype == TMessageType.EXCEPTION:
  389. x = TApplicationException()
  390. x.read(self._iprot)
  391. self._iprot.readMessageEnd()
  392. raise x
  393. result = rename_sentry_privilege_result()
  394. result.read(self._iprot)
  395. self._iprot.readMessageEnd()
  396. if result.success is not None:
  397. return result.success
  398. raise TApplicationException(TApplicationException.MISSING_RESULT, "rename_sentry_privilege failed: unknown result");
  399. def list_sentry_privileges_by_authorizable(self, request):
  400. """
  401. Parameters:
  402. - request
  403. """
  404. self.send_list_sentry_privileges_by_authorizable(request)
  405. return self.recv_list_sentry_privileges_by_authorizable()
  406. def send_list_sentry_privileges_by_authorizable(self, request):
  407. self._oprot.writeMessageBegin('list_sentry_privileges_by_authorizable', TMessageType.CALL, self._seqid)
  408. args = list_sentry_privileges_by_authorizable_args()
  409. args.request = request
  410. args.write(self._oprot)
  411. self._oprot.writeMessageEnd()
  412. self._oprot.trans.flush()
  413. def recv_list_sentry_privileges_by_authorizable(self, ):
  414. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  415. if mtype == TMessageType.EXCEPTION:
  416. x = TApplicationException()
  417. x.read(self._iprot)
  418. self._iprot.readMessageEnd()
  419. raise x
  420. result = list_sentry_privileges_by_authorizable_result()
  421. result.read(self._iprot)
  422. self._iprot.readMessageEnd()
  423. if result.success is not None:
  424. return result.success
  425. raise TApplicationException(TApplicationException.MISSING_RESULT, "list_sentry_privileges_by_authorizable failed: unknown result");
  426. def get_sentry_config_value(self, request):
  427. """
  428. Parameters:
  429. - request
  430. """
  431. self.send_get_sentry_config_value(request)
  432. return self.recv_get_sentry_config_value()
  433. def send_get_sentry_config_value(self, request):
  434. self._oprot.writeMessageBegin('get_sentry_config_value', TMessageType.CALL, self._seqid)
  435. args = get_sentry_config_value_args()
  436. args.request = request
  437. args.write(self._oprot)
  438. self._oprot.writeMessageEnd()
  439. self._oprot.trans.flush()
  440. def recv_get_sentry_config_value(self, ):
  441. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  442. if mtype == TMessageType.EXCEPTION:
  443. x = TApplicationException()
  444. x.read(self._iprot)
  445. self._iprot.readMessageEnd()
  446. raise x
  447. result = get_sentry_config_value_result()
  448. result.read(self._iprot)
  449. self._iprot.readMessageEnd()
  450. if result.success is not None:
  451. return result.success
  452. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_sentry_config_value failed: unknown result");
  453. class Processor(Iface, TProcessor):
  454. def __init__(self, handler):
  455. self._handler = handler
  456. self._processMap = {}
  457. self._processMap["create_sentry_role"] = Processor.process_create_sentry_role
  458. self._processMap["drop_sentry_role"] = Processor.process_drop_sentry_role
  459. self._processMap["alter_sentry_role_grant_privilege"] = Processor.process_alter_sentry_role_grant_privilege
  460. self._processMap["alter_sentry_role_revoke_privilege"] = Processor.process_alter_sentry_role_revoke_privilege
  461. self._processMap["alter_sentry_role_add_groups"] = Processor.process_alter_sentry_role_add_groups
  462. self._processMap["alter_sentry_role_delete_groups"] = Processor.process_alter_sentry_role_delete_groups
  463. self._processMap["list_sentry_roles_by_group"] = Processor.process_list_sentry_roles_by_group
  464. self._processMap["list_sentry_privileges_by_role"] = Processor.process_list_sentry_privileges_by_role
  465. self._processMap["list_sentry_privileges_for_provider"] = Processor.process_list_sentry_privileges_for_provider
  466. self._processMap["drop_sentry_privilege"] = Processor.process_drop_sentry_privilege
  467. self._processMap["rename_sentry_privilege"] = Processor.process_rename_sentry_privilege
  468. self._processMap["list_sentry_privileges_by_authorizable"] = Processor.process_list_sentry_privileges_by_authorizable
  469. self._processMap["get_sentry_config_value"] = Processor.process_get_sentry_config_value
  470. def process(self, iprot, oprot):
  471. (name, type, seqid) = iprot.readMessageBegin()
  472. if name not in self._processMap:
  473. iprot.skip(TType.STRUCT)
  474. iprot.readMessageEnd()
  475. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  476. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  477. x.write(oprot)
  478. oprot.writeMessageEnd()
  479. oprot.trans.flush()
  480. return
  481. else:
  482. self._processMap[name](self, seqid, iprot, oprot)
  483. return True
  484. def process_create_sentry_role(self, seqid, iprot, oprot):
  485. args = create_sentry_role_args()
  486. args.read(iprot)
  487. iprot.readMessageEnd()
  488. result = create_sentry_role_result()
  489. result.success = self._handler.create_sentry_role(args.request)
  490. oprot.writeMessageBegin("create_sentry_role", TMessageType.REPLY, seqid)
  491. result.write(oprot)
  492. oprot.writeMessageEnd()
  493. oprot.trans.flush()
  494. def process_drop_sentry_role(self, seqid, iprot, oprot):
  495. args = drop_sentry_role_args()
  496. args.read(iprot)
  497. iprot.readMessageEnd()
  498. result = drop_sentry_role_result()
  499. result.success = self._handler.drop_sentry_role(args.request)
  500. oprot.writeMessageBegin("drop_sentry_role", TMessageType.REPLY, seqid)
  501. result.write(oprot)
  502. oprot.writeMessageEnd()
  503. oprot.trans.flush()
  504. def process_alter_sentry_role_grant_privilege(self, seqid, iprot, oprot):
  505. args = alter_sentry_role_grant_privilege_args()
  506. args.read(iprot)
  507. iprot.readMessageEnd()
  508. result = alter_sentry_role_grant_privilege_result()
  509. result.success = self._handler.alter_sentry_role_grant_privilege(args.request)
  510. oprot.writeMessageBegin("alter_sentry_role_grant_privilege", TMessageType.REPLY, seqid)
  511. result.write(oprot)
  512. oprot.writeMessageEnd()
  513. oprot.trans.flush()
  514. def process_alter_sentry_role_revoke_privilege(self, seqid, iprot, oprot):
  515. args = alter_sentry_role_revoke_privilege_args()
  516. args.read(iprot)
  517. iprot.readMessageEnd()
  518. result = alter_sentry_role_revoke_privilege_result()
  519. result.success = self._handler.alter_sentry_role_revoke_privilege(args.request)
  520. oprot.writeMessageBegin("alter_sentry_role_revoke_privilege", TMessageType.REPLY, seqid)
  521. result.write(oprot)
  522. oprot.writeMessageEnd()
  523. oprot.trans.flush()
  524. def process_alter_sentry_role_add_groups(self, seqid, iprot, oprot):
  525. args = alter_sentry_role_add_groups_args()
  526. args.read(iprot)
  527. iprot.readMessageEnd()
  528. result = alter_sentry_role_add_groups_result()
  529. result.success = self._handler.alter_sentry_role_add_groups(args.request)
  530. oprot.writeMessageBegin("alter_sentry_role_add_groups", TMessageType.REPLY, seqid)
  531. result.write(oprot)
  532. oprot.writeMessageEnd()
  533. oprot.trans.flush()
  534. def process_alter_sentry_role_delete_groups(self, seqid, iprot, oprot):
  535. args = alter_sentry_role_delete_groups_args()
  536. args.read(iprot)
  537. iprot.readMessageEnd()
  538. result = alter_sentry_role_delete_groups_result()
  539. result.success = self._handler.alter_sentry_role_delete_groups(args.request)
  540. oprot.writeMessageBegin("alter_sentry_role_delete_groups", TMessageType.REPLY, seqid)
  541. result.write(oprot)
  542. oprot.writeMessageEnd()
  543. oprot.trans.flush()
  544. def process_list_sentry_roles_by_group(self, seqid, iprot, oprot):
  545. args = list_sentry_roles_by_group_args()
  546. args.read(iprot)
  547. iprot.readMessageEnd()
  548. result = list_sentry_roles_by_group_result()
  549. result.success = self._handler.list_sentry_roles_by_group(args.request)
  550. oprot.writeMessageBegin("list_sentry_roles_by_group", TMessageType.REPLY, seqid)
  551. result.write(oprot)
  552. oprot.writeMessageEnd()
  553. oprot.trans.flush()
  554. def process_list_sentry_privileges_by_role(self, seqid, iprot, oprot):
  555. args = list_sentry_privileges_by_role_args()
  556. args.read(iprot)
  557. iprot.readMessageEnd()
  558. result = list_sentry_privileges_by_role_result()
  559. result.success = self._handler.list_sentry_privileges_by_role(args.request)
  560. oprot.writeMessageBegin("list_sentry_privileges_by_role", TMessageType.REPLY, seqid)
  561. result.write(oprot)
  562. oprot.writeMessageEnd()
  563. oprot.trans.flush()
  564. def process_list_sentry_privileges_for_provider(self, seqid, iprot, oprot):
  565. args = list_sentry_privileges_for_provider_args()
  566. args.read(iprot)
  567. iprot.readMessageEnd()
  568. result = list_sentry_privileges_for_provider_result()
  569. result.success = self._handler.list_sentry_privileges_for_provider(args.request)
  570. oprot.writeMessageBegin("list_sentry_privileges_for_provider", TMessageType.REPLY, seqid)
  571. result.write(oprot)
  572. oprot.writeMessageEnd()
  573. oprot.trans.flush()
  574. def process_drop_sentry_privilege(self, seqid, iprot, oprot):
  575. args = drop_sentry_privilege_args()
  576. args.read(iprot)
  577. iprot.readMessageEnd()
  578. result = drop_sentry_privilege_result()
  579. result.success = self._handler.drop_sentry_privilege(args.request)
  580. oprot.writeMessageBegin("drop_sentry_privilege", TMessageType.REPLY, seqid)
  581. result.write(oprot)
  582. oprot.writeMessageEnd()
  583. oprot.trans.flush()
  584. def process_rename_sentry_privilege(self, seqid, iprot, oprot):
  585. args = rename_sentry_privilege_args()
  586. args.read(iprot)
  587. iprot.readMessageEnd()
  588. result = rename_sentry_privilege_result()
  589. result.success = self._handler.rename_sentry_privilege(args.request)
  590. oprot.writeMessageBegin("rename_sentry_privilege", TMessageType.REPLY, seqid)
  591. result.write(oprot)
  592. oprot.writeMessageEnd()
  593. oprot.trans.flush()
  594. def process_list_sentry_privileges_by_authorizable(self, seqid, iprot, oprot):
  595. args = list_sentry_privileges_by_authorizable_args()
  596. args.read(iprot)
  597. iprot.readMessageEnd()
  598. result = list_sentry_privileges_by_authorizable_result()
  599. result.success = self._handler.list_sentry_privileges_by_authorizable(args.request)
  600. oprot.writeMessageBegin("list_sentry_privileges_by_authorizable", TMessageType.REPLY, seqid)
  601. result.write(oprot)
  602. oprot.writeMessageEnd()
  603. oprot.trans.flush()
  604. def process_get_sentry_config_value(self, seqid, iprot, oprot):
  605. args = get_sentry_config_value_args()
  606. args.read(iprot)
  607. iprot.readMessageEnd()
  608. result = get_sentry_config_value_result()
  609. result.success = self._handler.get_sentry_config_value(args.request)
  610. oprot.writeMessageBegin("get_sentry_config_value", TMessageType.REPLY, seqid)
  611. result.write(oprot)
  612. oprot.writeMessageEnd()
  613. oprot.trans.flush()
  614. # HELPER FUNCTIONS AND STRUCTURES
  615. class create_sentry_role_args(object):
  616. """
  617. Attributes:
  618. - request
  619. """
  620. thrift_spec = (
  621. None, # 0
  622. (1, TType.STRUCT, 'request', (TCreateSentryRoleRequest, TCreateSentryRoleRequest.thrift_spec), None, ), # 1
  623. )
  624. def __init__(self, request=None,):
  625. self.request = request
  626. def read(self, iprot):
  627. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  628. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  629. return
  630. iprot.readStructBegin()
  631. while True:
  632. (fname, ftype, fid) = iprot.readFieldBegin()
  633. if ftype == TType.STOP:
  634. break
  635. if fid == 1:
  636. if ftype == TType.STRUCT:
  637. self.request = TCreateSentryRoleRequest()
  638. self.request.read(iprot)
  639. else:
  640. iprot.skip(ftype)
  641. else:
  642. iprot.skip(ftype)
  643. iprot.readFieldEnd()
  644. iprot.readStructEnd()
  645. def write(self, oprot):
  646. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  647. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  648. return
  649. oprot.writeStructBegin('create_sentry_role_args')
  650. if self.request is not None:
  651. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  652. self.request.write(oprot)
  653. oprot.writeFieldEnd()
  654. oprot.writeFieldStop()
  655. oprot.writeStructEnd()
  656. def validate(self):
  657. return
  658. def __repr__(self):
  659. L = ['%s=%r' % (key, value)
  660. for key, value in self.__dict__.iteritems()]
  661. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  662. def __eq__(self, other):
  663. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  664. def __ne__(self, other):
  665. return not (self == other)
  666. class create_sentry_role_result(object):
  667. """
  668. Attributes:
  669. - success
  670. """
  671. thrift_spec = (
  672. (0, TType.STRUCT, 'success', (TCreateSentryRoleResponse, TCreateSentryRoleResponse.thrift_spec), None, ), # 0
  673. )
  674. def __init__(self, success=None,):
  675. self.success = success
  676. def read(self, iprot):
  677. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  678. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  679. return
  680. iprot.readStructBegin()
  681. while True:
  682. (fname, ftype, fid) = iprot.readFieldBegin()
  683. if ftype == TType.STOP:
  684. break
  685. if fid == 0:
  686. if ftype == TType.STRUCT:
  687. self.success = TCreateSentryRoleResponse()
  688. self.success.read(iprot)
  689. else:
  690. iprot.skip(ftype)
  691. else:
  692. iprot.skip(ftype)
  693. iprot.readFieldEnd()
  694. iprot.readStructEnd()
  695. def write(self, oprot):
  696. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  697. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  698. return
  699. oprot.writeStructBegin('create_sentry_role_result')
  700. if self.success is not None:
  701. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  702. self.success.write(oprot)
  703. oprot.writeFieldEnd()
  704. oprot.writeFieldStop()
  705. oprot.writeStructEnd()
  706. def validate(self):
  707. return
  708. def __repr__(self):
  709. L = ['%s=%r' % (key, value)
  710. for key, value in self.__dict__.iteritems()]
  711. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  712. def __eq__(self, other):
  713. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  714. def __ne__(self, other):
  715. return not (self == other)
  716. class drop_sentry_role_args(object):
  717. """
  718. Attributes:
  719. - request
  720. """
  721. thrift_spec = (
  722. None, # 0
  723. (1, TType.STRUCT, 'request', (TDropSentryRoleRequest, TDropSentryRoleRequest.thrift_spec), None, ), # 1
  724. )
  725. def __init__(self, request=None,):
  726. self.request = request
  727. def read(self, iprot):
  728. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  729. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  730. return
  731. iprot.readStructBegin()
  732. while True:
  733. (fname, ftype, fid) = iprot.readFieldBegin()
  734. if ftype == TType.STOP:
  735. break
  736. if fid == 1:
  737. if ftype == TType.STRUCT:
  738. self.request = TDropSentryRoleRequest()
  739. self.request.read(iprot)
  740. else:
  741. iprot.skip(ftype)
  742. else:
  743. iprot.skip(ftype)
  744. iprot.readFieldEnd()
  745. iprot.readStructEnd()
  746. def write(self, oprot):
  747. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  748. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  749. return
  750. oprot.writeStructBegin('drop_sentry_role_args')
  751. if self.request is not None:
  752. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  753. self.request.write(oprot)
  754. oprot.writeFieldEnd()
  755. oprot.writeFieldStop()
  756. oprot.writeStructEnd()
  757. def validate(self):
  758. return
  759. def __repr__(self):
  760. L = ['%s=%r' % (key, value)
  761. for key, value in self.__dict__.iteritems()]
  762. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  763. def __eq__(self, other):
  764. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  765. def __ne__(self, other):
  766. return not (self == other)
  767. class drop_sentry_role_result(object):
  768. """
  769. Attributes:
  770. - success
  771. """
  772. thrift_spec = (
  773. (0, TType.STRUCT, 'success', (TDropSentryRoleResponse, TDropSentryRoleResponse.thrift_spec), None, ), # 0
  774. )
  775. def __init__(self, success=None,):
  776. self.success = success
  777. def read(self, iprot):
  778. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  779. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  780. return
  781. iprot.readStructBegin()
  782. while True:
  783. (fname, ftype, fid) = iprot.readFieldBegin()
  784. if ftype == TType.STOP:
  785. break
  786. if fid == 0:
  787. if ftype == TType.STRUCT:
  788. self.success = TDropSentryRoleResponse()
  789. self.success.read(iprot)
  790. else:
  791. iprot.skip(ftype)
  792. else:
  793. iprot.skip(ftype)
  794. iprot.readFieldEnd()
  795. iprot.readStructEnd()
  796. def write(self, oprot):
  797. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  798. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  799. return
  800. oprot.writeStructBegin('drop_sentry_role_result')
  801. if self.success is not None:
  802. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  803. self.success.write(oprot)
  804. oprot.writeFieldEnd()
  805. oprot.writeFieldStop()
  806. oprot.writeStructEnd()
  807. def validate(self):
  808. return
  809. def __repr__(self):
  810. L = ['%s=%r' % (key, value)
  811. for key, value in self.__dict__.iteritems()]
  812. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  813. def __eq__(self, other):
  814. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  815. def __ne__(self, other):
  816. return not (self == other)
  817. class alter_sentry_role_grant_privilege_args(object):
  818. """
  819. Attributes:
  820. - request
  821. """
  822. thrift_spec = (
  823. None, # 0
  824. (1, TType.STRUCT, 'request', (TAlterSentryRoleGrantPrivilegeRequest, TAlterSentryRoleGrantPrivilegeRequest.thrift_spec), None, ), # 1
  825. )
  826. def __init__(self, request=None,):
  827. self.request = request
  828. def read(self, iprot):
  829. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  830. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  831. return
  832. iprot.readStructBegin()
  833. while True:
  834. (fname, ftype, fid) = iprot.readFieldBegin()
  835. if ftype == TType.STOP:
  836. break
  837. if fid == 1:
  838. if ftype == TType.STRUCT:
  839. self.request = TAlterSentryRoleGrantPrivilegeRequest()
  840. self.request.read(iprot)
  841. else:
  842. iprot.skip(ftype)
  843. else:
  844. iprot.skip(ftype)
  845. iprot.readFieldEnd()
  846. iprot.readStructEnd()
  847. def write(self, oprot):
  848. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  849. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  850. return
  851. oprot.writeStructBegin('alter_sentry_role_grant_privilege_args')
  852. if self.request is not None:
  853. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  854. self.request.write(oprot)
  855. oprot.writeFieldEnd()
  856. oprot.writeFieldStop()
  857. oprot.writeStructEnd()
  858. def validate(self):
  859. return
  860. def __repr__(self):
  861. L = ['%s=%r' % (key, value)
  862. for key, value in self.__dict__.iteritems()]
  863. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  864. def __eq__(self, other):
  865. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  866. def __ne__(self, other):
  867. return not (self == other)
  868. class alter_sentry_role_grant_privilege_result(object):
  869. """
  870. Attributes:
  871. - success
  872. """
  873. thrift_spec = (
  874. (0, TType.STRUCT, 'success', (TAlterSentryRoleGrantPrivilegeResponse, TAlterSentryRoleGrantPrivilegeResponse.thrift_spec), None, ), # 0
  875. )
  876. def __init__(self, success=None,):
  877. self.success = success
  878. def read(self, iprot):
  879. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  880. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  881. return
  882. iprot.readStructBegin()
  883. while True:
  884. (fname, ftype, fid) = iprot.readFieldBegin()
  885. if ftype == TType.STOP:
  886. break
  887. if fid == 0:
  888. if ftype == TType.STRUCT:
  889. self.success = TAlterSentryRoleGrantPrivilegeResponse()
  890. self.success.read(iprot)
  891. else:
  892. iprot.skip(ftype)
  893. else:
  894. iprot.skip(ftype)
  895. iprot.readFieldEnd()
  896. iprot.readStructEnd()
  897. def write(self, oprot):
  898. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  899. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  900. return
  901. oprot.writeStructBegin('alter_sentry_role_grant_privilege_result')
  902. if self.success is not None:
  903. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  904. self.success.write(oprot)
  905. oprot.writeFieldEnd()
  906. oprot.writeFieldStop()
  907. oprot.writeStructEnd()
  908. def validate(self):
  909. return
  910. def __repr__(self):
  911. L = ['%s=%r' % (key, value)
  912. for key, value in self.__dict__.iteritems()]
  913. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  914. def __eq__(self, other):
  915. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  916. def __ne__(self, other):
  917. return not (self == other)
  918. class alter_sentry_role_revoke_privilege_args(object):
  919. """
  920. Attributes:
  921. - request
  922. """
  923. thrift_spec = (
  924. None, # 0
  925. (1, TType.STRUCT, 'request', (TAlterSentryRoleRevokePrivilegeRequest, TAlterSentryRoleRevokePrivilegeRequest.thrift_spec), None, ), # 1
  926. )
  927. def __init__(self, request=None,):
  928. self.request = request
  929. def read(self, iprot):
  930. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  931. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  932. return
  933. iprot.readStructBegin()
  934. while True:
  935. (fname, ftype, fid) = iprot.readFieldBegin()
  936. if ftype == TType.STOP:
  937. break
  938. if fid == 1:
  939. if ftype == TType.STRUCT:
  940. self.request = TAlterSentryRoleRevokePrivilegeRequest()
  941. self.request.read(iprot)
  942. else:
  943. iprot.skip(ftype)
  944. else:
  945. iprot.skip(ftype)
  946. iprot.readFieldEnd()
  947. iprot.readStructEnd()
  948. def write(self, oprot):
  949. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  950. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  951. return
  952. oprot.writeStructBegin('alter_sentry_role_revoke_privilege_args')
  953. if self.request is not None:
  954. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  955. self.request.write(oprot)
  956. oprot.writeFieldEnd()
  957. oprot.writeFieldStop()
  958. oprot.writeStructEnd()
  959. def validate(self):
  960. return
  961. def __repr__(self):
  962. L = ['%s=%r' % (key, value)
  963. for key, value in self.__dict__.iteritems()]
  964. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  965. def __eq__(self, other):
  966. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  967. def __ne__(self, other):
  968. return not (self == other)
  969. class alter_sentry_role_revoke_privilege_result(object):
  970. """
  971. Attributes:
  972. - success
  973. """
  974. thrift_spec = (
  975. (0, TType.STRUCT, 'success', (TAlterSentryRoleRevokePrivilegeResponse, TAlterSentryRoleRevokePrivilegeResponse.thrift_spec), None, ), # 0
  976. )
  977. def __init__(self, success=None,):
  978. self.success = success
  979. def read(self, iprot):
  980. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  981. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  982. return
  983. iprot.readStructBegin()
  984. while True:
  985. (fname, ftype, fid) = iprot.readFieldBegin()
  986. if ftype == TType.STOP:
  987. break
  988. if fid == 0:
  989. if ftype == TType.STRUCT:
  990. self.success = TAlterSentryRoleRevokePrivilegeResponse()
  991. self.success.read(iprot)
  992. else:
  993. iprot.skip(ftype)
  994. else:
  995. iprot.skip(ftype)
  996. iprot.readFieldEnd()
  997. iprot.readStructEnd()
  998. def write(self, oprot):
  999. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1000. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1001. return
  1002. oprot.writeStructBegin('alter_sentry_role_revoke_privilege_result')
  1003. if self.success is not None:
  1004. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1005. self.success.write(oprot)
  1006. oprot.writeFieldEnd()
  1007. oprot.writeFieldStop()
  1008. oprot.writeStructEnd()
  1009. def validate(self):
  1010. return
  1011. def __repr__(self):
  1012. L = ['%s=%r' % (key, value)
  1013. for key, value in self.__dict__.iteritems()]
  1014. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1015. def __eq__(self, other):
  1016. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1017. def __ne__(self, other):
  1018. return not (self == other)
  1019. class alter_sentry_role_add_groups_args(object):
  1020. """
  1021. Attributes:
  1022. - request
  1023. """
  1024. thrift_spec = (
  1025. None, # 0
  1026. (1, TType.STRUCT, 'request', (TAlterSentryRoleAddGroupsRequest, TAlterSentryRoleAddGroupsRequest.thrift_spec), None, ), # 1
  1027. )
  1028. def __init__(self, request=None,):
  1029. self.request = request
  1030. def read(self, iprot):
  1031. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1032. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1033. return
  1034. iprot.readStructBegin()
  1035. while True:
  1036. (fname, ftype, fid) = iprot.readFieldBegin()
  1037. if ftype == TType.STOP:
  1038. break
  1039. if fid == 1:
  1040. if ftype == TType.STRUCT:
  1041. self.request = TAlterSentryRoleAddGroupsRequest()
  1042. self.request.read(iprot)
  1043. else:
  1044. iprot.skip(ftype)
  1045. else:
  1046. iprot.skip(ftype)
  1047. iprot.readFieldEnd()
  1048. iprot.readStructEnd()
  1049. def write(self, oprot):
  1050. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1051. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1052. return
  1053. oprot.writeStructBegin('alter_sentry_role_add_groups_args')
  1054. if self.request is not None:
  1055. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1056. self.request.write(oprot)
  1057. oprot.writeFieldEnd()
  1058. oprot.writeFieldStop()
  1059. oprot.writeStructEnd()
  1060. def validate(self):
  1061. return
  1062. def __repr__(self):
  1063. L = ['%s=%r' % (key, value)
  1064. for key, value in self.__dict__.iteritems()]
  1065. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1066. def __eq__(self, other):
  1067. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1068. def __ne__(self, other):
  1069. return not (self == other)
  1070. class alter_sentry_role_add_groups_result(object):
  1071. """
  1072. Attributes:
  1073. - success
  1074. """
  1075. thrift_spec = (
  1076. (0, TType.STRUCT, 'success', (TAlterSentryRoleAddGroupsResponse, TAlterSentryRoleAddGroupsResponse.thrift_spec), None, ), # 0
  1077. )
  1078. def __init__(self, success=None,):
  1079. self.success = success
  1080. def read(self, iprot):
  1081. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1082. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1083. return
  1084. iprot.readStructBegin()
  1085. while True:
  1086. (fname, ftype, fid) = iprot.readFieldBegin()
  1087. if ftype == TType.STOP:
  1088. break
  1089. if fid == 0:
  1090. if ftype == TType.STRUCT:
  1091. self.success = TAlterSentryRoleAddGroupsResponse()
  1092. self.success.read(iprot)
  1093. else:
  1094. iprot.skip(ftype)
  1095. else:
  1096. iprot.skip(ftype)
  1097. iprot.readFieldEnd()
  1098. iprot.readStructEnd()
  1099. def write(self, oprot):
  1100. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1101. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1102. return
  1103. oprot.writeStructBegin('alter_sentry_role_add_groups_result')
  1104. if self.success is not None:
  1105. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1106. self.success.write(oprot)
  1107. oprot.writeFieldEnd()
  1108. oprot.writeFieldStop()
  1109. oprot.writeStructEnd()
  1110. def validate(self):
  1111. return
  1112. def __repr__(self):
  1113. L = ['%s=%r' % (key, value)
  1114. for key, value in self.__dict__.iteritems()]
  1115. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1116. def __eq__(self, other):
  1117. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1118. def __ne__(self, other):
  1119. return not (self == other)
  1120. class alter_sentry_role_delete_groups_args(object):
  1121. """
  1122. Attributes:
  1123. - request
  1124. """
  1125. thrift_spec = (
  1126. None, # 0
  1127. (1, TType.STRUCT, 'request', (TAlterSentryRoleDeleteGroupsRequest, TAlterSentryRoleDeleteGroupsRequest.thrift_spec), None, ), # 1
  1128. )
  1129. def __init__(self, request=None,):
  1130. self.request = request
  1131. def read(self, iprot):
  1132. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1133. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1134. return
  1135. iprot.readStructBegin()
  1136. while True:
  1137. (fname, ftype, fid) = iprot.readFieldBegin()
  1138. if ftype == TType.STOP:
  1139. break
  1140. if fid == 1:
  1141. if ftype == TType.STRUCT:
  1142. self.request = TAlterSentryRoleDeleteGroupsRequest()
  1143. self.request.read(iprot)
  1144. else:
  1145. iprot.skip(ftype)
  1146. else:
  1147. iprot.skip(ftype)
  1148. iprot.readFieldEnd()
  1149. iprot.readStructEnd()
  1150. def write(self, oprot):
  1151. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1152. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1153. return
  1154. oprot.writeStructBegin('alter_sentry_role_delete_groups_args')
  1155. if self.request is not None:
  1156. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1157. self.request.write(oprot)
  1158. oprot.writeFieldEnd()
  1159. oprot.writeFieldStop()
  1160. oprot.writeStructEnd()
  1161. def validate(self):
  1162. return
  1163. def __repr__(self):
  1164. L = ['%s=%r' % (key, value)
  1165. for key, value in self.__dict__.iteritems()]
  1166. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1167. def __eq__(self, other):
  1168. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1169. def __ne__(self, other):
  1170. return not (self == other)
  1171. class alter_sentry_role_delete_groups_result(object):
  1172. """
  1173. Attributes:
  1174. - success
  1175. """
  1176. thrift_spec = (
  1177. (0, TType.STRUCT, 'success', (TAlterSentryRoleDeleteGroupsResponse, TAlterSentryRoleDeleteGroupsResponse.thrift_spec), None, ), # 0
  1178. )
  1179. def __init__(self, success=None,):
  1180. self.success = success
  1181. def read(self, iprot):
  1182. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1183. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1184. return
  1185. iprot.readStructBegin()
  1186. while True:
  1187. (fname, ftype, fid) = iprot.readFieldBegin()
  1188. if ftype == TType.STOP:
  1189. break
  1190. if fid == 0:
  1191. if ftype == TType.STRUCT:
  1192. self.success = TAlterSentryRoleDeleteGroupsResponse()
  1193. self.success.read(iprot)
  1194. else:
  1195. iprot.skip(ftype)
  1196. else:
  1197. iprot.skip(ftype)
  1198. iprot.readFieldEnd()
  1199. iprot.readStructEnd()
  1200. def write(self, oprot):
  1201. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1202. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1203. return
  1204. oprot.writeStructBegin('alter_sentry_role_delete_groups_result')
  1205. if self.success is not None:
  1206. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1207. self.success.write(oprot)
  1208. oprot.writeFieldEnd()
  1209. oprot.writeFieldStop()
  1210. oprot.writeStructEnd()
  1211. def validate(self):
  1212. return
  1213. def __repr__(self):
  1214. L = ['%s=%r' % (key, value)
  1215. for key, value in self.__dict__.iteritems()]
  1216. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1217. def __eq__(self, other):
  1218. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1219. def __ne__(self, other):
  1220. return not (self == other)
  1221. class list_sentry_roles_by_group_args(object):
  1222. """
  1223. Attributes:
  1224. - request
  1225. """
  1226. thrift_spec = (
  1227. None, # 0
  1228. (1, TType.STRUCT, 'request', (TListSentryRolesRequest, TListSentryRolesRequest.thrift_spec), None, ), # 1
  1229. )
  1230. def __init__(self, request=None,):
  1231. self.request = request
  1232. def read(self, iprot):
  1233. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1234. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1235. return
  1236. iprot.readStructBegin()
  1237. while True:
  1238. (fname, ftype, fid) = iprot.readFieldBegin()
  1239. if ftype == TType.STOP:
  1240. break
  1241. if fid == 1:
  1242. if ftype == TType.STRUCT:
  1243. self.request = TListSentryRolesRequest()
  1244. self.request.read(iprot)
  1245. else:
  1246. iprot.skip(ftype)
  1247. else:
  1248. iprot.skip(ftype)
  1249. iprot.readFieldEnd()
  1250. iprot.readStructEnd()
  1251. def write(self, oprot):
  1252. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1253. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1254. return
  1255. oprot.writeStructBegin('list_sentry_roles_by_group_args')
  1256. if self.request is not None:
  1257. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1258. self.request.write(oprot)
  1259. oprot.writeFieldEnd()
  1260. oprot.writeFieldStop()
  1261. oprot.writeStructEnd()
  1262. def validate(self):
  1263. return
  1264. def __repr__(self):
  1265. L = ['%s=%r' % (key, value)
  1266. for key, value in self.__dict__.iteritems()]
  1267. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1268. def __eq__(self, other):
  1269. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1270. def __ne__(self, other):
  1271. return not (self == other)
  1272. class list_sentry_roles_by_group_result(object):
  1273. """
  1274. Attributes:
  1275. - success
  1276. """
  1277. thrift_spec = (
  1278. (0, TType.STRUCT, 'success', (TListSentryRolesResponse, TListSentryRolesResponse.thrift_spec), None, ), # 0
  1279. )
  1280. def __init__(self, success=None,):
  1281. self.success = success
  1282. def read(self, iprot):
  1283. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1284. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1285. return
  1286. iprot.readStructBegin()
  1287. while True:
  1288. (fname, ftype, fid) = iprot.readFieldBegin()
  1289. if ftype == TType.STOP:
  1290. break
  1291. if fid == 0:
  1292. if ftype == TType.STRUCT:
  1293. self.success = TListSentryRolesResponse()
  1294. self.success.read(iprot)
  1295. else:
  1296. iprot.skip(ftype)
  1297. else:
  1298. iprot.skip(ftype)
  1299. iprot.readFieldEnd()
  1300. iprot.readStructEnd()
  1301. def write(self, oprot):
  1302. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1303. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1304. return
  1305. oprot.writeStructBegin('list_sentry_roles_by_group_result')
  1306. if self.success is not None:
  1307. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1308. self.success.write(oprot)
  1309. oprot.writeFieldEnd()
  1310. oprot.writeFieldStop()
  1311. oprot.writeStructEnd()
  1312. def validate(self):
  1313. return
  1314. def __repr__(self):
  1315. L = ['%s=%r' % (key, value)
  1316. for key, value in self.__dict__.iteritems()]
  1317. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1318. def __eq__(self, other):
  1319. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1320. def __ne__(self, other):
  1321. return not (self == other)
  1322. class list_sentry_privileges_by_role_args(object):
  1323. """
  1324. Attributes:
  1325. - request
  1326. """
  1327. thrift_spec = (
  1328. None, # 0
  1329. (1, TType.STRUCT, 'request', (TListSentryPrivilegesRequest, TListSentryPrivilegesRequest.thrift_spec), None, ), # 1
  1330. )
  1331. def __init__(self, request=None,):
  1332. self.request = request
  1333. def read(self, iprot):
  1334. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1335. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1336. return
  1337. iprot.readStructBegin()
  1338. while True:
  1339. (fname, ftype, fid) = iprot.readFieldBegin()
  1340. if ftype == TType.STOP:
  1341. break
  1342. if fid == 1:
  1343. if ftype == TType.STRUCT:
  1344. self.request = TListSentryPrivilegesRequest()
  1345. self.request.read(iprot)
  1346. else:
  1347. iprot.skip(ftype)
  1348. else:
  1349. iprot.skip(ftype)
  1350. iprot.readFieldEnd()
  1351. iprot.readStructEnd()
  1352. def write(self, oprot):
  1353. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1354. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1355. return
  1356. oprot.writeStructBegin('list_sentry_privileges_by_role_args')
  1357. if self.request is not None:
  1358. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1359. self.request.write(oprot)
  1360. oprot.writeFieldEnd()
  1361. oprot.writeFieldStop()
  1362. oprot.writeStructEnd()
  1363. def validate(self):
  1364. return
  1365. def __repr__(self):
  1366. L = ['%s=%r' % (key, value)
  1367. for key, value in self.__dict__.iteritems()]
  1368. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1369. def __eq__(self, other):
  1370. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1371. def __ne__(self, other):
  1372. return not (self == other)
  1373. class list_sentry_privileges_by_role_result(object):
  1374. """
  1375. Attributes:
  1376. - success
  1377. """
  1378. thrift_spec = (
  1379. (0, TType.STRUCT, 'success', (TListSentryPrivilegesResponse, TListSentryPrivilegesResponse.thrift_spec), None, ), # 0
  1380. )
  1381. def __init__(self, success=None,):
  1382. self.success = success
  1383. def read(self, iprot):
  1384. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1385. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1386. return
  1387. iprot.readStructBegin()
  1388. while True:
  1389. (fname, ftype, fid) = iprot.readFieldBegin()
  1390. if ftype == TType.STOP:
  1391. break
  1392. if fid == 0:
  1393. if ftype == TType.STRUCT:
  1394. self.success = TListSentryPrivilegesResponse()
  1395. self.success.read(iprot)
  1396. else:
  1397. iprot.skip(ftype)
  1398. else:
  1399. iprot.skip(ftype)
  1400. iprot.readFieldEnd()
  1401. iprot.readStructEnd()
  1402. def write(self, oprot):
  1403. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1404. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1405. return
  1406. oprot.writeStructBegin('list_sentry_privileges_by_role_result')
  1407. if self.success is not None:
  1408. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1409. self.success.write(oprot)
  1410. oprot.writeFieldEnd()
  1411. oprot.writeFieldStop()
  1412. oprot.writeStructEnd()
  1413. def validate(self):
  1414. return
  1415. def __repr__(self):
  1416. L = ['%s=%r' % (key, value)
  1417. for key, value in self.__dict__.iteritems()]
  1418. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1419. def __eq__(self, other):
  1420. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1421. def __ne__(self, other):
  1422. return not (self == other)
  1423. class list_sentry_privileges_for_provider_args(object):
  1424. """
  1425. Attributes:
  1426. - request
  1427. """
  1428. thrift_spec = (
  1429. None, # 0
  1430. (1, TType.STRUCT, 'request', (TListSentryPrivilegesForProviderRequest, TListSentryPrivilegesForProviderRequest.thrift_spec), None, ), # 1
  1431. )
  1432. def __init__(self, request=None,):
  1433. self.request = request
  1434. def read(self, iprot):
  1435. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1436. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1437. return
  1438. iprot.readStructBegin()
  1439. while True:
  1440. (fname, ftype, fid) = iprot.readFieldBegin()
  1441. if ftype == TType.STOP:
  1442. break
  1443. if fid == 1:
  1444. if ftype == TType.STRUCT:
  1445. self.request = TListSentryPrivilegesForProviderRequest()
  1446. self.request.read(iprot)
  1447. else:
  1448. iprot.skip(ftype)
  1449. else:
  1450. iprot.skip(ftype)
  1451. iprot.readFieldEnd()
  1452. iprot.readStructEnd()
  1453. def write(self, oprot):
  1454. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1455. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1456. return
  1457. oprot.writeStructBegin('list_sentry_privileges_for_provider_args')
  1458. if self.request is not None:
  1459. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1460. self.request.write(oprot)
  1461. oprot.writeFieldEnd()
  1462. oprot.writeFieldStop()
  1463. oprot.writeStructEnd()
  1464. def validate(self):
  1465. return
  1466. def __repr__(self):
  1467. L = ['%s=%r' % (key, value)
  1468. for key, value in self.__dict__.iteritems()]
  1469. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1470. def __eq__(self, other):
  1471. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1472. def __ne__(self, other):
  1473. return not (self == other)
  1474. class list_sentry_privileges_for_provider_result(object):
  1475. """
  1476. Attributes:
  1477. - success
  1478. """
  1479. thrift_spec = (
  1480. (0, TType.STRUCT, 'success', (TListSentryPrivilegesForProviderResponse, TListSentryPrivilegesForProviderResponse.thrift_spec), None, ), # 0
  1481. )
  1482. def __init__(self, success=None,):
  1483. self.success = success
  1484. def read(self, iprot):
  1485. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1486. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1487. return
  1488. iprot.readStructBegin()
  1489. while True:
  1490. (fname, ftype, fid) = iprot.readFieldBegin()
  1491. if ftype == TType.STOP:
  1492. break
  1493. if fid == 0:
  1494. if ftype == TType.STRUCT:
  1495. self.success = TListSentryPrivilegesForProviderResponse()
  1496. self.success.read(iprot)
  1497. else:
  1498. iprot.skip(ftype)
  1499. else:
  1500. iprot.skip(ftype)
  1501. iprot.readFieldEnd()
  1502. iprot.readStructEnd()
  1503. def write(self, oprot):
  1504. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1505. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1506. return
  1507. oprot.writeStructBegin('list_sentry_privileges_for_provider_result')
  1508. if self.success is not None:
  1509. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1510. self.success.write(oprot)
  1511. oprot.writeFieldEnd()
  1512. oprot.writeFieldStop()
  1513. oprot.writeStructEnd()
  1514. def validate(self):
  1515. return
  1516. def __repr__(self):
  1517. L = ['%s=%r' % (key, value)
  1518. for key, value in self.__dict__.iteritems()]
  1519. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1520. def __eq__(self, other):
  1521. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1522. def __ne__(self, other):
  1523. return not (self == other)
  1524. class drop_sentry_privilege_args(object):
  1525. """
  1526. Attributes:
  1527. - request
  1528. """
  1529. thrift_spec = (
  1530. None, # 0
  1531. (1, TType.STRUCT, 'request', (TDropPrivilegesRequest, TDropPrivilegesRequest.thrift_spec), None, ), # 1
  1532. )
  1533. def __init__(self, request=None,):
  1534. self.request = request
  1535. def read(self, iprot):
  1536. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1537. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1538. return
  1539. iprot.readStructBegin()
  1540. while True:
  1541. (fname, ftype, fid) = iprot.readFieldBegin()
  1542. if ftype == TType.STOP:
  1543. break
  1544. if fid == 1:
  1545. if ftype == TType.STRUCT:
  1546. self.request = TDropPrivilegesRequest()
  1547. self.request.read(iprot)
  1548. else:
  1549. iprot.skip(ftype)
  1550. else:
  1551. iprot.skip(ftype)
  1552. iprot.readFieldEnd()
  1553. iprot.readStructEnd()
  1554. def write(self, oprot):
  1555. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1556. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1557. return
  1558. oprot.writeStructBegin('drop_sentry_privilege_args')
  1559. if self.request is not None:
  1560. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1561. self.request.write(oprot)
  1562. oprot.writeFieldEnd()
  1563. oprot.writeFieldStop()
  1564. oprot.writeStructEnd()
  1565. def validate(self):
  1566. return
  1567. def __repr__(self):
  1568. L = ['%s=%r' % (key, value)
  1569. for key, value in self.__dict__.iteritems()]
  1570. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1571. def __eq__(self, other):
  1572. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1573. def __ne__(self, other):
  1574. return not (self == other)
  1575. class drop_sentry_privilege_result(object):
  1576. """
  1577. Attributes:
  1578. - success
  1579. """
  1580. thrift_spec = (
  1581. (0, TType.STRUCT, 'success', (TDropPrivilegesResponse, TDropPrivilegesResponse.thrift_spec), None, ), # 0
  1582. )
  1583. def __init__(self, success=None,):
  1584. self.success = success
  1585. def read(self, iprot):
  1586. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1587. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1588. return
  1589. iprot.readStructBegin()
  1590. while True:
  1591. (fname, ftype, fid) = iprot.readFieldBegin()
  1592. if ftype == TType.STOP:
  1593. break
  1594. if fid == 0:
  1595. if ftype == TType.STRUCT:
  1596. self.success = TDropPrivilegesResponse()
  1597. self.success.read(iprot)
  1598. else:
  1599. iprot.skip(ftype)
  1600. else:
  1601. iprot.skip(ftype)
  1602. iprot.readFieldEnd()
  1603. iprot.readStructEnd()
  1604. def write(self, oprot):
  1605. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1606. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1607. return
  1608. oprot.writeStructBegin('drop_sentry_privilege_result')
  1609. if self.success is not None:
  1610. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1611. self.success.write(oprot)
  1612. oprot.writeFieldEnd()
  1613. oprot.writeFieldStop()
  1614. oprot.writeStructEnd()
  1615. def validate(self):
  1616. return
  1617. def __repr__(self):
  1618. L = ['%s=%r' % (key, value)
  1619. for key, value in self.__dict__.iteritems()]
  1620. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1621. def __eq__(self, other):
  1622. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1623. def __ne__(self, other):
  1624. return not (self == other)
  1625. class rename_sentry_privilege_args(object):
  1626. """
  1627. Attributes:
  1628. - request
  1629. """
  1630. thrift_spec = (
  1631. None, # 0
  1632. (1, TType.STRUCT, 'request', (TRenamePrivilegesRequest, TRenamePrivilegesRequest.thrift_spec), None, ), # 1
  1633. )
  1634. def __init__(self, request=None,):
  1635. self.request = request
  1636. def read(self, iprot):
  1637. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1638. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1639. return
  1640. iprot.readStructBegin()
  1641. while True:
  1642. (fname, ftype, fid) = iprot.readFieldBegin()
  1643. if ftype == TType.STOP:
  1644. break
  1645. if fid == 1:
  1646. if ftype == TType.STRUCT:
  1647. self.request = TRenamePrivilegesRequest()
  1648. self.request.read(iprot)
  1649. else:
  1650. iprot.skip(ftype)
  1651. else:
  1652. iprot.skip(ftype)
  1653. iprot.readFieldEnd()
  1654. iprot.readStructEnd()
  1655. def write(self, oprot):
  1656. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1657. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1658. return
  1659. oprot.writeStructBegin('rename_sentry_privilege_args')
  1660. if self.request is not None:
  1661. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1662. self.request.write(oprot)
  1663. oprot.writeFieldEnd()
  1664. oprot.writeFieldStop()
  1665. oprot.writeStructEnd()
  1666. def validate(self):
  1667. return
  1668. def __repr__(self):
  1669. L = ['%s=%r' % (key, value)
  1670. for key, value in self.__dict__.iteritems()]
  1671. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1672. def __eq__(self, other):
  1673. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1674. def __ne__(self, other):
  1675. return not (self == other)
  1676. class rename_sentry_privilege_result(object):
  1677. """
  1678. Attributes:
  1679. - success
  1680. """
  1681. thrift_spec = (
  1682. (0, TType.STRUCT, 'success', (TRenamePrivilegesResponse, TRenamePrivilegesResponse.thrift_spec), None, ), # 0
  1683. )
  1684. def __init__(self, success=None,):
  1685. self.success = success
  1686. def read(self, iprot):
  1687. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1688. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1689. return
  1690. iprot.readStructBegin()
  1691. while True:
  1692. (fname, ftype, fid) = iprot.readFieldBegin()
  1693. if ftype == TType.STOP:
  1694. break
  1695. if fid == 0:
  1696. if ftype == TType.STRUCT:
  1697. self.success = TRenamePrivilegesResponse()
  1698. self.success.read(iprot)
  1699. else:
  1700. iprot.skip(ftype)
  1701. else:
  1702. iprot.skip(ftype)
  1703. iprot.readFieldEnd()
  1704. iprot.readStructEnd()
  1705. def write(self, oprot):
  1706. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1707. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1708. return
  1709. oprot.writeStructBegin('rename_sentry_privilege_result')
  1710. if self.success is not None:
  1711. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1712. self.success.write(oprot)
  1713. oprot.writeFieldEnd()
  1714. oprot.writeFieldStop()
  1715. oprot.writeStructEnd()
  1716. def validate(self):
  1717. return
  1718. def __repr__(self):
  1719. L = ['%s=%r' % (key, value)
  1720. for key, value in self.__dict__.iteritems()]
  1721. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1722. def __eq__(self, other):
  1723. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1724. def __ne__(self, other):
  1725. return not (self == other)
  1726. class list_sentry_privileges_by_authorizable_args(object):
  1727. """
  1728. Attributes:
  1729. - request
  1730. """
  1731. thrift_spec = (
  1732. None, # 0
  1733. (1, TType.STRUCT, 'request', (TListSentryPrivilegesByAuthRequest, TListSentryPrivilegesByAuthRequest.thrift_spec), None, ), # 1
  1734. )
  1735. def __init__(self, request=None,):
  1736. self.request = request
  1737. def read(self, iprot):
  1738. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1739. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1740. return
  1741. iprot.readStructBegin()
  1742. while True:
  1743. (fname, ftype, fid) = iprot.readFieldBegin()
  1744. if ftype == TType.STOP:
  1745. break
  1746. if fid == 1:
  1747. if ftype == TType.STRUCT:
  1748. self.request = TListSentryPrivilegesByAuthRequest()
  1749. self.request.read(iprot)
  1750. else:
  1751. iprot.skip(ftype)
  1752. else:
  1753. iprot.skip(ftype)
  1754. iprot.readFieldEnd()
  1755. iprot.readStructEnd()
  1756. def write(self, oprot):
  1757. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1758. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1759. return
  1760. oprot.writeStructBegin('list_sentry_privileges_by_authorizable_args')
  1761. if self.request is not None:
  1762. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1763. self.request.write(oprot)
  1764. oprot.writeFieldEnd()
  1765. oprot.writeFieldStop()
  1766. oprot.writeStructEnd()
  1767. def validate(self):
  1768. return
  1769. def __repr__(self):
  1770. L = ['%s=%r' % (key, value)
  1771. for key, value in self.__dict__.iteritems()]
  1772. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1773. def __eq__(self, other):
  1774. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1775. def __ne__(self, other):
  1776. return not (self == other)
  1777. class list_sentry_privileges_by_authorizable_result(object):
  1778. """
  1779. Attributes:
  1780. - success
  1781. """
  1782. thrift_spec = (
  1783. (0, TType.STRUCT, 'success', (TListSentryPrivilegesByAuthResponse, TListSentryPrivilegesByAuthResponse.thrift_spec), None, ), # 0
  1784. )
  1785. def __init__(self, success=None,):
  1786. self.success = success
  1787. def read(self, iprot):
  1788. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1789. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1790. return
  1791. iprot.readStructBegin()
  1792. while True:
  1793. (fname, ftype, fid) = iprot.readFieldBegin()
  1794. if ftype == TType.STOP:
  1795. break
  1796. if fid == 0:
  1797. if ftype == TType.STRUCT:
  1798. self.success = TListSentryPrivilegesByAuthResponse()
  1799. self.success.read(iprot)
  1800. else:
  1801. iprot.skip(ftype)
  1802. else:
  1803. iprot.skip(ftype)
  1804. iprot.readFieldEnd()
  1805. iprot.readStructEnd()
  1806. def write(self, oprot):
  1807. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1808. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1809. return
  1810. oprot.writeStructBegin('list_sentry_privileges_by_authorizable_result')
  1811. if self.success is not None:
  1812. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1813. self.success.write(oprot)
  1814. oprot.writeFieldEnd()
  1815. oprot.writeFieldStop()
  1816. oprot.writeStructEnd()
  1817. def validate(self):
  1818. return
  1819. def __repr__(self):
  1820. L = ['%s=%r' % (key, value)
  1821. for key, value in self.__dict__.iteritems()]
  1822. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1823. def __eq__(self, other):
  1824. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1825. def __ne__(self, other):
  1826. return not (self == other)
  1827. class get_sentry_config_value_args(object):
  1828. """
  1829. Attributes:
  1830. - request
  1831. """
  1832. thrift_spec = (
  1833. None, # 0
  1834. (1, TType.STRUCT, 'request', (TSentryConfigValueRequest, TSentryConfigValueRequest.thrift_spec), None, ), # 1
  1835. )
  1836. def __init__(self, request=None,):
  1837. self.request = request
  1838. def read(self, iprot):
  1839. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1840. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1841. return
  1842. iprot.readStructBegin()
  1843. while True:
  1844. (fname, ftype, fid) = iprot.readFieldBegin()
  1845. if ftype == TType.STOP:
  1846. break
  1847. if fid == 1:
  1848. if ftype == TType.STRUCT:
  1849. self.request = TSentryConfigValueRequest()
  1850. self.request.read(iprot)
  1851. else:
  1852. iprot.skip(ftype)
  1853. else:
  1854. iprot.skip(ftype)
  1855. iprot.readFieldEnd()
  1856. iprot.readStructEnd()
  1857. def write(self, oprot):
  1858. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1859. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1860. return
  1861. oprot.writeStructBegin('get_sentry_config_value_args')
  1862. if self.request is not None:
  1863. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1864. self.request.write(oprot)
  1865. oprot.writeFieldEnd()
  1866. oprot.writeFieldStop()
  1867. oprot.writeStructEnd()
  1868. def validate(self):
  1869. return
  1870. def __repr__(self):
  1871. L = ['%s=%r' % (key, value)
  1872. for key, value in self.__dict__.iteritems()]
  1873. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1874. def __eq__(self, other):
  1875. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1876. def __ne__(self, other):
  1877. return not (self == other)
  1878. class get_sentry_config_value_result(object):
  1879. """
  1880. Attributes:
  1881. - success
  1882. """
  1883. thrift_spec = (
  1884. (0, TType.STRUCT, 'success', (TSentryConfigValueResponse, TSentryConfigValueResponse.thrift_spec), None, ), # 0
  1885. )
  1886. def __init__(self, success=None,):
  1887. self.success = success
  1888. def read(self, iprot):
  1889. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1890. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1891. return
  1892. iprot.readStructBegin()
  1893. while True:
  1894. (fname, ftype, fid) = iprot.readFieldBegin()
  1895. if ftype == TType.STOP:
  1896. break
  1897. if fid == 0:
  1898. if ftype == TType.STRUCT:
  1899. self.success = TSentryConfigValueResponse()
  1900. self.success.read(iprot)
  1901. else:
  1902. iprot.skip(ftype)
  1903. else:
  1904. iprot.skip(ftype)
  1905. iprot.readFieldEnd()
  1906. iprot.readStructEnd()
  1907. def write(self, oprot):
  1908. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1909. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1910. return
  1911. oprot.writeStructBegin('get_sentry_config_value_result')
  1912. if self.success is not None:
  1913. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1914. self.success.write(oprot)
  1915. oprot.writeFieldEnd()
  1916. oprot.writeFieldStop()
  1917. oprot.writeStructEnd()
  1918. def validate(self):
  1919. return
  1920. def __repr__(self):
  1921. L = ['%s=%r' % (key, value)
  1922. for key, value in self.__dict__.iteritems()]
  1923. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1924. def __eq__(self, other):
  1925. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1926. def __ne__(self, other):
  1927. return not (self == other)