http://git-wip-us.apache.org/repos/asf/hive/blob/42a38577/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py ---------------------------------------------------------------------- diff --cc standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py index 0000000,7570895..c21dfb0 mode 000000,100644..100644 --- a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@@ -1,0 -1,15160 +1,15163 @@@ + # + # Autogenerated by Thrift Compiler (0.9.3) + # + # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + # + # options string: py + # + + from thrift.Thrift import TType, TMessageType, TException, TApplicationException + import fb303.ttypes + + + from thrift.transport import TTransport + from thrift.protocol import TBinaryProtocol, TProtocol + try: + from thrift.protocol import fastbinary + except: + fastbinary = None + + + class HiveObjectType: + GLOBAL = 1 + DATABASE = 2 + TABLE = 3 + PARTITION = 4 + COLUMN = 5 + + _VALUES_TO_NAMES = { + 1: "GLOBAL", + 2: "DATABASE", + 3: "TABLE", + 4: "PARTITION", + 5: "COLUMN", + } + + _NAMES_TO_VALUES = { + "GLOBAL": 1, + "DATABASE": 2, + "TABLE": 3, + "PARTITION": 4, + "COLUMN": 5, + } + + class PrincipalType: + USER = 1 + ROLE = 2 + GROUP = 3 + + _VALUES_TO_NAMES = { + 1: "USER", + 2: "ROLE", + 3: "GROUP", + } + + _NAMES_TO_VALUES = { + "USER": 1, + "ROLE": 2, + "GROUP": 3, + } + + class PartitionEventType: + LOAD_DONE = 1 + + _VALUES_TO_NAMES = { + 1: "LOAD_DONE", + } + + _NAMES_TO_VALUES = { + "LOAD_DONE": 1, + } + + class TxnState: + COMMITTED = 1 + ABORTED = 2 + OPEN = 3 + + _VALUES_TO_NAMES = { + 1: "COMMITTED", + 2: "ABORTED", + 3: "OPEN", + } + + _NAMES_TO_VALUES = { + "COMMITTED": 1, + "ABORTED": 2, + "OPEN": 3, + } + + class LockLevel: + DB = 1 + TABLE = 2 + PARTITION = 3 + + _VALUES_TO_NAMES = { + 1: "DB", + 2: "TABLE", + 3: "PARTITION", + } + + _NAMES_TO_VALUES = { + "DB": 1, + "TABLE": 2, + "PARTITION": 3, + } + + class LockState: + ACQUIRED = 1 + WAITING = 2 + ABORT = 3 + NOT_ACQUIRED = 4 + + _VALUES_TO_NAMES = { + 1: "ACQUIRED", + 2: "WAITING", + 3: "ABORT", + 4: "NOT_ACQUIRED", + } + + _NAMES_TO_VALUES = { + "ACQUIRED": 1, + "WAITING": 2, + "ABORT": 3, + "NOT_ACQUIRED": 4, + } + + class LockType: + SHARED_READ = 1 + SHARED_WRITE = 2 + EXCLUSIVE = 3 + + _VALUES_TO_NAMES = { + 1: "SHARED_READ", + 2: "SHARED_WRITE", + 3: "EXCLUSIVE", + } + + _NAMES_TO_VALUES = { + "SHARED_READ": 1, + "SHARED_WRITE": 2, + "EXCLUSIVE": 3, + } + + class CompactionType: + MINOR = 1 + MAJOR = 2 + + _VALUES_TO_NAMES = { + 1: "MINOR", + 2: "MAJOR", + } + + _NAMES_TO_VALUES = { + "MINOR": 1, + "MAJOR": 2, + } + + class GrantRevokeType: + GRANT = 1 + REVOKE = 2 + + _VALUES_TO_NAMES = { + 1: "GRANT", + 2: "REVOKE", + } + + _NAMES_TO_VALUES = { + "GRANT": 1, + "REVOKE": 2, + } + + class DataOperationType: + SELECT = 1 + INSERT = 2 + UPDATE = 3 + DELETE = 4 + UNSET = 5 + NO_TXN = 6 + + _VALUES_TO_NAMES = { + 1: "SELECT", + 2: "INSERT", + 3: "UPDATE", + 4: "DELETE", + 5: "UNSET", + 6: "NO_TXN", + } + + _NAMES_TO_VALUES = { + "SELECT": 1, + "INSERT": 2, + "UPDATE": 3, + "DELETE": 4, + "UNSET": 5, + "NO_TXN": 6, + } + + class EventRequestType: + INSERT = 1 + UPDATE = 2 + DELETE = 3 + + _VALUES_TO_NAMES = { + 1: "INSERT", + 2: "UPDATE", + 3: "DELETE", + } + + _NAMES_TO_VALUES = { + "INSERT": 1, + "UPDATE": 2, + "DELETE": 3, + } + + class FunctionType: + JAVA = 1 + + _VALUES_TO_NAMES = { + 1: "JAVA", + } + + _NAMES_TO_VALUES = { + "JAVA": 1, + } + + class ResourceType: + JAR = 1 + FILE = 2 + ARCHIVE = 3 + + _VALUES_TO_NAMES = { + 1: "JAR", + 2: "FILE", + 3: "ARCHIVE", + } + + _NAMES_TO_VALUES = { + "JAR": 1, + "FILE": 2, + "ARCHIVE": 3, + } + + class FileMetadataExprType: + ORC_SARG = 1 + + _VALUES_TO_NAMES = { + 1: "ORC_SARG", + } + + _NAMES_TO_VALUES = { + "ORC_SARG": 1, + } + + class ClientCapability: + TEST_CAPABILITY = 1 ++ INSERT_ONLY_TABLES = 2 + + _VALUES_TO_NAMES = { + 1: "TEST_CAPABILITY", ++ 2: "INSERT_ONLY_TABLES", + } + + _NAMES_TO_VALUES = { + "TEST_CAPABILITY": 1, ++ "INSERT_ONLY_TABLES": 2, + } + + + class Version: + """ + Attributes: + - version + - comments + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'version', None, None, ), # 1 + (2, TType.STRING, 'comments', None, None, ), # 2 + ) + + def __init__(self, version=None, comments=None,): + self.version = version + self.comments = comments + + 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.version = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.comments = 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('Version') + if self.version is not None: + oprot.writeFieldBegin('version', TType.STRING, 1) + oprot.writeString(self.version) + oprot.writeFieldEnd() + if self.comments is not None: + oprot.writeFieldBegin('comments', TType.STRING, 2) + oprot.writeString(self.comments) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.version) + value = (value * 31) ^ hash(self.comments) + 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 FieldSchema: + """ + Attributes: + - name + - type + - comment + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'type', None, None, ), # 2 + (3, TType.STRING, 'comment', None, None, ), # 3 + ) + + def __init__(self, name=None, type=None, comment=None,): + self.name = name + self.type = type + self.comment = comment + + 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.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.type = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.comment = 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('FieldSchema') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.STRING, 2) + oprot.writeString(self.type) + oprot.writeFieldEnd() + if self.comment is not None: + oprot.writeFieldBegin('comment', TType.STRING, 3) + oprot.writeString(self.comment) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.type) + value = (value * 31) ^ hash(self.comment) + 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 SQLPrimaryKey: + """ + Attributes: + - table_db + - table_name + - column_name + - key_seq + - pk_name + - enable_cstr + - validate_cstr + - rely_cstr + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table_db', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'column_name', None, None, ), # 3 + (4, TType.I32, 'key_seq', None, None, ), # 4 + (5, TType.STRING, 'pk_name', None, None, ), # 5 + (6, TType.BOOL, 'enable_cstr', None, None, ), # 6 + (7, TType.BOOL, 'validate_cstr', None, None, ), # 7 + (8, TType.BOOL, 'rely_cstr', None, None, ), # 8 + ) + + def __init__(self, table_db=None, table_name=None, column_name=None, key_seq=None, pk_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.key_seq = key_seq + self.pk_name = pk_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + 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.table_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.pk_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + 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('SQLPrimaryKey') + if self.table_db is not None: + oprot.writeFieldBegin('table_db', TType.STRING, 1) + oprot.writeString(self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin('column_name', TType.STRING, 3) + oprot.writeString(self.column_name) + oprot.writeFieldEnd() + if self.key_seq is not None: + oprot.writeFieldBegin('key_seq', TType.I32, 4) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + if self.pk_name is not None: + oprot.writeFieldBegin('pk_name', TType.STRING, 5) + oprot.writeString(self.pk_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin('enable_cstr', TType.BOOL, 6) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin('validate_cstr', TType.BOOL, 7) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin('rely_cstr', TType.BOOL, 8) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.table_db) + value = (value * 31) ^ hash(self.table_name) + value = (value * 31) ^ hash(self.column_name) + value = (value * 31) ^ hash(self.key_seq) + value = (value * 31) ^ hash(self.pk_name) + value = (value * 31) ^ hash(self.enable_cstr) + value = (value * 31) ^ hash(self.validate_cstr) + value = (value * 31) ^ hash(self.rely_cstr) + 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 SQLForeignKey: + """ + Attributes: + - pktable_db + - pktable_name + - pkcolumn_name + - fktable_db + - fktable_name + - fkcolumn_name + - key_seq + - update_rule + - delete_rule + - fk_name + - pk_name + - enable_cstr + - validate_cstr + - rely_cstr + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'pktable_db', None, None, ), # 1 + (2, TType.STRING, 'pktable_name', None, None, ), # 2 + (3, TType.STRING, 'pkcolumn_name', None, None, ), # 3 + (4, TType.STRING, 'fktable_db', None, None, ), # 4 + (5, TType.STRING, 'fktable_name', None, None, ), # 5 + (6, TType.STRING, 'fkcolumn_name', None, None, ), # 6 + (7, TType.I32, 'key_seq', None, None, ), # 7 + (8, TType.I32, 'update_rule', None, None, ), # 8 + (9, TType.I32, 'delete_rule', None, None, ), # 9 + (10, TType.STRING, 'fk_name', None, None, ), # 10 + (11, TType.STRING, 'pk_name', None, None, ), # 11 + (12, TType.BOOL, 'enable_cstr', None, None, ), # 12 + (13, TType.BOOL, 'validate_cstr', None, None, ), # 13 + (14, TType.BOOL, 'rely_cstr', None, None, ), # 14 + ) + + def __init__(self, pktable_db=None, pktable_name=None, pkcolumn_name=None, fktable_db=None, fktable_name=None, fkcolumn_name=None, key_seq=None, update_rule=None, delete_rule=None, fk_name=None, pk_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): + self.pktable_db = pktable_db + self.pktable_name = pktable_name + self.pkcolumn_name = pkcolumn_name + self.fktable_db = fktable_db + self.fktable_name = fktable_name + self.fkcolumn_name = fkcolumn_name + self.key_seq = key_seq + self.update_rule = update_rule + self.delete_rule = delete_rule + self.fk_name = fk_name + self.pk_name = pk_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + 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.pktable_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pktable_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.pkcolumn_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.fktable_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.fktable_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.fkcolumn_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I32: + self.update_rule = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.delete_rule = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.fk_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.pk_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + 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('SQLForeignKey') + if self.pktable_db is not None: + oprot.writeFieldBegin('pktable_db', TType.STRING, 1) + oprot.writeString(self.pktable_db) + oprot.writeFieldEnd() + if self.pktable_name is not None: + oprot.writeFieldBegin('pktable_name', TType.STRING, 2) + oprot.writeString(self.pktable_name) + oprot.writeFieldEnd() + if self.pkcolumn_name is not None: + oprot.writeFieldBegin('pkcolumn_name', TType.STRING, 3) + oprot.writeString(self.pkcolumn_name) + oprot.writeFieldEnd() + if self.fktable_db is not None: + oprot.writeFieldBegin('fktable_db', TType.STRING, 4) + oprot.writeString(self.fktable_db) + oprot.writeFieldEnd() + if self.fktable_name is not None: + oprot.writeFieldBegin('fktable_name', TType.STRING, 5) + oprot.writeString(self.fktable_name) + oprot.writeFieldEnd() + if self.fkcolumn_name is not None: + oprot.writeFieldBegin('fkcolumn_name', TType.STRING, 6) + oprot.writeString(self.fkcolumn_name) + oprot.writeFieldEnd() + if self.key_seq is not None: + oprot.writeFieldBegin('key_seq', TType.I32, 7) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + if self.update_rule is not None: + oprot.writeFieldBegin('update_rule', TType.I32, 8) + oprot.writeI32(self.update_rule) + oprot.writeFieldEnd() + if self.delete_rule is not None: + oprot.writeFieldBegin('delete_rule', TType.I32, 9) + oprot.writeI32(self.delete_rule) + oprot.writeFieldEnd() + if self.fk_name is not None: + oprot.writeFieldBegin('fk_name', TType.STRING, 10) + oprot.writeString(self.fk_name) + oprot.writeFieldEnd() + if self.pk_name is not None: + oprot.writeFieldBegin('pk_name', TType.STRING, 11) + oprot.writeString(self.pk_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin('enable_cstr', TType.BOOL, 12) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin('validate_cstr', TType.BOOL, 13) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin('rely_cstr', TType.BOOL, 14) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.pktable_db) + value = (value * 31) ^ hash(self.pktable_name) + value = (value * 31) ^ hash(self.pkcolumn_name) + value = (value * 31) ^ hash(self.fktable_db) + value = (value * 31) ^ hash(self.fktable_name) + value = (value * 31) ^ hash(self.fkcolumn_name) + value = (value * 31) ^ hash(self.key_seq) + value = (value * 31) ^ hash(self.update_rule) + value = (value * 31) ^ hash(self.delete_rule) + value = (value * 31) ^ hash(self.fk_name) + value = (value * 31) ^ hash(self.pk_name) + value = (value * 31) ^ hash(self.enable_cstr) + value = (value * 31) ^ hash(self.validate_cstr) + value = (value * 31) ^ hash(self.rely_cstr) + 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 SQLUniqueConstraint: + """ + Attributes: + - table_db + - table_name + - column_name + - key_seq + - uk_name + - enable_cstr + - validate_cstr + - rely_cstr + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table_db', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'column_name', None, None, ), # 3 + (4, TType.I32, 'key_seq', None, None, ), # 4 + (5, TType.STRING, 'uk_name', None, None, ), # 5 + (6, TType.BOOL, 'enable_cstr', None, None, ), # 6 + (7, TType.BOOL, 'validate_cstr', None, None, ), # 7 + (8, TType.BOOL, 'rely_cstr', None, None, ), # 8 + ) + + def __init__(self, table_db=None, table_name=None, column_name=None, key_seq=None, uk_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.key_seq = key_seq + self.uk_name = uk_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + 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.table_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.uk_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + 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('SQLUniqueConstraint') + if self.table_db is not None: + oprot.writeFieldBegin('table_db', TType.STRING, 1) + oprot.writeString(self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin('column_name', TType.STRING, 3) + oprot.writeString(self.column_name) + oprot.writeFieldEnd() + if self.key_seq is not None: + oprot.writeFieldBegin('key_seq', TType.I32, 4) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + if self.uk_name is not None: + oprot.writeFieldBegin('uk_name', TType.STRING, 5) + oprot.writeString(self.uk_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin('enable_cstr', TType.BOOL, 6) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin('validate_cstr', TType.BOOL, 7) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin('rely_cstr', TType.BOOL, 8) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.table_db) + value = (value * 31) ^ hash(self.table_name) + value = (value * 31) ^ hash(self.column_name) + value = (value * 31) ^ hash(self.key_seq) + value = (value * 31) ^ hash(self.uk_name) + value = (value * 31) ^ hash(self.enable_cstr) + value = (value * 31) ^ hash(self.validate_cstr) + value = (value * 31) ^ hash(self.rely_cstr) + 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 SQLNotNullConstraint: + """ + Attributes: + - table_db + - table_name + - column_name + - nn_name + - enable_cstr + - validate_cstr + - rely_cstr + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table_db', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'column_name', None, None, ), # 3 + (4, TType.STRING, 'nn_name', None, None, ), # 4 + (5, TType.BOOL, 'enable_cstr', None, None, ), # 5 + (6, TType.BOOL, 'validate_cstr', None, None, ), # 6 + (7, TType.BOOL, 'rely_cstr', None, None, ), # 7 + ) + + def __init__(self, table_db=None, table_name=None, column_name=None, nn_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.nn_name = nn_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + 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.table_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.nn_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + 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('SQLNotNullConstraint') + if self.table_db is not None: + oprot.writeFieldBegin('table_db', TType.STRING, 1) + oprot.writeString(self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin('column_name', TType.STRING, 3) + oprot.writeString(self.column_name) + oprot.writeFieldEnd() + if self.nn_name is not None: + oprot.writeFieldBegin('nn_name', TType.STRING, 4) + oprot.writeString(self.nn_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin('enable_cstr', TType.BOOL, 5) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin('validate_cstr', TType.BOOL, 6) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin('rely_cstr', TType.BOOL, 7) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.table_db) + value = (value * 31) ^ hash(self.table_name) + value = (value * 31) ^ hash(self.column_name) + value = (value * 31) ^ hash(self.nn_name) + value = (value * 31) ^ hash(self.enable_cstr) + value = (value * 31) ^ hash(self.validate_cstr) + value = (value * 31) ^ hash(self.rely_cstr) + 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 Type: + """ + Attributes: + - name + - type1 + - type2 + - fields + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'type1', None, None, ), # 2 + (3, TType.STRING, 'type2', None, None, ), # 3 + (4, TType.LIST, 'fields', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 4 + ) + + def __init__(self, name=None, type1=None, type2=None, fields=None,): + self.name = name + self.type1 = type1 + self.type2 = type2 + self.fields = fields + + 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.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.type1 = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.type2 = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.fields = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in xrange(_size0): + _elem5 = FieldSchema() + _elem5.read(iprot) + self.fields.append(_elem5) + 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('Type') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.type1 is not None: + oprot.writeFieldBegin('type1', TType.STRING, 2) + oprot.writeString(self.type1) + oprot.writeFieldEnd() + if self.type2 is not None: + oprot.writeFieldBegin('type2', TType.STRING, 3) + oprot.writeString(self.type2) + oprot.writeFieldEnd() + if self.fields is not None: + oprot.writeFieldBegin('fields', TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.fields)) + for iter6 in self.fields: + iter6.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.type1) + value = (value * 31) ^ hash(self.type2) + value = (value * 31) ^ hash(self.fields) + 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 HiveObjectRef: + """ + Attributes: + - objectType + - dbName + - objectName + - partValues + - columnName + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'objectType', None, None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'objectName', None, None, ), # 3 + (4, TType.LIST, 'partValues', (TType.STRING,None), None, ), # 4 + (5, TType.STRING, 'columnName', None, None, ), # 5 + ) + + def __init__(self, objectType=None, dbName=None, objectName=None, partValues=None, columnName=None,): + self.objectType = objectType + self.dbName = dbName + self.objectName = objectName + self.partValues = partValues + self.columnName = columnName + + 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.objectType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.objectName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partValues = [] + (_etype10, _size7) = iprot.readListBegin() + for _i11 in xrange(_size7): + _elem12 = iprot.readString() + self.partValues.append(_elem12) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.columnName = 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('HiveObjectRef') + if self.objectType is not None: + oprot.writeFieldBegin('objectType', TType.I32, 1) + oprot.writeI32(self.objectType) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.objectName is not None: + oprot.writeFieldBegin('objectName', TType.STRING, 3) + oprot.writeString(self.objectName) + oprot.writeFieldEnd() + if self.partValues is not None: + oprot.writeFieldBegin('partValues', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partValues)) + for iter13 in self.partValues: + oprot.writeString(iter13) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.columnName is not None: + oprot.writeFieldBegin('columnName', TType.STRING, 5) + oprot.writeString(self.columnName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.objectType) + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.objectName) + value = (value * 31) ^ hash(self.partValues) + value = (value * 31) ^ hash(self.columnName) + 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 PrivilegeGrantInfo: + """ + Attributes: + - privilege + - createTime + - grantor + - grantorType + - grantOption + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'privilege', None, None, ), # 1 + (2, TType.I32, 'createTime', None, None, ), # 2 + (3, TType.STRING, 'grantor', None, None, ), # 3 + (4, TType.I32, 'grantorType', None, None, ), # 4 + (5, TType.BOOL, 'grantOption', None, None, ), # 5 + ) + + def __init__(self, privilege=None, createTime=None, grantor=None, grantorType=None, grantOption=None,): + self.privilege = privilege + self.createTime = createTime + self.grantor = grantor + self.grantorType = grantorType + 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.privilege = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.grantor = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.grantorType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.grantOption = iprot.readBool() + 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('PrivilegeGrantInfo') + if self.privilege is not None: + oprot.writeFieldBegin('privilege', TType.STRING, 1) + oprot.writeString(self.privilege) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor is not None: + oprot.writeFieldBegin('grantor', TType.STRING, 3) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.grantorType is not None: + oprot.writeFieldBegin('grantorType', TType.I32, 4) + oprot.writeI32(self.grantorType) + oprot.writeFieldEnd() + if self.grantOption is not None: + oprot.writeFieldBegin('grantOption', TType.BOOL, 5) + oprot.writeBool(self.grantOption) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.privilege) + value = (value * 31) ^ hash(self.createTime) + value = (value * 31) ^ hash(self.grantor) + value = (value * 31) ^ hash(self.grantorType) + 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 HiveObjectPrivilege: + """ + Attributes: + - hiveObject + - principalName + - principalType + - grantInfo + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 1 + (2, TType.STRING, 'principalName', None, None, ), # 2 + (3, TType.I32, 'principalType', None, None, ), # 3 + (4, TType.STRUCT, 'grantInfo', (PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec), None, ), # 4 + ) + + def __init__(self, hiveObject=None, principalName=None, principalType=None, grantInfo=None,): + self.hiveObject = hiveObject + self.principalName = principalName + self.principalType = principalType + self.grantInfo = grantInfo + + 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.hiveObject = HiveObjectRef() + self.hiveObject.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principalName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principalType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.grantInfo = PrivilegeGrantInfo() + self.grantInfo.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('HiveObjectPrivilege') + if self.hiveObject is not None: + oprot.writeFieldBegin('hiveObject', TType.STRUCT, 1) + self.hiveObject.write(oprot) + oprot.writeFieldEnd() + if self.principalName is not None: + oprot.writeFieldBegin('principalName', TType.STRING, 2) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.principalType is not None: + oprot.writeFieldBegin('principalType', TType.I32, 3) + oprot.writeI32(self.principalType) + oprot.writeFieldEnd() + if self.grantInfo is not None: + oprot.writeFieldBegin('grantInfo', TType.STRUCT, 4) + self.grantInfo.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.hiveObject) + value = (value * 31) ^ hash(self.principalName) + value = (value * 31) ^ hash(self.principalType) + value = (value * 31) ^ hash(self.grantInfo) + 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 PrivilegeBag: + """ + Attributes: + - privileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'privileges', (TType.STRUCT,(HiveObjectPrivilege, HiveObjectPrivilege.thrift_spec)), None, ), # 1 + ) + + def __init__(self, privileges=None,): + 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.LIST: + self.privileges = [] + (_etype17, _size14) = iprot.readListBegin() + for _i18 in xrange(_size14): + _elem19 = HiveObjectPrivilege() + _elem19.read(iprot) + self.privileges.append(_elem19) + 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('PrivilegeBag') + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.privileges)) + for iter20 in self.privileges: + iter20.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + 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 PrincipalPrivilegeSet: + """ + Attributes: + - userPrivileges + - groupPrivileges + - rolePrivileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'userPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 1 + (2, TType.MAP, 'groupPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 2 + (3, TType.MAP, 'rolePrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 3 + ) + + def __init__(self, userPrivileges=None, groupPrivileges=None, rolePrivileges=None,): + self.userPrivileges = userPrivileges + self.groupPrivileges = groupPrivileges + self.rolePrivileges = rolePrivileges + + 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.MAP: + self.userPrivileges = {} + (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin() + for _i25 in xrange(_size21): + _key26 = iprot.readString() + _val27 = [] + (_etype31, _size28) = iprot.readListBegin() + for _i32 in xrange(_size28): + _elem33 = PrivilegeGrantInfo() + _elem33.read(iprot) + _val27.append(_elem33) + iprot.readListEnd() + self.userPrivileges[_key26] = _val27 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.groupPrivileges = {} + (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin() + for _i38 in xrange(_size34): + _key39 = iprot.readString() + _val40 = [] + (_etype44, _size41) = iprot.readListBegin() + for _i45 in xrange(_size41): + _elem46 = PrivilegeGrantInfo() + _elem46.read(iprot) + _val40.append(_elem46) + iprot.readListEnd() + self.groupPrivileges[_key39] = _val40 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.rolePrivileges = {} + (_ktype48, _vtype49, _size47 ) = iprot.readMapBegin() + for _i51 in xrange(_size47): + _key52 = iprot.readString() + _val53 = [] + (_etype57, _size54) = iprot.readListBegin() + for _i58 in xrange(_size54): + _elem59 = PrivilegeGrantInfo() + _elem59.read(iprot) + _val53.append(_elem59) + iprot.readListEnd() + self.rolePrivileges[_key52] = _val53 + iprot.readMapEnd() + 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('PrincipalPrivilegeSet') + if self.userPrivileges is not None: + oprot.writeFieldBegin('userPrivileges', TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.userPrivileges)) + for kiter60,viter61 in self.userPrivileges.items(): + oprot.writeString(kiter60) + oprot.writeListBegin(TType.STRUCT, len(viter61)) + for iter62 in viter61: + iter62.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.groupPrivileges is not None: + oprot.writeFieldBegin('groupPrivileges', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.groupPrivileges)) + for kiter63,viter64 in self.groupPrivileges.items(): + oprot.writeString(kiter63) + oprot.writeListBegin(TType.STRUCT, len(viter64)) + for iter65 in viter64: + iter65.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.rolePrivileges is not None: + oprot.writeFieldBegin('rolePrivileges', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.rolePrivileges)) + for kiter66,viter67 in self.rolePrivileges.items(): + oprot.writeString(kiter66) + oprot.writeListBegin(TType.STRUCT, len(viter67)) + for iter68 in viter67: + iter68.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.userPrivileges) + value = (value * 31) ^ hash(self.groupPrivileges) + value = (value * 31) ^ hash(self.rolePrivileges) + 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 GrantRevokePrivilegeRequest: + """ + Attributes: + - requestType + - privileges + - revokeGrantOption + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'requestType', None, None, ), # 1 + (2, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 2 + (3, TType.BOOL, 'revokeGrantOption', None, None, ), # 3 + ) + + def __init__(self, requestType=None, privileges=None, revokeGrantOption=None,): + self.requestType = requestType + self.privileges = privileges + self.revokeGrantOption = revokeGrantOption + + 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.requestType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.revokeGrantOption = iprot.readBool() + 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('GrantRevokePrivilegeRequest') + if self.requestType is not None: + oprot.writeFieldBegin('requestType', TType.I32, 1) + oprot.writeI32(self.requestType) + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 2) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.revokeGrantOption is not None: + oprot.writeFieldBegin('revokeGrantOption', TType.BOOL, 3) + oprot.writeBool(self.revokeGrantOption) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.requestType) + value = (value * 31) ^ hash(self.privileges) + value = (value * 31) ^ hash(self.revokeGrantOption) + 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 GrantRevokePrivilegeResponse: + """ + Attributes: + - success + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'success', None, None, ), # 1 + ) + + def __init__(self, success=None,): + self.success = success + + 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.success = iprot.readBool() + 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('GrantRevokePrivilegeResponse') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 1) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + 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 Role: + """ + Attributes: + - roleName + - createTime + - ownerName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'roleName', None, None, ), # 1 + (2, TType.I32, 'createTime', None, None, ), # 2 + (3, TType.STRING, 'ownerName', None, None, ), # 3 + ) + + def __init__(self, roleName=None, createTime=None, ownerName=None,): + self.roleName = roleName + self.createTime = createTime + self.ownerName = ownerName + + 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.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.ownerName = 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('Role') + if self.roleName is not None: + oprot.writeFieldBegin('roleName', TType.STRING, 1) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin('ownerName', TType.STRING, 3) + oprot.writeString(self.ownerName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.roleName) + value = (value * 31) ^ hash(self.createTime) + value = (value * 31) ^ hash(self.ownerName) + 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 RolePrincipalGrant: + """ + Attributes: + - roleName + - principalName + - principalType + - grantOption + - grantTime + - grantorName + - grantorPrincipalType + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'roleName', None, None, ), # 1 + (2, TType.STRING, 'principalName', None, None, ), # 2 + (3, TType.I32, 'principalType', None, None, ), # 3 + (4, TType.BOOL, 'grantOption', None, None, ), # 4 + (5, TType.I32, 'grantTime', None, None, ), # 5 + (6, TType.STRING, 'grantorName', None, None, ), # 6 + (7, TType.I32, 'grantorPrincipalType', None, None, ), # 7 + ) + + def __init__(self, roleName=None, principalName=None, principalType=None, grantOption=None, grantTime=None, grantorName=None, grantorPrincipalType=None,): + self.roleName = roleName + self.principalName = principalName + self.principalType = principalType + self.grantOption = grantOption + self.grantTime = grantTime + self.grantorName = grantorName + self.grantorPrincipalType = grantorPrincipalType + + 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.STRING: + self.principalName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principalType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.grantOption = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.grantTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantorName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.grantorPrincipalType = 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('RolePrincipalGrant') + if self.roleName is not None: + oprot.writeFieldBegin('roleName', TType.STRING, 1) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + if self.principalName is not None: + oprot.writeFieldBegin('principalName', TType.STRING, 2) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.principalType is not None: + oprot.writeFieldBegin('principalType', TType.I32, 3) + oprot.writeI32(self.principalType) + oprot.writeFieldEnd() + if self.grantOption is not None: + oprot.writeFieldBegin('grantOption', TType.BOOL, 4) + oprot.writeBool(self.grantOption) + oprot.writeFieldEnd() + if self.grantTime is not None: + oprot.writeFieldBegin('grantTime', TType.I32, 5) + oprot.writeI32(self.grantTime) + oprot.writeFieldEnd() + if self.grantorName is not None: + oprot.writeFieldBegin('grantorName', TType.STRING, 6) + oprot.writeString(self.grantorName) + oprot.writeFieldEnd() + if self.grantorPrincipalType is not None: + oprot.writeFieldBegin('grantorPrincipalType', TType.I32, 7) + oprot.writeI32(self.grantorPrincipalType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.roleName) + value = (value * 31) ^ hash(self.principalName) + value = (value * 31) ^ hash(self.principalType) + value = (value * 31) ^ hash(self.grantOption) + value = (value * 31) ^ hash(self.grantTime) + value = (value * 31) ^ hash(self.grantorName) + value = (value * 31) ^ hash(self.grantorPrincipalType) + 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 GetRoleGrantsForPrincipalRequest: + """ + Attributes: + - principal_name + - principal_type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.I32, 'principal_type', None, None, ), # 2 + ) + + def __init__(self, principal_name=None, principal_type=None,): + self.principal_name = principal_name + self.principal_type = principal_type + + 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.principal_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.principal_type = 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('GetRoleGrantsForPrincipalRequest') + if self.principal_name is not None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin('principal_type', TType.I32, 2) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.principal_name is None: + raise TProtocol.TProtocolException(message='Required field principal_name is unset!') + if self.principal_type is None: + raise TProtocol.TProtocolException(message='Required field principal_type is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.principal_name) + value = (value * 31) ^ hash(self.principal_type) + 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 GetRoleGrantsForPrincipalResponse: + """ + Attributes: + - principalGrants + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'principalGrants', (TType.STRUCT,(RolePrincipalGrant, RolePrincipalGrant.thrift_spec)), None, ), # 1 + ) + + def __init__(self, principalGrants=None,): + self.principalGrants = principalGrants + + 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.LIST: + self.principalGrants = [] + (_etype72, _size69) = iprot.readListBegin() + for _i73 in xrange(_size69): + _elem74 = RolePrincipalGrant() + _elem74.read(iprot) + self.principalGrants.append(_elem74) + 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('GetRoleGrantsForPrincipalResponse') + if self.principalGrants is not None: + oprot.writeFieldBegin('principalGrants', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.principalGrants)) + for iter75 in self.principalGrants: + iter75.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.principalGrants is None: + raise TProtocol.TProtocolException(message='Required field principalGrants is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.principalGrants) + 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 GetPrincipalsInRoleRequest: + """ + Attributes: + - roleName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'roleName', None, None, ), # 1 + ) + + def __init__(self, roleName=None,): + self.roleName = roleName + + 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) + 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('GetPrincipalsInRoleRequest') + if self.roleName is not None: + oprot.writeFieldBegin('roleName', TType.STRING, 1) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.roleName is None: + raise TProtocol.TProtocolException(message='Required field roleName is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.roleName) + 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 GetPrincipalsInRoleResponse: + """ + Attributes: + - principalGrants + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'principalGrants', (TType.STRUCT,(RolePrincipalGrant, RolePrincipalGrant.thrift_spec)), None, ), # 1 + ) + + def __init__(self, principalGrants=None,): + self.principalGrants = principalGrants + + 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.LIST: + self.principalGrants = [] + (_etype79, _size76) = iprot.readListBegin() + for _i80 in xrange(_size76): + _elem81 = RolePrincipalGrant() + _elem81.read(iprot) + self.principalGrants.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('GetPrincipalsInRoleResponse') + if self.principalGrants is not None: + oprot.writeFieldBegin('principalGrants', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.principalGrants)) + for iter82 in self.principalGrants: + iter82.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.principalGrants is None: + raise TProtocol.TProtocolException(message='Required field principalGrants is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.principalGrants) + 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 GrantRevokeRoleRequest: + """ + Attributes: + - requestType + - roleName + - principalName + - principalType + - grantor + - grantorType + - grantOption + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'requestType', None, None, ), # 1 + (2, TType.STRING, 'roleName', None, None, ), # 2 + (3, TType.STRING, 'principalName', None, None, ), # 3 + (4, TType.I32, 'principalType', None, None, ), # 4 + (5, TType.STRING, 'grantor', None, None, ), # 5 + (6, TType.I32, 'grantorType', None, None, ), # 6 + (7, TType.BOOL, 'grantOption', None, None, ), # 7 + ) + + def __init__(self, requestType=None, roleName=None, principalName=None, principalType=None, grantor=None, grantorType=None, grantOption=None,): + self.requestType = requestType + self.roleName = roleName + self.principalName = principalName + self.principalType = principalType + self.grantor = grantor + self.grantorType = grantorType + 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.I32: + self.requestType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.roleName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.principalName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.principalType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.grantor = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.grantorType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.grantOption = iprot.readBool() + 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('GrantRevokeRoleRequest') + if self.requestType is not None: + oprot.writeFieldBegin('requestType', TType.I32, 1) + oprot.writeI32(self.requestType) + oprot.writeFieldEnd() + if self.roleName is not None: + oprot.writeFieldBegin('roleName', TType.STRING, 2) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + if self.principalName is not None: + oprot.writeFieldBegin('principalName', TType.STRING, 3) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.principalType is not None: + oprot.writeFieldBegin('principalType', TType.I32, 4) + oprot.writeI32(self.principalType) + oprot.writeFieldEnd() + if self.grantor is not None: + oprot.writeFieldBegin('grantor', TType.STRING, 5) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.grantorType is not None: + oprot.writeFieldBegin('grantorType', TType.I32, 6) + oprot.writeI32(self.grantorType) + oprot.writeFieldEnd() + if self.grantOption is not None: + oprot.writeFieldBegin('grantOption', TType.BOOL, 7) + oprot.writeBool(self.grantOption) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.requestType) + value = (value * 31) ^ hash(self.roleName) + value = (value * 31) ^ hash(self.principalName) + value = (value * 31) ^ hash(self.principalType) + value = (value * 31) ^ hash(self.grantor) + value = (value * 31) ^ hash(self.grantorType) + 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 GrantRevokeRoleResponse: + """ + Attributes: + - success + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'success', None, None, ), # 1 + ) + + def __init__(self, success=None,): + self.success = success + + 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.success = iprot.readBool() + 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('GrantRevokeRoleResponse') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 1) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.
<TRUNCATED>