<s> from thrift . Thrift import TType , TMessageType , TException , TApplicationException <EOL> import sentry_common_service . ttypes <EOL> import sentry_policy_service . ttypes <EOL> from thrift . transport import TTransport <EOL> from thrift . protocol import TBinaryProtocol , TProtocol <EOL> try : <EOL> from thrift . protocol import fastbinary <EOL> except : <EOL> fastbinary = None <EOL> class TSentryGrantOption ( object ) : <EOL> TRUE = <NUM_LIT:1> <EOL> FALSE = <NUM_LIT:0> <EOL> UNSET = - <NUM_LIT:1> <EOL> _VALUES_TO_NAMES = { <EOL> <NUM_LIT:1> : "<STR_LIT>" , <EOL> <NUM_LIT:0> : "<STR_LIT>" , <EOL> - <NUM_LIT:1> : "<STR_LIT>" , <EOL> } <EOL> _NAMES_TO_VALUES = { <EOL> "<STR_LIT>" : <NUM_LIT:1> , <EOL> "<STR_LIT>" : <NUM_LIT:0> , <EOL> "<STR_LIT>" : - <NUM_LIT:1> , <EOL> } <EOL> class TAuthorizable ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRING , '<STR_LIT:type>' , None , None , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT:name>' , None , None , ) , <EOL> ) <EOL> def __init__ ( self , type = None , name = None , ) : <EOL> self . type = type <EOL> self . name = name <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRING : <EOL> self . type = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . name = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . type is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:type>' , TType . STRING , <NUM_LIT:1> ) <EOL> oprot . writeString ( self . type ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . name is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:name>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . name ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . type is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . name is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . type ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . name ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TSentryPrivilege ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . LIST , '<STR_LIT>' , ( TType . STRUCT , ( TAuthorizable , TAuthorizable . thrift_spec ) ) , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT:action>' , None , None , ) , <EOL> ( <NUM_LIT:5> , TType . I64 , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:6> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:7> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:0> , ) , <EOL> ) <EOL> def __init__ ( self , component = None , serviceName = None , authorizables = None , action = None , createTime = None , grantorPrincipal = None , grantOption = thrift_spec [ <NUM_LIT:7> ] [ <NUM_LIT:4> ] , ) : <EOL> self . component = component <EOL> self . serviceName = serviceName <EOL> self . authorizables = authorizables <EOL> self . action = action <EOL> self . createTime = createTime <EOL> self . grantorPrincipal = grantorPrincipal <EOL> self . grantOption = grantOption <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . serviceName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . LIST : <EOL> self . authorizables = [ ] <EOL> ( _etype3 , _size0 ) = iprot . readListBegin ( ) <EOL> for _i4 in xrange ( _size0 ) : <EOL> _elem5 = TAuthorizable ( ) <EOL> _elem5 . read ( iprot ) <EOL> self . authorizables . append ( _elem5 ) <EOL> iprot . readListEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . action = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . I64 : <EOL> self . createTime = iprot . readI64 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:6> : <EOL> if ftype == TType . STRING : <EOL> self . grantorPrincipal = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:7> : <EOL> if ftype == TType . I32 : <EOL> self . grantOption = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:1> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . serviceName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . serviceName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . authorizables is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . LIST , <NUM_LIT:3> ) <EOL> oprot . writeListBegin ( TType . STRUCT , len ( self . authorizables ) ) <EOL> for iter6 in self . authorizables : <EOL> iter6 . write ( oprot ) <EOL> oprot . writeListEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . action is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:action>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . action ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . createTime is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I64 , <NUM_LIT:5> ) <EOL> oprot . writeI64 ( self . createTime ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . grantorPrincipal is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:6> ) <EOL> oprot . writeString ( self . grantorPrincipal ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . grantOption is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:7> ) <EOL> oprot . writeI32 ( self . grantOption ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . serviceName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . authorizables is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . action is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . serviceName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( frozenset ( self . authorizables ) ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . action ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . createTime ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . grantorPrincipal ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . grantOption ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TCreateSentryRoleRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , roleName = None , component = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . roleName = roleName <EOL> self . component = component <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . roleName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roleName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . roleName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . roleName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roleName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TCreateSentryRoleResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , ) : <EOL> self . status = status <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TDropSentryRoleRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , roleName = None , component = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . roleName = roleName <EOL> self . component = component <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . roleName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roleName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . roleName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . roleName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roleName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TDropSentryRoleResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , ) : <EOL> self . status = status <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TAlterSentryRoleAddGroupsRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:5> , TType . SET , '<STR_LIT>' , ( TType . STRING , None ) , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , roleName = None , component = None , groups = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . roleName = roleName <EOL> self . component = component <EOL> self . groups = groups <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . roleName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . SET : <EOL> self . groups = set ( ) <EOL> ( _etype10 , _size7 ) = iprot . readSetBegin ( ) <EOL> for _i11 in xrange ( _size7 ) : <EOL> _elem12 = iprot . readString ( ) <EOL> self . groups . add ( _elem12 ) <EOL> iprot . readSetEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roleName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . roleName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . groups is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . SET , <NUM_LIT:5> ) <EOL> oprot . writeSetBegin ( TType . STRING , len ( self . groups ) ) <EOL> for iter13 in self . groups : <EOL> oprot . writeString ( iter13 ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . roleName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . groups is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roleName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . groups ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TAlterSentryRoleAddGroupsResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , ) : <EOL> self . status = status <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TAlterSentryRoleDeleteGroupsRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:5> , TType . SET , '<STR_LIT>' , ( TType . STRING , None ) , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , roleName = None , component = None , groups = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . roleName = roleName <EOL> self . component = component <EOL> self . groups = groups <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . roleName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . SET : <EOL> self . groups = set ( ) <EOL> ( _etype17 , _size14 ) = iprot . readSetBegin ( ) <EOL> for _i18 in xrange ( _size14 ) : <EOL> _elem19 = iprot . readString ( ) <EOL> self . groups . add ( _elem19 ) <EOL> iprot . readSetEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roleName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . roleName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . groups is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . SET , <NUM_LIT:5> ) <EOL> oprot . writeSetBegin ( TType . STRING , len ( self . groups ) ) <EOL> for iter20 in self . groups : <EOL> oprot . writeString ( iter20 ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . roleName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . groups is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roleName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . groups ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TAlterSentryRoleDeleteGroupsResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , ) : <EOL> self . status = status <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TAlterSentryRoleGrantPrivilegeRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:5> , TType . STRUCT , '<STR_LIT>' , ( TSentryPrivilege , TSentryPrivilege . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , roleName = None , component = None , privilege = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . roleName = roleName <EOL> self . component = component <EOL> self . privilege = privilege <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . roleName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . STRUCT : <EOL> self . privilege = TSentryPrivilege ( ) <EOL> self . privilege . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roleName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . roleName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . privilege is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRUCT , <NUM_LIT:5> ) <EOL> self . privilege . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . roleName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . privilege is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roleName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . privilege ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TAlterSentryRoleGrantPrivilegeResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , ) : <EOL> self . status = status <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TAlterSentryRoleRevokePrivilegeRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:5> , TType . STRUCT , '<STR_LIT>' , ( TSentryPrivilege , TSentryPrivilege . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , roleName = None , component = None , privilege = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . roleName = roleName <EOL> self . component = component <EOL> self . privilege = privilege <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . roleName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . STRUCT : <EOL> self . privilege = TSentryPrivilege ( ) <EOL> self . privilege . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roleName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . roleName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . privilege is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRUCT , <NUM_LIT:5> ) <EOL> self . privilege . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . roleName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . privilege is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roleName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . privilege ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TAlterSentryRoleRevokePrivilegeResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , ) : <EOL> self . status = status <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TListSentryRolesRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , groupName = None , component = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . groupName = groupName <EOL> self . component = component <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . groupName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . groupName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . groupName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . groupName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TSentryRole ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:2> , TType . SET , '<STR_LIT>' , ( TType . STRING , None ) , None , ) , <EOL> ) <EOL> def __init__ ( self , roleName = None , groups = None , ) : <EOL> self . roleName = roleName <EOL> self . groups = groups <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRING : <EOL> self . roleName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . SET : <EOL> self . groups = set ( ) <EOL> ( _etype24 , _size21 ) = iprot . readSetBegin ( ) <EOL> for _i25 in xrange ( _size21 ) : <EOL> _elem26 = iprot . readString ( ) <EOL> self . groups . add ( _elem26 ) <EOL> iprot . readSetEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . roleName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:1> ) <EOL> oprot . writeString ( self . roleName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . groups is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . SET , <NUM_LIT:2> ) <EOL> oprot . writeSetBegin ( TType . STRING , len ( self . groups ) ) <EOL> for iter27 in self . groups : <EOL> oprot . writeString ( iter27 ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . roleName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . groups is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roleName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( frozenset ( self . groups ) ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TListSentryRolesResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ( <NUM_LIT:2> , TType . SET , '<STR_LIT>' , ( TType . STRUCT , ( TSentryRole , TSentryRole . thrift_spec ) ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , roles = None , ) : <EOL> self . status = status <EOL> self . roles = roles <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . SET : <EOL> self . roles = set ( ) <EOL> ( _etype31 , _size28 ) = iprot . readSetBegin ( ) <EOL> for _i32 in xrange ( _size28 ) : <EOL> _elem33 = TSentryRole ( ) <EOL> _elem33 . read ( iprot ) <EOL> self . roles . add ( _elem33 ) <EOL> iprot . readSetEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roles is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . SET , <NUM_LIT:2> ) <EOL> oprot . writeSetBegin ( TType . STRUCT , len ( self . roles ) ) <EOL> for iter34 in self . roles : <EOL> iter34 . write ( oprot ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roles ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TListSentryPrivilegesRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:5> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:6> , TType . LIST , '<STR_LIT>' , ( TType . STRUCT , ( TAuthorizable , TAuthorizable . thrift_spec ) ) , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , roleName = None , component = None , serviceName = None , authorizables = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . roleName = roleName <EOL> self . component = component <EOL> self . serviceName = serviceName <EOL> self . authorizables = authorizables <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . roleName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . STRING : <EOL> self . serviceName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:6> : <EOL> if ftype == TType . LIST : <EOL> self . authorizables = [ ] <EOL> ( _etype38 , _size35 ) = iprot . readListBegin ( ) <EOL> for _i39 in xrange ( _size35 ) : <EOL> _elem40 = TAuthorizable ( ) <EOL> _elem40 . read ( iprot ) <EOL> self . authorizables . append ( _elem40 ) <EOL> iprot . readListEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roleName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . roleName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . serviceName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:5> ) <EOL> oprot . writeString ( self . serviceName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . authorizables is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . LIST , <NUM_LIT:6> ) <EOL> oprot . writeListBegin ( TType . STRUCT , len ( self . authorizables ) ) <EOL> for iter41 in self . authorizables : <EOL> iter41 . write ( oprot ) <EOL> oprot . writeListEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . roleName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . serviceName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roleName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . serviceName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . authorizables ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TListSentryPrivilegesResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ( <NUM_LIT:2> , TType . SET , '<STR_LIT>' , ( TType . STRUCT , ( TSentryPrivilege , TSentryPrivilege . thrift_spec ) ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , privileges = None , ) : <EOL> self . status = status <EOL> self . privileges = privileges <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . SET : <EOL> self . privileges = set ( ) <EOL> ( _etype45 , _size42 ) = iprot . readSetBegin ( ) <EOL> for _i46 in xrange ( _size42 ) : <EOL> _elem47 = TSentryPrivilege ( ) <EOL> _elem47 . read ( iprot ) <EOL> self . privileges . add ( _elem47 ) <EOL> iprot . readSetEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . privileges is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . SET , <NUM_LIT:2> ) <EOL> oprot . writeSetBegin ( TType . STRUCT , len ( self . privileges ) ) <EOL> for iter48 in self . privileges : <EOL> iter48 . write ( oprot ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . privileges ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TDropPrivilegesRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRUCT , '<STR_LIT>' , ( TSentryPrivilege , TSentryPrivilege . thrift_spec ) , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , privilege = None , component = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . privilege = privilege <EOL> self . component = component <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRUCT : <EOL> self . privilege = TSentryPrivilege ( ) <EOL> self . privilege . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . privilege is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRUCT , <NUM_LIT:3> ) <EOL> self . privilege . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . privilege is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . privilege ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TDropPrivilegesResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , ) : <EOL> self . status = status <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TRenamePrivilegesRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:5> , TType . LIST , '<STR_LIT>' , ( TType . STRUCT , ( TAuthorizable , TAuthorizable . thrift_spec ) ) , None , ) , <EOL> ( <NUM_LIT:6> , TType . LIST , '<STR_LIT>' , ( TType . STRUCT , ( TAuthorizable , TAuthorizable . thrift_spec ) ) , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , component = None , serviceName = None , oldAuthorizables = None , newAuthorizables = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . component = component <EOL> self . serviceName = serviceName <EOL> self . oldAuthorizables = oldAuthorizables <EOL> self . newAuthorizables = newAuthorizables <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . serviceName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . LIST : <EOL> self . oldAuthorizables = [ ] <EOL> ( _etype52 , _size49 ) = iprot . readListBegin ( ) <EOL> for _i53 in xrange ( _size49 ) : <EOL> _elem54 = TAuthorizable ( ) <EOL> _elem54 . read ( iprot ) <EOL> self . oldAuthorizables . append ( _elem54 ) <EOL> iprot . readListEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:6> : <EOL> if ftype == TType . LIST : <EOL> self . newAuthorizables = [ ] <EOL> ( _etype58 , _size55 ) = iprot . readListBegin ( ) <EOL> for _i59 in xrange ( _size55 ) : <EOL> _elem60 = TAuthorizable ( ) <EOL> _elem60 . read ( iprot ) <EOL> self . newAuthorizables . append ( _elem60 ) <EOL> iprot . readListEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . serviceName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . serviceName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . oldAuthorizables is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . LIST , <NUM_LIT:5> ) <EOL> oprot . writeListBegin ( TType . STRUCT , len ( self . oldAuthorizables ) ) <EOL> for iter61 in self . oldAuthorizables : <EOL> iter61 . write ( oprot ) <EOL> oprot . writeListEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . newAuthorizables is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . LIST , <NUM_LIT:6> ) <EOL> oprot . writeListBegin ( TType . STRUCT , len ( self . newAuthorizables ) ) <EOL> for iter62 in self . newAuthorizables : <EOL> iter62 . write ( oprot ) <EOL> oprot . writeListEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . serviceName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . oldAuthorizables is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . newAuthorizables is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . serviceName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . oldAuthorizables ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . newAuthorizables ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TRenamePrivilegesResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , ) : <EOL> self . status = status <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TSentryActiveRoleSet ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . BOOL , '<STR_LIT:all>' , None , None , ) , <EOL> ( <NUM_LIT:2> , TType . SET , '<STR_LIT>' , ( TType . STRING , None ) , None , ) , <EOL> ) <EOL> def __init__ ( self , all = None , roles = None , ) : <EOL> self . all = all <EOL> self . roles = roles <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . BOOL : <EOL> self . all = iprot . readBool ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . SET : <EOL> self . roles = set ( ) <EOL> ( _etype66 , _size63 ) = iprot . readSetBegin ( ) <EOL> for _i67 in xrange ( _size63 ) : <EOL> _elem68 = iprot . readString ( ) <EOL> self . roles . add ( _elem68 ) <EOL> iprot . readSetEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . all is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:all>' , TType . BOOL , <NUM_LIT:1> ) <EOL> oprot . writeBool ( self . all ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roles is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . SET , <NUM_LIT:2> ) <EOL> oprot . writeSetBegin ( TType . STRING , len ( self . roles ) ) <EOL> for iter69 in self . roles : <EOL> oprot . writeString ( iter69 ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . all is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . roles is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . all ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roles ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TListSentryPrivilegesForProviderRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . SET , '<STR_LIT>' , ( TType . STRING , None ) , None , ) , <EOL> ( <NUM_LIT:5> , TType . STRUCT , '<STR_LIT>' , ( TSentryActiveRoleSet , TSentryActiveRoleSet . thrift_spec ) , None , ) , <EOL> ( <NUM_LIT:6> , TType . LIST , '<STR_LIT>' , ( TType . STRUCT , ( TAuthorizable , TAuthorizable . thrift_spec ) ) , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , component = None , serviceName = None , groups = None , roleSet = None , authorizables = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . component = component <EOL> self . serviceName = serviceName <EOL> self . groups = groups <EOL> self . roleSet = roleSet <EOL> self . authorizables = authorizables <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . serviceName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . SET : <EOL> self . groups = set ( ) <EOL> ( _etype73 , _size70 ) = iprot . readSetBegin ( ) <EOL> for _i74 in xrange ( _size70 ) : <EOL> _elem75 = iprot . readString ( ) <EOL> self . groups . add ( _elem75 ) <EOL> iprot . readSetEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . STRUCT : <EOL> self . roleSet = TSentryActiveRoleSet ( ) <EOL> self . roleSet . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:6> : <EOL> if ftype == TType . LIST : <EOL> self . authorizables = [ ] <EOL> ( _etype79 , _size76 ) = iprot . readListBegin ( ) <EOL> for _i80 in xrange ( _size76 ) : <EOL> _elem81 = TAuthorizable ( ) <EOL> _elem81 . read ( iprot ) <EOL> self . authorizables . append ( _elem81 ) <EOL> iprot . readListEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . serviceName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . serviceName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . groups is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . SET , <NUM_LIT:4> ) <EOL> oprot . writeSetBegin ( TType . STRING , len ( self . groups ) ) <EOL> for iter82 in self . groups : <EOL> oprot . writeString ( iter82 ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roleSet is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRUCT , <NUM_LIT:5> ) <EOL> self . roleSet . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . authorizables is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . LIST , <NUM_LIT:6> ) <EOL> oprot . writeListBegin ( TType . STRUCT , len ( self . authorizables ) ) <EOL> for iter83 in self . authorizables : <EOL> iter83 . write ( oprot ) <EOL> oprot . writeListEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . serviceName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . groups is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . roleSet is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . serviceName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . groups ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roleSet ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . authorizables ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TListSentryPrivilegesForProviderResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ( <NUM_LIT:2> , TType . SET , '<STR_LIT>' , ( TType . STRING , None ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , privileges = None , ) : <EOL> self . status = status <EOL> self . privileges = privileges <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . SET : <EOL> self . privileges = set ( ) <EOL> ( _etype87 , _size84 ) = iprot . readSetBegin ( ) <EOL> for _i88 in xrange ( _size84 ) : <EOL> _elem89 = iprot . readString ( ) <EOL> self . privileges . add ( _elem89 ) <EOL> iprot . readSetEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . privileges is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . SET , <NUM_LIT:2> ) <EOL> oprot . writeSetBegin ( TType . STRING , len ( self . privileges ) ) <EOL> for iter90 in self . privileges : <EOL> oprot . writeString ( iter90 ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . privileges is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . privileges ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TSentryPrivilegeMap ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . MAP , '<STR_LIT>' , ( TType . STRING , None , TType . SET , ( TType . STRUCT , ( TSentryPrivilege , TSentryPrivilege . thrift_spec ) ) ) , None , ) , <EOL> ) <EOL> def __init__ ( self , privilegeMap = None , ) : <EOL> self . privilegeMap = privilegeMap <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . MAP : <EOL> self . privilegeMap = { } <EOL> ( _ktype92 , _vtype93 , _size91 ) = iprot . readMapBegin ( ) <EOL> for _i95 in xrange ( _size91 ) : <EOL> _key96 = iprot . readString ( ) <EOL> _val97 = set ( ) <EOL> ( _etype101 , _size98 ) = iprot . readSetBegin ( ) <EOL> for _i102 in xrange ( _size98 ) : <EOL> _elem103 = TSentryPrivilege ( ) <EOL> _elem103 . read ( iprot ) <EOL> _val97 . add ( _elem103 ) <EOL> iprot . readSetEnd ( ) <EOL> self . privilegeMap [ _key96 ] = _val97 <EOL> iprot . readMapEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . privilegeMap is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . MAP , <NUM_LIT:1> ) <EOL> oprot . writeMapBegin ( TType . STRING , TType . SET , len ( self . privilegeMap ) ) <EOL> for kiter104 , viter105 in self . privilegeMap . items ( ) : <EOL> oprot . writeString ( kiter104 ) <EOL> oprot . writeSetBegin ( TType . STRUCT , len ( viter105 ) ) <EOL> for iter106 in viter105 : <EOL> iter106 . write ( oprot ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeMapEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . privilegeMap is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . privilegeMap ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TListSentryPrivilegesByAuthRequest ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , <NUM_LIT:2> , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:5> , TType . SET , '<STR_LIT>' , ( TType . STRING , None ) , None , ) , <EOL> ( <NUM_LIT:6> , TType . SET , '<STR_LIT>' , ( TType . STRING , None ) , None , ) , <EOL> ( <NUM_LIT:7> , TType . STRUCT , '<STR_LIT>' , ( TSentryActiveRoleSet , TSentryActiveRoleSet . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , protocol_version = thrift_spec [ <NUM_LIT:1> ] [ <NUM_LIT:4> ] , requestorUserName = None , component = None , serviceName = None , authorizablesSet = None , groups = None , roleSet = None , ) : <EOL> self . protocol_version = protocol_version <EOL> self . requestorUserName = requestorUserName <EOL> self . component = component <EOL> self . serviceName = serviceName <EOL> self . authorizablesSet = authorizablesSet <EOL> self . groups = groups <EOL> self . roleSet = roleSet <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . protocol_version = iprot . readI32 ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . requestorUserName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . component = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . serviceName = iprot . readString ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . SET : <EOL> self . authorizablesSet = set ( ) <EOL> ( _etype110 , _size107 ) = iprot . readSetBegin ( ) <EOL> for _i111 in xrange ( _size107 ) : <EOL> _elem112 = iprot . readString ( ) <EOL> self . authorizablesSet . add ( _elem112 ) <EOL> iprot . readSetEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:6> : <EOL> if ftype == TType . SET : <EOL> self . groups = set ( ) <EOL> ( _etype116 , _size113 ) = iprot . readSetBegin ( ) <EOL> for _i117 in xrange ( _size113 ) : <EOL> _elem118 = iprot . readString ( ) <EOL> self . groups . add ( _elem118 ) <EOL> iprot . readSetEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:7> : <EOL> if ftype == TType . STRUCT : <EOL> self . roleSet = TSentryActiveRoleSet ( ) <EOL> self . roleSet . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . protocol_version is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . protocol_version ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . requestorUserName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . requestorUserName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . component is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . component ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . serviceName is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . serviceName ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . authorizablesSet is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . SET , <NUM_LIT:5> ) <EOL> oprot . writeSetBegin ( TType . STRING , len ( self . authorizablesSet ) ) <EOL> for iter119 in self . authorizablesSet : <EOL> oprot . writeString ( iter119 ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . groups is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . SET , <NUM_LIT:6> ) <EOL> oprot . writeSetBegin ( TType . STRING , len ( self . groups ) ) <EOL> for iter120 in self . groups : <EOL> oprot . writeString ( iter120 ) <EOL> oprot . writeSetEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . roleSet is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRUCT , <NUM_LIT:7> ) <EOL> self . roleSet . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . protocol_version is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . requestorUserName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . component is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . serviceName is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . authorizablesSet is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . protocol_version ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . requestorUserName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . component ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . serviceName ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . authorizablesSet ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . groups ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . roleSet ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class TListSentryPrivilegesByAuthResponse ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRUCT , '<STR_LIT:status>' , ( sentry_common_service . ttypes . TSentryResponseStatus , sentry_common_service . ttypes . TSentryResponseStatus . thrift_spec ) , None , ) , <EOL> ( <NUM_LIT:2> , TType . MAP , '<STR_LIT>' , ( TType . STRING , None , TType . STRUCT , ( TSentryPrivilegeMap , TSentryPrivilegeMap . thrift_spec ) ) , None , ) , <EOL> ) <EOL> def __init__ ( self , status = None , privilegesMapByAuth = None , ) : <EOL> self . status = status <EOL> self . privilegesMapByAuth = privilegesMapByAuth <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRUCT : <EOL> self . status = sentry_common_service . ttypes . TSentryResponseStatus ( ) <EOL> self . status . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . MAP : <EOL> self . privilegesMapByAuth = { } <EOL> ( _ktype122 , _vtype123 , _size121 ) = iprot . readMapBegin ( ) <EOL> for _i125 in xrange ( _size121 ) : <EOL> _key126 = iprot . readString ( ) <EOL> _val127 = TSentryPrivilegeMap ( ) <EOL> _val127 . read ( iprot ) <EOL> self . privilegesMapByAuth [ _key126 ] = _val127 <EOL> iprot . readMapEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . status is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:status>' , TType . STRUCT , <NUM_LIT:1> ) <EOL> self . status . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . privilegesMapByAuth is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . MAP , <NUM_LIT:2> ) <EOL> oprot . writeMapBegin ( TType . STRING , TType . STRUCT , len ( self . privilegesMapByAuth ) ) <EOL> for kiter128 , viter129 in self . privilegesMapByAuth . items ( ) : <EOL> oprot . writeString ( kiter128 ) <EOL> viter129 . write ( oprot ) <EOL> oprot . writeMapEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . status is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __hash__ ( self ) : <EOL> value = <NUM_LIT> <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . status ) <EOL> value = ( value * <NUM_LIT> ) ^ hash ( self . privilegesMapByAuth ) <EOL> return value <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) </s>
