|
|
@@ -0,0 +1,2715 @@
|
|
|
+#
|
|
|
+# Autogenerated by Thrift Compiler (0.9.3)
|
|
|
+#
|
|
|
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
+#
|
|
|
+# options string: py:new_style
|
|
|
+#
|
|
|
+
|
|
|
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
|
|
|
+import sentry_common_service.ttypes
|
|
|
+import sentry_policy_service.ttypes
|
|
|
+
|
|
|
+
|
|
|
+from thrift.transport import TTransport
|
|
|
+from thrift.protocol import TBinaryProtocol, TProtocol
|
|
|
+try:
|
|
|
+ from thrift.protocol import fastbinary
|
|
|
+except:
|
|
|
+ fastbinary = None
|
|
|
+
|
|
|
+
|
|
|
+class TSentryGrantOption(object):
|
|
|
+ TRUE = 1
|
|
|
+ FALSE = 0
|
|
|
+ UNSET = -1
|
|
|
+
|
|
|
+ _VALUES_TO_NAMES = {
|
|
|
+ 1: "TRUE",
|
|
|
+ 0: "FALSE",
|
|
|
+ -1: "UNSET",
|
|
|
+ }
|
|
|
+
|
|
|
+ _NAMES_TO_VALUES = {
|
|
|
+ "TRUE": 1,
|
|
|
+ "FALSE": 0,
|
|
|
+ "UNSET": -1,
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+class TAuthorizable(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - type
|
|
|
+ - name
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRING, 'type', None, None, ), # 1
|
|
|
+ (2, TType.STRING, 'name', None, None, ), # 2
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, type=None, name=None,):
|
|
|
+ self.type = type
|
|
|
+ self.name = name
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.type = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.name = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TAuthorizable')
|
|
|
+ if self.type is not None:
|
|
|
+ oprot.writeFieldBegin('type', TType.STRING, 1)
|
|
|
+ oprot.writeString(self.type)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.name is not None:
|
|
|
+ oprot.writeFieldBegin('name', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.name)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.type is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field type is unset!')
|
|
|
+ if self.name is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field name is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.type)
|
|
|
+ value = (value * 31) ^ hash(self.name)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TSentryPrivilege(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - component
|
|
|
+ - serviceName
|
|
|
+ - authorizables
|
|
|
+ - action
|
|
|
+ - createTime
|
|
|
+ - grantorPrincipal
|
|
|
+ - grantOption
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRING, 'component', None, None, ), # 1
|
|
|
+ (2, TType.STRING, 'serviceName', None, None, ), # 2
|
|
|
+ (3, TType.LIST, 'authorizables', (TType.STRUCT,(TAuthorizable, TAuthorizable.thrift_spec)), None, ), # 3
|
|
|
+ (4, TType.STRING, 'action', None, None, ), # 4
|
|
|
+ (5, TType.I64, 'createTime', None, None, ), # 5
|
|
|
+ (6, TType.STRING, 'grantorPrincipal', None, None, ), # 6
|
|
|
+ (7, TType.I32, 'grantOption', None, 0, ), # 7
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, component=None, serviceName=None, authorizables=None, action=None, createTime=None, grantorPrincipal=None, grantOption=thrift_spec[7][4],):
|
|
|
+ self.component = component
|
|
|
+ self.serviceName = serviceName
|
|
|
+ self.authorizables = authorizables
|
|
|
+ self.action = action
|
|
|
+ self.createTime = createTime
|
|
|
+ self.grantorPrincipal = grantorPrincipal
|
|
|
+ self.grantOption = grantOption
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.serviceName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.authorizables = []
|
|
|
+ (_etype3, _size0) = iprot.readListBegin()
|
|
|
+ for _i4 in xrange(_size0):
|
|
|
+ _elem5 = TAuthorizable()
|
|
|
+ _elem5.read(iprot)
|
|
|
+ self.authorizables.append(_elem5)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.action = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 5:
|
|
|
+ if ftype == TType.I64:
|
|
|
+ self.createTime = iprot.readI64()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 6:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.grantorPrincipal = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 7:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.grantOption = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TSentryPrivilege')
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 1)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.serviceName is not None:
|
|
|
+ oprot.writeFieldBegin('serviceName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.serviceName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.authorizables is not None:
|
|
|
+ oprot.writeFieldBegin('authorizables', TType.LIST, 3)
|
|
|
+ oprot.writeListBegin(TType.STRUCT, len(self.authorizables))
|
|
|
+ for iter6 in self.authorizables:
|
|
|
+ iter6.write(oprot)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.action is not None:
|
|
|
+ oprot.writeFieldBegin('action', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.action)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.createTime is not None:
|
|
|
+ oprot.writeFieldBegin('createTime', TType.I64, 5)
|
|
|
+ oprot.writeI64(self.createTime)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.grantorPrincipal is not None:
|
|
|
+ oprot.writeFieldBegin('grantorPrincipal', TType.STRING, 6)
|
|
|
+ oprot.writeString(self.grantorPrincipal)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.grantOption is not None:
|
|
|
+ oprot.writeFieldBegin('grantOption', TType.I32, 7)
|
|
|
+ oprot.writeI32(self.grantOption)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ if self.serviceName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field serviceName is unset!')
|
|
|
+ if self.authorizables is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field authorizables is unset!')
|
|
|
+ if self.action is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field action is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ value = (value * 31) ^ hash(self.serviceName)
|
|
|
+ value = (value * 31) ^ hash(self.authorizables)
|
|
|
+ value = (value * 31) ^ hash(self.action)
|
|
|
+ value = (value * 31) ^ hash(self.createTime)
|
|
|
+ value = (value * 31) ^ hash(self.grantorPrincipal)
|
|
|
+ value = (value * 31) ^ hash(self.grantOption)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TCreateSentryRoleRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - requestorUserName
|
|
|
+ - roleName
|
|
|
+ - component
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'requestorUserName', None, None, ), # 2
|
|
|
+ (3, TType.STRING, 'roleName', None, None, ), # 3
|
|
|
+ (4, TType.STRING, 'component', None, None, ), # 4
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], requestorUserName=None, roleName=None, component=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.requestorUserName = requestorUserName
|
|
|
+ self.roleName = roleName
|
|
|
+ self.component = component
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.requestorUserName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.roleName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TCreateSentryRoleRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.requestorUserName is not None:
|
|
|
+ oprot.writeFieldBegin('requestorUserName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.requestorUserName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.roleName is not None:
|
|
|
+ oprot.writeFieldBegin('roleName', TType.STRING, 3)
|
|
|
+ oprot.writeString(self.roleName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.requestorUserName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field requestorUserName is unset!')
|
|
|
+ if self.roleName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field roleName is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.requestorUserName)
|
|
|
+ value = (value * 31) ^ hash(self.roleName)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TCreateSentryRoleResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None,):
|
|
|
+ self.status = status
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TCreateSentryRoleResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TDropSentryRoleRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - requestorUserName
|
|
|
+ - roleName
|
|
|
+ - component
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'requestorUserName', None, None, ), # 2
|
|
|
+ (3, TType.STRING, 'roleName', None, None, ), # 3
|
|
|
+ (4, TType.STRING, 'component', None, None, ), # 4
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], requestorUserName=None, roleName=None, component=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.requestorUserName = requestorUserName
|
|
|
+ self.roleName = roleName
|
|
|
+ self.component = component
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.requestorUserName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.roleName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TDropSentryRoleRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.requestorUserName is not None:
|
|
|
+ oprot.writeFieldBegin('requestorUserName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.requestorUserName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.roleName is not None:
|
|
|
+ oprot.writeFieldBegin('roleName', TType.STRING, 3)
|
|
|
+ oprot.writeString(self.roleName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.requestorUserName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field requestorUserName is unset!')
|
|
|
+ if self.roleName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field roleName is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.requestorUserName)
|
|
|
+ value = (value * 31) ^ hash(self.roleName)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TDropSentryRoleResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None,):
|
|
|
+ self.status = status
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TDropSentryRoleResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TAlterSentryRoleAddGroupsRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - requestorUserName
|
|
|
+ - roleName
|
|
|
+ - component
|
|
|
+ - groups
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'requestorUserName', None, None, ), # 2
|
|
|
+ (3, TType.STRING, 'roleName', None, None, ), # 3
|
|
|
+ (4, TType.STRING, 'component', None, None, ), # 4
|
|
|
+ (5, TType.SET, 'groups', (TType.STRING,None), None, ), # 5
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], requestorUserName=None, roleName=None, component=None, groups=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.requestorUserName = requestorUserName
|
|
|
+ self.roleName = roleName
|
|
|
+ self.component = component
|
|
|
+ self.groups = groups
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.requestorUserName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.roleName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 5:
|
|
|
+ if ftype == TType.SET:
|
|
|
+ self.groups = set()
|
|
|
+ (_etype10, _size7) = iprot.readSetBegin()
|
|
|
+ for _i11 in xrange(_size7):
|
|
|
+ _elem12 = iprot.readString()
|
|
|
+ self.groups.add(_elem12)
|
|
|
+ iprot.readSetEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TAlterSentryRoleAddGroupsRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.requestorUserName is not None:
|
|
|
+ oprot.writeFieldBegin('requestorUserName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.requestorUserName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.roleName is not None:
|
|
|
+ oprot.writeFieldBegin('roleName', TType.STRING, 3)
|
|
|
+ oprot.writeString(self.roleName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.groups is not None:
|
|
|
+ oprot.writeFieldBegin('groups', TType.SET, 5)
|
|
|
+ oprot.writeSetBegin(TType.STRING, len(self.groups))
|
|
|
+ for iter13 in self.groups:
|
|
|
+ oprot.writeString(iter13)
|
|
|
+ oprot.writeSetEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.requestorUserName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field requestorUserName is unset!')
|
|
|
+ if self.roleName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field roleName is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ if self.groups is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field groups is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.requestorUserName)
|
|
|
+ value = (value * 31) ^ hash(self.roleName)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ value = (value * 31) ^ hash(self.groups)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TAlterSentryRoleAddGroupsResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None,):
|
|
|
+ self.status = status
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TAlterSentryRoleAddGroupsResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TAlterSentryRoleDeleteGroupsRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - requestorUserName
|
|
|
+ - roleName
|
|
|
+ - component
|
|
|
+ - groups
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'requestorUserName', None, None, ), # 2
|
|
|
+ (3, TType.STRING, 'roleName', None, None, ), # 3
|
|
|
+ (4, TType.STRING, 'component', None, None, ), # 4
|
|
|
+ (5, TType.SET, 'groups', (TType.STRING,None), None, ), # 5
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], requestorUserName=None, roleName=None, component=None, groups=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.requestorUserName = requestorUserName
|
|
|
+ self.roleName = roleName
|
|
|
+ self.component = component
|
|
|
+ self.groups = groups
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.requestorUserName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.roleName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 5:
|
|
|
+ if ftype == TType.SET:
|
|
|
+ self.groups = set()
|
|
|
+ (_etype17, _size14) = iprot.readSetBegin()
|
|
|
+ for _i18 in xrange(_size14):
|
|
|
+ _elem19 = iprot.readString()
|
|
|
+ self.groups.add(_elem19)
|
|
|
+ iprot.readSetEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TAlterSentryRoleDeleteGroupsRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.requestorUserName is not None:
|
|
|
+ oprot.writeFieldBegin('requestorUserName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.requestorUserName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.roleName is not None:
|
|
|
+ oprot.writeFieldBegin('roleName', TType.STRING, 3)
|
|
|
+ oprot.writeString(self.roleName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.groups is not None:
|
|
|
+ oprot.writeFieldBegin('groups', TType.SET, 5)
|
|
|
+ oprot.writeSetBegin(TType.STRING, len(self.groups))
|
|
|
+ for iter20 in self.groups:
|
|
|
+ oprot.writeString(iter20)
|
|
|
+ oprot.writeSetEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.requestorUserName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field requestorUserName is unset!')
|
|
|
+ if self.roleName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field roleName is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ if self.groups is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field groups is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.requestorUserName)
|
|
|
+ value = (value * 31) ^ hash(self.roleName)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ value = (value * 31) ^ hash(self.groups)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TAlterSentryRoleDeleteGroupsResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None,):
|
|
|
+ self.status = status
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TAlterSentryRoleDeleteGroupsResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TAlterSentryRoleGrantPrivilegeRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - requestorUserName
|
|
|
+ - roleName
|
|
|
+ - component
|
|
|
+ - privilege
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'requestorUserName', None, None, ), # 2
|
|
|
+ (3, TType.STRING, 'roleName', None, None, ), # 3
|
|
|
+ (4, TType.STRING, 'component', None, None, ), # 4
|
|
|
+ (5, TType.STRUCT, 'privilege', (TSentryPrivilege, TSentryPrivilege.thrift_spec), None, ), # 5
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], requestorUserName=None, roleName=None, component=None, privilege=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.requestorUserName = requestorUserName
|
|
|
+ self.roleName = roleName
|
|
|
+ self.component = component
|
|
|
+ self.privilege = privilege
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.requestorUserName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.roleName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 5:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.privilege = TSentryPrivilege()
|
|
|
+ self.privilege.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TAlterSentryRoleGrantPrivilegeRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.requestorUserName is not None:
|
|
|
+ oprot.writeFieldBegin('requestorUserName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.requestorUserName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.roleName is not None:
|
|
|
+ oprot.writeFieldBegin('roleName', TType.STRING, 3)
|
|
|
+ oprot.writeString(self.roleName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.privilege is not None:
|
|
|
+ oprot.writeFieldBegin('privilege', TType.STRUCT, 5)
|
|
|
+ self.privilege.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.requestorUserName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field requestorUserName is unset!')
|
|
|
+ if self.roleName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field roleName is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ if self.privilege is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field privilege is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.requestorUserName)
|
|
|
+ value = (value * 31) ^ hash(self.roleName)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ value = (value * 31) ^ hash(self.privilege)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TAlterSentryRoleGrantPrivilegeResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None,):
|
|
|
+ self.status = status
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TAlterSentryRoleGrantPrivilegeResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TAlterSentryRoleRevokePrivilegeRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - requestorUserName
|
|
|
+ - roleName
|
|
|
+ - component
|
|
|
+ - privilege
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'requestorUserName', None, None, ), # 2
|
|
|
+ (3, TType.STRING, 'roleName', None, None, ), # 3
|
|
|
+ (4, TType.STRING, 'component', None, None, ), # 4
|
|
|
+ (5, TType.STRUCT, 'privilege', (TSentryPrivilege, TSentryPrivilege.thrift_spec), None, ), # 5
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], requestorUserName=None, roleName=None, component=None, privilege=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.requestorUserName = requestorUserName
|
|
|
+ self.roleName = roleName
|
|
|
+ self.component = component
|
|
|
+ self.privilege = privilege
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.requestorUserName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.roleName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 5:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.privilege = TSentryPrivilege()
|
|
|
+ self.privilege.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TAlterSentryRoleRevokePrivilegeRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.requestorUserName is not None:
|
|
|
+ oprot.writeFieldBegin('requestorUserName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.requestorUserName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.roleName is not None:
|
|
|
+ oprot.writeFieldBegin('roleName', TType.STRING, 3)
|
|
|
+ oprot.writeString(self.roleName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.privilege is not None:
|
|
|
+ oprot.writeFieldBegin('privilege', TType.STRUCT, 5)
|
|
|
+ self.privilege.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.requestorUserName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field requestorUserName is unset!')
|
|
|
+ if self.roleName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field roleName is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ if self.privilege is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field privilege is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.requestorUserName)
|
|
|
+ value = (value * 31) ^ hash(self.roleName)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ value = (value * 31) ^ hash(self.privilege)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TAlterSentryRoleRevokePrivilegeResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None,):
|
|
|
+ self.status = status
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TAlterSentryRoleRevokePrivilegeResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TListSentryRolesRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - requestorUserName
|
|
|
+ - groupName
|
|
|
+ - component
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'requestorUserName', None, None, ), # 2
|
|
|
+ (3, TType.STRING, 'groupName', None, None, ), # 3
|
|
|
+ (4, TType.STRING, 'component', None, None, ), # 4
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], requestorUserName=None, groupName=None, component=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.requestorUserName = requestorUserName
|
|
|
+ self.groupName = groupName
|
|
|
+ self.component = component
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.requestorUserName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.groupName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TListSentryRolesRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.requestorUserName is not None:
|
|
|
+ oprot.writeFieldBegin('requestorUserName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.requestorUserName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.groupName is not None:
|
|
|
+ oprot.writeFieldBegin('groupName', TType.STRING, 3)
|
|
|
+ oprot.writeString(self.groupName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.requestorUserName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field requestorUserName is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.requestorUserName)
|
|
|
+ value = (value * 31) ^ hash(self.groupName)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TSentryRole(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - roleName
|
|
|
+ - groups
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRING, 'roleName', None, None, ), # 1
|
|
|
+ (2, TType.SET, 'groups', (TType.STRING,None), None, ), # 2
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, roleName=None, groups=None,):
|
|
|
+ self.roleName = roleName
|
|
|
+ self.groups = groups
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.roleName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.SET:
|
|
|
+ self.groups = set()
|
|
|
+ (_etype24, _size21) = iprot.readSetBegin()
|
|
|
+ for _i25 in xrange(_size21):
|
|
|
+ _elem26 = iprot.readString()
|
|
|
+ self.groups.add(_elem26)
|
|
|
+ iprot.readSetEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TSentryRole')
|
|
|
+ if self.roleName is not None:
|
|
|
+ oprot.writeFieldBegin('roleName', TType.STRING, 1)
|
|
|
+ oprot.writeString(self.roleName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.groups is not None:
|
|
|
+ oprot.writeFieldBegin('groups', TType.SET, 2)
|
|
|
+ oprot.writeSetBegin(TType.STRING, len(self.groups))
|
|
|
+ for iter27 in self.groups:
|
|
|
+ oprot.writeString(iter27)
|
|
|
+ oprot.writeSetEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.roleName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field roleName is unset!')
|
|
|
+ if self.groups is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field groups is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.roleName)
|
|
|
+ value = (value * 31) ^ hash(self.groups)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TListSentryRolesResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ - roles
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ (2, TType.SET, 'roles', (TType.STRUCT,(TSentryRole, TSentryRole.thrift_spec)), None, ), # 2
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None, roles=None,):
|
|
|
+ self.status = status
|
|
|
+ self.roles = roles
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.SET:
|
|
|
+ self.roles = set()
|
|
|
+ (_etype31, _size28) = iprot.readSetBegin()
|
|
|
+ for _i32 in xrange(_size28):
|
|
|
+ _elem33 = TSentryRole()
|
|
|
+ _elem33.read(iprot)
|
|
|
+ self.roles.add(_elem33)
|
|
|
+ iprot.readSetEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TListSentryRolesResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.roles is not None:
|
|
|
+ oprot.writeFieldBegin('roles', TType.SET, 2)
|
|
|
+ oprot.writeSetBegin(TType.STRUCT, len(self.roles))
|
|
|
+ for iter34 in self.roles:
|
|
|
+ iter34.write(oprot)
|
|
|
+ oprot.writeSetEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ value = (value * 31) ^ hash(self.roles)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TListSentryPrivilegesRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - requestorUserName
|
|
|
+ - roleName
|
|
|
+ - component
|
|
|
+ - serviceName
|
|
|
+ - authorizables
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'requestorUserName', None, None, ), # 2
|
|
|
+ (3, TType.STRING, 'roleName', None, None, ), # 3
|
|
|
+ (4, TType.STRING, 'component', None, None, ), # 4
|
|
|
+ (5, TType.STRING, 'serviceName', None, None, ), # 5
|
|
|
+ (6, TType.LIST, 'authorizables', (TType.STRUCT,(TAuthorizable, TAuthorizable.thrift_spec)), None, ), # 6
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], requestorUserName=None, roleName=None, component=None, serviceName=None, authorizables=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.requestorUserName = requestorUserName
|
|
|
+ self.roleName = roleName
|
|
|
+ self.component = component
|
|
|
+ self.serviceName = serviceName
|
|
|
+ self.authorizables = authorizables
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.requestorUserName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.roleName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 5:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.serviceName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 6:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.authorizables = []
|
|
|
+ (_etype38, _size35) = iprot.readListBegin()
|
|
|
+ for _i39 in xrange(_size35):
|
|
|
+ _elem40 = TAuthorizable()
|
|
|
+ _elem40.read(iprot)
|
|
|
+ self.authorizables.append(_elem40)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TListSentryPrivilegesRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.requestorUserName is not None:
|
|
|
+ oprot.writeFieldBegin('requestorUserName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.requestorUserName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.roleName is not None:
|
|
|
+ oprot.writeFieldBegin('roleName', TType.STRING, 3)
|
|
|
+ oprot.writeString(self.roleName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.serviceName is not None:
|
|
|
+ oprot.writeFieldBegin('serviceName', TType.STRING, 5)
|
|
|
+ oprot.writeString(self.serviceName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.authorizables is not None:
|
|
|
+ oprot.writeFieldBegin('authorizables', TType.LIST, 6)
|
|
|
+ oprot.writeListBegin(TType.STRUCT, len(self.authorizables))
|
|
|
+ for iter41 in self.authorizables:
|
|
|
+ iter41.write(oprot)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.requestorUserName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field requestorUserName is unset!')
|
|
|
+ if self.roleName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field roleName is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ if self.serviceName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field serviceName is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.requestorUserName)
|
|
|
+ value = (value * 31) ^ hash(self.roleName)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ value = (value * 31) ^ hash(self.serviceName)
|
|
|
+ value = (value * 31) ^ hash(self.authorizables)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TListSentryPrivilegesResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ - privileges
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ (2, TType.SET, 'privileges', (TType.STRUCT,(TSentryPrivilege, TSentryPrivilege.thrift_spec)), None, ), # 2
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None, privileges=None,):
|
|
|
+ self.status = status
|
|
|
+ self.privileges = privileges
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.SET:
|
|
|
+ self.privileges = set()
|
|
|
+ (_etype45, _size42) = iprot.readSetBegin()
|
|
|
+ for _i46 in xrange(_size42):
|
|
|
+ _elem47 = TSentryPrivilege()
|
|
|
+ _elem47.read(iprot)
|
|
|
+ self.privileges.add(_elem47)
|
|
|
+ iprot.readSetEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TListSentryPrivilegesResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.privileges is not None:
|
|
|
+ oprot.writeFieldBegin('privileges', TType.SET, 2)
|
|
|
+ oprot.writeSetBegin(TType.STRUCT, len(self.privileges))
|
|
|
+ for iter48 in self.privileges:
|
|
|
+ iter48.write(oprot)
|
|
|
+ oprot.writeSetEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ value = (value * 31) ^ hash(self.privileges)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TDropPrivilegesRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - requestorUserName
|
|
|
+ - privilege
|
|
|
+ - component
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'requestorUserName', None, None, ), # 2
|
|
|
+ (3, TType.STRUCT, 'privilege', (TSentryPrivilege, TSentryPrivilege.thrift_spec), None, ), # 3
|
|
|
+ (4, TType.STRING, 'component', None, None, ), # 4
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], requestorUserName=None, privilege=None, component=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.requestorUserName = requestorUserName
|
|
|
+ self.privilege = privilege
|
|
|
+ self.component = component
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.requestorUserName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.privilege = TSentryPrivilege()
|
|
|
+ self.privilege.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TDropPrivilegesRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.requestorUserName is not None:
|
|
|
+ oprot.writeFieldBegin('requestorUserName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.requestorUserName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.privilege is not None:
|
|
|
+ oprot.writeFieldBegin('privilege', TType.STRUCT, 3)
|
|
|
+ self.privilege.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.requestorUserName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field requestorUserName is unset!')
|
|
|
+ if self.privilege is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field privilege is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.requestorUserName)
|
|
|
+ value = (value * 31) ^ hash(self.privilege)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TDropPrivilegesResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None,):
|
|
|
+ self.status = status
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TDropPrivilegesResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TRenamePrivilegesRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - requestorUserName
|
|
|
+ - component
|
|
|
+ - serviceName
|
|
|
+ - oldAuthorizables
|
|
|
+ - newAuthorizables
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'requestorUserName', None, None, ), # 2
|
|
|
+ (3, TType.STRING, 'component', None, None, ), # 3
|
|
|
+ (4, TType.STRING, 'serviceName', None, None, ), # 4
|
|
|
+ (5, TType.LIST, 'oldAuthorizables', (TType.STRUCT,(TAuthorizable, TAuthorizable.thrift_spec)), None, ), # 5
|
|
|
+ (6, TType.LIST, 'newAuthorizables', (TType.STRUCT,(TAuthorizable, TAuthorizable.thrift_spec)), None, ), # 6
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], requestorUserName=None, component=None, serviceName=None, oldAuthorizables=None, newAuthorizables=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.requestorUserName = requestorUserName
|
|
|
+ self.component = component
|
|
|
+ self.serviceName = serviceName
|
|
|
+ self.oldAuthorizables = oldAuthorizables
|
|
|
+ self.newAuthorizables = newAuthorizables
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.requestorUserName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.serviceName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 5:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.oldAuthorizables = []
|
|
|
+ (_etype52, _size49) = iprot.readListBegin()
|
|
|
+ for _i53 in xrange(_size49):
|
|
|
+ _elem54 = TAuthorizable()
|
|
|
+ _elem54.read(iprot)
|
|
|
+ self.oldAuthorizables.append(_elem54)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 6:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.newAuthorizables = []
|
|
|
+ (_etype58, _size55) = iprot.readListBegin()
|
|
|
+ for _i59 in xrange(_size55):
|
|
|
+ _elem60 = TAuthorizable()
|
|
|
+ _elem60.read(iprot)
|
|
|
+ self.newAuthorizables.append(_elem60)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TRenamePrivilegesRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.requestorUserName is not None:
|
|
|
+ oprot.writeFieldBegin('requestorUserName', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.requestorUserName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 3)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.serviceName is not None:
|
|
|
+ oprot.writeFieldBegin('serviceName', TType.STRING, 4)
|
|
|
+ oprot.writeString(self.serviceName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.oldAuthorizables is not None:
|
|
|
+ oprot.writeFieldBegin('oldAuthorizables', TType.LIST, 5)
|
|
|
+ oprot.writeListBegin(TType.STRUCT, len(self.oldAuthorizables))
|
|
|
+ for iter61 in self.oldAuthorizables:
|
|
|
+ iter61.write(oprot)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.newAuthorizables is not None:
|
|
|
+ oprot.writeFieldBegin('newAuthorizables', TType.LIST, 6)
|
|
|
+ oprot.writeListBegin(TType.STRUCT, len(self.newAuthorizables))
|
|
|
+ for iter62 in self.newAuthorizables:
|
|
|
+ iter62.write(oprot)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.requestorUserName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field requestorUserName is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ if self.serviceName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field serviceName is unset!')
|
|
|
+ if self.oldAuthorizables is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field oldAuthorizables is unset!')
|
|
|
+ if self.newAuthorizables is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field newAuthorizables is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.requestorUserName)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ value = (value * 31) ^ hash(self.serviceName)
|
|
|
+ value = (value * 31) ^ hash(self.oldAuthorizables)
|
|
|
+ value = (value * 31) ^ hash(self.newAuthorizables)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TRenamePrivilegesResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None,):
|
|
|
+ self.status = status
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TRenamePrivilegesResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TSentryActiveRoleSet(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - all
|
|
|
+ - roles
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.BOOL, 'all', None, None, ), # 1
|
|
|
+ (2, TType.SET, 'roles', (TType.STRING,None), None, ), # 2
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, all=None, roles=None,):
|
|
|
+ self.all = all
|
|
|
+ self.roles = roles
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.BOOL:
|
|
|
+ self.all = iprot.readBool()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.SET:
|
|
|
+ self.roles = set()
|
|
|
+ (_etype66, _size63) = iprot.readSetBegin()
|
|
|
+ for _i67 in xrange(_size63):
|
|
|
+ _elem68 = iprot.readString()
|
|
|
+ self.roles.add(_elem68)
|
|
|
+ iprot.readSetEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TSentryActiveRoleSet')
|
|
|
+ if self.all is not None:
|
|
|
+ oprot.writeFieldBegin('all', TType.BOOL, 1)
|
|
|
+ oprot.writeBool(self.all)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.roles is not None:
|
|
|
+ oprot.writeFieldBegin('roles', TType.SET, 2)
|
|
|
+ oprot.writeSetBegin(TType.STRING, len(self.roles))
|
|
|
+ for iter69 in self.roles:
|
|
|
+ oprot.writeString(iter69)
|
|
|
+ oprot.writeSetEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.all is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field all is unset!')
|
|
|
+ if self.roles is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field roles is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.all)
|
|
|
+ value = (value * 31) ^ hash(self.roles)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TListSentryPrivilegesForProviderRequest(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - protocol_version
|
|
|
+ - component
|
|
|
+ - serviceName
|
|
|
+ - groups
|
|
|
+ - roleSet
|
|
|
+ - authorizables
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.I32, 'protocol_version', None, 2, ), # 1
|
|
|
+ (2, TType.STRING, 'component', None, None, ), # 2
|
|
|
+ (3, TType.STRING, 'serviceName', None, None, ), # 3
|
|
|
+ (4, TType.SET, 'groups', (TType.STRING,None), None, ), # 4
|
|
|
+ (5, TType.STRUCT, 'roleSet', (TSentryActiveRoleSet, TSentryActiveRoleSet.thrift_spec), None, ), # 5
|
|
|
+ (6, TType.LIST, 'authorizables', (TType.STRUCT,(TAuthorizable, TAuthorizable.thrift_spec)), None, ), # 6
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, protocol_version=thrift_spec[1][4], component=None, serviceName=None, groups=None, roleSet=None, authorizables=None,):
|
|
|
+ self.protocol_version = protocol_version
|
|
|
+ self.component = component
|
|
|
+ self.serviceName = serviceName
|
|
|
+ self.groups = groups
|
|
|
+ self.roleSet = roleSet
|
|
|
+ self.authorizables = authorizables
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.I32:
|
|
|
+ self.protocol_version = iprot.readI32()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.component = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 3:
|
|
|
+ if ftype == TType.STRING:
|
|
|
+ self.serviceName = iprot.readString()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 4:
|
|
|
+ if ftype == TType.SET:
|
|
|
+ self.groups = set()
|
|
|
+ (_etype73, _size70) = iprot.readSetBegin()
|
|
|
+ for _i74 in xrange(_size70):
|
|
|
+ _elem75 = iprot.readString()
|
|
|
+ self.groups.add(_elem75)
|
|
|
+ iprot.readSetEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 5:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.roleSet = TSentryActiveRoleSet()
|
|
|
+ self.roleSet.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 6:
|
|
|
+ if ftype == TType.LIST:
|
|
|
+ self.authorizables = []
|
|
|
+ (_etype79, _size76) = iprot.readListBegin()
|
|
|
+ for _i80 in xrange(_size76):
|
|
|
+ _elem81 = TAuthorizable()
|
|
|
+ _elem81.read(iprot)
|
|
|
+ self.authorizables.append(_elem81)
|
|
|
+ iprot.readListEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TListSentryPrivilegesForProviderRequest')
|
|
|
+ if self.protocol_version is not None:
|
|
|
+ oprot.writeFieldBegin('protocol_version', TType.I32, 1)
|
|
|
+ oprot.writeI32(self.protocol_version)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.component is not None:
|
|
|
+ oprot.writeFieldBegin('component', TType.STRING, 2)
|
|
|
+ oprot.writeString(self.component)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.serviceName is not None:
|
|
|
+ oprot.writeFieldBegin('serviceName', TType.STRING, 3)
|
|
|
+ oprot.writeString(self.serviceName)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.groups is not None:
|
|
|
+ oprot.writeFieldBegin('groups', TType.SET, 4)
|
|
|
+ oprot.writeSetBegin(TType.STRING, len(self.groups))
|
|
|
+ for iter82 in self.groups:
|
|
|
+ oprot.writeString(iter82)
|
|
|
+ oprot.writeSetEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.roleSet is not None:
|
|
|
+ oprot.writeFieldBegin('roleSet', TType.STRUCT, 5)
|
|
|
+ self.roleSet.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.authorizables is not None:
|
|
|
+ oprot.writeFieldBegin('authorizables', TType.LIST, 6)
|
|
|
+ oprot.writeListBegin(TType.STRUCT, len(self.authorizables))
|
|
|
+ for iter83 in self.authorizables:
|
|
|
+ iter83.write(oprot)
|
|
|
+ oprot.writeListEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.protocol_version is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field protocol_version is unset!')
|
|
|
+ if self.component is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field component is unset!')
|
|
|
+ if self.serviceName is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field serviceName is unset!')
|
|
|
+ if self.groups is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field groups is unset!')
|
|
|
+ if self.roleSet is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field roleSet is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.protocol_version)
|
|
|
+ value = (value * 31) ^ hash(self.component)
|
|
|
+ value = (value * 31) ^ hash(self.serviceName)
|
|
|
+ value = (value * 31) ^ hash(self.groups)
|
|
|
+ value = (value * 31) ^ hash(self.roleSet)
|
|
|
+ value = (value * 31) ^ hash(self.authorizables)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|
|
|
+
|
|
|
+class TListSentryPrivilegesForProviderResponse(object):
|
|
|
+ """
|
|
|
+ Attributes:
|
|
|
+ - status
|
|
|
+ - privileges
|
|
|
+ """
|
|
|
+
|
|
|
+ thrift_spec = (
|
|
|
+ None, # 0
|
|
|
+ (1, TType.STRUCT, 'status', (sentry_common_service.ttypes.TSentryResponseStatus, sentry_common_service.ttypes.TSentryResponseStatus.thrift_spec), None, ), # 1
|
|
|
+ (2, TType.SET, 'privileges', (TType.STRING,None), None, ), # 2
|
|
|
+ )
|
|
|
+
|
|
|
+ def __init__(self, status=None, privileges=None,):
|
|
|
+ self.status = status
|
|
|
+ self.privileges = privileges
|
|
|
+
|
|
|
+ def read(self, iprot):
|
|
|
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
+ return
|
|
|
+ iprot.readStructBegin()
|
|
|
+ while True:
|
|
|
+ (fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
+ if ftype == TType.STOP:
|
|
|
+ break
|
|
|
+ if fid == 1:
|
|
|
+ if ftype == TType.STRUCT:
|
|
|
+ self.status = sentry_common_service.ttypes.TSentryResponseStatus()
|
|
|
+ self.status.read(iprot)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ elif fid == 2:
|
|
|
+ if ftype == TType.SET:
|
|
|
+ self.privileges = set()
|
|
|
+ (_etype87, _size84) = iprot.readSetBegin()
|
|
|
+ for _i88 in xrange(_size84):
|
|
|
+ _elem89 = iprot.readString()
|
|
|
+ self.privileges.add(_elem89)
|
|
|
+ iprot.readSetEnd()
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ else:
|
|
|
+ iprot.skip(ftype)
|
|
|
+ iprot.readFieldEnd()
|
|
|
+ iprot.readStructEnd()
|
|
|
+
|
|
|
+ def write(self, oprot):
|
|
|
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
+ return
|
|
|
+ oprot.writeStructBegin('TListSentryPrivilegesForProviderResponse')
|
|
|
+ if self.status is not None:
|
|
|
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
|
|
|
+ self.status.write(oprot)
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ if self.privileges is not None:
|
|
|
+ oprot.writeFieldBegin('privileges', TType.SET, 2)
|
|
|
+ oprot.writeSetBegin(TType.STRING, len(self.privileges))
|
|
|
+ for iter90 in self.privileges:
|
|
|
+ oprot.writeString(iter90)
|
|
|
+ oprot.writeSetEnd()
|
|
|
+ oprot.writeFieldEnd()
|
|
|
+ oprot.writeFieldStop()
|
|
|
+ oprot.writeStructEnd()
|
|
|
+
|
|
|
+ def validate(self):
|
|
|
+ if self.status is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field status is unset!')
|
|
|
+ if self.privileges is None:
|
|
|
+ raise TProtocol.TProtocolException(message='Required field privileges is unset!')
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+ def __hash__(self):
|
|
|
+ value = 17
|
|
|
+ value = (value * 31) ^ hash(self.status)
|
|
|
+ value = (value * 31) ^ hash(self.privileges)
|
|
|
+ return value
|
|
|
+
|
|
|
+ def __repr__(self):
|
|
|
+ L = ['%s=%r' % (key, value)
|
|
|
+ for key, value in self.__dict__.iteritems()]
|
|
|
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
+
|
|
|
+ def __eq__(self, other):
|
|
|
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
+
|
|
|
+ def __ne__(self, other):
|
|
|
+ return not (self == other)
|