#
# Autogenerated by Thrift Compiler (0.16.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
#  options string: py
#

from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive import fix_spec

import sys
import fb303.ttypes

from thrift.transport import TTransport
all_structs = []


class HiveObjectType(object):
    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(object):
    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(object):
    LOAD_DONE = 1

    _VALUES_TO_NAMES = {
        1: "LOAD_DONE",
    }

    _NAMES_TO_VALUES = {
        "LOAD_DONE": 1,
    }


class TxnState(object):
    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(object):
    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(object):
    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(object):
    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(object):
    MINOR = 1
    MAJOR = 2

    _VALUES_TO_NAMES = {
        1: "MINOR",
        2: "MAJOR",
    }

    _NAMES_TO_VALUES = {
        "MINOR": 1,
        "MAJOR": 2,
    }


class GrantRevokeType(object):
    GRANT = 1
    REVOKE = 2

    _VALUES_TO_NAMES = {
        1: "GRANT",
        2: "REVOKE",
    }

    _NAMES_TO_VALUES = {
        "GRANT": 1,
        "REVOKE": 2,
    }


class DataOperationType(object):
    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(object):
    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 SerdeType(object):
    HIVE = 1
    SCHEMA_REGISTRY = 2

    _VALUES_TO_NAMES = {
        1: "HIVE",
        2: "SCHEMA_REGISTRY",
    }

    _NAMES_TO_VALUES = {
        "HIVE": 1,
        "SCHEMA_REGISTRY": 2,
    }


class SchemaType(object):
    HIVE = 1
    AVRO = 2

    _VALUES_TO_NAMES = {
        1: "HIVE",
        2: "AVRO",
    }

    _NAMES_TO_VALUES = {
        "HIVE": 1,
        "AVRO": 2,
    }


class SchemaCompatibility(object):
    NONE = 1
    BACKWARD = 2
    FORWARD = 3
    BOTH = 4

    _VALUES_TO_NAMES = {
        1: "NONE",
        2: "BACKWARD",
        3: "FORWARD",
        4: "BOTH",
    }

    _NAMES_TO_VALUES = {
        "NONE": 1,
        "BACKWARD": 2,
        "FORWARD": 3,
        "BOTH": 4,
    }


class SchemaValidation(object):
    LATEST = 1
    ALL = 2

    _VALUES_TO_NAMES = {
        1: "LATEST",
        2: "ALL",
    }

    _NAMES_TO_VALUES = {
        "LATEST": 1,
        "ALL": 2,
    }


class SchemaVersionState(object):
    INITIATED = 1
    START_REVIEW = 2
    CHANGES_REQUIRED = 3
    REVIEWED = 4
    ENABLED = 5
    DISABLED = 6
    ARCHIVED = 7
    DELETED = 8

    _VALUES_TO_NAMES = {
        1: "INITIATED",
        2: "START_REVIEW",
        3: "CHANGES_REQUIRED",
        4: "REVIEWED",
        5: "ENABLED",
        6: "DISABLED",
        7: "ARCHIVED",
        8: "DELETED",
    }

    _NAMES_TO_VALUES = {
        "INITIATED": 1,
        "START_REVIEW": 2,
        "CHANGES_REQUIRED": 3,
        "REVIEWED": 4,
        "ENABLED": 5,
        "DISABLED": 6,
        "ARCHIVED": 7,
        "DELETED": 8,
    }


class FunctionType(object):
    JAVA = 1

    _VALUES_TO_NAMES = {
        1: "JAVA",
    }

    _NAMES_TO_VALUES = {
        "JAVA": 1,
    }


class ResourceType(object):
    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(object):
    ORC_SARG = 1

    _VALUES_TO_NAMES = {
        1: "ORC_SARG",
    }

    _NAMES_TO_VALUES = {
        "ORC_SARG": 1,
    }


class ClientCapability(object):
    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 WMResourcePlanStatus(object):
    ACTIVE = 1
    ENABLED = 2
    DISABLED = 3

    _VALUES_TO_NAMES = {
        1: "ACTIVE",
        2: "ENABLED",
        3: "DISABLED",
    }

    _NAMES_TO_VALUES = {
        "ACTIVE": 1,
        "ENABLED": 2,
        "DISABLED": 3,
    }


class WMPoolSchedulingPolicy(object):
    FAIR = 1
    FIFO = 2

    _VALUES_TO_NAMES = {
        1: "FAIR",
        2: "FIFO",
    }

    _NAMES_TO_VALUES = {
        "FAIR": 1,
        "FIFO": 2,
    }


class Version(object):
    """
    Attributes:
     - version
     - comments

    """


    def __init__(self, version=None, comments=None,):
        self.version = version
        self.comments = comments

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.comments = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.version)
            oprot.writeFieldEnd()
        if self.comments is not None:
            oprot.writeFieldBegin('comments', TType.STRING, 2)
            oprot.writeString(self.comments.encode('utf-8') if sys.version_info[0] == 2 else self.comments)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - name
     - type
     - comment

    """


    def __init__(self, name=None, type=None, comment=None,):
        self.name = name
        self.type = type
        self.comment = comment

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.comment = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.STRING, 2)
            oprot.writeString(self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type)
            oprot.writeFieldEnd()
        if self.comment is not None:
            oprot.writeFieldBegin('comment', TType.STRING, 3)
            oprot.writeString(self.comment.encode('utf-8') if sys.version_info[0] == 2 else self.comment)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - table_db
     - table_name
     - column_name
     - key_seq
     - pk_name
     - enable_cstr
     - validate_cstr
     - rely_cstr
     - catName

    """


    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, catName=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
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.table_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.column_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.table_db)
            oprot.writeFieldEnd()
        if self.table_name is not None:
            oprot.writeFieldBegin('table_name', TType.STRING, 2)
            oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name)
            oprot.writeFieldEnd()
        if self.column_name is not None:
            oprot.writeFieldBegin('column_name', TType.STRING, 3)
            oprot.writeString(self.column_name.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 9)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    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
     - catName

    """


    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, catName=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
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.pktable_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.pkcolumn_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.fktable_db = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.fktable_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.fkcolumn_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.pk_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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)
            elif fid == 15:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.pktable_db)
            oprot.writeFieldEnd()
        if self.pktable_name is not None:
            oprot.writeFieldBegin('pktable_name', TType.STRING, 2)
            oprot.writeString(self.pktable_name.encode('utf-8') if sys.version_info[0] == 2 else self.pktable_name)
            oprot.writeFieldEnd()
        if self.pkcolumn_name is not None:
            oprot.writeFieldBegin('pkcolumn_name', TType.STRING, 3)
            oprot.writeString(self.pkcolumn_name.encode('utf-8') if sys.version_info[0] == 2 else self.pkcolumn_name)
            oprot.writeFieldEnd()
        if self.fktable_db is not None:
            oprot.writeFieldBegin('fktable_db', TType.STRING, 4)
            oprot.writeString(self.fktable_db.encode('utf-8') if sys.version_info[0] == 2 else self.fktable_db)
            oprot.writeFieldEnd()
        if self.fktable_name is not None:
            oprot.writeFieldBegin('fktable_name', TType.STRING, 5)
            oprot.writeString(self.fktable_name.encode('utf-8') if sys.version_info[0] == 2 else self.fktable_name)
            oprot.writeFieldEnd()
        if self.fkcolumn_name is not None:
            oprot.writeFieldBegin('fkcolumn_name', TType.STRING, 6)
            oprot.writeString(self.fkcolumn_name.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.fk_name)
            oprot.writeFieldEnd()
        if self.pk_name is not None:
            oprot.writeFieldBegin('pk_name', TType.STRING, 11)
            oprot.writeString(self.pk_name.encode('utf-8') if sys.version_info[0] == 2 else 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()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 15)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - catName
     - table_db
     - table_name
     - column_name
     - key_seq
     - uk_name
     - enable_cstr
     - validate_cstr
     - rely_cstr

    """


    def __init__(self, catName=None, 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.catName = catName
        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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.table_db = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.table_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.column_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.key_seq = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.uk_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.enable_cstr = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.BOOL:
                    self.validate_cstr = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SQLUniqueConstraint')
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 1)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.table_db is not None:
            oprot.writeFieldBegin('table_db', TType.STRING, 2)
            oprot.writeString(self.table_db.encode('utf-8') if sys.version_info[0] == 2 else self.table_db)
            oprot.writeFieldEnd()
        if self.table_name is not None:
            oprot.writeFieldBegin('table_name', TType.STRING, 3)
            oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name)
            oprot.writeFieldEnd()
        if self.column_name is not None:
            oprot.writeFieldBegin('column_name', TType.STRING, 4)
            oprot.writeString(self.column_name.encode('utf-8') if sys.version_info[0] == 2 else self.column_name)
            oprot.writeFieldEnd()
        if self.key_seq is not None:
            oprot.writeFieldBegin('key_seq', TType.I32, 5)
            oprot.writeI32(self.key_seq)
            oprot.writeFieldEnd()
        if self.uk_name is not None:
            oprot.writeFieldBegin('uk_name', TType.STRING, 6)
            oprot.writeString(self.uk_name.encode('utf-8') if sys.version_info[0] == 2 else self.uk_name)
            oprot.writeFieldEnd()
        if self.enable_cstr is not None:
            oprot.writeFieldBegin('enable_cstr', TType.BOOL, 7)
            oprot.writeBool(self.enable_cstr)
            oprot.writeFieldEnd()
        if self.validate_cstr is not None:
            oprot.writeFieldBegin('validate_cstr', TType.BOOL, 8)
            oprot.writeBool(self.validate_cstr)
            oprot.writeFieldEnd()
        if self.rely_cstr is not None:
            oprot.writeFieldBegin('rely_cstr', TType.BOOL, 9)
            oprot.writeBool(self.rely_cstr)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - catName
     - table_db
     - table_name
     - column_name
     - nn_name
     - enable_cstr
     - validate_cstr
     - rely_cstr

    """


    def __init__(self, catName=None, table_db=None, table_name=None, column_name=None, nn_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,):
        self.catName = catName
        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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.table_db = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.table_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.column_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.nn_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SQLNotNullConstraint')
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 1)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.table_db is not None:
            oprot.writeFieldBegin('table_db', TType.STRING, 2)
            oprot.writeString(self.table_db.encode('utf-8') if sys.version_info[0] == 2 else self.table_db)
            oprot.writeFieldEnd()
        if self.table_name is not None:
            oprot.writeFieldBegin('table_name', TType.STRING, 3)
            oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name)
            oprot.writeFieldEnd()
        if self.column_name is not None:
            oprot.writeFieldBegin('column_name', TType.STRING, 4)
            oprot.writeString(self.column_name.encode('utf-8') if sys.version_info[0] == 2 else self.column_name)
            oprot.writeFieldEnd()
        if self.nn_name is not None:
            oprot.writeFieldBegin('nn_name', TType.STRING, 5)
            oprot.writeString(self.nn_name.encode('utf-8') if sys.version_info[0] == 2 else self.nn_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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 SQLDefaultConstraint(object):
    """
    Attributes:
     - catName
     - table_db
     - table_name
     - column_name
     - default_value
     - dc_name
     - enable_cstr
     - validate_cstr
     - rely_cstr

    """


    def __init__(self, catName=None, table_db=None, table_name=None, column_name=None, default_value=None, dc_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,):
        self.catName = catName
        self.table_db = table_db
        self.table_name = table_name
        self.column_name = column_name
        self.default_value = default_value
        self.dc_name = dc_name
        self.enable_cstr = enable_cstr
        self.validate_cstr = validate_cstr
        self.rely_cstr = rely_cstr

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.table_db = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.table_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.column_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.default_value = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.dc_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.enable_cstr = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.BOOL:
                    self.validate_cstr = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SQLDefaultConstraint')
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 1)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.table_db is not None:
            oprot.writeFieldBegin('table_db', TType.STRING, 2)
            oprot.writeString(self.table_db.encode('utf-8') if sys.version_info[0] == 2 else self.table_db)
            oprot.writeFieldEnd()
        if self.table_name is not None:
            oprot.writeFieldBegin('table_name', TType.STRING, 3)
            oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name)
            oprot.writeFieldEnd()
        if self.column_name is not None:
            oprot.writeFieldBegin('column_name', TType.STRING, 4)
            oprot.writeString(self.column_name.encode('utf-8') if sys.version_info[0] == 2 else self.column_name)
            oprot.writeFieldEnd()
        if self.default_value is not None:
            oprot.writeFieldBegin('default_value', TType.STRING, 5)
            oprot.writeString(self.default_value.encode('utf-8') if sys.version_info[0] == 2 else self.default_value)
            oprot.writeFieldEnd()
        if self.dc_name is not None:
            oprot.writeFieldBegin('dc_name', TType.STRING, 6)
            oprot.writeString(self.dc_name.encode('utf-8') if sys.version_info[0] == 2 else self.dc_name)
            oprot.writeFieldEnd()
        if self.enable_cstr is not None:
            oprot.writeFieldBegin('enable_cstr', TType.BOOL, 7)
            oprot.writeBool(self.enable_cstr)
            oprot.writeFieldEnd()
        if self.validate_cstr is not None:
            oprot.writeFieldBegin('validate_cstr', TType.BOOL, 8)
            oprot.writeBool(self.validate_cstr)
            oprot.writeFieldEnd()
        if self.rely_cstr is not None:
            oprot.writeFieldBegin('rely_cstr', TType.BOOL, 9)
            oprot.writeBool(self.rely_cstr)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 SQLCheckConstraint(object):
    """
    Attributes:
     - catName
     - table_db
     - table_name
     - column_name
     - check_expression
     - dc_name
     - enable_cstr
     - validate_cstr
     - rely_cstr

    """


    def __init__(self, catName=None, table_db=None, table_name=None, column_name=None, check_expression=None, dc_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,):
        self.catName = catName
        self.table_db = table_db
        self.table_name = table_name
        self.column_name = column_name
        self.check_expression = check_expression
        self.dc_name = dc_name
        self.enable_cstr = enable_cstr
        self.validate_cstr = validate_cstr
        self.rely_cstr = rely_cstr

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.table_db = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.table_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.column_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.check_expression = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.dc_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.enable_cstr = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.BOOL:
                    self.validate_cstr = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SQLCheckConstraint')
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 1)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.table_db is not None:
            oprot.writeFieldBegin('table_db', TType.STRING, 2)
            oprot.writeString(self.table_db.encode('utf-8') if sys.version_info[0] == 2 else self.table_db)
            oprot.writeFieldEnd()
        if self.table_name is not None:
            oprot.writeFieldBegin('table_name', TType.STRING, 3)
            oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name)
            oprot.writeFieldEnd()
        if self.column_name is not None:
            oprot.writeFieldBegin('column_name', TType.STRING, 4)
            oprot.writeString(self.column_name.encode('utf-8') if sys.version_info[0] == 2 else self.column_name)
            oprot.writeFieldEnd()
        if self.check_expression is not None:
            oprot.writeFieldBegin('check_expression', TType.STRING, 5)
            oprot.writeString(self.check_expression.encode('utf-8') if sys.version_info[0] == 2 else self.check_expression)
            oprot.writeFieldEnd()
        if self.dc_name is not None:
            oprot.writeFieldBegin('dc_name', TType.STRING, 6)
            oprot.writeString(self.dc_name.encode('utf-8') if sys.version_info[0] == 2 else self.dc_name)
            oprot.writeFieldEnd()
        if self.enable_cstr is not None:
            oprot.writeFieldBegin('enable_cstr', TType.BOOL, 7)
            oprot.writeBool(self.enable_cstr)
            oprot.writeFieldEnd()
        if self.validate_cstr is not None:
            oprot.writeFieldBegin('validate_cstr', TType.BOOL, 8)
            oprot.writeBool(self.validate_cstr)
            oprot.writeFieldEnd()
        if self.rely_cstr is not None:
            oprot.writeFieldBegin('rely_cstr', TType.BOOL, 9)
            oprot.writeBool(self.rely_cstr)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - name
     - type1
     - type2
     - fields

    """


    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.type1 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.type2 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.fields = []
                    (_etype3, _size0) = iprot.readListBegin()
                    for _i4 in range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.type1 is not None:
            oprot.writeFieldBegin('type1', TType.STRING, 2)
            oprot.writeString(self.type1.encode('utf-8') if sys.version_info[0] == 2 else self.type1)
            oprot.writeFieldEnd()
        if self.type2 is not None:
            oprot.writeFieldBegin('type2', TType.STRING, 3)
            oprot.writeString(self.type2.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - objectType
     - dbName
     - objectName
     - partValues
     - columnName
     - catName

    """


    def __init__(self, objectType=None, dbName=None, objectName=None, partValues=None, columnName=None, catName=None,):
        self.objectType = objectType
        self.dbName = dbName
        self.objectName = objectName
        self.partValues = partValues
        self.columnName = columnName
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.objectName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.partValues = []
                    (_etype10, _size7) = iprot.readListBegin()
                    for _i11 in range(_size7):
                        _elem12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.partValues.append(_elem12)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.columnName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.objectName is not None:
            oprot.writeFieldBegin('objectName', TType.STRING, 3)
            oprot.writeString(self.objectName.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else iter13)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.columnName is not None:
            oprot.writeFieldBegin('columnName', TType.STRING, 5)
            oprot.writeString(self.columnName.encode('utf-8') if sys.version_info[0] == 2 else self.columnName)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 6)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - privilege
     - createTime
     - grantor
     - grantorType
     - grantOption

    """


    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - hiveObject
     - principalName
     - principalType
     - grantInfo
     - authorizer

    """


    def __init__(self, hiveObject=None, principalName=None, principalType=None, grantInfo=None, authorizer=None,):
        self.hiveObject = hiveObject
        self.principalName = principalName
        self.principalType = principalType
        self.grantInfo = grantInfo
        self.authorizer = authorizer

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.authorizer = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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()
        if self.authorizer is not None:
            oprot.writeFieldBegin('authorizer', TType.STRING, 5)
            oprot.writeString(self.authorizer.encode('utf-8') if sys.version_info[0] == 2 else self.authorizer)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - privileges

    """


    def __init__(self, privileges=None,):
        self.privileges = privileges

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - userPrivileges
     - groupPrivileges
     - rolePrivileges

    """


    def __init__(self, userPrivileges=None, groupPrivileges=None, rolePrivileges=None,):
        self.userPrivileges = userPrivileges
        self.groupPrivileges = groupPrivileges
        self.rolePrivileges = rolePrivileges

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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 range(_size21):
                        _key26 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val27 = []
                        (_etype31, _size28) = iprot.readListBegin()
                        for _i32 in range(_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 range(_size34):
                        _key39 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val40 = []
                        (_etype44, _size41) = iprot.readListBegin()
                        for _i45 in range(_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 range(_size47):
                        _key52 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val53 = []
                        (_etype57, _size54) = iprot.readListBegin()
                        for _i58 in range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - requestType
     - privileges
     - revokeGrantOption

    """


    def __init__(self, requestType=None, privileges=None, revokeGrantOption=None,):
        self.requestType = requestType
        self.privileges = privileges
        self.revokeGrantOption = revokeGrantOption

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - success

    """


    def __init__(self, success=None,):
        self.success = success

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - roleName
     - createTime
     - ownerName

    """


    def __init__(self, roleName=None, createTime=None, ownerName=None,):
        self.roleName = roleName
        self.createTime = createTime
        self.ownerName = ownerName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else self.ownerName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - roleName
     - principalName
     - principalType
     - grantOption
     - grantTime
     - grantorName
     - grantorPrincipalType

    """


    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.principalName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.roleName)
            oprot.writeFieldEnd()
        if self.principalName is not None:
            oprot.writeFieldBegin('principalName', TType.STRING, 2)
            oprot.writeString(self.principalName.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - principal_name
     - principal_type

    """


    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else 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 TProtocolException(message='Required field principal_name is unset!')
        if self.principal_type is None:
            raise TProtocolException(message='Required field principal_type is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - principalGrants

    """


    def __init__(self, principalGrants=None,):
        self.principalGrants = principalGrants

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 TProtocolException(message='Required field principalGrants is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - roleName

    """


    def __init__(self, roleName=None,):
        self.roleName = roleName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.roleName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.roleName is None:
            raise TProtocolException(message='Required field roleName is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - principalGrants

    """


    def __init__(self, principalGrants=None,):
        self.principalGrants = principalGrants

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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 range(_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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 TProtocolException(message='Required field principalGrants is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - requestType
     - roleName
     - principalName
     - principalType
     - grantor
     - grantorType
     - grantOption

    """


    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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.principalName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else 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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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.encode('utf-8') if sys.version_info[0] == 2 else self.roleName)
            oprot.writeFieldEnd()
        if self.principalName is not None:
            oprot.writeFieldBegin('principalName', TType.STRING, 3)
            oprot.writeString(self.principalName.encode('utf-8') if sys.version_info[0] == 2 else 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.encode('utf-8') if sys.version_info[0] == 2 else 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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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(object):
    """
    Attributes:
     - success

    """


    def __init__(self, success=None,):
        self.success = success

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(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 __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 Catalog(object):
    """
    Attributes:
     - name
     - description
     - locationUri

    """


    def __init__(self, name=None, description=None, locationUri=None,):
        self.name = name
        self.description = description
        self.locationUri = locationUri

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.locationUri = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Catalog')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.description is not None:
            oprot.writeFieldBegin('description', TType.STRING, 2)
            oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description)
            oprot.writeFieldEnd()
        if self.locationUri is not None:
            oprot.writeFieldBegin('locationUri', TType.STRING, 3)
            oprot.writeString(self.locationUri.encode('utf-8') if sys.version_info[0] == 2 else self.locationUri)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CreateCatalogRequest(object):
    """
    Attributes:
     - catalog

    """


    def __init__(self, catalog=None,):
        self.catalog = catalog

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catalog = Catalog()
                    self.catalog.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CreateCatalogRequest')
        if self.catalog is not None:
            oprot.writeFieldBegin('catalog', TType.STRUCT, 1)
            self.catalog.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AlterCatalogRequest(object):
    """
    Attributes:
     - name
     - newCat

    """


    def __init__(self, name=None, newCat=None,):
        self.name = name
        self.newCat = newCat

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.newCat = Catalog()
                    self.newCat.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AlterCatalogRequest')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.newCat is not None:
            oprot.writeFieldBegin('newCat', TType.STRUCT, 2)
            self.newCat.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetCatalogRequest(object):
    """
    Attributes:
     - name

    """


    def __init__(self, name=None,):
        self.name = name

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetCatalogRequest')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetCatalogResponse(object):
    """
    Attributes:
     - catalog

    """


    def __init__(self, catalog=None,):
        self.catalog = catalog

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catalog = Catalog()
                    self.catalog.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetCatalogResponse')
        if self.catalog is not None:
            oprot.writeFieldBegin('catalog', TType.STRUCT, 1)
            self.catalog.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetCatalogsResponse(object):
    """
    Attributes:
     - names

    """


    def __init__(self, names=None,):
        self.names = names

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.names = []
                    (_etype86, _size83) = iprot.readListBegin()
                    for _i87 in range(_size83):
                        _elem88 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.names.append(_elem88)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetCatalogsResponse')
        if self.names is not None:
            oprot.writeFieldBegin('names', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.names))
            for iter89 in self.names:
                oprot.writeString(iter89.encode('utf-8') if sys.version_info[0] == 2 else iter89)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 DropCatalogRequest(object):
    """
    Attributes:
     - name

    """


    def __init__(self, name=None,):
        self.name = name

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DropCatalogRequest')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 Database(object):
    """
    Attributes:
     - name
     - description
     - locationUri
     - parameters
     - privileges
     - ownerName
     - ownerType
     - catalogName

    """


    def __init__(self, name=None, description=None, locationUri=None, parameters=None, privileges=None, ownerName=None, ownerType=None, catalogName=None,):
        self.name = name
        self.description = description
        self.locationUri = locationUri
        self.parameters = parameters
        self.privileges = privileges
        self.ownerName = ownerName
        self.ownerType = ownerType
        self.catalogName = catalogName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.locationUri = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.MAP:
                    self.parameters = {}
                    (_ktype91, _vtype92, _size90) = iprot.readMapBegin()
                    for _i94 in range(_size90):
                        _key95 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val96 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameters[_key95] = _val96
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.privileges = PrincipalPrivilegeSet()
                    self.privileges.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.ownerName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.ownerType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.catalogName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Database')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.description is not None:
            oprot.writeFieldBegin('description', TType.STRING, 2)
            oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description)
            oprot.writeFieldEnd()
        if self.locationUri is not None:
            oprot.writeFieldBegin('locationUri', TType.STRING, 3)
            oprot.writeString(self.locationUri.encode('utf-8') if sys.version_info[0] == 2 else self.locationUri)
            oprot.writeFieldEnd()
        if self.parameters is not None:
            oprot.writeFieldBegin('parameters', TType.MAP, 4)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
            for kiter97, viter98 in self.parameters.items():
                oprot.writeString(kiter97.encode('utf-8') if sys.version_info[0] == 2 else kiter97)
                oprot.writeString(viter98.encode('utf-8') if sys.version_info[0] == 2 else viter98)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.privileges is not None:
            oprot.writeFieldBegin('privileges', TType.STRUCT, 5)
            self.privileges.write(oprot)
            oprot.writeFieldEnd()
        if self.ownerName is not None:
            oprot.writeFieldBegin('ownerName', TType.STRING, 6)
            oprot.writeString(self.ownerName.encode('utf-8') if sys.version_info[0] == 2 else self.ownerName)
            oprot.writeFieldEnd()
        if self.ownerType is not None:
            oprot.writeFieldBegin('ownerType', TType.I32, 7)
            oprot.writeI32(self.ownerType)
            oprot.writeFieldEnd()
        if self.catalogName is not None:
            oprot.writeFieldBegin('catalogName', TType.STRING, 8)
            oprot.writeString(self.catalogName.encode('utf-8') if sys.version_info[0] == 2 else self.catalogName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 SerDeInfo(object):
    """
    Attributes:
     - name
     - serializationLib
     - parameters
     - description
     - serializerClass
     - deserializerClass
     - serdeType

    """


    def __init__(self, name=None, serializationLib=None, parameters=None, description=None, serializerClass=None, deserializerClass=None, serdeType=None,):
        self.name = name
        self.serializationLib = serializationLib
        self.parameters = parameters
        self.description = description
        self.serializerClass = serializerClass
        self.deserializerClass = deserializerClass
        self.serdeType = serdeType

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.serializationLib = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.parameters = {}
                    (_ktype100, _vtype101, _size99) = iprot.readMapBegin()
                    for _i103 in range(_size99):
                        _key104 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val105 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameters[_key104] = _val105
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.serializerClass = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.deserializerClass = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.serdeType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SerDeInfo')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.serializationLib is not None:
            oprot.writeFieldBegin('serializationLib', TType.STRING, 2)
            oprot.writeString(self.serializationLib.encode('utf-8') if sys.version_info[0] == 2 else self.serializationLib)
            oprot.writeFieldEnd()
        if self.parameters is not None:
            oprot.writeFieldBegin('parameters', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
            for kiter106, viter107 in self.parameters.items():
                oprot.writeString(kiter106.encode('utf-8') if sys.version_info[0] == 2 else kiter106)
                oprot.writeString(viter107.encode('utf-8') if sys.version_info[0] == 2 else viter107)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.description is not None:
            oprot.writeFieldBegin('description', TType.STRING, 4)
            oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description)
            oprot.writeFieldEnd()
        if self.serializerClass is not None:
            oprot.writeFieldBegin('serializerClass', TType.STRING, 5)
            oprot.writeString(self.serializerClass.encode('utf-8') if sys.version_info[0] == 2 else self.serializerClass)
            oprot.writeFieldEnd()
        if self.deserializerClass is not None:
            oprot.writeFieldBegin('deserializerClass', TType.STRING, 6)
            oprot.writeString(self.deserializerClass.encode('utf-8') if sys.version_info[0] == 2 else self.deserializerClass)
            oprot.writeFieldEnd()
        if self.serdeType is not None:
            oprot.writeFieldBegin('serdeType', TType.I32, 7)
            oprot.writeI32(self.serdeType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 Order(object):
    """
    Attributes:
     - col
     - order

    """


    def __init__(self, col=None, order=None,):
        self.col = col
        self.order = order

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.col = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.order = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Order')
        if self.col is not None:
            oprot.writeFieldBegin('col', TType.STRING, 1)
            oprot.writeString(self.col.encode('utf-8') if sys.version_info[0] == 2 else self.col)
            oprot.writeFieldEnd()
        if self.order is not None:
            oprot.writeFieldBegin('order', TType.I32, 2)
            oprot.writeI32(self.order)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 SkewedInfo(object):
    """
    Attributes:
     - skewedColNames
     - skewedColValues
     - skewedColValueLocationMaps

    """


    def __init__(self, skewedColNames=None, skewedColValues=None, skewedColValueLocationMaps=None,):
        self.skewedColNames = skewedColNames
        self.skewedColValues = skewedColValues
        self.skewedColValueLocationMaps = skewedColValueLocationMaps

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.skewedColNames = []
                    (_etype111, _size108) = iprot.readListBegin()
                    for _i112 in range(_size108):
                        _elem113 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.skewedColNames.append(_elem113)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.skewedColValues = []
                    (_etype117, _size114) = iprot.readListBegin()
                    for _i118 in range(_size114):
                        _elem119 = []
                        (_etype123, _size120) = iprot.readListBegin()
                        for _i124 in range(_size120):
                            _elem125 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                            _elem119.append(_elem125)
                        iprot.readListEnd()
                        self.skewedColValues.append(_elem119)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.skewedColValueLocationMaps = {}
                    (_ktype127, _vtype128, _size126) = iprot.readMapBegin()
                    for _i130 in range(_size126):
                        _key131 = []
                        (_etype136, _size133) = iprot.readListBegin()
                        for _i137 in range(_size133):
                            _elem138 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                            _key131.append(_elem138)
                        iprot.readListEnd()
                        _val132 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.skewedColValueLocationMaps[_key131] = _val132
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SkewedInfo')
        if self.skewedColNames is not None:
            oprot.writeFieldBegin('skewedColNames', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.skewedColNames))
            for iter139 in self.skewedColNames:
                oprot.writeString(iter139.encode('utf-8') if sys.version_info[0] == 2 else iter139)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.skewedColValues is not None:
            oprot.writeFieldBegin('skewedColValues', TType.LIST, 2)
            oprot.writeListBegin(TType.LIST, len(self.skewedColValues))
            for iter140 in self.skewedColValues:
                oprot.writeListBegin(TType.STRING, len(iter140))
                for iter141 in iter140:
                    oprot.writeString(iter141.encode('utf-8') if sys.version_info[0] == 2 else iter141)
                oprot.writeListEnd()
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.skewedColValueLocationMaps is not None:
            oprot.writeFieldBegin('skewedColValueLocationMaps', TType.MAP, 3)
            oprot.writeMapBegin(TType.LIST, TType.STRING, len(self.skewedColValueLocationMaps))
            for kiter142, viter143 in self.skewedColValueLocationMaps.items():
                oprot.writeListBegin(TType.STRING, len(kiter142))
                for iter144 in kiter142:
                    oprot.writeString(iter144.encode('utf-8') if sys.version_info[0] == 2 else iter144)
                oprot.writeListEnd()
                oprot.writeString(viter143.encode('utf-8') if sys.version_info[0] == 2 else viter143)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 StorageDescriptor(object):
    """
    Attributes:
     - cols
     - location
     - inputFormat
     - outputFormat
     - compressed
     - numBuckets
     - serdeInfo
     - bucketCols
     - sortCols
     - parameters
     - skewedInfo
     - storedAsSubDirectories

    """


    def __init__(self, cols=None, location=None, inputFormat=None, outputFormat=None, compressed=None, numBuckets=None, serdeInfo=None, bucketCols=None, sortCols=None, parameters=None, skewedInfo=None, storedAsSubDirectories=None,):
        self.cols = cols
        self.location = location
        self.inputFormat = inputFormat
        self.outputFormat = outputFormat
        self.compressed = compressed
        self.numBuckets = numBuckets
        self.serdeInfo = serdeInfo
        self.bucketCols = bucketCols
        self.sortCols = sortCols
        self.parameters = parameters
        self.skewedInfo = skewedInfo
        self.storedAsSubDirectories = storedAsSubDirectories

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.cols = []
                    (_etype148, _size145) = iprot.readListBegin()
                    for _i149 in range(_size145):
                        _elem150 = FieldSchema()
                        _elem150.read(iprot)
                        self.cols.append(_elem150)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.location = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.inputFormat = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.outputFormat = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.compressed = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.numBuckets = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRUCT:
                    self.serdeInfo = SerDeInfo()
                    self.serdeInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.LIST:
                    self.bucketCols = []
                    (_etype154, _size151) = iprot.readListBegin()
                    for _i155 in range(_size151):
                        _elem156 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.bucketCols.append(_elem156)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.LIST:
                    self.sortCols = []
                    (_etype160, _size157) = iprot.readListBegin()
                    for _i161 in range(_size157):
                        _elem162 = Order()
                        _elem162.read(iprot)
                        self.sortCols.append(_elem162)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.MAP:
                    self.parameters = {}
                    (_ktype164, _vtype165, _size163) = iprot.readMapBegin()
                    for _i167 in range(_size163):
                        _key168 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val169 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameters[_key168] = _val169
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRUCT:
                    self.skewedInfo = SkewedInfo()
                    self.skewedInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.BOOL:
                    self.storedAsSubDirectories = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('StorageDescriptor')
        if self.cols is not None:
            oprot.writeFieldBegin('cols', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.cols))
            for iter170 in self.cols:
                iter170.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.location is not None:
            oprot.writeFieldBegin('location', TType.STRING, 2)
            oprot.writeString(self.location.encode('utf-8') if sys.version_info[0] == 2 else self.location)
            oprot.writeFieldEnd()
        if self.inputFormat is not None:
            oprot.writeFieldBegin('inputFormat', TType.STRING, 3)
            oprot.writeString(self.inputFormat.encode('utf-8') if sys.version_info[0] == 2 else self.inputFormat)
            oprot.writeFieldEnd()
        if self.outputFormat is not None:
            oprot.writeFieldBegin('outputFormat', TType.STRING, 4)
            oprot.writeString(self.outputFormat.encode('utf-8') if sys.version_info[0] == 2 else self.outputFormat)
            oprot.writeFieldEnd()
        if self.compressed is not None:
            oprot.writeFieldBegin('compressed', TType.BOOL, 5)
            oprot.writeBool(self.compressed)
            oprot.writeFieldEnd()
        if self.numBuckets is not None:
            oprot.writeFieldBegin('numBuckets', TType.I32, 6)
            oprot.writeI32(self.numBuckets)
            oprot.writeFieldEnd()
        if self.serdeInfo is not None:
            oprot.writeFieldBegin('serdeInfo', TType.STRUCT, 7)
            self.serdeInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.bucketCols is not None:
            oprot.writeFieldBegin('bucketCols', TType.LIST, 8)
            oprot.writeListBegin(TType.STRING, len(self.bucketCols))
            for iter171 in self.bucketCols:
                oprot.writeString(iter171.encode('utf-8') if sys.version_info[0] == 2 else iter171)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.sortCols is not None:
            oprot.writeFieldBegin('sortCols', TType.LIST, 9)
            oprot.writeListBegin(TType.STRUCT, len(self.sortCols))
            for iter172 in self.sortCols:
                iter172.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.parameters is not None:
            oprot.writeFieldBegin('parameters', TType.MAP, 10)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
            for kiter173, viter174 in self.parameters.items():
                oprot.writeString(kiter173.encode('utf-8') if sys.version_info[0] == 2 else kiter173)
                oprot.writeString(viter174.encode('utf-8') if sys.version_info[0] == 2 else viter174)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.skewedInfo is not None:
            oprot.writeFieldBegin('skewedInfo', TType.STRUCT, 11)
            self.skewedInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.storedAsSubDirectories is not None:
            oprot.writeFieldBegin('storedAsSubDirectories', TType.BOOL, 12)
            oprot.writeBool(self.storedAsSubDirectories)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 Table(object):
    """
    Attributes:
     - tableName
     - dbName
     - owner
     - createTime
     - lastAccessTime
     - retention
     - sd
     - partitionKeys
     - parameters
     - viewOriginalText
     - viewExpandedText
     - tableType
     - privileges
     - temporary
     - rewriteEnabled
     - creationMetadata
     - catName
     - ownerType

    """


    def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None, temporary=False, rewriteEnabled=None, creationMetadata=None, catName=None, ownerType=1,):
        self.tableName = tableName
        self.dbName = dbName
        self.owner = owner
        self.createTime = createTime
        self.lastAccessTime = lastAccessTime
        self.retention = retention
        self.sd = sd
        self.partitionKeys = partitionKeys
        self.parameters = parameters
        self.viewOriginalText = viewOriginalText
        self.viewExpandedText = viewExpandedText
        self.tableType = tableType
        self.privileges = privileges
        self.temporary = temporary
        self.rewriteEnabled = rewriteEnabled
        self.creationMetadata = creationMetadata
        self.catName = catName
        self.ownerType = ownerType

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.tableName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.createTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.lastAccessTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.retention = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRUCT:
                    self.sd = StorageDescriptor()
                    self.sd.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.LIST:
                    self.partitionKeys = []
                    (_etype178, _size175) = iprot.readListBegin()
                    for _i179 in range(_size175):
                        _elem180 = FieldSchema()
                        _elem180.read(iprot)
                        self.partitionKeys.append(_elem180)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.MAP:
                    self.parameters = {}
                    (_ktype182, _vtype183, _size181) = iprot.readMapBegin()
                    for _i185 in range(_size181):
                        _key186 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val187 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameters[_key186] = _val187
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.viewOriginalText = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.viewExpandedText = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.tableType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRUCT:
                    self.privileges = PrincipalPrivilegeSet()
                    self.privileges.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.BOOL:
                    self.temporary = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.BOOL:
                    self.rewriteEnabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.STRUCT:
                    self.creationMetadata = CreationMetadata()
                    self.creationMetadata.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 18:
                if ftype == TType.I32:
                    self.ownerType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Table')
        if self.tableName is not None:
            oprot.writeFieldBegin('tableName', TType.STRING, 1)
            oprot.writeString(self.tableName.encode('utf-8') if sys.version_info[0] == 2 else self.tableName)
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 2)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.owner is not None:
            oprot.writeFieldBegin('owner', TType.STRING, 3)
            oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner)
            oprot.writeFieldEnd()
        if self.createTime is not None:
            oprot.writeFieldBegin('createTime', TType.I32, 4)
            oprot.writeI32(self.createTime)
            oprot.writeFieldEnd()
        if self.lastAccessTime is not None:
            oprot.writeFieldBegin('lastAccessTime', TType.I32, 5)
            oprot.writeI32(self.lastAccessTime)
            oprot.writeFieldEnd()
        if self.retention is not None:
            oprot.writeFieldBegin('retention', TType.I32, 6)
            oprot.writeI32(self.retention)
            oprot.writeFieldEnd()
        if self.sd is not None:
            oprot.writeFieldBegin('sd', TType.STRUCT, 7)
            self.sd.write(oprot)
            oprot.writeFieldEnd()
        if self.partitionKeys is not None:
            oprot.writeFieldBegin('partitionKeys', TType.LIST, 8)
            oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys))
            for iter188 in self.partitionKeys:
                iter188.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.parameters is not None:
            oprot.writeFieldBegin('parameters', TType.MAP, 9)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
            for kiter189, viter190 in self.parameters.items():
                oprot.writeString(kiter189.encode('utf-8') if sys.version_info[0] == 2 else kiter189)
                oprot.writeString(viter190.encode('utf-8') if sys.version_info[0] == 2 else viter190)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.viewOriginalText is not None:
            oprot.writeFieldBegin('viewOriginalText', TType.STRING, 10)
            oprot.writeString(self.viewOriginalText.encode('utf-8') if sys.version_info[0] == 2 else self.viewOriginalText)
            oprot.writeFieldEnd()
        if self.viewExpandedText is not None:
            oprot.writeFieldBegin('viewExpandedText', TType.STRING, 11)
            oprot.writeString(self.viewExpandedText.encode('utf-8') if sys.version_info[0] == 2 else self.viewExpandedText)
            oprot.writeFieldEnd()
        if self.tableType is not None:
            oprot.writeFieldBegin('tableType', TType.STRING, 12)
            oprot.writeString(self.tableType.encode('utf-8') if sys.version_info[0] == 2 else self.tableType)
            oprot.writeFieldEnd()
        if self.privileges is not None:
            oprot.writeFieldBegin('privileges', TType.STRUCT, 13)
            self.privileges.write(oprot)
            oprot.writeFieldEnd()
        if self.temporary is not None:
            oprot.writeFieldBegin('temporary', TType.BOOL, 14)
            oprot.writeBool(self.temporary)
            oprot.writeFieldEnd()
        if self.rewriteEnabled is not None:
            oprot.writeFieldBegin('rewriteEnabled', TType.BOOL, 15)
            oprot.writeBool(self.rewriteEnabled)
            oprot.writeFieldEnd()
        if self.creationMetadata is not None:
            oprot.writeFieldBegin('creationMetadata', TType.STRUCT, 16)
            self.creationMetadata.write(oprot)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 17)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.ownerType is not None:
            oprot.writeFieldBegin('ownerType', TType.I32, 18)
            oprot.writeI32(self.ownerType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 Partition(object):
    """
    Attributes:
     - values
     - dbName
     - tableName
     - createTime
     - lastAccessTime
     - sd
     - parameters
     - privileges
     - catName

    """


    def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None, privileges=None, catName=None,):
        self.values = values
        self.dbName = dbName
        self.tableName = tableName
        self.createTime = createTime
        self.lastAccessTime = lastAccessTime
        self.sd = sd
        self.parameters = parameters
        self.privileges = privileges
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.values = []
                    (_etype194, _size191) = iprot.readListBegin()
                    for _i195 in range(_size191):
                        _elem196 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.values.append(_elem196)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.tableName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.createTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.lastAccessTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.sd = StorageDescriptor()
                    self.sd.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.MAP:
                    self.parameters = {}
                    (_ktype198, _vtype199, _size197) = iprot.readMapBegin()
                    for _i201 in range(_size197):
                        _key202 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val203 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameters[_key202] = _val203
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRUCT:
                    self.privileges = PrincipalPrivilegeSet()
                    self.privileges.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Partition')
        if self.values is not None:
            oprot.writeFieldBegin('values', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.values))
            for iter204 in self.values:
                oprot.writeString(iter204.encode('utf-8') if sys.version_info[0] == 2 else iter204)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 2)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tableName is not None:
            oprot.writeFieldBegin('tableName', TType.STRING, 3)
            oprot.writeString(self.tableName.encode('utf-8') if sys.version_info[0] == 2 else self.tableName)
            oprot.writeFieldEnd()
        if self.createTime is not None:
            oprot.writeFieldBegin('createTime', TType.I32, 4)
            oprot.writeI32(self.createTime)
            oprot.writeFieldEnd()
        if self.lastAccessTime is not None:
            oprot.writeFieldBegin('lastAccessTime', TType.I32, 5)
            oprot.writeI32(self.lastAccessTime)
            oprot.writeFieldEnd()
        if self.sd is not None:
            oprot.writeFieldBegin('sd', TType.STRUCT, 6)
            self.sd.write(oprot)
            oprot.writeFieldEnd()
        if self.parameters is not None:
            oprot.writeFieldBegin('parameters', TType.MAP, 7)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
            for kiter205, viter206 in self.parameters.items():
                oprot.writeString(kiter205.encode('utf-8') if sys.version_info[0] == 2 else kiter205)
                oprot.writeString(viter206.encode('utf-8') if sys.version_info[0] == 2 else viter206)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.privileges is not None:
            oprot.writeFieldBegin('privileges', TType.STRUCT, 8)
            self.privileges.write(oprot)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 9)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionWithoutSD(object):
    """
    Attributes:
     - values
     - createTime
     - lastAccessTime
     - relativePath
     - parameters
     - privileges

    """


    def __init__(self, values=None, createTime=None, lastAccessTime=None, relativePath=None, parameters=None, privileges=None,):
        self.values = values
        self.createTime = createTime
        self.lastAccessTime = lastAccessTime
        self.relativePath = relativePath
        self.parameters = parameters
        self.privileges = privileges

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.values = []
                    (_etype210, _size207) = iprot.readListBegin()
                    for _i211 in range(_size207):
                        _elem212 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.values.append(_elem212)
                    iprot.readListEnd()
                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.I32:
                    self.lastAccessTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.relativePath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.MAP:
                    self.parameters = {}
                    (_ktype214, _vtype215, _size213) = iprot.readMapBegin()
                    for _i217 in range(_size213):
                        _key218 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val219 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameters[_key218] = _val219
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.privileges = PrincipalPrivilegeSet()
                    self.privileges.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionWithoutSD')
        if self.values is not None:
            oprot.writeFieldBegin('values', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.values))
            for iter220 in self.values:
                oprot.writeString(iter220.encode('utf-8') if sys.version_info[0] == 2 else iter220)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.createTime is not None:
            oprot.writeFieldBegin('createTime', TType.I32, 2)
            oprot.writeI32(self.createTime)
            oprot.writeFieldEnd()
        if self.lastAccessTime is not None:
            oprot.writeFieldBegin('lastAccessTime', TType.I32, 3)
            oprot.writeI32(self.lastAccessTime)
            oprot.writeFieldEnd()
        if self.relativePath is not None:
            oprot.writeFieldBegin('relativePath', TType.STRING, 4)
            oprot.writeString(self.relativePath.encode('utf-8') if sys.version_info[0] == 2 else self.relativePath)
            oprot.writeFieldEnd()
        if self.parameters is not None:
            oprot.writeFieldBegin('parameters', TType.MAP, 5)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
            for kiter221, viter222 in self.parameters.items():
                oprot.writeString(kiter221.encode('utf-8') if sys.version_info[0] == 2 else kiter221)
                oprot.writeString(viter222.encode('utf-8') if sys.version_info[0] == 2 else viter222)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.privileges is not None:
            oprot.writeFieldBegin('privileges', TType.STRUCT, 6)
            self.privileges.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionSpecWithSharedSD(object):
    """
    Attributes:
     - partitions
     - sd

    """


    def __init__(self, partitions=None, sd=None,):
        self.partitions = partitions
        self.sd = sd

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.partitions = []
                    (_etype226, _size223) = iprot.readListBegin()
                    for _i227 in range(_size223):
                        _elem228 = PartitionWithoutSD()
                        _elem228.read(iprot)
                        self.partitions.append(_elem228)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.sd = StorageDescriptor()
                    self.sd.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionSpecWithSharedSD')
        if self.partitions is not None:
            oprot.writeFieldBegin('partitions', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter229 in self.partitions:
                iter229.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.sd is not None:
            oprot.writeFieldBegin('sd', TType.STRUCT, 2)
            self.sd.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionListComposingSpec(object):
    """
    Attributes:
     - partitions

    """


    def __init__(self, partitions=None,):
        self.partitions = partitions

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.partitions = []
                    (_etype233, _size230) = iprot.readListBegin()
                    for _i234 in range(_size230):
                        _elem235 = Partition()
                        _elem235.read(iprot)
                        self.partitions.append(_elem235)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionListComposingSpec')
        if self.partitions is not None:
            oprot.writeFieldBegin('partitions', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter236 in self.partitions:
                iter236.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionSpec(object):
    """
    Attributes:
     - dbName
     - tableName
     - rootPath
     - sharedSDPartitionSpec
     - partitionList
     - catName

    """


    def __init__(self, dbName=None, tableName=None, rootPath=None, sharedSDPartitionSpec=None, partitionList=None, catName=None,):
        self.dbName = dbName
        self.tableName = tableName
        self.rootPath = rootPath
        self.sharedSDPartitionSpec = sharedSDPartitionSpec
        self.partitionList = partitionList
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tableName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.rootPath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.sharedSDPartitionSpec = PartitionSpecWithSharedSD()
                    self.sharedSDPartitionSpec.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.partitionList = PartitionListComposingSpec()
                    self.partitionList.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionSpec')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tableName is not None:
            oprot.writeFieldBegin('tableName', TType.STRING, 2)
            oprot.writeString(self.tableName.encode('utf-8') if sys.version_info[0] == 2 else self.tableName)
            oprot.writeFieldEnd()
        if self.rootPath is not None:
            oprot.writeFieldBegin('rootPath', TType.STRING, 3)
            oprot.writeString(self.rootPath.encode('utf-8') if sys.version_info[0] == 2 else self.rootPath)
            oprot.writeFieldEnd()
        if self.sharedSDPartitionSpec is not None:
            oprot.writeFieldBegin('sharedSDPartitionSpec', TType.STRUCT, 4)
            self.sharedSDPartitionSpec.write(oprot)
            oprot.writeFieldEnd()
        if self.partitionList is not None:
            oprot.writeFieldBegin('partitionList', TType.STRUCT, 5)
            self.partitionList.write(oprot)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 6)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 BooleanColumnStatsData(object):
    """
    Attributes:
     - numTrues
     - numFalses
     - numNulls
     - bitVectors

    """


    def __init__(self, numTrues=None, numFalses=None, numNulls=None, bitVectors=None,):
        self.numTrues = numTrues
        self.numFalses = numFalses
        self.numNulls = numNulls
        self.bitVectors = bitVectors

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.numTrues = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.numFalses = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.numNulls = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.bitVectors = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('BooleanColumnStatsData')
        if self.numTrues is not None:
            oprot.writeFieldBegin('numTrues', TType.I64, 1)
            oprot.writeI64(self.numTrues)
            oprot.writeFieldEnd()
        if self.numFalses is not None:
            oprot.writeFieldBegin('numFalses', TType.I64, 2)
            oprot.writeI64(self.numFalses)
            oprot.writeFieldEnd()
        if self.numNulls is not None:
            oprot.writeFieldBegin('numNulls', TType.I64, 3)
            oprot.writeI64(self.numNulls)
            oprot.writeFieldEnd()
        if self.bitVectors is not None:
            oprot.writeFieldBegin('bitVectors', TType.STRING, 4)
            oprot.writeBinary(self.bitVectors)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.numTrues is None:
            raise TProtocolException(message='Required field numTrues is unset!')
        if self.numFalses is None:
            raise TProtocolException(message='Required field numFalses is unset!')
        if self.numNulls is None:
            raise TProtocolException(message='Required field numNulls is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 DoubleColumnStatsData(object):
    """
    Attributes:
     - lowValue
     - highValue
     - numNulls
     - numDVs
     - bitVectors

    """


    def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,):
        self.lowValue = lowValue
        self.highValue = highValue
        self.numNulls = numNulls
        self.numDVs = numDVs
        self.bitVectors = bitVectors

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.DOUBLE:
                    self.lowValue = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.DOUBLE:
                    self.highValue = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.numNulls = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.numDVs = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.bitVectors = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DoubleColumnStatsData')
        if self.lowValue is not None:
            oprot.writeFieldBegin('lowValue', TType.DOUBLE, 1)
            oprot.writeDouble(self.lowValue)
            oprot.writeFieldEnd()
        if self.highValue is not None:
            oprot.writeFieldBegin('highValue', TType.DOUBLE, 2)
            oprot.writeDouble(self.highValue)
            oprot.writeFieldEnd()
        if self.numNulls is not None:
            oprot.writeFieldBegin('numNulls', TType.I64, 3)
            oprot.writeI64(self.numNulls)
            oprot.writeFieldEnd()
        if self.numDVs is not None:
            oprot.writeFieldBegin('numDVs', TType.I64, 4)
            oprot.writeI64(self.numDVs)
            oprot.writeFieldEnd()
        if self.bitVectors is not None:
            oprot.writeFieldBegin('bitVectors', TType.STRING, 5)
            oprot.writeBinary(self.bitVectors)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.numNulls is None:
            raise TProtocolException(message='Required field numNulls is unset!')
        if self.numDVs is None:
            raise TProtocolException(message='Required field numDVs is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 LongColumnStatsData(object):
    """
    Attributes:
     - lowValue
     - highValue
     - numNulls
     - numDVs
     - bitVectors

    """


    def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,):
        self.lowValue = lowValue
        self.highValue = highValue
        self.numNulls = numNulls
        self.numDVs = numDVs
        self.bitVectors = bitVectors

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.lowValue = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.highValue = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.numNulls = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.numDVs = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.bitVectors = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('LongColumnStatsData')
        if self.lowValue is not None:
            oprot.writeFieldBegin('lowValue', TType.I64, 1)
            oprot.writeI64(self.lowValue)
            oprot.writeFieldEnd()
        if self.highValue is not None:
            oprot.writeFieldBegin('highValue', TType.I64, 2)
            oprot.writeI64(self.highValue)
            oprot.writeFieldEnd()
        if self.numNulls is not None:
            oprot.writeFieldBegin('numNulls', TType.I64, 3)
            oprot.writeI64(self.numNulls)
            oprot.writeFieldEnd()
        if self.numDVs is not None:
            oprot.writeFieldBegin('numDVs', TType.I64, 4)
            oprot.writeI64(self.numDVs)
            oprot.writeFieldEnd()
        if self.bitVectors is not None:
            oprot.writeFieldBegin('bitVectors', TType.STRING, 5)
            oprot.writeBinary(self.bitVectors)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.numNulls is None:
            raise TProtocolException(message='Required field numNulls is unset!')
        if self.numDVs is None:
            raise TProtocolException(message='Required field numDVs is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 StringColumnStatsData(object):
    """
    Attributes:
     - maxColLen
     - avgColLen
     - numNulls
     - numDVs
     - bitVectors

    """


    def __init__(self, maxColLen=None, avgColLen=None, numNulls=None, numDVs=None, bitVectors=None,):
        self.maxColLen = maxColLen
        self.avgColLen = avgColLen
        self.numNulls = numNulls
        self.numDVs = numDVs
        self.bitVectors = bitVectors

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.maxColLen = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.DOUBLE:
                    self.avgColLen = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.numNulls = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.numDVs = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.bitVectors = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('StringColumnStatsData')
        if self.maxColLen is not None:
            oprot.writeFieldBegin('maxColLen', TType.I64, 1)
            oprot.writeI64(self.maxColLen)
            oprot.writeFieldEnd()
        if self.avgColLen is not None:
            oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 2)
            oprot.writeDouble(self.avgColLen)
            oprot.writeFieldEnd()
        if self.numNulls is not None:
            oprot.writeFieldBegin('numNulls', TType.I64, 3)
            oprot.writeI64(self.numNulls)
            oprot.writeFieldEnd()
        if self.numDVs is not None:
            oprot.writeFieldBegin('numDVs', TType.I64, 4)
            oprot.writeI64(self.numDVs)
            oprot.writeFieldEnd()
        if self.bitVectors is not None:
            oprot.writeFieldBegin('bitVectors', TType.STRING, 5)
            oprot.writeBinary(self.bitVectors)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.maxColLen is None:
            raise TProtocolException(message='Required field maxColLen is unset!')
        if self.avgColLen is None:
            raise TProtocolException(message='Required field avgColLen is unset!')
        if self.numNulls is None:
            raise TProtocolException(message='Required field numNulls is unset!')
        if self.numDVs is None:
            raise TProtocolException(message='Required field numDVs is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 BinaryColumnStatsData(object):
    """
    Attributes:
     - maxColLen
     - avgColLen
     - numNulls
     - bitVectors

    """


    def __init__(self, maxColLen=None, avgColLen=None, numNulls=None, bitVectors=None,):
        self.maxColLen = maxColLen
        self.avgColLen = avgColLen
        self.numNulls = numNulls
        self.bitVectors = bitVectors

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.maxColLen = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.DOUBLE:
                    self.avgColLen = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.numNulls = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.bitVectors = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('BinaryColumnStatsData')
        if self.maxColLen is not None:
            oprot.writeFieldBegin('maxColLen', TType.I64, 1)
            oprot.writeI64(self.maxColLen)
            oprot.writeFieldEnd()
        if self.avgColLen is not None:
            oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 2)
            oprot.writeDouble(self.avgColLen)
            oprot.writeFieldEnd()
        if self.numNulls is not None:
            oprot.writeFieldBegin('numNulls', TType.I64, 3)
            oprot.writeI64(self.numNulls)
            oprot.writeFieldEnd()
        if self.bitVectors is not None:
            oprot.writeFieldBegin('bitVectors', TType.STRING, 4)
            oprot.writeBinary(self.bitVectors)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.maxColLen is None:
            raise TProtocolException(message='Required field maxColLen is unset!')
        if self.avgColLen is None:
            raise TProtocolException(message='Required field avgColLen is unset!')
        if self.numNulls is None:
            raise TProtocolException(message='Required field numNulls is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 Decimal(object):
    """
    Attributes:
     - scale
     - unscaled

    """


    def __init__(self, scale=None, unscaled=None,):
        self.scale = scale
        self.unscaled = unscaled

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 3:
                if ftype == TType.I16:
                    self.scale = iprot.readI16()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRING:
                    self.unscaled = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Decimal')
        if self.unscaled is not None:
            oprot.writeFieldBegin('unscaled', TType.STRING, 1)
            oprot.writeBinary(self.unscaled)
            oprot.writeFieldEnd()
        if self.scale is not None:
            oprot.writeFieldBegin('scale', TType.I16, 3)
            oprot.writeI16(self.scale)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.scale is None:
            raise TProtocolException(message='Required field scale is unset!')
        if self.unscaled is None:
            raise TProtocolException(message='Required field unscaled is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 DecimalColumnStatsData(object):
    """
    Attributes:
     - lowValue
     - highValue
     - numNulls
     - numDVs
     - bitVectors

    """


    def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,):
        self.lowValue = lowValue
        self.highValue = highValue
        self.numNulls = numNulls
        self.numDVs = numDVs
        self.bitVectors = bitVectors

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.lowValue = Decimal()
                    self.lowValue.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.highValue = Decimal()
                    self.highValue.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.numNulls = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.numDVs = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.bitVectors = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DecimalColumnStatsData')
        if self.lowValue is not None:
            oprot.writeFieldBegin('lowValue', TType.STRUCT, 1)
            self.lowValue.write(oprot)
            oprot.writeFieldEnd()
        if self.highValue is not None:
            oprot.writeFieldBegin('highValue', TType.STRUCT, 2)
            self.highValue.write(oprot)
            oprot.writeFieldEnd()
        if self.numNulls is not None:
            oprot.writeFieldBegin('numNulls', TType.I64, 3)
            oprot.writeI64(self.numNulls)
            oprot.writeFieldEnd()
        if self.numDVs is not None:
            oprot.writeFieldBegin('numDVs', TType.I64, 4)
            oprot.writeI64(self.numDVs)
            oprot.writeFieldEnd()
        if self.bitVectors is not None:
            oprot.writeFieldBegin('bitVectors', TType.STRING, 5)
            oprot.writeBinary(self.bitVectors)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.numNulls is None:
            raise TProtocolException(message='Required field numNulls is unset!')
        if self.numDVs is None:
            raise TProtocolException(message='Required field numDVs is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 Date(object):
    """
    Attributes:
     - daysSinceEpoch

    """


    def __init__(self, daysSinceEpoch=None,):
        self.daysSinceEpoch = daysSinceEpoch

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.daysSinceEpoch = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Date')
        if self.daysSinceEpoch is not None:
            oprot.writeFieldBegin('daysSinceEpoch', TType.I64, 1)
            oprot.writeI64(self.daysSinceEpoch)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.daysSinceEpoch is None:
            raise TProtocolException(message='Required field daysSinceEpoch is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 DateColumnStatsData(object):
    """
    Attributes:
     - lowValue
     - highValue
     - numNulls
     - numDVs
     - bitVectors

    """


    def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,):
        self.lowValue = lowValue
        self.highValue = highValue
        self.numNulls = numNulls
        self.numDVs = numDVs
        self.bitVectors = bitVectors

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.lowValue = Date()
                    self.lowValue.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.highValue = Date()
                    self.highValue.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.numNulls = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.numDVs = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.bitVectors = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DateColumnStatsData')
        if self.lowValue is not None:
            oprot.writeFieldBegin('lowValue', TType.STRUCT, 1)
            self.lowValue.write(oprot)
            oprot.writeFieldEnd()
        if self.highValue is not None:
            oprot.writeFieldBegin('highValue', TType.STRUCT, 2)
            self.highValue.write(oprot)
            oprot.writeFieldEnd()
        if self.numNulls is not None:
            oprot.writeFieldBegin('numNulls', TType.I64, 3)
            oprot.writeI64(self.numNulls)
            oprot.writeFieldEnd()
        if self.numDVs is not None:
            oprot.writeFieldBegin('numDVs', TType.I64, 4)
            oprot.writeI64(self.numDVs)
            oprot.writeFieldEnd()
        if self.bitVectors is not None:
            oprot.writeFieldBegin('bitVectors', TType.STRING, 5)
            oprot.writeBinary(self.bitVectors)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.numNulls is None:
            raise TProtocolException(message='Required field numNulls is unset!')
        if self.numDVs is None:
            raise TProtocolException(message='Required field numDVs is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ColumnStatisticsData(object):
    """
    Attributes:
     - booleanStats
     - longStats
     - doubleStats
     - stringStats
     - binaryStats
     - decimalStats
     - dateStats

    """


    def __init__(self, booleanStats=None, longStats=None, doubleStats=None, stringStats=None, binaryStats=None, decimalStats=None, dateStats=None,):
        self.booleanStats = booleanStats
        self.longStats = longStats
        self.doubleStats = doubleStats
        self.stringStats = stringStats
        self.binaryStats = binaryStats
        self.decimalStats = decimalStats
        self.dateStats = dateStats

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.booleanStats = BooleanColumnStatsData()
                    self.booleanStats.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.longStats = LongColumnStatsData()
                    self.longStats.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.doubleStats = DoubleColumnStatsData()
                    self.doubleStats.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.stringStats = StringColumnStatsData()
                    self.stringStats.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.binaryStats = BinaryColumnStatsData()
                    self.binaryStats.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.decimalStats = DecimalColumnStatsData()
                    self.decimalStats.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRUCT:
                    self.dateStats = DateColumnStatsData()
                    self.dateStats.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ColumnStatisticsData')
        if self.booleanStats is not None:
            oprot.writeFieldBegin('booleanStats', TType.STRUCT, 1)
            self.booleanStats.write(oprot)
            oprot.writeFieldEnd()
        if self.longStats is not None:
            oprot.writeFieldBegin('longStats', TType.STRUCT, 2)
            self.longStats.write(oprot)
            oprot.writeFieldEnd()
        if self.doubleStats is not None:
            oprot.writeFieldBegin('doubleStats', TType.STRUCT, 3)
            self.doubleStats.write(oprot)
            oprot.writeFieldEnd()
        if self.stringStats is not None:
            oprot.writeFieldBegin('stringStats', TType.STRUCT, 4)
            self.stringStats.write(oprot)
            oprot.writeFieldEnd()
        if self.binaryStats is not None:
            oprot.writeFieldBegin('binaryStats', TType.STRUCT, 5)
            self.binaryStats.write(oprot)
            oprot.writeFieldEnd()
        if self.decimalStats is not None:
            oprot.writeFieldBegin('decimalStats', TType.STRUCT, 6)
            self.decimalStats.write(oprot)
            oprot.writeFieldEnd()
        if self.dateStats is not None:
            oprot.writeFieldBegin('dateStats', TType.STRUCT, 7)
            self.dateStats.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ColumnStatisticsObj(object):
    """
    Attributes:
     - colName
     - colType
     - statsData

    """


    def __init__(self, colName=None, colType=None, statsData=None,):
        self.colName = colName
        self.colType = colType
        self.statsData = statsData

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.colName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.colType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.statsData = ColumnStatisticsData()
                    self.statsData.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ColumnStatisticsObj')
        if self.colName is not None:
            oprot.writeFieldBegin('colName', TType.STRING, 1)
            oprot.writeString(self.colName.encode('utf-8') if sys.version_info[0] == 2 else self.colName)
            oprot.writeFieldEnd()
        if self.colType is not None:
            oprot.writeFieldBegin('colType', TType.STRING, 2)
            oprot.writeString(self.colType.encode('utf-8') if sys.version_info[0] == 2 else self.colType)
            oprot.writeFieldEnd()
        if self.statsData is not None:
            oprot.writeFieldBegin('statsData', TType.STRUCT, 3)
            self.statsData.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.colName is None:
            raise TProtocolException(message='Required field colName is unset!')
        if self.colType is None:
            raise TProtocolException(message='Required field colType is unset!')
        if self.statsData is None:
            raise TProtocolException(message='Required field statsData is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ColumnStatisticsDesc(object):
    """
    Attributes:
     - isTblLevel
     - dbName
     - tableName
     - partName
     - lastAnalyzed
     - catName

    """


    def __init__(self, isTblLevel=None, dbName=None, tableName=None, partName=None, lastAnalyzed=None, catName=None,):
        self.isTblLevel = isTblLevel
        self.dbName = dbName
        self.tableName = tableName
        self.partName = partName
        self.lastAnalyzed = lastAnalyzed
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.isTblLevel = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.tableName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.partName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.lastAnalyzed = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ColumnStatisticsDesc')
        if self.isTblLevel is not None:
            oprot.writeFieldBegin('isTblLevel', TType.BOOL, 1)
            oprot.writeBool(self.isTblLevel)
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 2)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tableName is not None:
            oprot.writeFieldBegin('tableName', TType.STRING, 3)
            oprot.writeString(self.tableName.encode('utf-8') if sys.version_info[0] == 2 else self.tableName)
            oprot.writeFieldEnd()
        if self.partName is not None:
            oprot.writeFieldBegin('partName', TType.STRING, 4)
            oprot.writeString(self.partName.encode('utf-8') if sys.version_info[0] == 2 else self.partName)
            oprot.writeFieldEnd()
        if self.lastAnalyzed is not None:
            oprot.writeFieldBegin('lastAnalyzed', TType.I64, 5)
            oprot.writeI64(self.lastAnalyzed)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 6)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.isTblLevel is None:
            raise TProtocolException(message='Required field isTblLevel is unset!')
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tableName is None:
            raise TProtocolException(message='Required field tableName is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ColumnStatistics(object):
    """
    Attributes:
     - statsDesc
     - statsObj

    """


    def __init__(self, statsDesc=None, statsObj=None,):
        self.statsDesc = statsDesc
        self.statsObj = statsObj

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.statsDesc = ColumnStatisticsDesc()
                    self.statsDesc.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.statsObj = []
                    (_etype240, _size237) = iprot.readListBegin()
                    for _i241 in range(_size237):
                        _elem242 = ColumnStatisticsObj()
                        _elem242.read(iprot)
                        self.statsObj.append(_elem242)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ColumnStatistics')
        if self.statsDesc is not None:
            oprot.writeFieldBegin('statsDesc', TType.STRUCT, 1)
            self.statsDesc.write(oprot)
            oprot.writeFieldEnd()
        if self.statsObj is not None:
            oprot.writeFieldBegin('statsObj', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.statsObj))
            for iter243 in self.statsObj:
                iter243.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.statsDesc is None:
            raise TProtocolException(message='Required field statsDesc is unset!')
        if self.statsObj is None:
            raise TProtocolException(message='Required field statsObj is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AggrStats(object):
    """
    Attributes:
     - colStats
     - partsFound

    """


    def __init__(self, colStats=None, partsFound=None,):
        self.colStats = colStats
        self.partsFound = partsFound

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.colStats = []
                    (_etype247, _size244) = iprot.readListBegin()
                    for _i248 in range(_size244):
                        _elem249 = ColumnStatisticsObj()
                        _elem249.read(iprot)
                        self.colStats.append(_elem249)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.partsFound = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AggrStats')
        if self.colStats is not None:
            oprot.writeFieldBegin('colStats', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.colStats))
            for iter250 in self.colStats:
                iter250.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.partsFound is not None:
            oprot.writeFieldBegin('partsFound', TType.I64, 2)
            oprot.writeI64(self.partsFound)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.colStats is None:
            raise TProtocolException(message='Required field colStats is unset!')
        if self.partsFound is None:
            raise TProtocolException(message='Required field partsFound is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 SetPartitionsStatsRequest(object):
    """
    Attributes:
     - colStats
     - needMerge

    """


    def __init__(self, colStats=None, needMerge=None,):
        self.colStats = colStats
        self.needMerge = needMerge

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.colStats = []
                    (_etype254, _size251) = iprot.readListBegin()
                    for _i255 in range(_size251):
                        _elem256 = ColumnStatistics()
                        _elem256.read(iprot)
                        self.colStats.append(_elem256)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.needMerge = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SetPartitionsStatsRequest')
        if self.colStats is not None:
            oprot.writeFieldBegin('colStats', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.colStats))
            for iter257 in self.colStats:
                iter257.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.needMerge is not None:
            oprot.writeFieldBegin('needMerge', TType.BOOL, 2)
            oprot.writeBool(self.needMerge)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.colStats is None:
            raise TProtocolException(message='Required field colStats is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 Schema(object):
    """
    Attributes:
     - fieldSchemas
     - properties

    """


    def __init__(self, fieldSchemas=None, properties=None,):
        self.fieldSchemas = fieldSchemas
        self.properties = properties

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.fieldSchemas = []
                    (_etype261, _size258) = iprot.readListBegin()
                    for _i262 in range(_size258):
                        _elem263 = FieldSchema()
                        _elem263.read(iprot)
                        self.fieldSchemas.append(_elem263)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.properties = {}
                    (_ktype265, _vtype266, _size264) = iprot.readMapBegin()
                    for _i268 in range(_size264):
                        _key269 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val270 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.properties[_key269] = _val270
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Schema')
        if self.fieldSchemas is not None:
            oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas))
            for iter271 in self.fieldSchemas:
                iter271.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.properties is not None:
            oprot.writeFieldBegin('properties', TType.MAP, 2)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
            for kiter272, viter273 in self.properties.items():
                oprot.writeString(kiter272.encode('utf-8') if sys.version_info[0] == 2 else kiter272)
                oprot.writeString(viter273.encode('utf-8') if sys.version_info[0] == 2 else viter273)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 EnvironmentContext(object):
    """
    Attributes:
     - properties

    """


    def __init__(self, properties=None,):
        self.properties = properties

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.properties = {}
                    (_ktype275, _vtype276, _size274) = iprot.readMapBegin()
                    for _i278 in range(_size274):
                        _key279 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val280 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.properties[_key279] = _val280
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('EnvironmentContext')
        if self.properties is not None:
            oprot.writeFieldBegin('properties', TType.MAP, 1)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
            for kiter281, viter282 in self.properties.items():
                oprot.writeString(kiter281.encode('utf-8') if sys.version_info[0] == 2 else kiter281)
                oprot.writeString(viter282.encode('utf-8') if sys.version_info[0] == 2 else viter282)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PrimaryKeysRequest(object):
    """
    Attributes:
     - db_name
     - tbl_name
     - catName

    """


    def __init__(self, db_name=None, tbl_name=None, catName=None,):
        self.db_name = db_name
        self.tbl_name = tbl_name
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.db_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tbl_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PrimaryKeysRequest')
        if self.db_name is not None:
            oprot.writeFieldBegin('db_name', TType.STRING, 1)
            oprot.writeString(self.db_name.encode('utf-8') if sys.version_info[0] == 2 else self.db_name)
            oprot.writeFieldEnd()
        if self.tbl_name is not None:
            oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
            oprot.writeString(self.tbl_name.encode('utf-8') if sys.version_info[0] == 2 else self.tbl_name)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 3)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.db_name is None:
            raise TProtocolException(message='Required field db_name is unset!')
        if self.tbl_name is None:
            raise TProtocolException(message='Required field tbl_name is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PrimaryKeysResponse(object):
    """
    Attributes:
     - primaryKeys

    """


    def __init__(self, primaryKeys=None,):
        self.primaryKeys = primaryKeys

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.primaryKeys = []
                    (_etype286, _size283) = iprot.readListBegin()
                    for _i287 in range(_size283):
                        _elem288 = SQLPrimaryKey()
                        _elem288.read(iprot)
                        self.primaryKeys.append(_elem288)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PrimaryKeysResponse')
        if self.primaryKeys is not None:
            oprot.writeFieldBegin('primaryKeys', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys))
            for iter289 in self.primaryKeys:
                iter289.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.primaryKeys is None:
            raise TProtocolException(message='Required field primaryKeys is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ForeignKeysRequest(object):
    """
    Attributes:
     - parent_db_name
     - parent_tbl_name
     - foreign_db_name
     - foreign_tbl_name
     - catName

    """


    def __init__(self, parent_db_name=None, parent_tbl_name=None, foreign_db_name=None, foreign_tbl_name=None, catName=None,):
        self.parent_db_name = parent_db_name
        self.parent_tbl_name = parent_tbl_name
        self.foreign_db_name = foreign_db_name
        self.foreign_tbl_name = foreign_tbl_name
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.parent_db_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.parent_tbl_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.foreign_db_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.foreign_tbl_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ForeignKeysRequest')
        if self.parent_db_name is not None:
            oprot.writeFieldBegin('parent_db_name', TType.STRING, 1)
            oprot.writeString(self.parent_db_name.encode('utf-8') if sys.version_info[0] == 2 else self.parent_db_name)
            oprot.writeFieldEnd()
        if self.parent_tbl_name is not None:
            oprot.writeFieldBegin('parent_tbl_name', TType.STRING, 2)
            oprot.writeString(self.parent_tbl_name.encode('utf-8') if sys.version_info[0] == 2 else self.parent_tbl_name)
            oprot.writeFieldEnd()
        if self.foreign_db_name is not None:
            oprot.writeFieldBegin('foreign_db_name', TType.STRING, 3)
            oprot.writeString(self.foreign_db_name.encode('utf-8') if sys.version_info[0] == 2 else self.foreign_db_name)
            oprot.writeFieldEnd()
        if self.foreign_tbl_name is not None:
            oprot.writeFieldBegin('foreign_tbl_name', TType.STRING, 4)
            oprot.writeString(self.foreign_tbl_name.encode('utf-8') if sys.version_info[0] == 2 else self.foreign_tbl_name)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 5)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ForeignKeysResponse(object):
    """
    Attributes:
     - foreignKeys

    """


    def __init__(self, foreignKeys=None,):
        self.foreignKeys = foreignKeys

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.foreignKeys = []
                    (_etype293, _size290) = iprot.readListBegin()
                    for _i294 in range(_size290):
                        _elem295 = SQLForeignKey()
                        _elem295.read(iprot)
                        self.foreignKeys.append(_elem295)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ForeignKeysResponse')
        if self.foreignKeys is not None:
            oprot.writeFieldBegin('foreignKeys', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys))
            for iter296 in self.foreignKeys:
                iter296.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.foreignKeys is None:
            raise TProtocolException(message='Required field foreignKeys is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 UniqueConstraintsRequest(object):
    """
    Attributes:
     - catName
     - db_name
     - tbl_name

    """


    def __init__(self, catName=None, db_name=None, tbl_name=None,):
        self.catName = catName
        self.db_name = db_name
        self.tbl_name = tbl_name

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.db_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.tbl_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('UniqueConstraintsRequest')
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 1)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.db_name is not None:
            oprot.writeFieldBegin('db_name', TType.STRING, 2)
            oprot.writeString(self.db_name.encode('utf-8') if sys.version_info[0] == 2 else self.db_name)
            oprot.writeFieldEnd()
        if self.tbl_name is not None:
            oprot.writeFieldBegin('tbl_name', TType.STRING, 3)
            oprot.writeString(self.tbl_name.encode('utf-8') if sys.version_info[0] == 2 else self.tbl_name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.catName is None:
            raise TProtocolException(message='Required field catName is unset!')
        if self.db_name is None:
            raise TProtocolException(message='Required field db_name is unset!')
        if self.tbl_name is None:
            raise TProtocolException(message='Required field tbl_name is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 UniqueConstraintsResponse(object):
    """
    Attributes:
     - uniqueConstraints

    """


    def __init__(self, uniqueConstraints=None,):
        self.uniqueConstraints = uniqueConstraints

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.uniqueConstraints = []
                    (_etype300, _size297) = iprot.readListBegin()
                    for _i301 in range(_size297):
                        _elem302 = SQLUniqueConstraint()
                        _elem302.read(iprot)
                        self.uniqueConstraints.append(_elem302)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('UniqueConstraintsResponse')
        if self.uniqueConstraints is not None:
            oprot.writeFieldBegin('uniqueConstraints', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints))
            for iter303 in self.uniqueConstraints:
                iter303.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.uniqueConstraints is None:
            raise TProtocolException(message='Required field uniqueConstraints is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 NotNullConstraintsRequest(object):
    """
    Attributes:
     - catName
     - db_name
     - tbl_name

    """


    def __init__(self, catName=None, db_name=None, tbl_name=None,):
        self.catName = catName
        self.db_name = db_name
        self.tbl_name = tbl_name

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.db_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.tbl_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('NotNullConstraintsRequest')
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 1)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.db_name is not None:
            oprot.writeFieldBegin('db_name', TType.STRING, 2)
            oprot.writeString(self.db_name.encode('utf-8') if sys.version_info[0] == 2 else self.db_name)
            oprot.writeFieldEnd()
        if self.tbl_name is not None:
            oprot.writeFieldBegin('tbl_name', TType.STRING, 3)
            oprot.writeString(self.tbl_name.encode('utf-8') if sys.version_info[0] == 2 else self.tbl_name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.catName is None:
            raise TProtocolException(message='Required field catName is unset!')
        if self.db_name is None:
            raise TProtocolException(message='Required field db_name is unset!')
        if self.tbl_name is None:
            raise TProtocolException(message='Required field tbl_name is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 NotNullConstraintsResponse(object):
    """
    Attributes:
     - notNullConstraints

    """


    def __init__(self, notNullConstraints=None,):
        self.notNullConstraints = notNullConstraints

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.notNullConstraints = []
                    (_etype307, _size304) = iprot.readListBegin()
                    for _i308 in range(_size304):
                        _elem309 = SQLNotNullConstraint()
                        _elem309.read(iprot)
                        self.notNullConstraints.append(_elem309)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('NotNullConstraintsResponse')
        if self.notNullConstraints is not None:
            oprot.writeFieldBegin('notNullConstraints', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints))
            for iter310 in self.notNullConstraints:
                iter310.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.notNullConstraints is None:
            raise TProtocolException(message='Required field notNullConstraints is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 DefaultConstraintsRequest(object):
    """
    Attributes:
     - catName
     - db_name
     - tbl_name

    """


    def __init__(self, catName=None, db_name=None, tbl_name=None,):
        self.catName = catName
        self.db_name = db_name
        self.tbl_name = tbl_name

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.db_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.tbl_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DefaultConstraintsRequest')
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 1)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.db_name is not None:
            oprot.writeFieldBegin('db_name', TType.STRING, 2)
            oprot.writeString(self.db_name.encode('utf-8') if sys.version_info[0] == 2 else self.db_name)
            oprot.writeFieldEnd()
        if self.tbl_name is not None:
            oprot.writeFieldBegin('tbl_name', TType.STRING, 3)
            oprot.writeString(self.tbl_name.encode('utf-8') if sys.version_info[0] == 2 else self.tbl_name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.catName is None:
            raise TProtocolException(message='Required field catName is unset!')
        if self.db_name is None:
            raise TProtocolException(message='Required field db_name is unset!')
        if self.tbl_name is None:
            raise TProtocolException(message='Required field tbl_name is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 DefaultConstraintsResponse(object):
    """
    Attributes:
     - defaultConstraints

    """


    def __init__(self, defaultConstraints=None,):
        self.defaultConstraints = defaultConstraints

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.defaultConstraints = []
                    (_etype314, _size311) = iprot.readListBegin()
                    for _i315 in range(_size311):
                        _elem316 = SQLDefaultConstraint()
                        _elem316.read(iprot)
                        self.defaultConstraints.append(_elem316)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DefaultConstraintsResponse')
        if self.defaultConstraints is not None:
            oprot.writeFieldBegin('defaultConstraints', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraints))
            for iter317 in self.defaultConstraints:
                iter317.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.defaultConstraints is None:
            raise TProtocolException(message='Required field defaultConstraints is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CheckConstraintsRequest(object):
    """
    Attributes:
     - catName
     - db_name
     - tbl_name

    """


    def __init__(self, catName=None, db_name=None, tbl_name=None,):
        self.catName = catName
        self.db_name = db_name
        self.tbl_name = tbl_name

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.db_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.tbl_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CheckConstraintsRequest')
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 1)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.db_name is not None:
            oprot.writeFieldBegin('db_name', TType.STRING, 2)
            oprot.writeString(self.db_name.encode('utf-8') if sys.version_info[0] == 2 else self.db_name)
            oprot.writeFieldEnd()
        if self.tbl_name is not None:
            oprot.writeFieldBegin('tbl_name', TType.STRING, 3)
            oprot.writeString(self.tbl_name.encode('utf-8') if sys.version_info[0] == 2 else self.tbl_name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.catName is None:
            raise TProtocolException(message='Required field catName is unset!')
        if self.db_name is None:
            raise TProtocolException(message='Required field db_name is unset!')
        if self.tbl_name is None:
            raise TProtocolException(message='Required field tbl_name is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CheckConstraintsResponse(object):
    """
    Attributes:
     - checkConstraints

    """


    def __init__(self, checkConstraints=None,):
        self.checkConstraints = checkConstraints

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.checkConstraints = []
                    (_etype321, _size318) = iprot.readListBegin()
                    for _i322 in range(_size318):
                        _elem323 = SQLCheckConstraint()
                        _elem323.read(iprot)
                        self.checkConstraints.append(_elem323)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CheckConstraintsResponse')
        if self.checkConstraints is not None:
            oprot.writeFieldBegin('checkConstraints', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.checkConstraints))
            for iter324 in self.checkConstraints:
                iter324.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.checkConstraints is None:
            raise TProtocolException(message='Required field checkConstraints is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 DropConstraintRequest(object):
    """
    Attributes:
     - dbname
     - tablename
     - constraintname
     - catName

    """


    def __init__(self, dbname=None, tablename=None, constraintname=None, catName=None,):
        self.dbname = dbname
        self.tablename = tablename
        self.constraintname = constraintname
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tablename = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.constraintname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DropConstraintRequest')
        if self.dbname is not None:
            oprot.writeFieldBegin('dbname', TType.STRING, 1)
            oprot.writeString(self.dbname.encode('utf-8') if sys.version_info[0] == 2 else self.dbname)
            oprot.writeFieldEnd()
        if self.tablename is not None:
            oprot.writeFieldBegin('tablename', TType.STRING, 2)
            oprot.writeString(self.tablename.encode('utf-8') if sys.version_info[0] == 2 else self.tablename)
            oprot.writeFieldEnd()
        if self.constraintname is not None:
            oprot.writeFieldBegin('constraintname', TType.STRING, 3)
            oprot.writeString(self.constraintname.encode('utf-8') if sys.version_info[0] == 2 else self.constraintname)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 4)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbname is None:
            raise TProtocolException(message='Required field dbname is unset!')
        if self.tablename is None:
            raise TProtocolException(message='Required field tablename is unset!')
        if self.constraintname is None:
            raise TProtocolException(message='Required field constraintname is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AddPrimaryKeyRequest(object):
    """
    Attributes:
     - primaryKeyCols

    """


    def __init__(self, primaryKeyCols=None,):
        self.primaryKeyCols = primaryKeyCols

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.primaryKeyCols = []
                    (_etype328, _size325) = iprot.readListBegin()
                    for _i329 in range(_size325):
                        _elem330 = SQLPrimaryKey()
                        _elem330.read(iprot)
                        self.primaryKeyCols.append(_elem330)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AddPrimaryKeyRequest')
        if self.primaryKeyCols is not None:
            oprot.writeFieldBegin('primaryKeyCols', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.primaryKeyCols))
            for iter331 in self.primaryKeyCols:
                iter331.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.primaryKeyCols is None:
            raise TProtocolException(message='Required field primaryKeyCols is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AddForeignKeyRequest(object):
    """
    Attributes:
     - foreignKeyCols

    """


    def __init__(self, foreignKeyCols=None,):
        self.foreignKeyCols = foreignKeyCols

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.foreignKeyCols = []
                    (_etype335, _size332) = iprot.readListBegin()
                    for _i336 in range(_size332):
                        _elem337 = SQLForeignKey()
                        _elem337.read(iprot)
                        self.foreignKeyCols.append(_elem337)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AddForeignKeyRequest')
        if self.foreignKeyCols is not None:
            oprot.writeFieldBegin('foreignKeyCols', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.foreignKeyCols))
            for iter338 in self.foreignKeyCols:
                iter338.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.foreignKeyCols is None:
            raise TProtocolException(message='Required field foreignKeyCols is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AddUniqueConstraintRequest(object):
    """
    Attributes:
     - uniqueConstraintCols

    """


    def __init__(self, uniqueConstraintCols=None,):
        self.uniqueConstraintCols = uniqueConstraintCols

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.uniqueConstraintCols = []
                    (_etype342, _size339) = iprot.readListBegin()
                    for _i343 in range(_size339):
                        _elem344 = SQLUniqueConstraint()
                        _elem344.read(iprot)
                        self.uniqueConstraintCols.append(_elem344)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AddUniqueConstraintRequest')
        if self.uniqueConstraintCols is not None:
            oprot.writeFieldBegin('uniqueConstraintCols', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraintCols))
            for iter345 in self.uniqueConstraintCols:
                iter345.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.uniqueConstraintCols is None:
            raise TProtocolException(message='Required field uniqueConstraintCols is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AddNotNullConstraintRequest(object):
    """
    Attributes:
     - notNullConstraintCols

    """


    def __init__(self, notNullConstraintCols=None,):
        self.notNullConstraintCols = notNullConstraintCols

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.notNullConstraintCols = []
                    (_etype349, _size346) = iprot.readListBegin()
                    for _i350 in range(_size346):
                        _elem351 = SQLNotNullConstraint()
                        _elem351.read(iprot)
                        self.notNullConstraintCols.append(_elem351)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AddNotNullConstraintRequest')
        if self.notNullConstraintCols is not None:
            oprot.writeFieldBegin('notNullConstraintCols', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraintCols))
            for iter352 in self.notNullConstraintCols:
                iter352.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.notNullConstraintCols is None:
            raise TProtocolException(message='Required field notNullConstraintCols is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AddDefaultConstraintRequest(object):
    """
    Attributes:
     - defaultConstraintCols

    """


    def __init__(self, defaultConstraintCols=None,):
        self.defaultConstraintCols = defaultConstraintCols

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.defaultConstraintCols = []
                    (_etype356, _size353) = iprot.readListBegin()
                    for _i357 in range(_size353):
                        _elem358 = SQLDefaultConstraint()
                        _elem358.read(iprot)
                        self.defaultConstraintCols.append(_elem358)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AddDefaultConstraintRequest')
        if self.defaultConstraintCols is not None:
            oprot.writeFieldBegin('defaultConstraintCols', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraintCols))
            for iter359 in self.defaultConstraintCols:
                iter359.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.defaultConstraintCols is None:
            raise TProtocolException(message='Required field defaultConstraintCols is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AddCheckConstraintRequest(object):
    """
    Attributes:
     - checkConstraintCols

    """


    def __init__(self, checkConstraintCols=None,):
        self.checkConstraintCols = checkConstraintCols

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.checkConstraintCols = []
                    (_etype363, _size360) = iprot.readListBegin()
                    for _i364 in range(_size360):
                        _elem365 = SQLCheckConstraint()
                        _elem365.read(iprot)
                        self.checkConstraintCols.append(_elem365)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AddCheckConstraintRequest')
        if self.checkConstraintCols is not None:
            oprot.writeFieldBegin('checkConstraintCols', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.checkConstraintCols))
            for iter366 in self.checkConstraintCols:
                iter366.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.checkConstraintCols is None:
            raise TProtocolException(message='Required field checkConstraintCols is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionsByExprResult(object):
    """
    Attributes:
     - partitions
     - hasUnknownPartitions

    """


    def __init__(self, partitions=None, hasUnknownPartitions=None,):
        self.partitions = partitions
        self.hasUnknownPartitions = hasUnknownPartitions

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.partitions = []
                    (_etype370, _size367) = iprot.readListBegin()
                    for _i371 in range(_size367):
                        _elem372 = Partition()
                        _elem372.read(iprot)
                        self.partitions.append(_elem372)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.hasUnknownPartitions = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionsByExprResult')
        if self.partitions is not None:
            oprot.writeFieldBegin('partitions', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter373 in self.partitions:
                iter373.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.hasUnknownPartitions is not None:
            oprot.writeFieldBegin('hasUnknownPartitions', TType.BOOL, 2)
            oprot.writeBool(self.hasUnknownPartitions)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.partitions is None:
            raise TProtocolException(message='Required field partitions is unset!')
        if self.hasUnknownPartitions is None:
            raise TProtocolException(message='Required field hasUnknownPartitions is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionsByExprRequest(object):
    """
    Attributes:
     - dbName
     - tblName
     - expr
     - defaultPartitionName
     - maxParts
     - catName

    """


    def __init__(self, dbName=None, tblName=None, expr=None, defaultPartitionName=None, maxParts=-1, catName=None,):
        self.dbName = dbName
        self.tblName = tblName
        self.expr = expr
        self.defaultPartitionName = defaultPartitionName
        self.maxParts = maxParts
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tblName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.expr = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.defaultPartitionName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I16:
                    self.maxParts = iprot.readI16()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionsByExprRequest')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tblName is not None:
            oprot.writeFieldBegin('tblName', TType.STRING, 2)
            oprot.writeString(self.tblName.encode('utf-8') if sys.version_info[0] == 2 else self.tblName)
            oprot.writeFieldEnd()
        if self.expr is not None:
            oprot.writeFieldBegin('expr', TType.STRING, 3)
            oprot.writeBinary(self.expr)
            oprot.writeFieldEnd()
        if self.defaultPartitionName is not None:
            oprot.writeFieldBegin('defaultPartitionName', TType.STRING, 4)
            oprot.writeString(self.defaultPartitionName.encode('utf-8') if sys.version_info[0] == 2 else self.defaultPartitionName)
            oprot.writeFieldEnd()
        if self.maxParts is not None:
            oprot.writeFieldBegin('maxParts', TType.I16, 5)
            oprot.writeI16(self.maxParts)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 6)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tblName is None:
            raise TProtocolException(message='Required field tblName is unset!')
        if self.expr is None:
            raise TProtocolException(message='Required field expr is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 TableStatsResult(object):
    """
    Attributes:
     - tableStats

    """


    def __init__(self, tableStats=None,):
        self.tableStats = tableStats

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.tableStats = []
                    (_etype377, _size374) = iprot.readListBegin()
                    for _i378 in range(_size374):
                        _elem379 = ColumnStatisticsObj()
                        _elem379.read(iprot)
                        self.tableStats.append(_elem379)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('TableStatsResult')
        if self.tableStats is not None:
            oprot.writeFieldBegin('tableStats', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.tableStats))
            for iter380 in self.tableStats:
                iter380.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.tableStats is None:
            raise TProtocolException(message='Required field tableStats is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionsStatsResult(object):
    """
    Attributes:
     - partStats

    """


    def __init__(self, partStats=None,):
        self.partStats = partStats

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.partStats = {}
                    (_ktype382, _vtype383, _size381) = iprot.readMapBegin()
                    for _i385 in range(_size381):
                        _key386 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val387 = []
                        (_etype391, _size388) = iprot.readListBegin()
                        for _i392 in range(_size388):
                            _elem393 = ColumnStatisticsObj()
                            _elem393.read(iprot)
                            _val387.append(_elem393)
                        iprot.readListEnd()
                        self.partStats[_key386] = _val387
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionsStatsResult')
        if self.partStats is not None:
            oprot.writeFieldBegin('partStats', TType.MAP, 1)
            oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.partStats))
            for kiter394, viter395 in self.partStats.items():
                oprot.writeString(kiter394.encode('utf-8') if sys.version_info[0] == 2 else kiter394)
                oprot.writeListBegin(TType.STRUCT, len(viter395))
                for iter396 in viter395:
                    iter396.write(oprot)
                oprot.writeListEnd()
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.partStats is None:
            raise TProtocolException(message='Required field partStats is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 TableStatsRequest(object):
    """
    Attributes:
     - dbName
     - tblName
     - colNames
     - catName

    """


    def __init__(self, dbName=None, tblName=None, colNames=None, catName=None,):
        self.dbName = dbName
        self.tblName = tblName
        self.colNames = colNames
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tblName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.colNames = []
                    (_etype400, _size397) = iprot.readListBegin()
                    for _i401 in range(_size397):
                        _elem402 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.colNames.append(_elem402)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('TableStatsRequest')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tblName is not None:
            oprot.writeFieldBegin('tblName', TType.STRING, 2)
            oprot.writeString(self.tblName.encode('utf-8') if sys.version_info[0] == 2 else self.tblName)
            oprot.writeFieldEnd()
        if self.colNames is not None:
            oprot.writeFieldBegin('colNames', TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.colNames))
            for iter403 in self.colNames:
                oprot.writeString(iter403.encode('utf-8') if sys.version_info[0] == 2 else iter403)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 4)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tblName is None:
            raise TProtocolException(message='Required field tblName is unset!')
        if self.colNames is None:
            raise TProtocolException(message='Required field colNames is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionsStatsRequest(object):
    """
    Attributes:
     - dbName
     - tblName
     - colNames
     - partNames
     - catName

    """


    def __init__(self, dbName=None, tblName=None, colNames=None, partNames=None, catName=None,):
        self.dbName = dbName
        self.tblName = tblName
        self.colNames = colNames
        self.partNames = partNames
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tblName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.colNames = []
                    (_etype407, _size404) = iprot.readListBegin()
                    for _i408 in range(_size404):
                        _elem409 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.colNames.append(_elem409)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.partNames = []
                    (_etype413, _size410) = iprot.readListBegin()
                    for _i414 in range(_size410):
                        _elem415 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.partNames.append(_elem415)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionsStatsRequest')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tblName is not None:
            oprot.writeFieldBegin('tblName', TType.STRING, 2)
            oprot.writeString(self.tblName.encode('utf-8') if sys.version_info[0] == 2 else self.tblName)
            oprot.writeFieldEnd()
        if self.colNames is not None:
            oprot.writeFieldBegin('colNames', TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.colNames))
            for iter416 in self.colNames:
                oprot.writeString(iter416.encode('utf-8') if sys.version_info[0] == 2 else iter416)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.partNames is not None:
            oprot.writeFieldBegin('partNames', TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.partNames))
            for iter417 in self.partNames:
                oprot.writeString(iter417.encode('utf-8') if sys.version_info[0] == 2 else iter417)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 5)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tblName is None:
            raise TProtocolException(message='Required field tblName is unset!')
        if self.colNames is None:
            raise TProtocolException(message='Required field colNames is unset!')
        if self.partNames is None:
            raise TProtocolException(message='Required field partNames is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AddPartitionsResult(object):
    """
    Attributes:
     - partitions

    """


    def __init__(self, partitions=None,):
        self.partitions = partitions

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.partitions = []
                    (_etype421, _size418) = iprot.readListBegin()
                    for _i422 in range(_size418):
                        _elem423 = Partition()
                        _elem423.read(iprot)
                        self.partitions.append(_elem423)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AddPartitionsResult')
        if self.partitions is not None:
            oprot.writeFieldBegin('partitions', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter424 in self.partitions:
                iter424.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AddPartitionsRequest(object):
    """
    Attributes:
     - dbName
     - tblName
     - parts
     - ifNotExists
     - needResult
     - catName

    """


    def __init__(self, dbName=None, tblName=None, parts=None, ifNotExists=None, needResult=True, catName=None,):
        self.dbName = dbName
        self.tblName = tblName
        self.parts = parts
        self.ifNotExists = ifNotExists
        self.needResult = needResult
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tblName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.parts = []
                    (_etype428, _size425) = iprot.readListBegin()
                    for _i429 in range(_size425):
                        _elem430 = Partition()
                        _elem430.read(iprot)
                        self.parts.append(_elem430)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.ifNotExists = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.needResult = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AddPartitionsRequest')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tblName is not None:
            oprot.writeFieldBegin('tblName', TType.STRING, 2)
            oprot.writeString(self.tblName.encode('utf-8') if sys.version_info[0] == 2 else self.tblName)
            oprot.writeFieldEnd()
        if self.parts is not None:
            oprot.writeFieldBegin('parts', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.parts))
            for iter431 in self.parts:
                iter431.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ifNotExists is not None:
            oprot.writeFieldBegin('ifNotExists', TType.BOOL, 4)
            oprot.writeBool(self.ifNotExists)
            oprot.writeFieldEnd()
        if self.needResult is not None:
            oprot.writeFieldBegin('needResult', TType.BOOL, 5)
            oprot.writeBool(self.needResult)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 6)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tblName is None:
            raise TProtocolException(message='Required field tblName is unset!')
        if self.parts is None:
            raise TProtocolException(message='Required field parts is unset!')
        if self.ifNotExists is None:
            raise TProtocolException(message='Required field ifNotExists is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 DropPartitionsResult(object):
    """
    Attributes:
     - partitions

    """


    def __init__(self, partitions=None,):
        self.partitions = partitions

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.partitions = []
                    (_etype435, _size432) = iprot.readListBegin()
                    for _i436 in range(_size432):
                        _elem437 = Partition()
                        _elem437.read(iprot)
                        self.partitions.append(_elem437)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DropPartitionsResult')
        if self.partitions is not None:
            oprot.writeFieldBegin('partitions', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter438 in self.partitions:
                iter438.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 DropPartitionsExpr(object):
    """
    Attributes:
     - expr
     - partArchiveLevel

    """


    def __init__(self, expr=None, partArchiveLevel=None,):
        self.expr = expr
        self.partArchiveLevel = partArchiveLevel

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.expr = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.partArchiveLevel = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DropPartitionsExpr')
        if self.expr is not None:
            oprot.writeFieldBegin('expr', TType.STRING, 1)
            oprot.writeBinary(self.expr)
            oprot.writeFieldEnd()
        if self.partArchiveLevel is not None:
            oprot.writeFieldBegin('partArchiveLevel', TType.I32, 2)
            oprot.writeI32(self.partArchiveLevel)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.expr is None:
            raise TProtocolException(message='Required field expr is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 RequestPartsSpec(object):
    """
    Attributes:
     - names
     - exprs

    """


    def __init__(self, names=None, exprs=None,):
        self.names = names
        self.exprs = exprs

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.names = []
                    (_etype442, _size439) = iprot.readListBegin()
                    for _i443 in range(_size439):
                        _elem444 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.names.append(_elem444)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.exprs = []
                    (_etype448, _size445) = iprot.readListBegin()
                    for _i449 in range(_size445):
                        _elem450 = DropPartitionsExpr()
                        _elem450.read(iprot)
                        self.exprs.append(_elem450)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('RequestPartsSpec')
        if self.names is not None:
            oprot.writeFieldBegin('names', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.names))
            for iter451 in self.names:
                oprot.writeString(iter451.encode('utf-8') if sys.version_info[0] == 2 else iter451)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.exprs is not None:
            oprot.writeFieldBegin('exprs', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.exprs))
            for iter452 in self.exprs:
                iter452.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 DropPartitionsRequest(object):
    """
    Attributes:
     - dbName
     - tblName
     - parts
     - deleteData
     - ifExists
     - ignoreProtection
     - environmentContext
     - needResult
     - catName

    """


    def __init__(self, dbName=None, tblName=None, parts=None, deleteData=None, ifExists=True, ignoreProtection=None, environmentContext=None, needResult=True, catName=None,):
        self.dbName = dbName
        self.tblName = tblName
        self.parts = parts
        self.deleteData = deleteData
        self.ifExists = ifExists
        self.ignoreProtection = ignoreProtection
        self.environmentContext = environmentContext
        self.needResult = needResult
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tblName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.parts = RequestPartsSpec()
                    self.parts.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.deleteData = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.ifExists = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.ignoreProtection = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRUCT:
                    self.environmentContext = EnvironmentContext()
                    self.environmentContext.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.BOOL:
                    self.needResult = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('DropPartitionsRequest')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tblName is not None:
            oprot.writeFieldBegin('tblName', TType.STRING, 2)
            oprot.writeString(self.tblName.encode('utf-8') if sys.version_info[0] == 2 else self.tblName)
            oprot.writeFieldEnd()
        if self.parts is not None:
            oprot.writeFieldBegin('parts', TType.STRUCT, 3)
            self.parts.write(oprot)
            oprot.writeFieldEnd()
        if self.deleteData is not None:
            oprot.writeFieldBegin('deleteData', TType.BOOL, 4)
            oprot.writeBool(self.deleteData)
            oprot.writeFieldEnd()
        if self.ifExists is not None:
            oprot.writeFieldBegin('ifExists', TType.BOOL, 5)
            oprot.writeBool(self.ifExists)
            oprot.writeFieldEnd()
        if self.ignoreProtection is not None:
            oprot.writeFieldBegin('ignoreProtection', TType.BOOL, 6)
            oprot.writeBool(self.ignoreProtection)
            oprot.writeFieldEnd()
        if self.environmentContext is not None:
            oprot.writeFieldBegin('environmentContext', TType.STRUCT, 7)
            self.environmentContext.write(oprot)
            oprot.writeFieldEnd()
        if self.needResult is not None:
            oprot.writeFieldBegin('needResult', TType.BOOL, 8)
            oprot.writeBool(self.needResult)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 9)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tblName is None:
            raise TProtocolException(message='Required field tblName is unset!')
        if self.parts is None:
            raise TProtocolException(message='Required field parts is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionValuesRequest(object):
    """
    Attributes:
     - dbName
     - tblName
     - partitionKeys
     - applyDistinct
     - filter
     - partitionOrder
     - ascending
     - maxParts
     - catName

    """


    def __init__(self, dbName=None, tblName=None, partitionKeys=None, applyDistinct=True, filter=None, partitionOrder=None, ascending=True, maxParts=-1, catName=None,):
        self.dbName = dbName
        self.tblName = tblName
        self.partitionKeys = partitionKeys
        self.applyDistinct = applyDistinct
        self.filter = filter
        self.partitionOrder = partitionOrder
        self.ascending = ascending
        self.maxParts = maxParts
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tblName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.partitionKeys = []
                    (_etype456, _size453) = iprot.readListBegin()
                    for _i457 in range(_size453):
                        _elem458 = FieldSchema()
                        _elem458.read(iprot)
                        self.partitionKeys.append(_elem458)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.applyDistinct = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.filter = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.LIST:
                    self.partitionOrder = []
                    (_etype462, _size459) = iprot.readListBegin()
                    for _i463 in range(_size459):
                        _elem464 = FieldSchema()
                        _elem464.read(iprot)
                        self.partitionOrder.append(_elem464)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.ascending = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I64:
                    self.maxParts = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionValuesRequest')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tblName is not None:
            oprot.writeFieldBegin('tblName', TType.STRING, 2)
            oprot.writeString(self.tblName.encode('utf-8') if sys.version_info[0] == 2 else self.tblName)
            oprot.writeFieldEnd()
        if self.partitionKeys is not None:
            oprot.writeFieldBegin('partitionKeys', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys))
            for iter465 in self.partitionKeys:
                iter465.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.applyDistinct is not None:
            oprot.writeFieldBegin('applyDistinct', TType.BOOL, 4)
            oprot.writeBool(self.applyDistinct)
            oprot.writeFieldEnd()
        if self.filter is not None:
            oprot.writeFieldBegin('filter', TType.STRING, 5)
            oprot.writeString(self.filter.encode('utf-8') if sys.version_info[0] == 2 else self.filter)
            oprot.writeFieldEnd()
        if self.partitionOrder is not None:
            oprot.writeFieldBegin('partitionOrder', TType.LIST, 6)
            oprot.writeListBegin(TType.STRUCT, len(self.partitionOrder))
            for iter466 in self.partitionOrder:
                iter466.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ascending is not None:
            oprot.writeFieldBegin('ascending', TType.BOOL, 7)
            oprot.writeBool(self.ascending)
            oprot.writeFieldEnd()
        if self.maxParts is not None:
            oprot.writeFieldBegin('maxParts', TType.I64, 8)
            oprot.writeI64(self.maxParts)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 9)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tblName is None:
            raise TProtocolException(message='Required field tblName is unset!')
        if self.partitionKeys is None:
            raise TProtocolException(message='Required field partitionKeys is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionValuesRow(object):
    """
    Attributes:
     - row

    """


    def __init__(self, row=None,):
        self.row = row

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.row = []
                    (_etype470, _size467) = iprot.readListBegin()
                    for _i471 in range(_size467):
                        _elem472 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.row.append(_elem472)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionValuesRow')
        if self.row is not None:
            oprot.writeFieldBegin('row', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.row))
            for iter473 in self.row:
                oprot.writeString(iter473.encode('utf-8') if sys.version_info[0] == 2 else iter473)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.row is None:
            raise TProtocolException(message='Required field row is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PartitionValuesResponse(object):
    """
    Attributes:
     - partitionValues

    """


    def __init__(self, partitionValues=None,):
        self.partitionValues = partitionValues

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.partitionValues = []
                    (_etype477, _size474) = iprot.readListBegin()
                    for _i478 in range(_size474):
                        _elem479 = PartitionValuesRow()
                        _elem479.read(iprot)
                        self.partitionValues.append(_elem479)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PartitionValuesResponse')
        if self.partitionValues is not None:
            oprot.writeFieldBegin('partitionValues', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitionValues))
            for iter480 in self.partitionValues:
                iter480.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.partitionValues is None:
            raise TProtocolException(message='Required field partitionValues is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ResourceUri(object):
    """
    Attributes:
     - resourceType
     - uri

    """


    def __init__(self, resourceType=None, uri=None,):
        self.resourceType = resourceType
        self.uri = uri

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourceType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.uri = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ResourceUri')
        if self.resourceType is not None:
            oprot.writeFieldBegin('resourceType', TType.I32, 1)
            oprot.writeI32(self.resourceType)
            oprot.writeFieldEnd()
        if self.uri is not None:
            oprot.writeFieldBegin('uri', TType.STRING, 2)
            oprot.writeString(self.uri.encode('utf-8') if sys.version_info[0] == 2 else self.uri)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 Function(object):
    """
    Attributes:
     - functionName
     - dbName
     - className
     - ownerName
     - ownerType
     - createTime
     - functionType
     - resourceUris
     - catName

    """


    def __init__(self, functionName=None, dbName=None, className=None, ownerName=None, ownerType=None, createTime=None, functionType=None, resourceUris=None, catName=None,):
        self.functionName = functionName
        self.dbName = dbName
        self.className = className
        self.ownerName = ownerName
        self.ownerType = ownerType
        self.createTime = createTime
        self.functionType = functionType
        self.resourceUris = resourceUris
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.functionName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.className = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.ownerName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.ownerType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.createTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.functionType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.LIST:
                    self.resourceUris = []
                    (_etype484, _size481) = iprot.readListBegin()
                    for _i485 in range(_size481):
                        _elem486 = ResourceUri()
                        _elem486.read(iprot)
                        self.resourceUris.append(_elem486)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Function')
        if self.functionName is not None:
            oprot.writeFieldBegin('functionName', TType.STRING, 1)
            oprot.writeString(self.functionName.encode('utf-8') if sys.version_info[0] == 2 else self.functionName)
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 2)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.className is not None:
            oprot.writeFieldBegin('className', TType.STRING, 3)
            oprot.writeString(self.className.encode('utf-8') if sys.version_info[0] == 2 else self.className)
            oprot.writeFieldEnd()
        if self.ownerName is not None:
            oprot.writeFieldBegin('ownerName', TType.STRING, 4)
            oprot.writeString(self.ownerName.encode('utf-8') if sys.version_info[0] == 2 else self.ownerName)
            oprot.writeFieldEnd()
        if self.ownerType is not None:
            oprot.writeFieldBegin('ownerType', TType.I32, 5)
            oprot.writeI32(self.ownerType)
            oprot.writeFieldEnd()
        if self.createTime is not None:
            oprot.writeFieldBegin('createTime', TType.I32, 6)
            oprot.writeI32(self.createTime)
            oprot.writeFieldEnd()
        if self.functionType is not None:
            oprot.writeFieldBegin('functionType', TType.I32, 7)
            oprot.writeI32(self.functionType)
            oprot.writeFieldEnd()
        if self.resourceUris is not None:
            oprot.writeFieldBegin('resourceUris', TType.LIST, 8)
            oprot.writeListBegin(TType.STRUCT, len(self.resourceUris))
            for iter487 in self.resourceUris:
                iter487.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 9)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 TxnInfo(object):
    """
    Attributes:
     - id
     - state
     - user
     - hostname
     - agentInfo
     - heartbeatCount
     - metaInfo
     - startedTime
     - lastHeartbeatTime

    """


    def __init__(self, id=None, state=None, user=None, hostname=None, agentInfo="Unknown", heartbeatCount=0, metaInfo=None, startedTime=None, lastHeartbeatTime=None,):
        self.id = id
        self.state = state
        self.user = user
        self.hostname = hostname
        self.agentInfo = agentInfo
        self.heartbeatCount = heartbeatCount
        self.metaInfo = metaInfo
        self.startedTime = startedTime
        self.lastHeartbeatTime = lastHeartbeatTime

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.id = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.hostname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.agentInfo = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.heartbeatCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.metaInfo = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I64:
                    self.startedTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I64:
                    self.lastHeartbeatTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('TxnInfo')
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.I64, 1)
            oprot.writeI64(self.id)
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 2)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin('user', TType.STRING, 3)
            oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user)
            oprot.writeFieldEnd()
        if self.hostname is not None:
            oprot.writeFieldBegin('hostname', TType.STRING, 4)
            oprot.writeString(self.hostname.encode('utf-8') if sys.version_info[0] == 2 else self.hostname)
            oprot.writeFieldEnd()
        if self.agentInfo is not None:
            oprot.writeFieldBegin('agentInfo', TType.STRING, 5)
            oprot.writeString(self.agentInfo.encode('utf-8') if sys.version_info[0] == 2 else self.agentInfo)
            oprot.writeFieldEnd()
        if self.heartbeatCount is not None:
            oprot.writeFieldBegin('heartbeatCount', TType.I32, 6)
            oprot.writeI32(self.heartbeatCount)
            oprot.writeFieldEnd()
        if self.metaInfo is not None:
            oprot.writeFieldBegin('metaInfo', TType.STRING, 7)
            oprot.writeString(self.metaInfo.encode('utf-8') if sys.version_info[0] == 2 else self.metaInfo)
            oprot.writeFieldEnd()
        if self.startedTime is not None:
            oprot.writeFieldBegin('startedTime', TType.I64, 8)
            oprot.writeI64(self.startedTime)
            oprot.writeFieldEnd()
        if self.lastHeartbeatTime is not None:
            oprot.writeFieldBegin('lastHeartbeatTime', TType.I64, 9)
            oprot.writeI64(self.lastHeartbeatTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.id is None:
            raise TProtocolException(message='Required field id is unset!')
        if self.state is None:
            raise TProtocolException(message='Required field state is unset!')
        if self.user is None:
            raise TProtocolException(message='Required field user is unset!')
        if self.hostname is None:
            raise TProtocolException(message='Required field hostname is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetOpenTxnsInfoResponse(object):
    """
    Attributes:
     - txn_high_water_mark
     - open_txns

    """


    def __init__(self, txn_high_water_mark=None, open_txns=None,):
        self.txn_high_water_mark = txn_high_water_mark
        self.open_txns = open_txns

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.txn_high_water_mark = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.open_txns = []
                    (_etype491, _size488) = iprot.readListBegin()
                    for _i492 in range(_size488):
                        _elem493 = TxnInfo()
                        _elem493.read(iprot)
                        self.open_txns.append(_elem493)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetOpenTxnsInfoResponse')
        if self.txn_high_water_mark is not None:
            oprot.writeFieldBegin('txn_high_water_mark', TType.I64, 1)
            oprot.writeI64(self.txn_high_water_mark)
            oprot.writeFieldEnd()
        if self.open_txns is not None:
            oprot.writeFieldBegin('open_txns', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.open_txns))
            for iter494 in self.open_txns:
                iter494.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.txn_high_water_mark is None:
            raise TProtocolException(message='Required field txn_high_water_mark is unset!')
        if self.open_txns is None:
            raise TProtocolException(message='Required field open_txns is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetOpenTxnsResponse(object):
    """
    Attributes:
     - txn_high_water_mark
     - open_txns
     - min_open_txn
     - abortedBits

    """


    def __init__(self, txn_high_water_mark=None, open_txns=None, min_open_txn=None, abortedBits=None,):
        self.txn_high_water_mark = txn_high_water_mark
        self.open_txns = open_txns
        self.min_open_txn = min_open_txn
        self.abortedBits = abortedBits

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.txn_high_water_mark = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.open_txns = []
                    (_etype498, _size495) = iprot.readListBegin()
                    for _i499 in range(_size495):
                        _elem500 = iprot.readI64()
                        self.open_txns.append(_elem500)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.min_open_txn = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.abortedBits = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetOpenTxnsResponse')
        if self.txn_high_water_mark is not None:
            oprot.writeFieldBegin('txn_high_water_mark', TType.I64, 1)
            oprot.writeI64(self.txn_high_water_mark)
            oprot.writeFieldEnd()
        if self.open_txns is not None:
            oprot.writeFieldBegin('open_txns', TType.LIST, 2)
            oprot.writeListBegin(TType.I64, len(self.open_txns))
            for iter501 in self.open_txns:
                oprot.writeI64(iter501)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.min_open_txn is not None:
            oprot.writeFieldBegin('min_open_txn', TType.I64, 3)
            oprot.writeI64(self.min_open_txn)
            oprot.writeFieldEnd()
        if self.abortedBits is not None:
            oprot.writeFieldBegin('abortedBits', TType.STRING, 4)
            oprot.writeBinary(self.abortedBits)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.txn_high_water_mark is None:
            raise TProtocolException(message='Required field txn_high_water_mark is unset!')
        if self.open_txns is None:
            raise TProtocolException(message='Required field open_txns is unset!')
        if self.abortedBits is None:
            raise TProtocolException(message='Required field abortedBits is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 OpenTxnRequest(object):
    """
    Attributes:
     - num_txns
     - user
     - hostname
     - agentInfo
     - replPolicy
     - replSrcTxnIds

    """


    def __init__(self, num_txns=None, user=None, hostname=None, agentInfo="Unknown", replPolicy=None, replSrcTxnIds=None,):
        self.num_txns = num_txns
        self.user = user
        self.hostname = hostname
        self.agentInfo = agentInfo
        self.replPolicy = replPolicy
        self.replSrcTxnIds = replSrcTxnIds

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.num_txns = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.hostname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.agentInfo = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.replPolicy = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.LIST:
                    self.replSrcTxnIds = []
                    (_etype505, _size502) = iprot.readListBegin()
                    for _i506 in range(_size502):
                        _elem507 = iprot.readI64()
                        self.replSrcTxnIds.append(_elem507)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('OpenTxnRequest')
        if self.num_txns is not None:
            oprot.writeFieldBegin('num_txns', TType.I32, 1)
            oprot.writeI32(self.num_txns)
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin('user', TType.STRING, 2)
            oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user)
            oprot.writeFieldEnd()
        if self.hostname is not None:
            oprot.writeFieldBegin('hostname', TType.STRING, 3)
            oprot.writeString(self.hostname.encode('utf-8') if sys.version_info[0] == 2 else self.hostname)
            oprot.writeFieldEnd()
        if self.agentInfo is not None:
            oprot.writeFieldBegin('agentInfo', TType.STRING, 4)
            oprot.writeString(self.agentInfo.encode('utf-8') if sys.version_info[0] == 2 else self.agentInfo)
            oprot.writeFieldEnd()
        if self.replPolicy is not None:
            oprot.writeFieldBegin('replPolicy', TType.STRING, 5)
            oprot.writeString(self.replPolicy.encode('utf-8') if sys.version_info[0] == 2 else self.replPolicy)
            oprot.writeFieldEnd()
        if self.replSrcTxnIds is not None:
            oprot.writeFieldBegin('replSrcTxnIds', TType.LIST, 6)
            oprot.writeListBegin(TType.I64, len(self.replSrcTxnIds))
            for iter508 in self.replSrcTxnIds:
                oprot.writeI64(iter508)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.num_txns is None:
            raise TProtocolException(message='Required field num_txns is unset!')
        if self.user is None:
            raise TProtocolException(message='Required field user is unset!')
        if self.hostname is None:
            raise TProtocolException(message='Required field hostname is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 OpenTxnsResponse(object):
    """
    Attributes:
     - txn_ids

    """


    def __init__(self, txn_ids=None,):
        self.txn_ids = txn_ids

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.txn_ids = []
                    (_etype512, _size509) = iprot.readListBegin()
                    for _i513 in range(_size509):
                        _elem514 = iprot.readI64()
                        self.txn_ids.append(_elem514)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('OpenTxnsResponse')
        if self.txn_ids is not None:
            oprot.writeFieldBegin('txn_ids', TType.LIST, 1)
            oprot.writeListBegin(TType.I64, len(self.txn_ids))
            for iter515 in self.txn_ids:
                oprot.writeI64(iter515)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.txn_ids is None:
            raise TProtocolException(message='Required field txn_ids is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AbortTxnRequest(object):
    """
    Attributes:
     - txnid
     - replPolicy

    """


    def __init__(self, txnid=None, replPolicy=None,):
        self.txnid = txnid
        self.replPolicy = replPolicy

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.txnid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.replPolicy = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AbortTxnRequest')
        if self.txnid is not None:
            oprot.writeFieldBegin('txnid', TType.I64, 1)
            oprot.writeI64(self.txnid)
            oprot.writeFieldEnd()
        if self.replPolicy is not None:
            oprot.writeFieldBegin('replPolicy', TType.STRING, 2)
            oprot.writeString(self.replPolicy.encode('utf-8') if sys.version_info[0] == 2 else self.replPolicy)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.txnid is None:
            raise TProtocolException(message='Required field txnid is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AbortTxnsRequest(object):
    """
    Attributes:
     - txn_ids

    """


    def __init__(self, txn_ids=None,):
        self.txn_ids = txn_ids

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.txn_ids = []
                    (_etype519, _size516) = iprot.readListBegin()
                    for _i520 in range(_size516):
                        _elem521 = iprot.readI64()
                        self.txn_ids.append(_elem521)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AbortTxnsRequest')
        if self.txn_ids is not None:
            oprot.writeFieldBegin('txn_ids', TType.LIST, 1)
            oprot.writeListBegin(TType.I64, len(self.txn_ids))
            for iter522 in self.txn_ids:
                oprot.writeI64(iter522)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.txn_ids is None:
            raise TProtocolException(message='Required field txn_ids is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CommitTxnRequest(object):
    """
    Attributes:
     - txnid
     - replPolicy

    """


    def __init__(self, txnid=None, replPolicy=None,):
        self.txnid = txnid
        self.replPolicy = replPolicy

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.txnid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.replPolicy = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CommitTxnRequest')
        if self.txnid is not None:
            oprot.writeFieldBegin('txnid', TType.I64, 1)
            oprot.writeI64(self.txnid)
            oprot.writeFieldEnd()
        if self.replPolicy is not None:
            oprot.writeFieldBegin('replPolicy', TType.STRING, 2)
            oprot.writeString(self.replPolicy.encode('utf-8') if sys.version_info[0] == 2 else self.replPolicy)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.txnid is None:
            raise TProtocolException(message='Required field txnid is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ReplTblWriteIdStateRequest(object):
    """
    Attributes:
     - validWriteIdlist
     - user
     - hostName
     - dbName
     - tableName
     - partNames

    """


    def __init__(self, validWriteIdlist=None, user=None, hostName=None, dbName=None, tableName=None, partNames=None,):
        self.validWriteIdlist = validWriteIdlist
        self.user = user
        self.hostName = hostName
        self.dbName = dbName
        self.tableName = tableName
        self.partNames = partNames

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.validWriteIdlist = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.hostName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.tableName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.LIST:
                    self.partNames = []
                    (_etype526, _size523) = iprot.readListBegin()
                    for _i527 in range(_size523):
                        _elem528 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.partNames.append(_elem528)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ReplTblWriteIdStateRequest')
        if self.validWriteIdlist is not None:
            oprot.writeFieldBegin('validWriteIdlist', TType.STRING, 1)
            oprot.writeString(self.validWriteIdlist.encode('utf-8') if sys.version_info[0] == 2 else self.validWriteIdlist)
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin('user', TType.STRING, 2)
            oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user)
            oprot.writeFieldEnd()
        if self.hostName is not None:
            oprot.writeFieldBegin('hostName', TType.STRING, 3)
            oprot.writeString(self.hostName.encode('utf-8') if sys.version_info[0] == 2 else self.hostName)
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 4)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tableName is not None:
            oprot.writeFieldBegin('tableName', TType.STRING, 5)
            oprot.writeString(self.tableName.encode('utf-8') if sys.version_info[0] == 2 else self.tableName)
            oprot.writeFieldEnd()
        if self.partNames is not None:
            oprot.writeFieldBegin('partNames', TType.LIST, 6)
            oprot.writeListBegin(TType.STRING, len(self.partNames))
            for iter529 in self.partNames:
                oprot.writeString(iter529.encode('utf-8') if sys.version_info[0] == 2 else iter529)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.validWriteIdlist is None:
            raise TProtocolException(message='Required field validWriteIdlist is unset!')
        if self.user is None:
            raise TProtocolException(message='Required field user is unset!')
        if self.hostName is None:
            raise TProtocolException(message='Required field hostName is unset!')
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tableName is None:
            raise TProtocolException(message='Required field tableName is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetValidWriteIdsRequest(object):
    """
    Attributes:
     - fullTableNames
     - validTxnList

    """


    def __init__(self, fullTableNames=None, validTxnList=None,):
        self.fullTableNames = fullTableNames
        self.validTxnList = validTxnList

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.fullTableNames = []
                    (_etype533, _size530) = iprot.readListBegin()
                    for _i534 in range(_size530):
                        _elem535 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.fullTableNames.append(_elem535)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.validTxnList = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetValidWriteIdsRequest')
        if self.fullTableNames is not None:
            oprot.writeFieldBegin('fullTableNames', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.fullTableNames))
            for iter536 in self.fullTableNames:
                oprot.writeString(iter536.encode('utf-8') if sys.version_info[0] == 2 else iter536)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.validTxnList is not None:
            oprot.writeFieldBegin('validTxnList', TType.STRING, 2)
            oprot.writeString(self.validTxnList.encode('utf-8') if sys.version_info[0] == 2 else self.validTxnList)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.fullTableNames is None:
            raise TProtocolException(message='Required field fullTableNames is unset!')
        if self.validTxnList is None:
            raise TProtocolException(message='Required field validTxnList is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 TableValidWriteIds(object):
    """
    Attributes:
     - fullTableName
     - writeIdHighWaterMark
     - invalidWriteIds
     - minOpenWriteId
     - abortedBits

    """


    def __init__(self, fullTableName=None, writeIdHighWaterMark=None, invalidWriteIds=None, minOpenWriteId=None, abortedBits=None,):
        self.fullTableName = fullTableName
        self.writeIdHighWaterMark = writeIdHighWaterMark
        self.invalidWriteIds = invalidWriteIds
        self.minOpenWriteId = minOpenWriteId
        self.abortedBits = abortedBits

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.fullTableName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.writeIdHighWaterMark = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.invalidWriteIds = []
                    (_etype540, _size537) = iprot.readListBegin()
                    for _i541 in range(_size537):
                        _elem542 = iprot.readI64()
                        self.invalidWriteIds.append(_elem542)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.minOpenWriteId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.abortedBits = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('TableValidWriteIds')
        if self.fullTableName is not None:
            oprot.writeFieldBegin('fullTableName', TType.STRING, 1)
            oprot.writeString(self.fullTableName.encode('utf-8') if sys.version_info[0] == 2 else self.fullTableName)
            oprot.writeFieldEnd()
        if self.writeIdHighWaterMark is not None:
            oprot.writeFieldBegin('writeIdHighWaterMark', TType.I64, 2)
            oprot.writeI64(self.writeIdHighWaterMark)
            oprot.writeFieldEnd()
        if self.invalidWriteIds is not None:
            oprot.writeFieldBegin('invalidWriteIds', TType.LIST, 3)
            oprot.writeListBegin(TType.I64, len(self.invalidWriteIds))
            for iter543 in self.invalidWriteIds:
                oprot.writeI64(iter543)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.minOpenWriteId is not None:
            oprot.writeFieldBegin('minOpenWriteId', TType.I64, 4)
            oprot.writeI64(self.minOpenWriteId)
            oprot.writeFieldEnd()
        if self.abortedBits is not None:
            oprot.writeFieldBegin('abortedBits', TType.STRING, 5)
            oprot.writeBinary(self.abortedBits)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.fullTableName is None:
            raise TProtocolException(message='Required field fullTableName is unset!')
        if self.writeIdHighWaterMark is None:
            raise TProtocolException(message='Required field writeIdHighWaterMark is unset!')
        if self.invalidWriteIds is None:
            raise TProtocolException(message='Required field invalidWriteIds is unset!')
        if self.abortedBits is None:
            raise TProtocolException(message='Required field abortedBits is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetValidWriteIdsResponse(object):
    """
    Attributes:
     - tblValidWriteIds

    """


    def __init__(self, tblValidWriteIds=None,):
        self.tblValidWriteIds = tblValidWriteIds

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.tblValidWriteIds = []
                    (_etype547, _size544) = iprot.readListBegin()
                    for _i548 in range(_size544):
                        _elem549 = TableValidWriteIds()
                        _elem549.read(iprot)
                        self.tblValidWriteIds.append(_elem549)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetValidWriteIdsResponse')
        if self.tblValidWriteIds is not None:
            oprot.writeFieldBegin('tblValidWriteIds', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.tblValidWriteIds))
            for iter550 in self.tblValidWriteIds:
                iter550.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.tblValidWriteIds is None:
            raise TProtocolException(message='Required field tblValidWriteIds is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AllocateTableWriteIdsRequest(object):
    """
    Attributes:
     - dbName
     - tableName
     - txnIds
     - replPolicy
     - srcTxnToWriteIdList

    """


    def __init__(self, dbName=None, tableName=None, txnIds=None, replPolicy=None, srcTxnToWriteIdList=None,):
        self.dbName = dbName
        self.tableName = tableName
        self.txnIds = txnIds
        self.replPolicy = replPolicy
        self.srcTxnToWriteIdList = srcTxnToWriteIdList

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tableName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.txnIds = []
                    (_etype554, _size551) = iprot.readListBegin()
                    for _i555 in range(_size551):
                        _elem556 = iprot.readI64()
                        self.txnIds.append(_elem556)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.replPolicy = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.srcTxnToWriteIdList = []
                    (_etype560, _size557) = iprot.readListBegin()
                    for _i561 in range(_size557):
                        _elem562 = TxnToWriteId()
                        _elem562.read(iprot)
                        self.srcTxnToWriteIdList.append(_elem562)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AllocateTableWriteIdsRequest')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tableName is not None:
            oprot.writeFieldBegin('tableName', TType.STRING, 2)
            oprot.writeString(self.tableName.encode('utf-8') if sys.version_info[0] == 2 else self.tableName)
            oprot.writeFieldEnd()
        if self.txnIds is not None:
            oprot.writeFieldBegin('txnIds', TType.LIST, 3)
            oprot.writeListBegin(TType.I64, len(self.txnIds))
            for iter563 in self.txnIds:
                oprot.writeI64(iter563)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.replPolicy is not None:
            oprot.writeFieldBegin('replPolicy', TType.STRING, 4)
            oprot.writeString(self.replPolicy.encode('utf-8') if sys.version_info[0] == 2 else self.replPolicy)
            oprot.writeFieldEnd()
        if self.srcTxnToWriteIdList is not None:
            oprot.writeFieldBegin('srcTxnToWriteIdList', TType.LIST, 5)
            oprot.writeListBegin(TType.STRUCT, len(self.srcTxnToWriteIdList))
            for iter564 in self.srcTxnToWriteIdList:
                iter564.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tableName is None:
            raise TProtocolException(message='Required field tableName is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 TxnToWriteId(object):
    """
    Attributes:
     - txnId
     - writeId

    """


    def __init__(self, txnId=None, writeId=None,):
        self.txnId = txnId
        self.writeId = writeId

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.txnId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.writeId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('TxnToWriteId')
        if self.txnId is not None:
            oprot.writeFieldBegin('txnId', TType.I64, 1)
            oprot.writeI64(self.txnId)
            oprot.writeFieldEnd()
        if self.writeId is not None:
            oprot.writeFieldBegin('writeId', TType.I64, 2)
            oprot.writeI64(self.writeId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.txnId is None:
            raise TProtocolException(message='Required field txnId is unset!')
        if self.writeId is None:
            raise TProtocolException(message='Required field writeId is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AllocateTableWriteIdsResponse(object):
    """
    Attributes:
     - txnToWriteIds

    """


    def __init__(self, txnToWriteIds=None,):
        self.txnToWriteIds = txnToWriteIds

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.txnToWriteIds = []
                    (_etype568, _size565) = iprot.readListBegin()
                    for _i569 in range(_size565):
                        _elem570 = TxnToWriteId()
                        _elem570.read(iprot)
                        self.txnToWriteIds.append(_elem570)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AllocateTableWriteIdsResponse')
        if self.txnToWriteIds is not None:
            oprot.writeFieldBegin('txnToWriteIds', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.txnToWriteIds))
            for iter571 in self.txnToWriteIds:
                iter571.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.txnToWriteIds is None:
            raise TProtocolException(message='Required field txnToWriteIds is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 LockComponent(object):
    """
    Attributes:
     - type
     - level
     - dbname
     - tablename
     - partitionname
     - operationType
     - isTransactional
     - isDynamicPartitionWrite

    """


    def __init__(self, type=None, level=None, dbname=None, tablename=None, partitionname=None, operationType=5, isTransactional=False, isDynamicPartitionWrite=False,):
        self.type = type
        self.level = level
        self.dbname = dbname
        self.tablename = tablename
        self.partitionname = partitionname
        self.operationType = operationType
        self.isTransactional = isTransactional
        self.isDynamicPartitionWrite = isDynamicPartitionWrite

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.level = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.dbname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.tablename = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.partitionname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.operationType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.isTransactional = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.BOOL:
                    self.isDynamicPartitionWrite = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('LockComponent')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.level is not None:
            oprot.writeFieldBegin('level', TType.I32, 2)
            oprot.writeI32(self.level)
            oprot.writeFieldEnd()
        if self.dbname is not None:
            oprot.writeFieldBegin('dbname', TType.STRING, 3)
            oprot.writeString(self.dbname.encode('utf-8') if sys.version_info[0] == 2 else self.dbname)
            oprot.writeFieldEnd()
        if self.tablename is not None:
            oprot.writeFieldBegin('tablename', TType.STRING, 4)
            oprot.writeString(self.tablename.encode('utf-8') if sys.version_info[0] == 2 else self.tablename)
            oprot.writeFieldEnd()
        if self.partitionname is not None:
            oprot.writeFieldBegin('partitionname', TType.STRING, 5)
            oprot.writeString(self.partitionname.encode('utf-8') if sys.version_info[0] == 2 else self.partitionname)
            oprot.writeFieldEnd()
        if self.operationType is not None:
            oprot.writeFieldBegin('operationType', TType.I32, 6)
            oprot.writeI32(self.operationType)
            oprot.writeFieldEnd()
        if self.isTransactional is not None:
            oprot.writeFieldBegin('isTransactional', TType.BOOL, 7)
            oprot.writeBool(self.isTransactional)
            oprot.writeFieldEnd()
        if self.isDynamicPartitionWrite is not None:
            oprot.writeFieldBegin('isDynamicPartitionWrite', TType.BOOL, 8)
            oprot.writeBool(self.isDynamicPartitionWrite)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.type is None:
            raise TProtocolException(message='Required field type is unset!')
        if self.level is None:
            raise TProtocolException(message='Required field level is unset!')
        if self.dbname is None:
            raise TProtocolException(message='Required field dbname is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 LockRequest(object):
    """
    Attributes:
     - component
     - txnid
     - user
     - hostname
     - agentInfo

    """


    def __init__(self, component=None, txnid=None, user=None, hostname=None, agentInfo="Unknown",):
        self.component = component
        self.txnid = txnid
        self.user = user
        self.hostname = hostname
        self.agentInfo = agentInfo

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.component = []
                    (_etype575, _size572) = iprot.readListBegin()
                    for _i576 in range(_size572):
                        _elem577 = LockComponent()
                        _elem577.read(iprot)
                        self.component.append(_elem577)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.txnid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.hostname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.agentInfo = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('LockRequest')
        if self.component is not None:
            oprot.writeFieldBegin('component', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.component))
            for iter578 in self.component:
                iter578.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.txnid is not None:
            oprot.writeFieldBegin('txnid', TType.I64, 2)
            oprot.writeI64(self.txnid)
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin('user', TType.STRING, 3)
            oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user)
            oprot.writeFieldEnd()
        if self.hostname is not None:
            oprot.writeFieldBegin('hostname', TType.STRING, 4)
            oprot.writeString(self.hostname.encode('utf-8') if sys.version_info[0] == 2 else self.hostname)
            oprot.writeFieldEnd()
        if self.agentInfo is not None:
            oprot.writeFieldBegin('agentInfo', TType.STRING, 5)
            oprot.writeString(self.agentInfo.encode('utf-8') if sys.version_info[0] == 2 else self.agentInfo)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.component is None:
            raise TProtocolException(message='Required field component is unset!')
        if self.user is None:
            raise TProtocolException(message='Required field user is unset!')
        if self.hostname is None:
            raise TProtocolException(message='Required field hostname is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 LockResponse(object):
    """
    Attributes:
     - lockid
     - state

    """


    def __init__(self, lockid=None, state=None,):
        self.lockid = lockid
        self.state = state

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.lockid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('LockResponse')
        if self.lockid is not None:
            oprot.writeFieldBegin('lockid', TType.I64, 1)
            oprot.writeI64(self.lockid)
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 2)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.lockid is None:
            raise TProtocolException(message='Required field lockid is unset!')
        if self.state is None:
            raise TProtocolException(message='Required field state is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CheckLockRequest(object):
    """
    Attributes:
     - lockid
     - txnid
     - elapsed_ms

    """


    def __init__(self, lockid=None, txnid=None, elapsed_ms=None,):
        self.lockid = lockid
        self.txnid = txnid
        self.elapsed_ms = elapsed_ms

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.lockid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.txnid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.elapsed_ms = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CheckLockRequest')
        if self.lockid is not None:
            oprot.writeFieldBegin('lockid', TType.I64, 1)
            oprot.writeI64(self.lockid)
            oprot.writeFieldEnd()
        if self.txnid is not None:
            oprot.writeFieldBegin('txnid', TType.I64, 2)
            oprot.writeI64(self.txnid)
            oprot.writeFieldEnd()
        if self.elapsed_ms is not None:
            oprot.writeFieldBegin('elapsed_ms', TType.I64, 3)
            oprot.writeI64(self.elapsed_ms)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.lockid is None:
            raise TProtocolException(message='Required field lockid is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 UnlockRequest(object):
    """
    Attributes:
     - lockid

    """


    def __init__(self, lockid=None,):
        self.lockid = lockid

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.lockid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('UnlockRequest')
        if self.lockid is not None:
            oprot.writeFieldBegin('lockid', TType.I64, 1)
            oprot.writeI64(self.lockid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.lockid is None:
            raise TProtocolException(message='Required field lockid is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ShowLocksRequest(object):
    """
    Attributes:
     - dbname
     - tablename
     - partname
     - isExtended

    """


    def __init__(self, dbname=None, tablename=None, partname=None, isExtended=False,):
        self.dbname = dbname
        self.tablename = tablename
        self.partname = partname
        self.isExtended = isExtended

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tablename = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.partname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.isExtended = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ShowLocksRequest')
        if self.dbname is not None:
            oprot.writeFieldBegin('dbname', TType.STRING, 1)
            oprot.writeString(self.dbname.encode('utf-8') if sys.version_info[0] == 2 else self.dbname)
            oprot.writeFieldEnd()
        if self.tablename is not None:
            oprot.writeFieldBegin('tablename', TType.STRING, 2)
            oprot.writeString(self.tablename.encode('utf-8') if sys.version_info[0] == 2 else self.tablename)
            oprot.writeFieldEnd()
        if self.partname is not None:
            oprot.writeFieldBegin('partname', TType.STRING, 3)
            oprot.writeString(self.partname.encode('utf-8') if sys.version_info[0] == 2 else self.partname)
            oprot.writeFieldEnd()
        if self.isExtended is not None:
            oprot.writeFieldBegin('isExtended', TType.BOOL, 4)
            oprot.writeBool(self.isExtended)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ShowLocksResponseElement(object):
    """
    Attributes:
     - lockid
     - dbname
     - tablename
     - partname
     - state
     - type
     - txnid
     - lastheartbeat
     - acquiredat
     - user
     - hostname
     - heartbeatCount
     - agentInfo
     - blockedByExtId
     - blockedByIntId
     - lockIdInternal

    """


    def __init__(self, lockid=None, dbname=None, tablename=None, partname=None, state=None, type=None, txnid=None, lastheartbeat=None, acquiredat=None, user=None, hostname=None, heartbeatCount=0, agentInfo=None, blockedByExtId=None, blockedByIntId=None, lockIdInternal=None,):
        self.lockid = lockid
        self.dbname = dbname
        self.tablename = tablename
        self.partname = partname
        self.state = state
        self.type = type
        self.txnid = txnid
        self.lastheartbeat = lastheartbeat
        self.acquiredat = acquiredat
        self.user = user
        self.hostname = hostname
        self.heartbeatCount = heartbeatCount
        self.agentInfo = agentInfo
        self.blockedByExtId = blockedByExtId
        self.blockedByIntId = blockedByIntId
        self.lockIdInternal = lockIdInternal

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.lockid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.dbname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.tablename = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.partname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.txnid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I64:
                    self.lastheartbeat = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I64:
                    self.acquiredat = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.hostname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I32:
                    self.heartbeatCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRING:
                    self.agentInfo = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.I64:
                    self.blockedByExtId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I64:
                    self.blockedByIntId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.I64:
                    self.lockIdInternal = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ShowLocksResponseElement')
        if self.lockid is not None:
            oprot.writeFieldBegin('lockid', TType.I64, 1)
            oprot.writeI64(self.lockid)
            oprot.writeFieldEnd()
        if self.dbname is not None:
            oprot.writeFieldBegin('dbname', TType.STRING, 2)
            oprot.writeString(self.dbname.encode('utf-8') if sys.version_info[0] == 2 else self.dbname)
            oprot.writeFieldEnd()
        if self.tablename is not None:
            oprot.writeFieldBegin('tablename', TType.STRING, 3)
            oprot.writeString(self.tablename.encode('utf-8') if sys.version_info[0] == 2 else self.tablename)
            oprot.writeFieldEnd()
        if self.partname is not None:
            oprot.writeFieldBegin('partname', TType.STRING, 4)
            oprot.writeString(self.partname.encode('utf-8') if sys.version_info[0] == 2 else self.partname)
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 5)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 6)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.txnid is not None:
            oprot.writeFieldBegin('txnid', TType.I64, 7)
            oprot.writeI64(self.txnid)
            oprot.writeFieldEnd()
        if self.lastheartbeat is not None:
            oprot.writeFieldBegin('lastheartbeat', TType.I64, 8)
            oprot.writeI64(self.lastheartbeat)
            oprot.writeFieldEnd()
        if self.acquiredat is not None:
            oprot.writeFieldBegin('acquiredat', TType.I64, 9)
            oprot.writeI64(self.acquiredat)
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin('user', TType.STRING, 10)
            oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user)
            oprot.writeFieldEnd()
        if self.hostname is not None:
            oprot.writeFieldBegin('hostname', TType.STRING, 11)
            oprot.writeString(self.hostname.encode('utf-8') if sys.version_info[0] == 2 else self.hostname)
            oprot.writeFieldEnd()
        if self.heartbeatCount is not None:
            oprot.writeFieldBegin('heartbeatCount', TType.I32, 12)
            oprot.writeI32(self.heartbeatCount)
            oprot.writeFieldEnd()
        if self.agentInfo is not None:
            oprot.writeFieldBegin('agentInfo', TType.STRING, 13)
            oprot.writeString(self.agentInfo.encode('utf-8') if sys.version_info[0] == 2 else self.agentInfo)
            oprot.writeFieldEnd()
        if self.blockedByExtId is not None:
            oprot.writeFieldBegin('blockedByExtId', TType.I64, 14)
            oprot.writeI64(self.blockedByExtId)
            oprot.writeFieldEnd()
        if self.blockedByIntId is not None:
            oprot.writeFieldBegin('blockedByIntId', TType.I64, 15)
            oprot.writeI64(self.blockedByIntId)
            oprot.writeFieldEnd()
        if self.lockIdInternal is not None:
            oprot.writeFieldBegin('lockIdInternal', TType.I64, 16)
            oprot.writeI64(self.lockIdInternal)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.lockid is None:
            raise TProtocolException(message='Required field lockid is unset!')
        if self.dbname is None:
            raise TProtocolException(message='Required field dbname is unset!')
        if self.state is None:
            raise TProtocolException(message='Required field state is unset!')
        if self.type is None:
            raise TProtocolException(message='Required field type is unset!')
        if self.lastheartbeat is None:
            raise TProtocolException(message='Required field lastheartbeat is unset!')
        if self.user is None:
            raise TProtocolException(message='Required field user is unset!')
        if self.hostname is None:
            raise TProtocolException(message='Required field hostname is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ShowLocksResponse(object):
    """
    Attributes:
     - locks

    """


    def __init__(self, locks=None,):
        self.locks = locks

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.locks = []
                    (_etype582, _size579) = iprot.readListBegin()
                    for _i583 in range(_size579):
                        _elem584 = ShowLocksResponseElement()
                        _elem584.read(iprot)
                        self.locks.append(_elem584)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ShowLocksResponse')
        if self.locks is not None:
            oprot.writeFieldBegin('locks', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.locks))
            for iter585 in self.locks:
                iter585.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 HeartbeatRequest(object):
    """
    Attributes:
     - lockid
     - txnid

    """


    def __init__(self, lockid=None, txnid=None,):
        self.lockid = lockid
        self.txnid = txnid

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.lockid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.txnid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('HeartbeatRequest')
        if self.lockid is not None:
            oprot.writeFieldBegin('lockid', TType.I64, 1)
            oprot.writeI64(self.lockid)
            oprot.writeFieldEnd()
        if self.txnid is not None:
            oprot.writeFieldBegin('txnid', TType.I64, 2)
            oprot.writeI64(self.txnid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 HeartbeatTxnRangeRequest(object):
    """
    Attributes:
     - min
     - max

    """


    def __init__(self, min=None, max=None,):
        self.min = min
        self.max = max

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.min = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.max = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('HeartbeatTxnRangeRequest')
        if self.min is not None:
            oprot.writeFieldBegin('min', TType.I64, 1)
            oprot.writeI64(self.min)
            oprot.writeFieldEnd()
        if self.max is not None:
            oprot.writeFieldBegin('max', TType.I64, 2)
            oprot.writeI64(self.max)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.min is None:
            raise TProtocolException(message='Required field min is unset!')
        if self.max is None:
            raise TProtocolException(message='Required field max is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 HeartbeatTxnRangeResponse(object):
    """
    Attributes:
     - aborted
     - nosuch

    """


    def __init__(self, aborted=None, nosuch=None,):
        self.aborted = aborted
        self.nosuch = nosuch

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.SET:
                    self.aborted = set()
                    (_etype589, _size586) = iprot.readSetBegin()
                    for _i590 in range(_size586):
                        _elem591 = iprot.readI64()
                        self.aborted.add(_elem591)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.SET:
                    self.nosuch = set()
                    (_etype595, _size592) = iprot.readSetBegin()
                    for _i596 in range(_size592):
                        _elem597 = iprot.readI64()
                        self.nosuch.add(_elem597)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('HeartbeatTxnRangeResponse')
        if self.aborted is not None:
            oprot.writeFieldBegin('aborted', TType.SET, 1)
            oprot.writeSetBegin(TType.I64, len(self.aborted))
            for iter598 in self.aborted:
                oprot.writeI64(iter598)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.nosuch is not None:
            oprot.writeFieldBegin('nosuch', TType.SET, 2)
            oprot.writeSetBegin(TType.I64, len(self.nosuch))
            for iter599 in self.nosuch:
                oprot.writeI64(iter599)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.aborted is None:
            raise TProtocolException(message='Required field aborted is unset!')
        if self.nosuch is None:
            raise TProtocolException(message='Required field nosuch is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CompactionRequest(object):
    """
    Attributes:
     - dbname
     - tablename
     - partitionname
     - type
     - runas
     - properties

    """


    def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, runas=None, properties=None,):
        self.dbname = dbname
        self.tablename = tablename
        self.partitionname = partitionname
        self.type = type
        self.runas = runas
        self.properties = properties

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tablename = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.partitionname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.runas = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.MAP:
                    self.properties = {}
                    (_ktype601, _vtype602, _size600) = iprot.readMapBegin()
                    for _i604 in range(_size600):
                        _key605 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val606 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.properties[_key605] = _val606
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CompactionRequest')
        if self.dbname is not None:
            oprot.writeFieldBegin('dbname', TType.STRING, 1)
            oprot.writeString(self.dbname.encode('utf-8') if sys.version_info[0] == 2 else self.dbname)
            oprot.writeFieldEnd()
        if self.tablename is not None:
            oprot.writeFieldBegin('tablename', TType.STRING, 2)
            oprot.writeString(self.tablename.encode('utf-8') if sys.version_info[0] == 2 else self.tablename)
            oprot.writeFieldEnd()
        if self.partitionname is not None:
            oprot.writeFieldBegin('partitionname', TType.STRING, 3)
            oprot.writeString(self.partitionname.encode('utf-8') if sys.version_info[0] == 2 else self.partitionname)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 4)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.runas is not None:
            oprot.writeFieldBegin('runas', TType.STRING, 5)
            oprot.writeString(self.runas.encode('utf-8') if sys.version_info[0] == 2 else self.runas)
            oprot.writeFieldEnd()
        if self.properties is not None:
            oprot.writeFieldBegin('properties', TType.MAP, 6)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
            for kiter607, viter608 in self.properties.items():
                oprot.writeString(kiter607.encode('utf-8') if sys.version_info[0] == 2 else kiter607)
                oprot.writeString(viter608.encode('utf-8') if sys.version_info[0] == 2 else viter608)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbname is None:
            raise TProtocolException(message='Required field dbname is unset!')
        if self.tablename is None:
            raise TProtocolException(message='Required field tablename is unset!')
        if self.type is None:
            raise TProtocolException(message='Required field type is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CompactionResponse(object):
    """
    Attributes:
     - id
     - state
     - accepted

    """


    def __init__(self, id=None, state=None, accepted=None,):
        self.id = id
        self.state = state
        self.accepted = accepted

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.id = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.state = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.accepted = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CompactionResponse')
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.I64, 1)
            oprot.writeI64(self.id)
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.STRING, 2)
            oprot.writeString(self.state.encode('utf-8') if sys.version_info[0] == 2 else self.state)
            oprot.writeFieldEnd()
        if self.accepted is not None:
            oprot.writeFieldBegin('accepted', TType.BOOL, 3)
            oprot.writeBool(self.accepted)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.id is None:
            raise TProtocolException(message='Required field id is unset!')
        if self.state is None:
            raise TProtocolException(message='Required field state is unset!')
        if self.accepted is None:
            raise TProtocolException(message='Required field accepted is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ShowCompactRequest(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ShowCompactRequest')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ShowCompactResponseElement(object):
    """
    Attributes:
     - dbname
     - tablename
     - partitionname
     - type
     - state
     - workerid
     - start
     - runAs
     - hightestTxnId
     - metaInfo
     - endTime
     - hadoopJobId
     - id
     - errorMessage
     - enqueueTime

    """


    def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, state=None, workerid=None, start=None, runAs=None, hightestTxnId=None, metaInfo=None, endTime=None, hadoopJobId="None", id=None, errorMessage=None, enqueueTime=None,):
        self.dbname = dbname
        self.tablename = tablename
        self.partitionname = partitionname
        self.type = type
        self.state = state
        self.workerid = workerid
        self.start = start
        self.runAs = runAs
        self.hightestTxnId = hightestTxnId
        self.metaInfo = metaInfo
        self.endTime = endTime
        self.hadoopJobId = hadoopJobId
        self.id = id
        self.errorMessage = errorMessage
        self.enqueueTime = enqueueTime

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tablename = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.partitionname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.state = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.workerid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.start = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.runAs = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I64:
                    self.hightestTxnId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.metaInfo = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I64:
                    self.endTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.hadoopJobId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.I64:
                    self.id = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 14:
                if ftype == TType.STRING:
                    self.errorMessage = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I64:
                    self.enqueueTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ShowCompactResponseElement')
        if self.dbname is not None:
            oprot.writeFieldBegin('dbname', TType.STRING, 1)
            oprot.writeString(self.dbname.encode('utf-8') if sys.version_info[0] == 2 else self.dbname)
            oprot.writeFieldEnd()
        if self.tablename is not None:
            oprot.writeFieldBegin('tablename', TType.STRING, 2)
            oprot.writeString(self.tablename.encode('utf-8') if sys.version_info[0] == 2 else self.tablename)
            oprot.writeFieldEnd()
        if self.partitionname is not None:
            oprot.writeFieldBegin('partitionname', TType.STRING, 3)
            oprot.writeString(self.partitionname.encode('utf-8') if sys.version_info[0] == 2 else self.partitionname)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 4)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.STRING, 5)
            oprot.writeString(self.state.encode('utf-8') if sys.version_info[0] == 2 else self.state)
            oprot.writeFieldEnd()
        if self.workerid is not None:
            oprot.writeFieldBegin('workerid', TType.STRING, 6)
            oprot.writeString(self.workerid.encode('utf-8') if sys.version_info[0] == 2 else self.workerid)
            oprot.writeFieldEnd()
        if self.start is not None:
            oprot.writeFieldBegin('start', TType.I64, 7)
            oprot.writeI64(self.start)
            oprot.writeFieldEnd()
        if self.runAs is not None:
            oprot.writeFieldBegin('runAs', TType.STRING, 8)
            oprot.writeString(self.runAs.encode('utf-8') if sys.version_info[0] == 2 else self.runAs)
            oprot.writeFieldEnd()
        if self.hightestTxnId is not None:
            oprot.writeFieldBegin('hightestTxnId', TType.I64, 9)
            oprot.writeI64(self.hightestTxnId)
            oprot.writeFieldEnd()
        if self.metaInfo is not None:
            oprot.writeFieldBegin('metaInfo', TType.STRING, 10)
            oprot.writeString(self.metaInfo.encode('utf-8') if sys.version_info[0] == 2 else self.metaInfo)
            oprot.writeFieldEnd()
        if self.endTime is not None:
            oprot.writeFieldBegin('endTime', TType.I64, 11)
            oprot.writeI64(self.endTime)
            oprot.writeFieldEnd()
        if self.hadoopJobId is not None:
            oprot.writeFieldBegin('hadoopJobId', TType.STRING, 12)
            oprot.writeString(self.hadoopJobId.encode('utf-8') if sys.version_info[0] == 2 else self.hadoopJobId)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.I64, 13)
            oprot.writeI64(self.id)
            oprot.writeFieldEnd()
        if self.errorMessage is not None:
            oprot.writeFieldBegin('errorMessage', TType.STRING, 14)
            oprot.writeString(self.errorMessage.encode('utf-8') if sys.version_info[0] == 2 else self.errorMessage)
            oprot.writeFieldEnd()
        if self.enqueueTime is not None:
            oprot.writeFieldBegin('enqueueTime', TType.I64, 15)
            oprot.writeI64(self.enqueueTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbname is None:
            raise TProtocolException(message='Required field dbname is unset!')
        if self.tablename is None:
            raise TProtocolException(message='Required field tablename is unset!')
        if self.type is None:
            raise TProtocolException(message='Required field type is unset!')
        if self.state is None:
            raise TProtocolException(message='Required field state is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ShowCompactResponse(object):
    """
    Attributes:
     - compacts

    """


    def __init__(self, compacts=None,):
        self.compacts = compacts

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.compacts = []
                    (_etype612, _size609) = iprot.readListBegin()
                    for _i613 in range(_size609):
                        _elem614 = ShowCompactResponseElement()
                        _elem614.read(iprot)
                        self.compacts.append(_elem614)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ShowCompactResponse')
        if self.compacts is not None:
            oprot.writeFieldBegin('compacts', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.compacts))
            for iter615 in self.compacts:
                iter615.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.compacts is None:
            raise TProtocolException(message='Required field compacts is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AddDynamicPartitions(object):
    """
    Attributes:
     - txnid
     - writeid
     - dbname
     - tablename
     - partitionnames
     - operationType

    """


    def __init__(self, txnid=None, writeid=None, dbname=None, tablename=None, partitionnames=None, operationType=5,):
        self.txnid = txnid
        self.writeid = writeid
        self.dbname = dbname
        self.tablename = tablename
        self.partitionnames = partitionnames
        self.operationType = operationType

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.txnid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.writeid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.dbname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.tablename = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.partitionnames = []
                    (_etype619, _size616) = iprot.readListBegin()
                    for _i620 in range(_size616):
                        _elem621 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.partitionnames.append(_elem621)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.operationType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AddDynamicPartitions')
        if self.txnid is not None:
            oprot.writeFieldBegin('txnid', TType.I64, 1)
            oprot.writeI64(self.txnid)
            oprot.writeFieldEnd()
        if self.writeid is not None:
            oprot.writeFieldBegin('writeid', TType.I64, 2)
            oprot.writeI64(self.writeid)
            oprot.writeFieldEnd()
        if self.dbname is not None:
            oprot.writeFieldBegin('dbname', TType.STRING, 3)
            oprot.writeString(self.dbname.encode('utf-8') if sys.version_info[0] == 2 else self.dbname)
            oprot.writeFieldEnd()
        if self.tablename is not None:
            oprot.writeFieldBegin('tablename', TType.STRING, 4)
            oprot.writeString(self.tablename.encode('utf-8') if sys.version_info[0] == 2 else self.tablename)
            oprot.writeFieldEnd()
        if self.partitionnames is not None:
            oprot.writeFieldBegin('partitionnames', TType.LIST, 5)
            oprot.writeListBegin(TType.STRING, len(self.partitionnames))
            for iter622 in self.partitionnames:
                oprot.writeString(iter622.encode('utf-8') if sys.version_info[0] == 2 else iter622)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.operationType is not None:
            oprot.writeFieldBegin('operationType', TType.I32, 6)
            oprot.writeI32(self.operationType)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.txnid is None:
            raise TProtocolException(message='Required field txnid is unset!')
        if self.writeid is None:
            raise TProtocolException(message='Required field writeid is unset!')
        if self.dbname is None:
            raise TProtocolException(message='Required field dbname is unset!')
        if self.tablename is None:
            raise TProtocolException(message='Required field tablename is unset!')
        if self.partitionnames is None:
            raise TProtocolException(message='Required field partitionnames is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 BasicTxnInfo(object):
    """
    Attributes:
     - isnull
     - time
     - txnid
     - dbname
     - tablename
     - partitionname

    """


    def __init__(self, isnull=None, time=None, txnid=None, dbname=None, tablename=None, partitionname=None,):
        self.isnull = isnull
        self.time = time
        self.txnid = txnid
        self.dbname = dbname
        self.tablename = tablename
        self.partitionname = partitionname

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.isnull = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.time = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.txnid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.dbname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.tablename = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.partitionname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('BasicTxnInfo')
        if self.isnull is not None:
            oprot.writeFieldBegin('isnull', TType.BOOL, 1)
            oprot.writeBool(self.isnull)
            oprot.writeFieldEnd()
        if self.time is not None:
            oprot.writeFieldBegin('time', TType.I64, 2)
            oprot.writeI64(self.time)
            oprot.writeFieldEnd()
        if self.txnid is not None:
            oprot.writeFieldBegin('txnid', TType.I64, 3)
            oprot.writeI64(self.txnid)
            oprot.writeFieldEnd()
        if self.dbname is not None:
            oprot.writeFieldBegin('dbname', TType.STRING, 4)
            oprot.writeString(self.dbname.encode('utf-8') if sys.version_info[0] == 2 else self.dbname)
            oprot.writeFieldEnd()
        if self.tablename is not None:
            oprot.writeFieldBegin('tablename', TType.STRING, 5)
            oprot.writeString(self.tablename.encode('utf-8') if sys.version_info[0] == 2 else self.tablename)
            oprot.writeFieldEnd()
        if self.partitionname is not None:
            oprot.writeFieldBegin('partitionname', TType.STRING, 6)
            oprot.writeString(self.partitionname.encode('utf-8') if sys.version_info[0] == 2 else self.partitionname)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.isnull is None:
            raise TProtocolException(message='Required field isnull is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CreationMetadata(object):
    """
    Attributes:
     - catName
     - dbName
     - tblName
     - tablesUsed
     - validTxnList
     - materializationTime

    """


    def __init__(self, catName=None, dbName=None, tblName=None, tablesUsed=None, validTxnList=None, materializationTime=None,):
        self.catName = catName
        self.dbName = dbName
        self.tblName = tblName
        self.tablesUsed = tablesUsed
        self.validTxnList = validTxnList
        self.materializationTime = materializationTime

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.tblName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.SET:
                    self.tablesUsed = set()
                    (_etype626, _size623) = iprot.readSetBegin()
                    for _i627 in range(_size623):
                        _elem628 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.tablesUsed.add(_elem628)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.validTxnList = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.materializationTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CreationMetadata')
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 1)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 2)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tblName is not None:
            oprot.writeFieldBegin('tblName', TType.STRING, 3)
            oprot.writeString(self.tblName.encode('utf-8') if sys.version_info[0] == 2 else self.tblName)
            oprot.writeFieldEnd()
        if self.tablesUsed is not None:
            oprot.writeFieldBegin('tablesUsed', TType.SET, 4)
            oprot.writeSetBegin(TType.STRING, len(self.tablesUsed))
            for iter629 in self.tablesUsed:
                oprot.writeString(iter629.encode('utf-8') if sys.version_info[0] == 2 else iter629)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.validTxnList is not None:
            oprot.writeFieldBegin('validTxnList', TType.STRING, 5)
            oprot.writeString(self.validTxnList.encode('utf-8') if sys.version_info[0] == 2 else self.validTxnList)
            oprot.writeFieldEnd()
        if self.materializationTime is not None:
            oprot.writeFieldBegin('materializationTime', TType.I64, 6)
            oprot.writeI64(self.materializationTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.catName is None:
            raise TProtocolException(message='Required field catName is unset!')
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tblName is None:
            raise TProtocolException(message='Required field tblName is unset!')
        if self.tablesUsed is None:
            raise TProtocolException(message='Required field tablesUsed is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 NotificationEventRequest(object):
    """
    Attributes:
     - lastEvent
     - maxEvents

    """


    def __init__(self, lastEvent=None, maxEvents=None,):
        self.lastEvent = lastEvent
        self.maxEvents = maxEvents

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.lastEvent = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.maxEvents = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('NotificationEventRequest')
        if self.lastEvent is not None:
            oprot.writeFieldBegin('lastEvent', TType.I64, 1)
            oprot.writeI64(self.lastEvent)
            oprot.writeFieldEnd()
        if self.maxEvents is not None:
            oprot.writeFieldBegin('maxEvents', TType.I32, 2)
            oprot.writeI32(self.maxEvents)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.lastEvent is None:
            raise TProtocolException(message='Required field lastEvent is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 NotificationEvent(object):
    """
    Attributes:
     - eventId
     - eventTime
     - eventType
     - dbName
     - tableName
     - message
     - messageFormat
     - catName

    """


    def __init__(self, eventId=None, eventTime=None, eventType=None, dbName=None, tableName=None, message=None, messageFormat=None, catName=None,):
        self.eventId = eventId
        self.eventTime = eventTime
        self.eventType = eventType
        self.dbName = dbName
        self.tableName = tableName
        self.message = message
        self.messageFormat = messageFormat
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.eventId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.eventTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.eventType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.tableName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.messageFormat = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('NotificationEvent')
        if self.eventId is not None:
            oprot.writeFieldBegin('eventId', TType.I64, 1)
            oprot.writeI64(self.eventId)
            oprot.writeFieldEnd()
        if self.eventTime is not None:
            oprot.writeFieldBegin('eventTime', TType.I32, 2)
            oprot.writeI32(self.eventTime)
            oprot.writeFieldEnd()
        if self.eventType is not None:
            oprot.writeFieldBegin('eventType', TType.STRING, 3)
            oprot.writeString(self.eventType.encode('utf-8') if sys.version_info[0] == 2 else self.eventType)
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 4)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tableName is not None:
            oprot.writeFieldBegin('tableName', TType.STRING, 5)
            oprot.writeString(self.tableName.encode('utf-8') if sys.version_info[0] == 2 else self.tableName)
            oprot.writeFieldEnd()
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 6)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        if self.messageFormat is not None:
            oprot.writeFieldBegin('messageFormat', TType.STRING, 7)
            oprot.writeString(self.messageFormat.encode('utf-8') if sys.version_info[0] == 2 else self.messageFormat)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 8)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.eventId is None:
            raise TProtocolException(message='Required field eventId is unset!')
        if self.eventTime is None:
            raise TProtocolException(message='Required field eventTime is unset!')
        if self.eventType is None:
            raise TProtocolException(message='Required field eventType is unset!')
        if self.message is None:
            raise TProtocolException(message='Required field message is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 NotificationEventResponse(object):
    """
    Attributes:
     - events

    """


    def __init__(self, events=None,):
        self.events = events

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.events = []
                    (_etype633, _size630) = iprot.readListBegin()
                    for _i634 in range(_size630):
                        _elem635 = NotificationEvent()
                        _elem635.read(iprot)
                        self.events.append(_elem635)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('NotificationEventResponse')
        if self.events is not None:
            oprot.writeFieldBegin('events', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.events))
            for iter636 in self.events:
                iter636.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.events is None:
            raise TProtocolException(message='Required field events is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CurrentNotificationEventId(object):
    """
    Attributes:
     - eventId

    """


    def __init__(self, eventId=None,):
        self.eventId = eventId

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.eventId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CurrentNotificationEventId')
        if self.eventId is not None:
            oprot.writeFieldBegin('eventId', TType.I64, 1)
            oprot.writeI64(self.eventId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.eventId is None:
            raise TProtocolException(message='Required field eventId is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 NotificationEventsCountRequest(object):
    """
    Attributes:
     - fromEventId
     - dbName
     - catName

    """


    def __init__(self, fromEventId=None, dbName=None, catName=None,):
        self.fromEventId = fromEventId
        self.dbName = dbName
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.fromEventId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('NotificationEventsCountRequest')
        if self.fromEventId is not None:
            oprot.writeFieldBegin('fromEventId', TType.I64, 1)
            oprot.writeI64(self.fromEventId)
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 2)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 3)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.fromEventId is None:
            raise TProtocolException(message='Required field fromEventId is unset!')
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 NotificationEventsCountResponse(object):
    """
    Attributes:
     - eventsCount

    """


    def __init__(self, eventsCount=None,):
        self.eventsCount = eventsCount

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.I64:
                    self.eventsCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('NotificationEventsCountResponse')
        if self.eventsCount is not None:
            oprot.writeFieldBegin('eventsCount', TType.I64, 1)
            oprot.writeI64(self.eventsCount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.eventsCount is None:
            raise TProtocolException(message='Required field eventsCount is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 InsertEventRequestData(object):
    """
    Attributes:
     - replace
     - filesAdded
     - filesAddedChecksum

    """


    def __init__(self, replace=None, filesAdded=None, filesAddedChecksum=None,):
        self.replace = replace
        self.filesAdded = filesAdded
        self.filesAddedChecksum = filesAddedChecksum

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.replace = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.filesAdded = []
                    (_etype640, _size637) = iprot.readListBegin()
                    for _i641 in range(_size637):
                        _elem642 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.filesAdded.append(_elem642)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.filesAddedChecksum = []
                    (_etype646, _size643) = iprot.readListBegin()
                    for _i647 in range(_size643):
                        _elem648 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.filesAddedChecksum.append(_elem648)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('InsertEventRequestData')
        if self.replace is not None:
            oprot.writeFieldBegin('replace', TType.BOOL, 1)
            oprot.writeBool(self.replace)
            oprot.writeFieldEnd()
        if self.filesAdded is not None:
            oprot.writeFieldBegin('filesAdded', TType.LIST, 2)
            oprot.writeListBegin(TType.STRING, len(self.filesAdded))
            for iter649 in self.filesAdded:
                oprot.writeString(iter649.encode('utf-8') if sys.version_info[0] == 2 else iter649)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.filesAddedChecksum is not None:
            oprot.writeFieldBegin('filesAddedChecksum', TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.filesAddedChecksum))
            for iter650 in self.filesAddedChecksum:
                oprot.writeString(iter650.encode('utf-8') if sys.version_info[0] == 2 else iter650)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.filesAdded is None:
            raise TProtocolException(message='Required field filesAdded is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 FireEventRequestData(object):
    """
    Attributes:
     - insertData

    """


    def __init__(self, insertData=None,):
        self.insertData = insertData

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.insertData = InsertEventRequestData()
                    self.insertData.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('FireEventRequestData')
        if self.insertData is not None:
            oprot.writeFieldBegin('insertData', TType.STRUCT, 1)
            self.insertData.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 FireEventRequest(object):
    """
    Attributes:
     - successful
     - data
     - dbName
     - tableName
     - partitionVals
     - catName

    """


    def __init__(self, successful=None, data=None, dbName=None, tableName=None, partitionVals=None, catName=None,):
        self.successful = successful
        self.data = data
        self.dbName = dbName
        self.tableName = tableName
        self.partitionVals = partitionVals
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.successful = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.data = FireEventRequestData()
                    self.data.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.tableName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.partitionVals = []
                    (_etype654, _size651) = iprot.readListBegin()
                    for _i655 in range(_size651):
                        _elem656 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.partitionVals.append(_elem656)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('FireEventRequest')
        if self.successful is not None:
            oprot.writeFieldBegin('successful', TType.BOOL, 1)
            oprot.writeBool(self.successful)
            oprot.writeFieldEnd()
        if self.data is not None:
            oprot.writeFieldBegin('data', TType.STRUCT, 2)
            self.data.write(oprot)
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 3)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tableName is not None:
            oprot.writeFieldBegin('tableName', TType.STRING, 4)
            oprot.writeString(self.tableName.encode('utf-8') if sys.version_info[0] == 2 else self.tableName)
            oprot.writeFieldEnd()
        if self.partitionVals is not None:
            oprot.writeFieldBegin('partitionVals', TType.LIST, 5)
            oprot.writeListBegin(TType.STRING, len(self.partitionVals))
            for iter657 in self.partitionVals:
                oprot.writeString(iter657.encode('utf-8') if sys.version_info[0] == 2 else iter657)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 6)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.successful is None:
            raise TProtocolException(message='Required field successful is unset!')
        if self.data is None:
            raise TProtocolException(message='Required field data is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 FireEventResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('FireEventResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 MetadataPpdResult(object):
    """
    Attributes:
     - metadata
     - includeBitset

    """


    def __init__(self, metadata=None, includeBitset=None,):
        self.metadata = metadata
        self.includeBitset = includeBitset

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.metadata = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.includeBitset = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('MetadataPpdResult')
        if self.metadata is not None:
            oprot.writeFieldBegin('metadata', TType.STRING, 1)
            oprot.writeBinary(self.metadata)
            oprot.writeFieldEnd()
        if self.includeBitset is not None:
            oprot.writeFieldBegin('includeBitset', TType.STRING, 2)
            oprot.writeBinary(self.includeBitset)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetFileMetadataByExprResult(object):
    """
    Attributes:
     - metadata
     - isSupported

    """


    def __init__(self, metadata=None, isSupported=None,):
        self.metadata = metadata
        self.isSupported = isSupported

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.metadata = {}
                    (_ktype659, _vtype660, _size658) = iprot.readMapBegin()
                    for _i662 in range(_size658):
                        _key663 = iprot.readI64()
                        _val664 = MetadataPpdResult()
                        _val664.read(iprot)
                        self.metadata[_key663] = _val664
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.isSupported = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetFileMetadataByExprResult')
        if self.metadata is not None:
            oprot.writeFieldBegin('metadata', TType.MAP, 1)
            oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.metadata))
            for kiter665, viter666 in self.metadata.items():
                oprot.writeI64(kiter665)
                viter666.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.isSupported is not None:
            oprot.writeFieldBegin('isSupported', TType.BOOL, 2)
            oprot.writeBool(self.isSupported)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.metadata is None:
            raise TProtocolException(message='Required field metadata is unset!')
        if self.isSupported is None:
            raise TProtocolException(message='Required field isSupported is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetFileMetadataByExprRequest(object):
    """
    Attributes:
     - fileIds
     - expr
     - doGetFooters
     - type

    """


    def __init__(self, fileIds=None, expr=None, doGetFooters=None, type=None,):
        self.fileIds = fileIds
        self.expr = expr
        self.doGetFooters = doGetFooters
        self.type = type

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.fileIds = []
                    (_etype670, _size667) = iprot.readListBegin()
                    for _i671 in range(_size667):
                        _elem672 = iprot.readI64()
                        self.fileIds.append(_elem672)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.expr = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.doGetFooters = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetFileMetadataByExprRequest')
        if self.fileIds is not None:
            oprot.writeFieldBegin('fileIds', TType.LIST, 1)
            oprot.writeListBegin(TType.I64, len(self.fileIds))
            for iter673 in self.fileIds:
                oprot.writeI64(iter673)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.expr is not None:
            oprot.writeFieldBegin('expr', TType.STRING, 2)
            oprot.writeBinary(self.expr)
            oprot.writeFieldEnd()
        if self.doGetFooters is not None:
            oprot.writeFieldBegin('doGetFooters', TType.BOOL, 3)
            oprot.writeBool(self.doGetFooters)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 4)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.fileIds is None:
            raise TProtocolException(message='Required field fileIds is unset!')
        if self.expr is None:
            raise TProtocolException(message='Required field expr is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetFileMetadataResult(object):
    """
    Attributes:
     - metadata
     - isSupported

    """


    def __init__(self, metadata=None, isSupported=None,):
        self.metadata = metadata
        self.isSupported = isSupported

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.metadata = {}
                    (_ktype675, _vtype676, _size674) = iprot.readMapBegin()
                    for _i678 in range(_size674):
                        _key679 = iprot.readI64()
                        _val680 = iprot.readBinary()
                        self.metadata[_key679] = _val680
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.isSupported = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetFileMetadataResult')
        if self.metadata is not None:
            oprot.writeFieldBegin('metadata', TType.MAP, 1)
            oprot.writeMapBegin(TType.I64, TType.STRING, len(self.metadata))
            for kiter681, viter682 in self.metadata.items():
                oprot.writeI64(kiter681)
                oprot.writeBinary(viter682)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.isSupported is not None:
            oprot.writeFieldBegin('isSupported', TType.BOOL, 2)
            oprot.writeBool(self.isSupported)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.metadata is None:
            raise TProtocolException(message='Required field metadata is unset!')
        if self.isSupported is None:
            raise TProtocolException(message='Required field isSupported is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetFileMetadataRequest(object):
    """
    Attributes:
     - fileIds

    """


    def __init__(self, fileIds=None,):
        self.fileIds = fileIds

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.fileIds = []
                    (_etype686, _size683) = iprot.readListBegin()
                    for _i687 in range(_size683):
                        _elem688 = iprot.readI64()
                        self.fileIds.append(_elem688)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetFileMetadataRequest')
        if self.fileIds is not None:
            oprot.writeFieldBegin('fileIds', TType.LIST, 1)
            oprot.writeListBegin(TType.I64, len(self.fileIds))
            for iter689 in self.fileIds:
                oprot.writeI64(iter689)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.fileIds is None:
            raise TProtocolException(message='Required field fileIds is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PutFileMetadataResult(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PutFileMetadataResult')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 PutFileMetadataRequest(object):
    """
    Attributes:
     - fileIds
     - metadata
     - type

    """


    def __init__(self, fileIds=None, metadata=None, type=None,):
        self.fileIds = fileIds
        self.metadata = metadata
        self.type = type

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.fileIds = []
                    (_etype693, _size690) = iprot.readListBegin()
                    for _i694 in range(_size690):
                        _elem695 = iprot.readI64()
                        self.fileIds.append(_elem695)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.metadata = []
                    (_etype699, _size696) = iprot.readListBegin()
                    for _i700 in range(_size696):
                        _elem701 = iprot.readBinary()
                        self.metadata.append(_elem701)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('PutFileMetadataRequest')
        if self.fileIds is not None:
            oprot.writeFieldBegin('fileIds', TType.LIST, 1)
            oprot.writeListBegin(TType.I64, len(self.fileIds))
            for iter702 in self.fileIds:
                oprot.writeI64(iter702)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.metadata is not None:
            oprot.writeFieldBegin('metadata', TType.LIST, 2)
            oprot.writeListBegin(TType.STRING, len(self.metadata))
            for iter703 in self.metadata:
                oprot.writeBinary(iter703)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 3)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.fileIds is None:
            raise TProtocolException(message='Required field fileIds is unset!')
        if self.metadata is None:
            raise TProtocolException(message='Required field metadata is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ClearFileMetadataResult(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ClearFileMetadataResult')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ClearFileMetadataRequest(object):
    """
    Attributes:
     - fileIds

    """


    def __init__(self, fileIds=None,):
        self.fileIds = fileIds

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.fileIds = []
                    (_etype707, _size704) = iprot.readListBegin()
                    for _i708 in range(_size704):
                        _elem709 = iprot.readI64()
                        self.fileIds.append(_elem709)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ClearFileMetadataRequest')
        if self.fileIds is not None:
            oprot.writeFieldBegin('fileIds', TType.LIST, 1)
            oprot.writeListBegin(TType.I64, len(self.fileIds))
            for iter710 in self.fileIds:
                oprot.writeI64(iter710)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.fileIds is None:
            raise TProtocolException(message='Required field fileIds is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CacheFileMetadataResult(object):
    """
    Attributes:
     - isSupported

    """


    def __init__(self, isSupported=None,):
        self.isSupported = isSupported

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.isSupported = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CacheFileMetadataResult')
        if self.isSupported is not None:
            oprot.writeFieldBegin('isSupported', TType.BOOL, 1)
            oprot.writeBool(self.isSupported)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.isSupported is None:
            raise TProtocolException(message='Required field isSupported is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CacheFileMetadataRequest(object):
    """
    Attributes:
     - dbName
     - tblName
     - partName
     - isAllParts

    """


    def __init__(self, dbName=None, tblName=None, partName=None, isAllParts=None,):
        self.dbName = dbName
        self.tblName = tblName
        self.partName = partName
        self.isAllParts = isAllParts

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tblName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.partName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.isAllParts = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CacheFileMetadataRequest')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tblName is not None:
            oprot.writeFieldBegin('tblName', TType.STRING, 2)
            oprot.writeString(self.tblName.encode('utf-8') if sys.version_info[0] == 2 else self.tblName)
            oprot.writeFieldEnd()
        if self.partName is not None:
            oprot.writeFieldBegin('partName', TType.STRING, 3)
            oprot.writeString(self.partName.encode('utf-8') if sys.version_info[0] == 2 else self.partName)
            oprot.writeFieldEnd()
        if self.isAllParts is not None:
            oprot.writeFieldBegin('isAllParts', TType.BOOL, 4)
            oprot.writeBool(self.isAllParts)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tblName is None:
            raise TProtocolException(message='Required field tblName is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetAllFunctionsResponse(object):
    """
    Attributes:
     - functions

    """


    def __init__(self, functions=None,):
        self.functions = functions

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.functions = []
                    (_etype714, _size711) = iprot.readListBegin()
                    for _i715 in range(_size711):
                        _elem716 = Function()
                        _elem716.read(iprot)
                        self.functions.append(_elem716)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetAllFunctionsResponse')
        if self.functions is not None:
            oprot.writeFieldBegin('functions', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.functions))
            for iter717 in self.functions:
                iter717.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ClientCapabilities(object):
    """
    Attributes:
     - values

    """


    def __init__(self, values=None,):
        self.values = values

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.values = []
                    (_etype721, _size718) = iprot.readListBegin()
                    for _i722 in range(_size718):
                        _elem723 = iprot.readI32()
                        self.values.append(_elem723)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ClientCapabilities')
        if self.values is not None:
            oprot.writeFieldBegin('values', TType.LIST, 1)
            oprot.writeListBegin(TType.I32, len(self.values))
            for iter724 in self.values:
                oprot.writeI32(iter724)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.values is None:
            raise TProtocolException(message='Required field values is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetTableRequest(object):
    """
    Attributes:
     - dbName
     - tblName
     - capabilities
     - catName

    """


    def __init__(self, dbName=None, tblName=None, capabilities=None, catName=None,):
        self.dbName = dbName
        self.tblName = tblName
        self.capabilities = capabilities
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tblName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.capabilities = ClientCapabilities()
                    self.capabilities.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetTableRequest')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tblName is not None:
            oprot.writeFieldBegin('tblName', TType.STRING, 2)
            oprot.writeString(self.tblName.encode('utf-8') if sys.version_info[0] == 2 else self.tblName)
            oprot.writeFieldEnd()
        if self.capabilities is not None:
            oprot.writeFieldBegin('capabilities', TType.STRUCT, 3)
            self.capabilities.write(oprot)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 4)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tblName is None:
            raise TProtocolException(message='Required field tblName is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetTableResult(object):
    """
    Attributes:
     - table

    """


    def __init__(self, table=None,):
        self.table = table

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.table = Table()
                    self.table.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetTableResult')
        if self.table is not None:
            oprot.writeFieldBegin('table', TType.STRUCT, 1)
            self.table.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.table is None:
            raise TProtocolException(message='Required field table is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetTablesRequest(object):
    """
    Attributes:
     - dbName
     - tblNames
     - capabilities
     - catName

    """


    def __init__(self, dbName=None, tblNames=None, capabilities=None, catName=None,):
        self.dbName = dbName
        self.tblNames = tblNames
        self.capabilities = capabilities
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.tblNames = []
                    (_etype728, _size725) = iprot.readListBegin()
                    for _i729 in range(_size725):
                        _elem730 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.tblNames.append(_elem730)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.capabilities = ClientCapabilities()
                    self.capabilities.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetTablesRequest')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tblNames is not None:
            oprot.writeFieldBegin('tblNames', TType.LIST, 2)
            oprot.writeListBegin(TType.STRING, len(self.tblNames))
            for iter731 in self.tblNames:
                oprot.writeString(iter731.encode('utf-8') if sys.version_info[0] == 2 else iter731)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.capabilities is not None:
            oprot.writeFieldBegin('capabilities', TType.STRUCT, 3)
            self.capabilities.write(oprot)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 4)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetTablesResult(object):
    """
    Attributes:
     - tables

    """


    def __init__(self, tables=None,):
        self.tables = tables

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.tables = []
                    (_etype735, _size732) = iprot.readListBegin()
                    for _i736 in range(_size732):
                        _elem737 = Table()
                        _elem737.read(iprot)
                        self.tables.append(_elem737)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetTablesResult')
        if self.tables is not None:
            oprot.writeFieldBegin('tables', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.tables))
            for iter738 in self.tables:
                iter738.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.tables is None:
            raise TProtocolException(message='Required field tables is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CmRecycleRequest(object):
    """
    Attributes:
     - dataPath
     - purge

    """


    def __init__(self, dataPath=None, purge=None,):
        self.dataPath = dataPath
        self.purge = purge

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dataPath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.purge = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CmRecycleRequest')
        if self.dataPath is not None:
            oprot.writeFieldBegin('dataPath', TType.STRING, 1)
            oprot.writeString(self.dataPath.encode('utf-8') if sys.version_info[0] == 2 else self.dataPath)
            oprot.writeFieldEnd()
        if self.purge is not None:
            oprot.writeFieldBegin('purge', TType.BOOL, 2)
            oprot.writeBool(self.purge)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dataPath is None:
            raise TProtocolException(message='Required field dataPath is unset!')
        if self.purge is None:
            raise TProtocolException(message='Required field purge is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 CmRecycleResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('CmRecycleResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 TableMeta(object):
    """
    Attributes:
     - dbName
     - tableName
     - tableType
     - comments
     - catName

    """


    def __init__(self, dbName=None, tableName=None, tableType=None, comments=None, catName=None,):
        self.dbName = dbName
        self.tableName = tableName
        self.tableType = tableType
        self.comments = comments
        self.catName = catName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.tableName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.tableType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.comments = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('TableMeta')
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 1)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.tableName is not None:
            oprot.writeFieldBegin('tableName', TType.STRING, 2)
            oprot.writeString(self.tableName.encode('utf-8') if sys.version_info[0] == 2 else self.tableName)
            oprot.writeFieldEnd()
        if self.tableType is not None:
            oprot.writeFieldBegin('tableType', TType.STRING, 3)
            oprot.writeString(self.tableType.encode('utf-8') if sys.version_info[0] == 2 else self.tableType)
            oprot.writeFieldEnd()
        if self.comments is not None:
            oprot.writeFieldBegin('comments', TType.STRING, 4)
            oprot.writeString(self.comments.encode('utf-8') if sys.version_info[0] == 2 else self.comments)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 5)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.dbName is None:
            raise TProtocolException(message='Required field dbName is unset!')
        if self.tableName is None:
            raise TProtocolException(message='Required field tableName is unset!')
        if self.tableType is None:
            raise TProtocolException(message='Required field tableType is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 Materialization(object):
    """
    Attributes:
     - sourceTablesUpdateDeleteModified

    """


    def __init__(self, sourceTablesUpdateDeleteModified=None,):
        self.sourceTablesUpdateDeleteModified = sourceTablesUpdateDeleteModified

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.sourceTablesUpdateDeleteModified = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('Materialization')
        if self.sourceTablesUpdateDeleteModified is not None:
            oprot.writeFieldBegin('sourceTablesUpdateDeleteModified', TType.BOOL, 1)
            oprot.writeBool(self.sourceTablesUpdateDeleteModified)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.sourceTablesUpdateDeleteModified is None:
            raise TProtocolException(message='Required field sourceTablesUpdateDeleteModified is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMResourcePlan(object):
    """
    Attributes:
     - name
     - status
     - queryParallelism
     - defaultPoolPath

    """


    def __init__(self, name=None, status=None, queryParallelism=None, defaultPoolPath=None,):
        self.name = name
        self.status = status
        self.queryParallelism = queryParallelism
        self.defaultPoolPath = defaultPoolPath

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.status = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.queryParallelism = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.defaultPoolPath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMResourcePlan')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 2)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.queryParallelism is not None:
            oprot.writeFieldBegin('queryParallelism', TType.I32, 3)
            oprot.writeI32(self.queryParallelism)
            oprot.writeFieldEnd()
        if self.defaultPoolPath is not None:
            oprot.writeFieldBegin('defaultPoolPath', TType.STRING, 4)
            oprot.writeString(self.defaultPoolPath.encode('utf-8') if sys.version_info[0] == 2 else self.defaultPoolPath)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.name is None:
            raise TProtocolException(message='Required field name is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMNullableResourcePlan(object):
    """
    Attributes:
     - name
     - status
     - queryParallelism
     - isSetQueryParallelism
     - defaultPoolPath
     - isSetDefaultPoolPath

    """


    def __init__(self, name=None, status=None, queryParallelism=None, isSetQueryParallelism=None, defaultPoolPath=None, isSetDefaultPoolPath=None,):
        self.name = name
        self.status = status
        self.queryParallelism = queryParallelism
        self.isSetQueryParallelism = isSetQueryParallelism
        self.defaultPoolPath = defaultPoolPath
        self.isSetDefaultPoolPath = isSetDefaultPoolPath

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.status = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.queryParallelism = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.isSetQueryParallelism = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.defaultPoolPath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.isSetDefaultPoolPath = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMNullableResourcePlan')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.I32, 2)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.queryParallelism is not None:
            oprot.writeFieldBegin('queryParallelism', TType.I32, 4)
            oprot.writeI32(self.queryParallelism)
            oprot.writeFieldEnd()
        if self.isSetQueryParallelism is not None:
            oprot.writeFieldBegin('isSetQueryParallelism', TType.BOOL, 5)
            oprot.writeBool(self.isSetQueryParallelism)
            oprot.writeFieldEnd()
        if self.defaultPoolPath is not None:
            oprot.writeFieldBegin('defaultPoolPath', TType.STRING, 6)
            oprot.writeString(self.defaultPoolPath.encode('utf-8') if sys.version_info[0] == 2 else self.defaultPoolPath)
            oprot.writeFieldEnd()
        if self.isSetDefaultPoolPath is not None:
            oprot.writeFieldBegin('isSetDefaultPoolPath', TType.BOOL, 7)
            oprot.writeBool(self.isSetDefaultPoolPath)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMPool(object):
    """
    Attributes:
     - resourcePlanName
     - poolPath
     - allocFraction
     - queryParallelism
     - schedulingPolicy

    """


    def __init__(self, resourcePlanName=None, poolPath=None, allocFraction=None, queryParallelism=None, schedulingPolicy=None,):
        self.resourcePlanName = resourcePlanName
        self.poolPath = poolPath
        self.allocFraction = allocFraction
        self.queryParallelism = queryParallelism
        self.schedulingPolicy = schedulingPolicy

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.poolPath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.DOUBLE:
                    self.allocFraction = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.queryParallelism = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.schedulingPolicy = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMPool')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        if self.poolPath is not None:
            oprot.writeFieldBegin('poolPath', TType.STRING, 2)
            oprot.writeString(self.poolPath.encode('utf-8') if sys.version_info[0] == 2 else self.poolPath)
            oprot.writeFieldEnd()
        if self.allocFraction is not None:
            oprot.writeFieldBegin('allocFraction', TType.DOUBLE, 3)
            oprot.writeDouble(self.allocFraction)
            oprot.writeFieldEnd()
        if self.queryParallelism is not None:
            oprot.writeFieldBegin('queryParallelism', TType.I32, 4)
            oprot.writeI32(self.queryParallelism)
            oprot.writeFieldEnd()
        if self.schedulingPolicy is not None:
            oprot.writeFieldBegin('schedulingPolicy', TType.STRING, 5)
            oprot.writeString(self.schedulingPolicy.encode('utf-8') if sys.version_info[0] == 2 else self.schedulingPolicy)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.resourcePlanName is None:
            raise TProtocolException(message='Required field resourcePlanName is unset!')
        if self.poolPath is None:
            raise TProtocolException(message='Required field poolPath is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMNullablePool(object):
    """
    Attributes:
     - resourcePlanName
     - poolPath
     - allocFraction
     - queryParallelism
     - schedulingPolicy
     - isSetSchedulingPolicy

    """


    def __init__(self, resourcePlanName=None, poolPath=None, allocFraction=None, queryParallelism=None, schedulingPolicy=None, isSetSchedulingPolicy=None,):
        self.resourcePlanName = resourcePlanName
        self.poolPath = poolPath
        self.allocFraction = allocFraction
        self.queryParallelism = queryParallelism
        self.schedulingPolicy = schedulingPolicy
        self.isSetSchedulingPolicy = isSetSchedulingPolicy

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.poolPath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.DOUBLE:
                    self.allocFraction = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.queryParallelism = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.schedulingPolicy = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.isSetSchedulingPolicy = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMNullablePool')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        if self.poolPath is not None:
            oprot.writeFieldBegin('poolPath', TType.STRING, 2)
            oprot.writeString(self.poolPath.encode('utf-8') if sys.version_info[0] == 2 else self.poolPath)
            oprot.writeFieldEnd()
        if self.allocFraction is not None:
            oprot.writeFieldBegin('allocFraction', TType.DOUBLE, 3)
            oprot.writeDouble(self.allocFraction)
            oprot.writeFieldEnd()
        if self.queryParallelism is not None:
            oprot.writeFieldBegin('queryParallelism', TType.I32, 4)
            oprot.writeI32(self.queryParallelism)
            oprot.writeFieldEnd()
        if self.schedulingPolicy is not None:
            oprot.writeFieldBegin('schedulingPolicy', TType.STRING, 5)
            oprot.writeString(self.schedulingPolicy.encode('utf-8') if sys.version_info[0] == 2 else self.schedulingPolicy)
            oprot.writeFieldEnd()
        if self.isSetSchedulingPolicy is not None:
            oprot.writeFieldBegin('isSetSchedulingPolicy', TType.BOOL, 6)
            oprot.writeBool(self.isSetSchedulingPolicy)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.resourcePlanName is None:
            raise TProtocolException(message='Required field resourcePlanName is unset!')
        if self.poolPath is None:
            raise TProtocolException(message='Required field poolPath is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMTrigger(object):
    """
    Attributes:
     - resourcePlanName
     - triggerName
     - triggerExpression
     - actionExpression
     - isInUnmanaged

    """


    def __init__(self, resourcePlanName=None, triggerName=None, triggerExpression=None, actionExpression=None, isInUnmanaged=None,):
        self.resourcePlanName = resourcePlanName
        self.triggerName = triggerName
        self.triggerExpression = triggerExpression
        self.actionExpression = actionExpression
        self.isInUnmanaged = isInUnmanaged

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.triggerName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.triggerExpression = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.actionExpression = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.isInUnmanaged = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMTrigger')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        if self.triggerName is not None:
            oprot.writeFieldBegin('triggerName', TType.STRING, 2)
            oprot.writeString(self.triggerName.encode('utf-8') if sys.version_info[0] == 2 else self.triggerName)
            oprot.writeFieldEnd()
        if self.triggerExpression is not None:
            oprot.writeFieldBegin('triggerExpression', TType.STRING, 3)
            oprot.writeString(self.triggerExpression.encode('utf-8') if sys.version_info[0] == 2 else self.triggerExpression)
            oprot.writeFieldEnd()
        if self.actionExpression is not None:
            oprot.writeFieldBegin('actionExpression', TType.STRING, 4)
            oprot.writeString(self.actionExpression.encode('utf-8') if sys.version_info[0] == 2 else self.actionExpression)
            oprot.writeFieldEnd()
        if self.isInUnmanaged is not None:
            oprot.writeFieldBegin('isInUnmanaged', TType.BOOL, 5)
            oprot.writeBool(self.isInUnmanaged)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.resourcePlanName is None:
            raise TProtocolException(message='Required field resourcePlanName is unset!')
        if self.triggerName is None:
            raise TProtocolException(message='Required field triggerName is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMMapping(object):
    """
    Attributes:
     - resourcePlanName
     - entityType
     - entityName
     - poolPath
     - ordering

    """


    def __init__(self, resourcePlanName=None, entityType=None, entityName=None, poolPath=None, ordering=None,):
        self.resourcePlanName = resourcePlanName
        self.entityType = entityType
        self.entityName = entityName
        self.poolPath = poolPath
        self.ordering = ordering

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.entityType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.entityName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.poolPath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.ordering = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMMapping')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        if self.entityType is not None:
            oprot.writeFieldBegin('entityType', TType.STRING, 2)
            oprot.writeString(self.entityType.encode('utf-8') if sys.version_info[0] == 2 else self.entityType)
            oprot.writeFieldEnd()
        if self.entityName is not None:
            oprot.writeFieldBegin('entityName', TType.STRING, 3)
            oprot.writeString(self.entityName.encode('utf-8') if sys.version_info[0] == 2 else self.entityName)
            oprot.writeFieldEnd()
        if self.poolPath is not None:
            oprot.writeFieldBegin('poolPath', TType.STRING, 4)
            oprot.writeString(self.poolPath.encode('utf-8') if sys.version_info[0] == 2 else self.poolPath)
            oprot.writeFieldEnd()
        if self.ordering is not None:
            oprot.writeFieldBegin('ordering', TType.I32, 5)
            oprot.writeI32(self.ordering)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.resourcePlanName is None:
            raise TProtocolException(message='Required field resourcePlanName is unset!')
        if self.entityType is None:
            raise TProtocolException(message='Required field entityType is unset!')
        if self.entityName is None:
            raise TProtocolException(message='Required field entityName is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMPoolTrigger(object):
    """
    Attributes:
     - pool
     - trigger

    """


    def __init__(self, pool=None, trigger=None,):
        self.pool = pool
        self.trigger = trigger

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.pool = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.trigger = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMPoolTrigger')
        if self.pool is not None:
            oprot.writeFieldBegin('pool', TType.STRING, 1)
            oprot.writeString(self.pool.encode('utf-8') if sys.version_info[0] == 2 else self.pool)
            oprot.writeFieldEnd()
        if self.trigger is not None:
            oprot.writeFieldBegin('trigger', TType.STRING, 2)
            oprot.writeString(self.trigger.encode('utf-8') if sys.version_info[0] == 2 else self.trigger)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.pool is None:
            raise TProtocolException(message='Required field pool is unset!')
        if self.trigger is None:
            raise TProtocolException(message='Required field trigger is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMFullResourcePlan(object):
    """
    Attributes:
     - plan
     - pools
     - mappings
     - triggers
     - poolTriggers

    """


    def __init__(self, plan=None, pools=None, mappings=None, triggers=None, poolTriggers=None,):
        self.plan = plan
        self.pools = pools
        self.mappings = mappings
        self.triggers = triggers
        self.poolTriggers = poolTriggers

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.plan = WMResourcePlan()
                    self.plan.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.pools = []
                    (_etype742, _size739) = iprot.readListBegin()
                    for _i743 in range(_size739):
                        _elem744 = WMPool()
                        _elem744.read(iprot)
                        self.pools.append(_elem744)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.mappings = []
                    (_etype748, _size745) = iprot.readListBegin()
                    for _i749 in range(_size745):
                        _elem750 = WMMapping()
                        _elem750.read(iprot)
                        self.mappings.append(_elem750)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.triggers = []
                    (_etype754, _size751) = iprot.readListBegin()
                    for _i755 in range(_size751):
                        _elem756 = WMTrigger()
                        _elem756.read(iprot)
                        self.triggers.append(_elem756)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.poolTriggers = []
                    (_etype760, _size757) = iprot.readListBegin()
                    for _i761 in range(_size757):
                        _elem762 = WMPoolTrigger()
                        _elem762.read(iprot)
                        self.poolTriggers.append(_elem762)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMFullResourcePlan')
        if self.plan is not None:
            oprot.writeFieldBegin('plan', TType.STRUCT, 1)
            self.plan.write(oprot)
            oprot.writeFieldEnd()
        if self.pools is not None:
            oprot.writeFieldBegin('pools', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.pools))
            for iter763 in self.pools:
                iter763.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.mappings is not None:
            oprot.writeFieldBegin('mappings', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.mappings))
            for iter764 in self.mappings:
                iter764.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.triggers is not None:
            oprot.writeFieldBegin('triggers', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.triggers))
            for iter765 in self.triggers:
                iter765.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.poolTriggers is not None:
            oprot.writeFieldBegin('poolTriggers', TType.LIST, 5)
            oprot.writeListBegin(TType.STRUCT, len(self.poolTriggers))
            for iter766 in self.poolTriggers:
                iter766.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.plan is None:
            raise TProtocolException(message='Required field plan is unset!')
        if self.pools is None:
            raise TProtocolException(message='Required field pools is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMCreateResourcePlanRequest(object):
    """
    Attributes:
     - resourcePlan
     - copyFrom

    """


    def __init__(self, resourcePlan=None, copyFrom=None,):
        self.resourcePlan = resourcePlan
        self.copyFrom = copyFrom

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlan = WMResourcePlan()
                    self.resourcePlan.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.copyFrom = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMCreateResourcePlanRequest')
        if self.resourcePlan is not None:
            oprot.writeFieldBegin('resourcePlan', TType.STRUCT, 1)
            self.resourcePlan.write(oprot)
            oprot.writeFieldEnd()
        if self.copyFrom is not None:
            oprot.writeFieldBegin('copyFrom', TType.STRING, 2)
            oprot.writeString(self.copyFrom.encode('utf-8') if sys.version_info[0] == 2 else self.copyFrom)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMCreateResourcePlanResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMCreateResourcePlanResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMGetActiveResourcePlanRequest(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMGetActiveResourcePlanRequest')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMGetActiveResourcePlanResponse(object):
    """
    Attributes:
     - resourcePlan

    """


    def __init__(self, resourcePlan=None,):
        self.resourcePlan = resourcePlan

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlan = WMFullResourcePlan()
                    self.resourcePlan.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMGetActiveResourcePlanResponse')
        if self.resourcePlan is not None:
            oprot.writeFieldBegin('resourcePlan', TType.STRUCT, 1)
            self.resourcePlan.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMGetResourcePlanRequest(object):
    """
    Attributes:
     - resourcePlanName

    """


    def __init__(self, resourcePlanName=None,):
        self.resourcePlanName = resourcePlanName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMGetResourcePlanRequest')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMGetResourcePlanResponse(object):
    """
    Attributes:
     - resourcePlan

    """


    def __init__(self, resourcePlan=None,):
        self.resourcePlan = resourcePlan

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlan = WMFullResourcePlan()
                    self.resourcePlan.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMGetResourcePlanResponse')
        if self.resourcePlan is not None:
            oprot.writeFieldBegin('resourcePlan', TType.STRUCT, 1)
            self.resourcePlan.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMGetAllResourcePlanRequest(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMGetAllResourcePlanRequest')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMGetAllResourcePlanResponse(object):
    """
    Attributes:
     - resourcePlans

    """


    def __init__(self, resourcePlans=None,):
        self.resourcePlans = resourcePlans

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlans = []
                    (_etype770, _size767) = iprot.readListBegin()
                    for _i771 in range(_size767):
                        _elem772 = WMResourcePlan()
                        _elem772.read(iprot)
                        self.resourcePlans.append(_elem772)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMGetAllResourcePlanResponse')
        if self.resourcePlans is not None:
            oprot.writeFieldBegin('resourcePlans', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.resourcePlans))
            for iter773 in self.resourcePlans:
                iter773.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMAlterResourcePlanRequest(object):
    """
    Attributes:
     - resourcePlanName
     - resourcePlan
     - isEnableAndActivate
     - isForceDeactivate
     - isReplace

    """


    def __init__(self, resourcePlanName=None, resourcePlan=None, isEnableAndActivate=None, isForceDeactivate=None, isReplace=None,):
        self.resourcePlanName = resourcePlanName
        self.resourcePlan = resourcePlan
        self.isEnableAndActivate = isEnableAndActivate
        self.isForceDeactivate = isForceDeactivate
        self.isReplace = isReplace

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.resourcePlan = WMNullableResourcePlan()
                    self.resourcePlan.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.isEnableAndActivate = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.isForceDeactivate = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.BOOL:
                    self.isReplace = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMAlterResourcePlanRequest')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        if self.resourcePlan is not None:
            oprot.writeFieldBegin('resourcePlan', TType.STRUCT, 2)
            self.resourcePlan.write(oprot)
            oprot.writeFieldEnd()
        if self.isEnableAndActivate is not None:
            oprot.writeFieldBegin('isEnableAndActivate', TType.BOOL, 3)
            oprot.writeBool(self.isEnableAndActivate)
            oprot.writeFieldEnd()
        if self.isForceDeactivate is not None:
            oprot.writeFieldBegin('isForceDeactivate', TType.BOOL, 4)
            oprot.writeBool(self.isForceDeactivate)
            oprot.writeFieldEnd()
        if self.isReplace is not None:
            oprot.writeFieldBegin('isReplace', TType.BOOL, 5)
            oprot.writeBool(self.isReplace)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMAlterResourcePlanResponse(object):
    """
    Attributes:
     - fullResourcePlan

    """


    def __init__(self, fullResourcePlan=None,):
        self.fullResourcePlan = fullResourcePlan

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.fullResourcePlan = WMFullResourcePlan()
                    self.fullResourcePlan.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMAlterResourcePlanResponse')
        if self.fullResourcePlan is not None:
            oprot.writeFieldBegin('fullResourcePlan', TType.STRUCT, 1)
            self.fullResourcePlan.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMValidateResourcePlanRequest(object):
    """
    Attributes:
     - resourcePlanName

    """


    def __init__(self, resourcePlanName=None,):
        self.resourcePlanName = resourcePlanName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMValidateResourcePlanRequest')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMValidateResourcePlanResponse(object):
    """
    Attributes:
     - errors
     - warnings

    """


    def __init__(self, errors=None, warnings=None,):
        self.errors = errors
        self.warnings = warnings

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.errors = []
                    (_etype777, _size774) = iprot.readListBegin()
                    for _i778 in range(_size774):
                        _elem779 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.errors.append(_elem779)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.warnings = []
                    (_etype783, _size780) = iprot.readListBegin()
                    for _i784 in range(_size780):
                        _elem785 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.warnings.append(_elem785)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMValidateResourcePlanResponse')
        if self.errors is not None:
            oprot.writeFieldBegin('errors', TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.errors))
            for iter786 in self.errors:
                oprot.writeString(iter786.encode('utf-8') if sys.version_info[0] == 2 else iter786)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.warnings is not None:
            oprot.writeFieldBegin('warnings', TType.LIST, 2)
            oprot.writeListBegin(TType.STRING, len(self.warnings))
            for iter787 in self.warnings:
                oprot.writeString(iter787.encode('utf-8') if sys.version_info[0] == 2 else iter787)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMDropResourcePlanRequest(object):
    """
    Attributes:
     - resourcePlanName

    """


    def __init__(self, resourcePlanName=None,):
        self.resourcePlanName = resourcePlanName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMDropResourcePlanRequest')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMDropResourcePlanResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMDropResourcePlanResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMCreateTriggerRequest(object):
    """
    Attributes:
     - trigger

    """


    def __init__(self, trigger=None,):
        self.trigger = trigger

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.trigger = WMTrigger()
                    self.trigger.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMCreateTriggerRequest')
        if self.trigger is not None:
            oprot.writeFieldBegin('trigger', TType.STRUCT, 1)
            self.trigger.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMCreateTriggerResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMCreateTriggerResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMAlterTriggerRequest(object):
    """
    Attributes:
     - trigger

    """


    def __init__(self, trigger=None,):
        self.trigger = trigger

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.trigger = WMTrigger()
                    self.trigger.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMAlterTriggerRequest')
        if self.trigger is not None:
            oprot.writeFieldBegin('trigger', TType.STRUCT, 1)
            self.trigger.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMAlterTriggerResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMAlterTriggerResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMDropTriggerRequest(object):
    """
    Attributes:
     - resourcePlanName
     - triggerName

    """


    def __init__(self, resourcePlanName=None, triggerName=None,):
        self.resourcePlanName = resourcePlanName
        self.triggerName = triggerName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.triggerName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMDropTriggerRequest')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        if self.triggerName is not None:
            oprot.writeFieldBegin('triggerName', TType.STRING, 2)
            oprot.writeString(self.triggerName.encode('utf-8') if sys.version_info[0] == 2 else self.triggerName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMDropTriggerResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMDropTriggerResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMGetTriggersForResourePlanRequest(object):
    """
    Attributes:
     - resourcePlanName

    """


    def __init__(self, resourcePlanName=None,):
        self.resourcePlanName = resourcePlanName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMGetTriggersForResourePlanRequest')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMGetTriggersForResourePlanResponse(object):
    """
    Attributes:
     - triggers

    """


    def __init__(self, triggers=None,):
        self.triggers = triggers

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.triggers = []
                    (_etype791, _size788) = iprot.readListBegin()
                    for _i792 in range(_size788):
                        _elem793 = WMTrigger()
                        _elem793.read(iprot)
                        self.triggers.append(_elem793)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMGetTriggersForResourePlanResponse')
        if self.triggers is not None:
            oprot.writeFieldBegin('triggers', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.triggers))
            for iter794 in self.triggers:
                iter794.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMCreatePoolRequest(object):
    """
    Attributes:
     - pool

    """


    def __init__(self, pool=None,):
        self.pool = pool

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.pool = WMPool()
                    self.pool.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMCreatePoolRequest')
        if self.pool is not None:
            oprot.writeFieldBegin('pool', TType.STRUCT, 1)
            self.pool.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMCreatePoolResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMCreatePoolResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMAlterPoolRequest(object):
    """
    Attributes:
     - pool
     - poolPath

    """


    def __init__(self, pool=None, poolPath=None,):
        self.pool = pool
        self.poolPath = poolPath

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.pool = WMNullablePool()
                    self.pool.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.poolPath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMAlterPoolRequest')
        if self.pool is not None:
            oprot.writeFieldBegin('pool', TType.STRUCT, 1)
            self.pool.write(oprot)
            oprot.writeFieldEnd()
        if self.poolPath is not None:
            oprot.writeFieldBegin('poolPath', TType.STRING, 2)
            oprot.writeString(self.poolPath.encode('utf-8') if sys.version_info[0] == 2 else self.poolPath)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMAlterPoolResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMAlterPoolResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMDropPoolRequest(object):
    """
    Attributes:
     - resourcePlanName
     - poolPath

    """


    def __init__(self, resourcePlanName=None, poolPath=None,):
        self.resourcePlanName = resourcePlanName
        self.poolPath = poolPath

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.poolPath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMDropPoolRequest')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        if self.poolPath is not None:
            oprot.writeFieldBegin('poolPath', TType.STRING, 2)
            oprot.writeString(self.poolPath.encode('utf-8') if sys.version_info[0] == 2 else self.poolPath)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMDropPoolResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMDropPoolResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMCreateOrUpdateMappingRequest(object):
    """
    Attributes:
     - mapping
     - update

    """


    def __init__(self, mapping=None, update=None,):
        self.mapping = mapping
        self.update = update

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.mapping = WMMapping()
                    self.mapping.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.update = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMCreateOrUpdateMappingRequest')
        if self.mapping is not None:
            oprot.writeFieldBegin('mapping', TType.STRUCT, 1)
            self.mapping.write(oprot)
            oprot.writeFieldEnd()
        if self.update is not None:
            oprot.writeFieldBegin('update', TType.BOOL, 2)
            oprot.writeBool(self.update)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMCreateOrUpdateMappingResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMCreateOrUpdateMappingResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMDropMappingRequest(object):
    """
    Attributes:
     - mapping

    """


    def __init__(self, mapping=None,):
        self.mapping = mapping

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.mapping = WMMapping()
                    self.mapping.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMDropMappingRequest')
        if self.mapping is not None:
            oprot.writeFieldBegin('mapping', TType.STRUCT, 1)
            self.mapping.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMDropMappingResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMDropMappingResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMCreateOrDropTriggerToPoolMappingRequest(object):
    """
    Attributes:
     - resourcePlanName
     - triggerName
     - poolPath
     - drop

    """


    def __init__(self, resourcePlanName=None, triggerName=None, poolPath=None, drop=None,):
        self.resourcePlanName = resourcePlanName
        self.triggerName = triggerName
        self.poolPath = poolPath
        self.drop = drop

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.resourcePlanName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.triggerName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.poolPath = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.drop = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMCreateOrDropTriggerToPoolMappingRequest')
        if self.resourcePlanName is not None:
            oprot.writeFieldBegin('resourcePlanName', TType.STRING, 1)
            oprot.writeString(self.resourcePlanName.encode('utf-8') if sys.version_info[0] == 2 else self.resourcePlanName)
            oprot.writeFieldEnd()
        if self.triggerName is not None:
            oprot.writeFieldBegin('triggerName', TType.STRING, 2)
            oprot.writeString(self.triggerName.encode('utf-8') if sys.version_info[0] == 2 else self.triggerName)
            oprot.writeFieldEnd()
        if self.poolPath is not None:
            oprot.writeFieldBegin('poolPath', TType.STRING, 3)
            oprot.writeString(self.poolPath.encode('utf-8') if sys.version_info[0] == 2 else self.poolPath)
            oprot.writeFieldEnd()
        if self.drop is not None:
            oprot.writeFieldBegin('drop', TType.BOOL, 4)
            oprot.writeBool(self.drop)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 WMCreateOrDropTriggerToPoolMappingResponse(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('WMCreateOrDropTriggerToPoolMappingResponse')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ISchema(object):
    """
    Attributes:
     - schemaType
     - name
     - catName
     - dbName
     - compatibility
     - validationLevel
     - canEvolve
     - schemaGroup
     - description

    """


    def __init__(self, schemaType=None, name=None, catName=None, dbName=None, compatibility=None, validationLevel=None, canEvolve=None, schemaGroup=None, description=None,):
        self.schemaType = schemaType
        self.name = name
        self.catName = catName
        self.dbName = dbName
        self.compatibility = compatibility
        self.validationLevel = validationLevel
        self.canEvolve = canEvolve
        self.schemaGroup = schemaGroup
        self.description = description

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.schemaType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.compatibility = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.validationLevel = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.canEvolve = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.schemaGroup = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ISchema')
        if self.schemaType is not None:
            oprot.writeFieldBegin('schemaType', TType.I32, 1)
            oprot.writeI32(self.schemaType)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 3)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 4)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.compatibility is not None:
            oprot.writeFieldBegin('compatibility', TType.I32, 5)
            oprot.writeI32(self.compatibility)
            oprot.writeFieldEnd()
        if self.validationLevel is not None:
            oprot.writeFieldBegin('validationLevel', TType.I32, 6)
            oprot.writeI32(self.validationLevel)
            oprot.writeFieldEnd()
        if self.canEvolve is not None:
            oprot.writeFieldBegin('canEvolve', TType.BOOL, 7)
            oprot.writeBool(self.canEvolve)
            oprot.writeFieldEnd()
        if self.schemaGroup is not None:
            oprot.writeFieldBegin('schemaGroup', TType.STRING, 8)
            oprot.writeString(self.schemaGroup.encode('utf-8') if sys.version_info[0] == 2 else self.schemaGroup)
            oprot.writeFieldEnd()
        if self.description is not None:
            oprot.writeFieldBegin('description', TType.STRING, 9)
            oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ISchemaName(object):
    """
    Attributes:
     - catName
     - dbName
     - schemaName

    """


    def __init__(self, catName=None, dbName=None, schemaName=None,):
        self.catName = catName
        self.dbName = dbName
        self.schemaName = schemaName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.catName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.dbName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.schemaName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ISchemaName')
        if self.catName is not None:
            oprot.writeFieldBegin('catName', TType.STRING, 1)
            oprot.writeString(self.catName.encode('utf-8') if sys.version_info[0] == 2 else self.catName)
            oprot.writeFieldEnd()
        if self.dbName is not None:
            oprot.writeFieldBegin('dbName', TType.STRING, 2)
            oprot.writeString(self.dbName.encode('utf-8') if sys.version_info[0] == 2 else self.dbName)
            oprot.writeFieldEnd()
        if self.schemaName is not None:
            oprot.writeFieldBegin('schemaName', TType.STRING, 3)
            oprot.writeString(self.schemaName.encode('utf-8') if sys.version_info[0] == 2 else self.schemaName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AlterISchemaRequest(object):
    """
    Attributes:
     - name
     - newSchema

    """


    def __init__(self, name=None, newSchema=None,):
        self.name = name
        self.newSchema = newSchema

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.name = ISchemaName()
                    self.name.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.newSchema = ISchema()
                    self.newSchema.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AlterISchemaRequest')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRUCT, 1)
            self.name.write(oprot)
            oprot.writeFieldEnd()
        if self.newSchema is not None:
            oprot.writeFieldBegin('newSchema', TType.STRUCT, 3)
            self.newSchema.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 SchemaVersion(object):
    """
    Attributes:
     - schema
     - version
     - createdAt
     - cols
     - state
     - description
     - schemaText
     - fingerprint
     - name
     - serDe

    """


    def __init__(self, schema=None, version=None, createdAt=None, cols=None, state=None, description=None, schemaText=None, fingerprint=None, name=None, serDe=None,):
        self.schema = schema
        self.version = version
        self.createdAt = createdAt
        self.cols = cols
        self.state = state
        self.description = description
        self.schemaText = schemaText
        self.fingerprint = fingerprint
        self.name = name
        self.serDe = serDe

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.schema = ISchemaName()
                    self.schema.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.version = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.createdAt = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.cols = []
                    (_etype798, _size795) = iprot.readListBegin()
                    for _i799 in range(_size795):
                        _elem800 = FieldSchema()
                        _elem800.read(iprot)
                        self.cols.append(_elem800)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.schemaText = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.fingerprint = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRUCT:
                    self.serDe = SerDeInfo()
                    self.serDe.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SchemaVersion')
        if self.schema is not None:
            oprot.writeFieldBegin('schema', TType.STRUCT, 1)
            self.schema.write(oprot)
            oprot.writeFieldEnd()
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.I32, 2)
            oprot.writeI32(self.version)
            oprot.writeFieldEnd()
        if self.createdAt is not None:
            oprot.writeFieldBegin('createdAt', TType.I64, 3)
            oprot.writeI64(self.createdAt)
            oprot.writeFieldEnd()
        if self.cols is not None:
            oprot.writeFieldBegin('cols', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.cols))
            for iter801 in self.cols:
                iter801.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 5)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.description is not None:
            oprot.writeFieldBegin('description', TType.STRING, 6)
            oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description)
            oprot.writeFieldEnd()
        if self.schemaText is not None:
            oprot.writeFieldBegin('schemaText', TType.STRING, 7)
            oprot.writeString(self.schemaText.encode('utf-8') if sys.version_info[0] == 2 else self.schemaText)
            oprot.writeFieldEnd()
        if self.fingerprint is not None:
            oprot.writeFieldBegin('fingerprint', TType.STRING, 8)
            oprot.writeString(self.fingerprint.encode('utf-8') if sys.version_info[0] == 2 else self.fingerprint)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 9)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.serDe is not None:
            oprot.writeFieldBegin('serDe', TType.STRUCT, 10)
            self.serDe.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 SchemaVersionDescriptor(object):
    """
    Attributes:
     - schema
     - version

    """


    def __init__(self, schema=None, version=None,):
        self.schema = schema
        self.version = version

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.schema = ISchemaName()
                    self.schema.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.version = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SchemaVersionDescriptor')
        if self.schema is not None:
            oprot.writeFieldBegin('schema', TType.STRUCT, 1)
            self.schema.write(oprot)
            oprot.writeFieldEnd()
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.I32, 2)
            oprot.writeI32(self.version)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 FindSchemasByColsRqst(object):
    """
    Attributes:
     - colName
     - colNamespace
     - type

    """


    def __init__(self, colName=None, colNamespace=None, type=None,):
        self.colName = colName
        self.colNamespace = colNamespace
        self.type = type

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.colName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.colNamespace = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('FindSchemasByColsRqst')
        if self.colName is not None:
            oprot.writeFieldBegin('colName', TType.STRING, 1)
            oprot.writeString(self.colName.encode('utf-8') if sys.version_info[0] == 2 else self.colName)
            oprot.writeFieldEnd()
        if self.colNamespace is not None:
            oprot.writeFieldBegin('colNamespace', TType.STRING, 2)
            oprot.writeString(self.colNamespace.encode('utf-8') if sys.version_info[0] == 2 else self.colNamespace)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.STRING, 3)
            oprot.writeString(self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 FindSchemasByColsResp(object):
    """
    Attributes:
     - schemaVersions

    """


    def __init__(self, schemaVersions=None,):
        self.schemaVersions = schemaVersions

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.schemaVersions = []
                    (_etype805, _size802) = iprot.readListBegin()
                    for _i806 in range(_size802):
                        _elem807 = SchemaVersionDescriptor()
                        _elem807.read(iprot)
                        self.schemaVersions.append(_elem807)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('FindSchemasByColsResp')
        if self.schemaVersions is not None:
            oprot.writeFieldBegin('schemaVersions', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.schemaVersions))
            for iter808 in self.schemaVersions:
                iter808.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 MapSchemaVersionToSerdeRequest(object):
    """
    Attributes:
     - schemaVersion
     - serdeName

    """


    def __init__(self, schemaVersion=None, serdeName=None,):
        self.schemaVersion = schemaVersion
        self.serdeName = serdeName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.schemaVersion = SchemaVersionDescriptor()
                    self.schemaVersion.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.serdeName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('MapSchemaVersionToSerdeRequest')
        if self.schemaVersion is not None:
            oprot.writeFieldBegin('schemaVersion', TType.STRUCT, 1)
            self.schemaVersion.write(oprot)
            oprot.writeFieldEnd()
        if self.serdeName is not None:
            oprot.writeFieldBegin('serdeName', TType.STRING, 2)
            oprot.writeString(self.serdeName.encode('utf-8') if sys.version_info[0] == 2 else self.serdeName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 SetSchemaVersionStateRequest(object):
    """
    Attributes:
     - schemaVersion
     - state

    """


    def __init__(self, schemaVersion=None, state=None,):
        self.schemaVersion = schemaVersion
        self.state = state

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.schemaVersion = SchemaVersionDescriptor()
                    self.schemaVersion.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('SetSchemaVersionStateRequest')
        if self.schemaVersion is not None:
            oprot.writeFieldBegin('schemaVersion', TType.STRUCT, 1)
            self.schemaVersion.write(oprot)
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 2)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetSerdeRequest(object):
    """
    Attributes:
     - serdeName

    """


    def __init__(self, serdeName=None,):
        self.serdeName = serdeName

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.serdeName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetSerdeRequest')
        if self.serdeName is not None:
            oprot.writeFieldBegin('serdeName', TType.STRING, 1)
            oprot.writeString(self.serdeName.encode('utf-8') if sys.version_info[0] == 2 else self.serdeName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 RuntimeStat(object):
    """
    Attributes:
     - createTime
     - weight
     - payload

    """


    def __init__(self, createTime=None, weight=None, payload=None,):
        self.createTime = createTime
        self.weight = weight
        self.payload = payload

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.createTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.weight = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.payload = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('RuntimeStat')
        if self.createTime is not None:
            oprot.writeFieldBegin('createTime', TType.I32, 1)
            oprot.writeI32(self.createTime)
            oprot.writeFieldEnd()
        if self.weight is not None:
            oprot.writeFieldBegin('weight', TType.I32, 2)
            oprot.writeI32(self.weight)
            oprot.writeFieldEnd()
        if self.payload is not None:
            oprot.writeFieldBegin('payload', TType.STRING, 3)
            oprot.writeBinary(self.payload)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.weight is None:
            raise TProtocolException(message='Required field weight is unset!')
        if self.payload is None:
            raise TProtocolException(message='Required field payload is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 GetRuntimeStatsRequest(object):
    """
    Attributes:
     - maxWeight
     - maxCreateTime

    """


    def __init__(self, maxWeight=None, maxCreateTime=None,):
        self.maxWeight = maxWeight
        self.maxCreateTime = maxCreateTime

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.maxWeight = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.maxCreateTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('GetRuntimeStatsRequest')
        if self.maxWeight is not None:
            oprot.writeFieldBegin('maxWeight', TType.I32, 1)
            oprot.writeI32(self.maxWeight)
            oprot.writeFieldEnd()
        if self.maxCreateTime is not None:
            oprot.writeFieldBegin('maxCreateTime', TType.I32, 2)
            oprot.writeI32(self.maxCreateTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.maxWeight is None:
            raise TProtocolException(message='Required field maxWeight is unset!')
        if self.maxCreateTime is None:
            raise TProtocolException(message='Required field maxCreateTime is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 MetaException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(MetaException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('MetaException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 UnknownTableException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(UnknownTableException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('UnknownTableException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 UnknownDBException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(UnknownDBException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('UnknownDBException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AlreadyExistsException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(AlreadyExistsException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AlreadyExistsException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 InvalidPartitionException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(InvalidPartitionException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('InvalidPartitionException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 UnknownPartitionException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(UnknownPartitionException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('UnknownPartitionException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 InvalidObjectException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(InvalidObjectException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('InvalidObjectException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 NoSuchObjectException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(NoSuchObjectException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('NoSuchObjectException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 InvalidOperationException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(InvalidOperationException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('InvalidOperationException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ConfigValSecurityException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(ConfigValSecurityException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ConfigValSecurityException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 InvalidInputException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(InvalidInputException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('InvalidInputException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 NoSuchTxnException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(NoSuchTxnException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('NoSuchTxnException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 TxnAbortedException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(TxnAbortedException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('TxnAbortedException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 TxnOpenException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(TxnOpenException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('TxnOpenException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 NoSuchLockException(TException):
    """
    Attributes:
     - message

    """


    def __init__(self, message=None,):
        super(NoSuchLockException, self).__setattr__('message', message)

    def __setattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __delattr__(self, *args):
        raise TypeError("can't modify immutable instance")

    def __hash__(self):
        return hash(self.__class__) ^ hash((self.message, ))

    @classmethod
    def read(cls, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None:
            return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec])
        iprot.readStructBegin()
        message = None
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()
        return cls(
            message=message,
        )

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('NoSuchLockException')
        if self.message is not None:
            oprot.writeFieldBegin('message', TType.STRING, 1)
            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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)
all_structs.append(Version)
Version.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'version', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'comments', 'UTF8', None, ),  # 2
)
all_structs.append(FieldSchema)
FieldSchema.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'type', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'comment', 'UTF8', None, ),  # 3
)
all_structs.append(SQLPrimaryKey)
SQLPrimaryKey.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'table_db', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'table_name', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'column_name', 'UTF8', None, ),  # 3
    (4, TType.I32, 'key_seq', None, None, ),  # 4
    (5, TType.STRING, 'pk_name', 'UTF8', 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
    (9, TType.STRING, 'catName', 'UTF8', None, ),  # 9
)
all_structs.append(SQLForeignKey)
SQLForeignKey.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'pktable_db', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'pktable_name', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'pkcolumn_name', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'fktable_db', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'fktable_name', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'fkcolumn_name', 'UTF8', 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', 'UTF8', None, ),  # 10
    (11, TType.STRING, 'pk_name', 'UTF8', 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
    (15, TType.STRING, 'catName', 'UTF8', None, ),  # 15
)
all_structs.append(SQLUniqueConstraint)
SQLUniqueConstraint.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'catName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'table_db', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'table_name', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'column_name', 'UTF8', None, ),  # 4
    (5, TType.I32, 'key_seq', None, None, ),  # 5
    (6, TType.STRING, 'uk_name', 'UTF8', None, ),  # 6
    (7, TType.BOOL, 'enable_cstr', None, None, ),  # 7
    (8, TType.BOOL, 'validate_cstr', None, None, ),  # 8
    (9, TType.BOOL, 'rely_cstr', None, None, ),  # 9
)
all_structs.append(SQLNotNullConstraint)
SQLNotNullConstraint.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'catName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'table_db', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'table_name', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'column_name', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'nn_name', 'UTF8', 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
)
all_structs.append(SQLDefaultConstraint)
SQLDefaultConstraint.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'catName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'table_db', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'table_name', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'column_name', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'default_value', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'dc_name', 'UTF8', None, ),  # 6
    (7, TType.BOOL, 'enable_cstr', None, None, ),  # 7
    (8, TType.BOOL, 'validate_cstr', None, None, ),  # 8
    (9, TType.BOOL, 'rely_cstr', None, None, ),  # 9
)
all_structs.append(SQLCheckConstraint)
SQLCheckConstraint.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'catName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'table_db', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'table_name', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'column_name', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'check_expression', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'dc_name', 'UTF8', None, ),  # 6
    (7, TType.BOOL, 'enable_cstr', None, None, ),  # 7
    (8, TType.BOOL, 'validate_cstr', None, None, ),  # 8
    (9, TType.BOOL, 'rely_cstr', None, None, ),  # 9
)
all_structs.append(Type)
Type.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'type1', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'type2', 'UTF8', None, ),  # 3
    (4, TType.LIST, 'fields', (TType.STRUCT, [FieldSchema, None], False), None, ),  # 4
)
all_structs.append(HiveObjectRef)
HiveObjectRef.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'objectType', None, None, ),  # 1
    (2, TType.STRING, 'dbName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'objectName', 'UTF8', None, ),  # 3
    (4, TType.LIST, 'partValues', (TType.STRING, 'UTF8', False), None, ),  # 4
    (5, TType.STRING, 'columnName', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'catName', 'UTF8', None, ),  # 6
)
all_structs.append(PrivilegeGrantInfo)
PrivilegeGrantInfo.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'privilege', 'UTF8', None, ),  # 1
    (2, TType.I32, 'createTime', None, None, ),  # 2
    (3, TType.STRING, 'grantor', 'UTF8', None, ),  # 3
    (4, TType.I32, 'grantorType', None, None, ),  # 4
    (5, TType.BOOL, 'grantOption', None, None, ),  # 5
)
all_structs.append(HiveObjectPrivilege)
HiveObjectPrivilege.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'hiveObject', [HiveObjectRef, None], None, ),  # 1
    (2, TType.STRING, 'principalName', 'UTF8', None, ),  # 2
    (3, TType.I32, 'principalType', None, None, ),  # 3
    (4, TType.STRUCT, 'grantInfo', [PrivilegeGrantInfo, None], None, ),  # 4
    (5, TType.STRING, 'authorizer', 'UTF8', None, ),  # 5
)
all_structs.append(PrivilegeBag)
PrivilegeBag.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'privileges', (TType.STRUCT, [HiveObjectPrivilege, None], False), None, ),  # 1
)
all_structs.append(PrincipalPrivilegeSet)
PrincipalPrivilegeSet.thrift_spec = (
    None,  # 0
    (1, TType.MAP, 'userPrivileges', (TType.STRING, 'UTF8', TType.LIST, (TType.STRUCT, [PrivilegeGrantInfo, None], False), False), None, ),  # 1
    (2, TType.MAP, 'groupPrivileges', (TType.STRING, 'UTF8', TType.LIST, (TType.STRUCT, [PrivilegeGrantInfo, None], False), False), None, ),  # 2
    (3, TType.MAP, 'rolePrivileges', (TType.STRING, 'UTF8', TType.LIST, (TType.STRUCT, [PrivilegeGrantInfo, None], False), False), None, ),  # 3
)
all_structs.append(GrantRevokePrivilegeRequest)
GrantRevokePrivilegeRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'requestType', None, None, ),  # 1
    (2, TType.STRUCT, 'privileges', [PrivilegeBag, None], None, ),  # 2
    (3, TType.BOOL, 'revokeGrantOption', None, None, ),  # 3
)
all_structs.append(GrantRevokePrivilegeResponse)
GrantRevokePrivilegeResponse.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'success', None, None, ),  # 1
)
all_structs.append(Role)
Role.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'roleName', 'UTF8', None, ),  # 1
    (2, TType.I32, 'createTime', None, None, ),  # 2
    (3, TType.STRING, 'ownerName', 'UTF8', None, ),  # 3
)
all_structs.append(RolePrincipalGrant)
RolePrincipalGrant.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'roleName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'principalName', 'UTF8', 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', 'UTF8', None, ),  # 6
    (7, TType.I32, 'grantorPrincipalType', None, None, ),  # 7
)
all_structs.append(GetRoleGrantsForPrincipalRequest)
GetRoleGrantsForPrincipalRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'principal_name', 'UTF8', None, ),  # 1
    (2, TType.I32, 'principal_type', None, None, ),  # 2
)
all_structs.append(GetRoleGrantsForPrincipalResponse)
GetRoleGrantsForPrincipalResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'principalGrants', (TType.STRUCT, [RolePrincipalGrant, None], False), None, ),  # 1
)
all_structs.append(GetPrincipalsInRoleRequest)
GetPrincipalsInRoleRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'roleName', 'UTF8', None, ),  # 1
)
all_structs.append(GetPrincipalsInRoleResponse)
GetPrincipalsInRoleResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'principalGrants', (TType.STRUCT, [RolePrincipalGrant, None], False), None, ),  # 1
)
all_structs.append(GrantRevokeRoleRequest)
GrantRevokeRoleRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'requestType', None, None, ),  # 1
    (2, TType.STRING, 'roleName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'principalName', 'UTF8', None, ),  # 3
    (4, TType.I32, 'principalType', None, None, ),  # 4
    (5, TType.STRING, 'grantor', 'UTF8', None, ),  # 5
    (6, TType.I32, 'grantorType', None, None, ),  # 6
    (7, TType.BOOL, 'grantOption', None, None, ),  # 7
)
all_structs.append(GrantRevokeRoleResponse)
GrantRevokeRoleResponse.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'success', None, None, ),  # 1
)
all_structs.append(Catalog)
Catalog.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'description', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'locationUri', 'UTF8', None, ),  # 3
)
all_structs.append(CreateCatalogRequest)
CreateCatalogRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'catalog', [Catalog, None], None, ),  # 1
)
all_structs.append(AlterCatalogRequest)
AlterCatalogRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'newCat', [Catalog, None], None, ),  # 2
)
all_structs.append(GetCatalogRequest)
GetCatalogRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
)
all_structs.append(GetCatalogResponse)
GetCatalogResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'catalog', [Catalog, None], None, ),  # 1
)
all_structs.append(GetCatalogsResponse)
GetCatalogsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'names', (TType.STRING, 'UTF8', False), None, ),  # 1
)
all_structs.append(DropCatalogRequest)
DropCatalogRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
)
all_structs.append(Database)
Database.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'description', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'locationUri', 'UTF8', None, ),  # 3
    (4, TType.MAP, 'parameters', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 4
    (5, TType.STRUCT, 'privileges', [PrincipalPrivilegeSet, None], None, ),  # 5
    (6, TType.STRING, 'ownerName', 'UTF8', None, ),  # 6
    (7, TType.I32, 'ownerType', None, None, ),  # 7
    (8, TType.STRING, 'catalogName', 'UTF8', None, ),  # 8
)
all_structs.append(SerDeInfo)
SerDeInfo.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'serializationLib', 'UTF8', None, ),  # 2
    (3, TType.MAP, 'parameters', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 3
    (4, TType.STRING, 'description', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'serializerClass', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'deserializerClass', 'UTF8', None, ),  # 6
    (7, TType.I32, 'serdeType', None, None, ),  # 7
)
all_structs.append(Order)
Order.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'col', 'UTF8', None, ),  # 1
    (2, TType.I32, 'order', None, None, ),  # 2
)
all_structs.append(SkewedInfo)
SkewedInfo.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'skewedColNames', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.LIST, 'skewedColValues', (TType.LIST, (TType.STRING, 'UTF8', False), False), None, ),  # 2
    (3, TType.MAP, 'skewedColValueLocationMaps', (TType.LIST, (TType.STRING, 'UTF8', False), TType.STRING, 'UTF8', False), None, ),  # 3
)
all_structs.append(StorageDescriptor)
StorageDescriptor.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'cols', (TType.STRUCT, [FieldSchema, None], False), None, ),  # 1
    (2, TType.STRING, 'location', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'inputFormat', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'outputFormat', 'UTF8', None, ),  # 4
    (5, TType.BOOL, 'compressed', None, None, ),  # 5
    (6, TType.I32, 'numBuckets', None, None, ),  # 6
    (7, TType.STRUCT, 'serdeInfo', [SerDeInfo, None], None, ),  # 7
    (8, TType.LIST, 'bucketCols', (TType.STRING, 'UTF8', False), None, ),  # 8
    (9, TType.LIST, 'sortCols', (TType.STRUCT, [Order, None], False), None, ),  # 9
    (10, TType.MAP, 'parameters', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 10
    (11, TType.STRUCT, 'skewedInfo', [SkewedInfo, None], None, ),  # 11
    (12, TType.BOOL, 'storedAsSubDirectories', None, None, ),  # 12
)
all_structs.append(Table)
Table.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'tableName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'dbName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'owner', 'UTF8', None, ),  # 3
    (4, TType.I32, 'createTime', None, None, ),  # 4
    (5, TType.I32, 'lastAccessTime', None, None, ),  # 5
    (6, TType.I32, 'retention', None, None, ),  # 6
    (7, TType.STRUCT, 'sd', [StorageDescriptor, None], None, ),  # 7
    (8, TType.LIST, 'partitionKeys', (TType.STRUCT, [FieldSchema, None], False), None, ),  # 8
    (9, TType.MAP, 'parameters', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 9
    (10, TType.STRING, 'viewOriginalText', 'UTF8', None, ),  # 10
    (11, TType.STRING, 'viewExpandedText', 'UTF8', None, ),  # 11
    (12, TType.STRING, 'tableType', 'UTF8', None, ),  # 12
    (13, TType.STRUCT, 'privileges', [PrincipalPrivilegeSet, None], None, ),  # 13
    (14, TType.BOOL, 'temporary', None, False, ),  # 14
    (15, TType.BOOL, 'rewriteEnabled', None, None, ),  # 15
    (16, TType.STRUCT, 'creationMetadata', [CreationMetadata, None], None, ),  # 16
    (17, TType.STRING, 'catName', 'UTF8', None, ),  # 17
    (18, TType.I32, 'ownerType', None, 1, ),  # 18
)
all_structs.append(Partition)
Partition.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'values', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.STRING, 'dbName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'tableName', 'UTF8', None, ),  # 3
    (4, TType.I32, 'createTime', None, None, ),  # 4
    (5, TType.I32, 'lastAccessTime', None, None, ),  # 5
    (6, TType.STRUCT, 'sd', [StorageDescriptor, None], None, ),  # 6
    (7, TType.MAP, 'parameters', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 7
    (8, TType.STRUCT, 'privileges', [PrincipalPrivilegeSet, None], None, ),  # 8
    (9, TType.STRING, 'catName', 'UTF8', None, ),  # 9
)
all_structs.append(PartitionWithoutSD)
PartitionWithoutSD.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'values', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.I32, 'createTime', None, None, ),  # 2
    (3, TType.I32, 'lastAccessTime', None, None, ),  # 3
    (4, TType.STRING, 'relativePath', 'UTF8', None, ),  # 4
    (5, TType.MAP, 'parameters', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 5
    (6, TType.STRUCT, 'privileges', [PrincipalPrivilegeSet, None], None, ),  # 6
)
all_structs.append(PartitionSpecWithSharedSD)
PartitionSpecWithSharedSD.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'partitions', (TType.STRUCT, [PartitionWithoutSD, None], False), None, ),  # 1
    (2, TType.STRUCT, 'sd', [StorageDescriptor, None], None, ),  # 2
)
all_structs.append(PartitionListComposingSpec)
PartitionListComposingSpec.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'partitions', (TType.STRUCT, [Partition, None], False), None, ),  # 1
)
all_structs.append(PartitionSpec)
PartitionSpec.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tableName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'rootPath', 'UTF8', None, ),  # 3
    (4, TType.STRUCT, 'sharedSDPartitionSpec', [PartitionSpecWithSharedSD, None], None, ),  # 4
    (5, TType.STRUCT, 'partitionList', [PartitionListComposingSpec, None], None, ),  # 5
    (6, TType.STRING, 'catName', 'UTF8', None, ),  # 6
)
all_structs.append(BooleanColumnStatsData)
BooleanColumnStatsData.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'numTrues', None, None, ),  # 1
    (2, TType.I64, 'numFalses', None, None, ),  # 2
    (3, TType.I64, 'numNulls', None, None, ),  # 3
    (4, TType.STRING, 'bitVectors', 'BINARY', None, ),  # 4
)
all_structs.append(DoubleColumnStatsData)
DoubleColumnStatsData.thrift_spec = (
    None,  # 0
    (1, TType.DOUBLE, 'lowValue', None, None, ),  # 1
    (2, TType.DOUBLE, 'highValue', None, None, ),  # 2
    (3, TType.I64, 'numNulls', None, None, ),  # 3
    (4, TType.I64, 'numDVs', None, None, ),  # 4
    (5, TType.STRING, 'bitVectors', 'BINARY', None, ),  # 5
)
all_structs.append(LongColumnStatsData)
LongColumnStatsData.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'lowValue', None, None, ),  # 1
    (2, TType.I64, 'highValue', None, None, ),  # 2
    (3, TType.I64, 'numNulls', None, None, ),  # 3
    (4, TType.I64, 'numDVs', None, None, ),  # 4
    (5, TType.STRING, 'bitVectors', 'BINARY', None, ),  # 5
)
all_structs.append(StringColumnStatsData)
StringColumnStatsData.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'maxColLen', None, None, ),  # 1
    (2, TType.DOUBLE, 'avgColLen', None, None, ),  # 2
    (3, TType.I64, 'numNulls', None, None, ),  # 3
    (4, TType.I64, 'numDVs', None, None, ),  # 4
    (5, TType.STRING, 'bitVectors', 'BINARY', None, ),  # 5
)
all_structs.append(BinaryColumnStatsData)
BinaryColumnStatsData.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'maxColLen', None, None, ),  # 1
    (2, TType.DOUBLE, 'avgColLen', None, None, ),  # 2
    (3, TType.I64, 'numNulls', None, None, ),  # 3
    (4, TType.STRING, 'bitVectors', 'BINARY', None, ),  # 4
)
all_structs.append(Decimal)
Decimal.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'unscaled', 'BINARY', None, ),  # 1
    None,  # 2
    (3, TType.I16, 'scale', None, None, ),  # 3
)
all_structs.append(DecimalColumnStatsData)
DecimalColumnStatsData.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'lowValue', [Decimal, None], None, ),  # 1
    (2, TType.STRUCT, 'highValue', [Decimal, None], None, ),  # 2
    (3, TType.I64, 'numNulls', None, None, ),  # 3
    (4, TType.I64, 'numDVs', None, None, ),  # 4
    (5, TType.STRING, 'bitVectors', 'BINARY', None, ),  # 5
)
all_structs.append(Date)
Date.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'daysSinceEpoch', None, None, ),  # 1
)
all_structs.append(DateColumnStatsData)
DateColumnStatsData.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'lowValue', [Date, None], None, ),  # 1
    (2, TType.STRUCT, 'highValue', [Date, None], None, ),  # 2
    (3, TType.I64, 'numNulls', None, None, ),  # 3
    (4, TType.I64, 'numDVs', None, None, ),  # 4
    (5, TType.STRING, 'bitVectors', 'BINARY', None, ),  # 5
)
all_structs.append(ColumnStatisticsData)
ColumnStatisticsData.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'booleanStats', [BooleanColumnStatsData, None], None, ),  # 1
    (2, TType.STRUCT, 'longStats', [LongColumnStatsData, None], None, ),  # 2
    (3, TType.STRUCT, 'doubleStats', [DoubleColumnStatsData, None], None, ),  # 3
    (4, TType.STRUCT, 'stringStats', [StringColumnStatsData, None], None, ),  # 4
    (5, TType.STRUCT, 'binaryStats', [BinaryColumnStatsData, None], None, ),  # 5
    (6, TType.STRUCT, 'decimalStats', [DecimalColumnStatsData, None], None, ),  # 6
    (7, TType.STRUCT, 'dateStats', [DateColumnStatsData, None], None, ),  # 7
)
all_structs.append(ColumnStatisticsObj)
ColumnStatisticsObj.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'colName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'colType', 'UTF8', None, ),  # 2
    (3, TType.STRUCT, 'statsData', [ColumnStatisticsData, None], None, ),  # 3
)
all_structs.append(ColumnStatisticsDesc)
ColumnStatisticsDesc.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'isTblLevel', None, None, ),  # 1
    (2, TType.STRING, 'dbName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'tableName', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'partName', 'UTF8', None, ),  # 4
    (5, TType.I64, 'lastAnalyzed', None, None, ),  # 5
    (6, TType.STRING, 'catName', 'UTF8', None, ),  # 6
)
all_structs.append(ColumnStatistics)
ColumnStatistics.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'statsDesc', [ColumnStatisticsDesc, None], None, ),  # 1
    (2, TType.LIST, 'statsObj', (TType.STRUCT, [ColumnStatisticsObj, None], False), None, ),  # 2
)
all_structs.append(AggrStats)
AggrStats.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'colStats', (TType.STRUCT, [ColumnStatisticsObj, None], False), None, ),  # 1
    (2, TType.I64, 'partsFound', None, None, ),  # 2
)
all_structs.append(SetPartitionsStatsRequest)
SetPartitionsStatsRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'colStats', (TType.STRUCT, [ColumnStatistics, None], False), None, ),  # 1
    (2, TType.BOOL, 'needMerge', None, None, ),  # 2
)
all_structs.append(Schema)
Schema.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'fieldSchemas', (TType.STRUCT, [FieldSchema, None], False), None, ),  # 1
    (2, TType.MAP, 'properties', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 2
)
all_structs.append(EnvironmentContext)
EnvironmentContext.thrift_spec = (
    None,  # 0
    (1, TType.MAP, 'properties', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 1
)
all_structs.append(PrimaryKeysRequest)
PrimaryKeysRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'db_name', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tbl_name', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'catName', 'UTF8', None, ),  # 3
)
all_structs.append(PrimaryKeysResponse)
PrimaryKeysResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'primaryKeys', (TType.STRUCT, [SQLPrimaryKey, None], False), None, ),  # 1
)
all_structs.append(ForeignKeysRequest)
ForeignKeysRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'parent_db_name', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'parent_tbl_name', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'foreign_db_name', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'foreign_tbl_name', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'catName', 'UTF8', None, ),  # 5
)
all_structs.append(ForeignKeysResponse)
ForeignKeysResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'foreignKeys', (TType.STRUCT, [SQLForeignKey, None], False), None, ),  # 1
)
all_structs.append(UniqueConstraintsRequest)
UniqueConstraintsRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'catName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'db_name', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'tbl_name', 'UTF8', None, ),  # 3
)
all_structs.append(UniqueConstraintsResponse)
UniqueConstraintsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'uniqueConstraints', (TType.STRUCT, [SQLUniqueConstraint, None], False), None, ),  # 1
)
all_structs.append(NotNullConstraintsRequest)
NotNullConstraintsRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'catName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'db_name', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'tbl_name', 'UTF8', None, ),  # 3
)
all_structs.append(NotNullConstraintsResponse)
NotNullConstraintsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'notNullConstraints', (TType.STRUCT, [SQLNotNullConstraint, None], False), None, ),  # 1
)
all_structs.append(DefaultConstraintsRequest)
DefaultConstraintsRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'catName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'db_name', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'tbl_name', 'UTF8', None, ),  # 3
)
all_structs.append(DefaultConstraintsResponse)
DefaultConstraintsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'defaultConstraints', (TType.STRUCT, [SQLDefaultConstraint, None], False), None, ),  # 1
)
all_structs.append(CheckConstraintsRequest)
CheckConstraintsRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'catName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'db_name', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'tbl_name', 'UTF8', None, ),  # 3
)
all_structs.append(CheckConstraintsResponse)
CheckConstraintsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'checkConstraints', (TType.STRUCT, [SQLCheckConstraint, None], False), None, ),  # 1
)
all_structs.append(DropConstraintRequest)
DropConstraintRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbname', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tablename', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'constraintname', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'catName', 'UTF8', None, ),  # 4
)
all_structs.append(AddPrimaryKeyRequest)
AddPrimaryKeyRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'primaryKeyCols', (TType.STRUCT, [SQLPrimaryKey, None], False), None, ),  # 1
)
all_structs.append(AddForeignKeyRequest)
AddForeignKeyRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'foreignKeyCols', (TType.STRUCT, [SQLForeignKey, None], False), None, ),  # 1
)
all_structs.append(AddUniqueConstraintRequest)
AddUniqueConstraintRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'uniqueConstraintCols', (TType.STRUCT, [SQLUniqueConstraint, None], False), None, ),  # 1
)
all_structs.append(AddNotNullConstraintRequest)
AddNotNullConstraintRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'notNullConstraintCols', (TType.STRUCT, [SQLNotNullConstraint, None], False), None, ),  # 1
)
all_structs.append(AddDefaultConstraintRequest)
AddDefaultConstraintRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'defaultConstraintCols', (TType.STRUCT, [SQLDefaultConstraint, None], False), None, ),  # 1
)
all_structs.append(AddCheckConstraintRequest)
AddCheckConstraintRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'checkConstraintCols', (TType.STRUCT, [SQLCheckConstraint, None], False), None, ),  # 1
)
all_structs.append(PartitionsByExprResult)
PartitionsByExprResult.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'partitions', (TType.STRUCT, [Partition, None], False), None, ),  # 1
    (2, TType.BOOL, 'hasUnknownPartitions', None, None, ),  # 2
)
all_structs.append(PartitionsByExprRequest)
PartitionsByExprRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tblName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'expr', 'BINARY', None, ),  # 3
    (4, TType.STRING, 'defaultPartitionName', 'UTF8', None, ),  # 4
    (5, TType.I16, 'maxParts', None, -1, ),  # 5
    (6, TType.STRING, 'catName', 'UTF8', None, ),  # 6
)
all_structs.append(TableStatsResult)
TableStatsResult.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'tableStats', (TType.STRUCT, [ColumnStatisticsObj, None], False), None, ),  # 1
)
all_structs.append(PartitionsStatsResult)
PartitionsStatsResult.thrift_spec = (
    None,  # 0
    (1, TType.MAP, 'partStats', (TType.STRING, 'UTF8', TType.LIST, (TType.STRUCT, [ColumnStatisticsObj, None], False), False), None, ),  # 1
)
all_structs.append(TableStatsRequest)
TableStatsRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tblName', 'UTF8', None, ),  # 2
    (3, TType.LIST, 'colNames', (TType.STRING, 'UTF8', False), None, ),  # 3
    (4, TType.STRING, 'catName', 'UTF8', None, ),  # 4
)
all_structs.append(PartitionsStatsRequest)
PartitionsStatsRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tblName', 'UTF8', None, ),  # 2
    (3, TType.LIST, 'colNames', (TType.STRING, 'UTF8', False), None, ),  # 3
    (4, TType.LIST, 'partNames', (TType.STRING, 'UTF8', False), None, ),  # 4
    (5, TType.STRING, 'catName', 'UTF8', None, ),  # 5
)
all_structs.append(AddPartitionsResult)
AddPartitionsResult.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'partitions', (TType.STRUCT, [Partition, None], False), None, ),  # 1
)
all_structs.append(AddPartitionsRequest)
AddPartitionsRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tblName', 'UTF8', None, ),  # 2
    (3, TType.LIST, 'parts', (TType.STRUCT, [Partition, None], False), None, ),  # 3
    (4, TType.BOOL, 'ifNotExists', None, None, ),  # 4
    (5, TType.BOOL, 'needResult', None, True, ),  # 5
    (6, TType.STRING, 'catName', 'UTF8', None, ),  # 6
)
all_structs.append(DropPartitionsResult)
DropPartitionsResult.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'partitions', (TType.STRUCT, [Partition, None], False), None, ),  # 1
)
all_structs.append(DropPartitionsExpr)
DropPartitionsExpr.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'expr', 'BINARY', None, ),  # 1
    (2, TType.I32, 'partArchiveLevel', None, None, ),  # 2
)
all_structs.append(RequestPartsSpec)
RequestPartsSpec.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'names', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.LIST, 'exprs', (TType.STRUCT, [DropPartitionsExpr, None], False), None, ),  # 2
)
all_structs.append(DropPartitionsRequest)
DropPartitionsRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tblName', 'UTF8', None, ),  # 2
    (3, TType.STRUCT, 'parts', [RequestPartsSpec, None], None, ),  # 3
    (4, TType.BOOL, 'deleteData', None, None, ),  # 4
    (5, TType.BOOL, 'ifExists', None, True, ),  # 5
    (6, TType.BOOL, 'ignoreProtection', None, None, ),  # 6
    (7, TType.STRUCT, 'environmentContext', [EnvironmentContext, None], None, ),  # 7
    (8, TType.BOOL, 'needResult', None, True, ),  # 8
    (9, TType.STRING, 'catName', 'UTF8', None, ),  # 9
)
all_structs.append(PartitionValuesRequest)
PartitionValuesRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tblName', 'UTF8', None, ),  # 2
    (3, TType.LIST, 'partitionKeys', (TType.STRUCT, [FieldSchema, None], False), None, ),  # 3
    (4, TType.BOOL, 'applyDistinct', None, True, ),  # 4
    (5, TType.STRING, 'filter', 'UTF8', None, ),  # 5
    (6, TType.LIST, 'partitionOrder', (TType.STRUCT, [FieldSchema, None], False), None, ),  # 6
    (7, TType.BOOL, 'ascending', None, True, ),  # 7
    (8, TType.I64, 'maxParts', None, -1, ),  # 8
    (9, TType.STRING, 'catName', 'UTF8', None, ),  # 9
)
all_structs.append(PartitionValuesRow)
PartitionValuesRow.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'row', (TType.STRING, 'UTF8', False), None, ),  # 1
)
all_structs.append(PartitionValuesResponse)
PartitionValuesResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'partitionValues', (TType.STRUCT, [PartitionValuesRow, None], False), None, ),  # 1
)
all_structs.append(ResourceUri)
ResourceUri.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'resourceType', None, None, ),  # 1
    (2, TType.STRING, 'uri', 'UTF8', None, ),  # 2
)
all_structs.append(Function)
Function.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'functionName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'dbName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'className', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'ownerName', 'UTF8', None, ),  # 4
    (5, TType.I32, 'ownerType', None, None, ),  # 5
    (6, TType.I32, 'createTime', None, None, ),  # 6
    (7, TType.I32, 'functionType', None, None, ),  # 7
    (8, TType.LIST, 'resourceUris', (TType.STRUCT, [ResourceUri, None], False), None, ),  # 8
    (9, TType.STRING, 'catName', 'UTF8', None, ),  # 9
)
all_structs.append(TxnInfo)
TxnInfo.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'id', None, None, ),  # 1
    (2, TType.I32, 'state', None, None, ),  # 2
    (3, TType.STRING, 'user', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'hostname', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'agentInfo', 'UTF8', "Unknown", ),  # 5
    (6, TType.I32, 'heartbeatCount', None, 0, ),  # 6
    (7, TType.STRING, 'metaInfo', 'UTF8', None, ),  # 7
    (8, TType.I64, 'startedTime', None, None, ),  # 8
    (9, TType.I64, 'lastHeartbeatTime', None, None, ),  # 9
)
all_structs.append(GetOpenTxnsInfoResponse)
GetOpenTxnsInfoResponse.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'txn_high_water_mark', None, None, ),  # 1
    (2, TType.LIST, 'open_txns', (TType.STRUCT, [TxnInfo, None], False), None, ),  # 2
)
all_structs.append(GetOpenTxnsResponse)
GetOpenTxnsResponse.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'txn_high_water_mark', None, None, ),  # 1
    (2, TType.LIST, 'open_txns', (TType.I64, None, False), None, ),  # 2
    (3, TType.I64, 'min_open_txn', None, None, ),  # 3
    (4, TType.STRING, 'abortedBits', 'BINARY', None, ),  # 4
)
all_structs.append(OpenTxnRequest)
OpenTxnRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'num_txns', None, None, ),  # 1
    (2, TType.STRING, 'user', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'hostname', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'agentInfo', 'UTF8', "Unknown", ),  # 4
    (5, TType.STRING, 'replPolicy', 'UTF8', None, ),  # 5
    (6, TType.LIST, 'replSrcTxnIds', (TType.I64, None, False), None, ),  # 6
)
all_structs.append(OpenTxnsResponse)
OpenTxnsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'txn_ids', (TType.I64, None, False), None, ),  # 1
)
all_structs.append(AbortTxnRequest)
AbortTxnRequest.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'txnid', None, None, ),  # 1
    (2, TType.STRING, 'replPolicy', 'UTF8', None, ),  # 2
)
all_structs.append(AbortTxnsRequest)
AbortTxnsRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'txn_ids', (TType.I64, None, False), None, ),  # 1
)
all_structs.append(CommitTxnRequest)
CommitTxnRequest.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'txnid', None, None, ),  # 1
    (2, TType.STRING, 'replPolicy', 'UTF8', None, ),  # 2
)
all_structs.append(ReplTblWriteIdStateRequest)
ReplTblWriteIdStateRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'validWriteIdlist', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'user', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'hostName', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'dbName', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'tableName', 'UTF8', None, ),  # 5
    (6, TType.LIST, 'partNames', (TType.STRING, 'UTF8', False), None, ),  # 6
)
all_structs.append(GetValidWriteIdsRequest)
GetValidWriteIdsRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'fullTableNames', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.STRING, 'validTxnList', 'UTF8', None, ),  # 2
)
all_structs.append(TableValidWriteIds)
TableValidWriteIds.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'fullTableName', 'UTF8', None, ),  # 1
    (2, TType.I64, 'writeIdHighWaterMark', None, None, ),  # 2
    (3, TType.LIST, 'invalidWriteIds', (TType.I64, None, False), None, ),  # 3
    (4, TType.I64, 'minOpenWriteId', None, None, ),  # 4
    (5, TType.STRING, 'abortedBits', 'BINARY', None, ),  # 5
)
all_structs.append(GetValidWriteIdsResponse)
GetValidWriteIdsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'tblValidWriteIds', (TType.STRUCT, [TableValidWriteIds, None], False), None, ),  # 1
)
all_structs.append(AllocateTableWriteIdsRequest)
AllocateTableWriteIdsRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tableName', 'UTF8', None, ),  # 2
    (3, TType.LIST, 'txnIds', (TType.I64, None, False), None, ),  # 3
    (4, TType.STRING, 'replPolicy', 'UTF8', None, ),  # 4
    (5, TType.LIST, 'srcTxnToWriteIdList', (TType.STRUCT, [TxnToWriteId, None], False), None, ),  # 5
)
all_structs.append(TxnToWriteId)
TxnToWriteId.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'txnId', None, None, ),  # 1
    (2, TType.I64, 'writeId', None, None, ),  # 2
)
all_structs.append(AllocateTableWriteIdsResponse)
AllocateTableWriteIdsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'txnToWriteIds', (TType.STRUCT, [TxnToWriteId, None], False), None, ),  # 1
)
all_structs.append(LockComponent)
LockComponent.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'type', None, None, ),  # 1
    (2, TType.I32, 'level', None, None, ),  # 2
    (3, TType.STRING, 'dbname', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'tablename', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'partitionname', 'UTF8', None, ),  # 5
    (6, TType.I32, 'operationType', None, 5, ),  # 6
    (7, TType.BOOL, 'isTransactional', None, False, ),  # 7
    (8, TType.BOOL, 'isDynamicPartitionWrite', None, False, ),  # 8
)
all_structs.append(LockRequest)
LockRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'component', (TType.STRUCT, [LockComponent, None], False), None, ),  # 1
    (2, TType.I64, 'txnid', None, None, ),  # 2
    (3, TType.STRING, 'user', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'hostname', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'agentInfo', 'UTF8', "Unknown", ),  # 5
)
all_structs.append(LockResponse)
LockResponse.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'lockid', None, None, ),  # 1
    (2, TType.I32, 'state', None, None, ),  # 2
)
all_structs.append(CheckLockRequest)
CheckLockRequest.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'lockid', None, None, ),  # 1
    (2, TType.I64, 'txnid', None, None, ),  # 2
    (3, TType.I64, 'elapsed_ms', None, None, ),  # 3
)
all_structs.append(UnlockRequest)
UnlockRequest.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'lockid', None, None, ),  # 1
)
all_structs.append(ShowLocksRequest)
ShowLocksRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbname', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tablename', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'partname', 'UTF8', None, ),  # 3
    (4, TType.BOOL, 'isExtended', None, False, ),  # 4
)
all_structs.append(ShowLocksResponseElement)
ShowLocksResponseElement.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'lockid', None, None, ),  # 1
    (2, TType.STRING, 'dbname', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'tablename', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'partname', 'UTF8', None, ),  # 4
    (5, TType.I32, 'state', None, None, ),  # 5
    (6, TType.I32, 'type', None, None, ),  # 6
    (7, TType.I64, 'txnid', None, None, ),  # 7
    (8, TType.I64, 'lastheartbeat', None, None, ),  # 8
    (9, TType.I64, 'acquiredat', None, None, ),  # 9
    (10, TType.STRING, 'user', 'UTF8', None, ),  # 10
    (11, TType.STRING, 'hostname', 'UTF8', None, ),  # 11
    (12, TType.I32, 'heartbeatCount', None, 0, ),  # 12
    (13, TType.STRING, 'agentInfo', 'UTF8', None, ),  # 13
    (14, TType.I64, 'blockedByExtId', None, None, ),  # 14
    (15, TType.I64, 'blockedByIntId', None, None, ),  # 15
    (16, TType.I64, 'lockIdInternal', None, None, ),  # 16
)
all_structs.append(ShowLocksResponse)
ShowLocksResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'locks', (TType.STRUCT, [ShowLocksResponseElement, None], False), None, ),  # 1
)
all_structs.append(HeartbeatRequest)
HeartbeatRequest.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'lockid', None, None, ),  # 1
    (2, TType.I64, 'txnid', None, None, ),  # 2
)
all_structs.append(HeartbeatTxnRangeRequest)
HeartbeatTxnRangeRequest.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'min', None, None, ),  # 1
    (2, TType.I64, 'max', None, None, ),  # 2
)
all_structs.append(HeartbeatTxnRangeResponse)
HeartbeatTxnRangeResponse.thrift_spec = (
    None,  # 0
    (1, TType.SET, 'aborted', (TType.I64, None, False), None, ),  # 1
    (2, TType.SET, 'nosuch', (TType.I64, None, False), None, ),  # 2
)
all_structs.append(CompactionRequest)
CompactionRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbname', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tablename', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'partitionname', 'UTF8', None, ),  # 3
    (4, TType.I32, 'type', None, None, ),  # 4
    (5, TType.STRING, 'runas', 'UTF8', None, ),  # 5
    (6, TType.MAP, 'properties', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 6
)
all_structs.append(CompactionResponse)
CompactionResponse.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'id', None, None, ),  # 1
    (2, TType.STRING, 'state', 'UTF8', None, ),  # 2
    (3, TType.BOOL, 'accepted', None, None, ),  # 3
)
all_structs.append(ShowCompactRequest)
ShowCompactRequest.thrift_spec = (
)
all_structs.append(ShowCompactResponseElement)
ShowCompactResponseElement.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbname', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tablename', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'partitionname', 'UTF8', None, ),  # 3
    (4, TType.I32, 'type', None, None, ),  # 4
    (5, TType.STRING, 'state', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'workerid', 'UTF8', None, ),  # 6
    (7, TType.I64, 'start', None, None, ),  # 7
    (8, TType.STRING, 'runAs', 'UTF8', None, ),  # 8
    (9, TType.I64, 'hightestTxnId', None, None, ),  # 9
    (10, TType.STRING, 'metaInfo', 'UTF8', None, ),  # 10
    (11, TType.I64, 'endTime', None, None, ),  # 11
    (12, TType.STRING, 'hadoopJobId', 'UTF8', "None", ),  # 12
    (13, TType.I64, 'id', None, None, ),  # 13
    (14, TType.STRING, 'errorMessage', 'UTF8', None, ),  # 14
    (15, TType.I64, 'enqueueTime', None, None, ),  # 15
)
all_structs.append(ShowCompactResponse)
ShowCompactResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'compacts', (TType.STRUCT, [ShowCompactResponseElement, None], False), None, ),  # 1
)
all_structs.append(AddDynamicPartitions)
AddDynamicPartitions.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'txnid', None, None, ),  # 1
    (2, TType.I64, 'writeid', None, None, ),  # 2
    (3, TType.STRING, 'dbname', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'tablename', 'UTF8', None, ),  # 4
    (5, TType.LIST, 'partitionnames', (TType.STRING, 'UTF8', False), None, ),  # 5
    (6, TType.I32, 'operationType', None, 5, ),  # 6
)
all_structs.append(BasicTxnInfo)
BasicTxnInfo.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'isnull', None, None, ),  # 1
    (2, TType.I64, 'time', None, None, ),  # 2
    (3, TType.I64, 'txnid', None, None, ),  # 3
    (4, TType.STRING, 'dbname', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'tablename', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'partitionname', 'UTF8', None, ),  # 6
)
all_structs.append(CreationMetadata)
CreationMetadata.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'catName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'dbName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'tblName', 'UTF8', None, ),  # 3
    (4, TType.SET, 'tablesUsed', (TType.STRING, 'UTF8', False), None, ),  # 4
    (5, TType.STRING, 'validTxnList', 'UTF8', None, ),  # 5
    (6, TType.I64, 'materializationTime', None, None, ),  # 6
)
all_structs.append(NotificationEventRequest)
NotificationEventRequest.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'lastEvent', None, None, ),  # 1
    (2, TType.I32, 'maxEvents', None, None, ),  # 2
)
all_structs.append(NotificationEvent)
NotificationEvent.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'eventId', None, None, ),  # 1
    (2, TType.I32, 'eventTime', None, None, ),  # 2
    (3, TType.STRING, 'eventType', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'dbName', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'tableName', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'message', 'UTF8', None, ),  # 6
    (7, TType.STRING, 'messageFormat', 'UTF8', None, ),  # 7
    (8, TType.STRING, 'catName', 'UTF8', None, ),  # 8
)
all_structs.append(NotificationEventResponse)
NotificationEventResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'events', (TType.STRUCT, [NotificationEvent, None], False), None, ),  # 1
)
all_structs.append(CurrentNotificationEventId)
CurrentNotificationEventId.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'eventId', None, None, ),  # 1
)
all_structs.append(NotificationEventsCountRequest)
NotificationEventsCountRequest.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'fromEventId', None, None, ),  # 1
    (2, TType.STRING, 'dbName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'catName', 'UTF8', None, ),  # 3
)
all_structs.append(NotificationEventsCountResponse)
NotificationEventsCountResponse.thrift_spec = (
    None,  # 0
    (1, TType.I64, 'eventsCount', None, None, ),  # 1
)
all_structs.append(InsertEventRequestData)
InsertEventRequestData.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'replace', None, None, ),  # 1
    (2, TType.LIST, 'filesAdded', (TType.STRING, 'UTF8', False), None, ),  # 2
    (3, TType.LIST, 'filesAddedChecksum', (TType.STRING, 'UTF8', False), None, ),  # 3
)
all_structs.append(FireEventRequestData)
FireEventRequestData.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'insertData', [InsertEventRequestData, None], None, ),  # 1
)
all_structs.append(FireEventRequest)
FireEventRequest.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'successful', None, None, ),  # 1
    (2, TType.STRUCT, 'data', [FireEventRequestData, None], None, ),  # 2
    (3, TType.STRING, 'dbName', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'tableName', 'UTF8', None, ),  # 4
    (5, TType.LIST, 'partitionVals', (TType.STRING, 'UTF8', False), None, ),  # 5
    (6, TType.STRING, 'catName', 'UTF8', None, ),  # 6
)
all_structs.append(FireEventResponse)
FireEventResponse.thrift_spec = (
)
all_structs.append(MetadataPpdResult)
MetadataPpdResult.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'metadata', 'BINARY', None, ),  # 1
    (2, TType.STRING, 'includeBitset', 'BINARY', None, ),  # 2
)
all_structs.append(GetFileMetadataByExprResult)
GetFileMetadataByExprResult.thrift_spec = (
    None,  # 0
    (1, TType.MAP, 'metadata', (TType.I64, None, TType.STRUCT, [MetadataPpdResult, None], False), None, ),  # 1
    (2, TType.BOOL, 'isSupported', None, None, ),  # 2
)
all_structs.append(GetFileMetadataByExprRequest)
GetFileMetadataByExprRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'fileIds', (TType.I64, None, False), None, ),  # 1
    (2, TType.STRING, 'expr', 'BINARY', None, ),  # 2
    (3, TType.BOOL, 'doGetFooters', None, None, ),  # 3
    (4, TType.I32, 'type', None, None, ),  # 4
)
all_structs.append(GetFileMetadataResult)
GetFileMetadataResult.thrift_spec = (
    None,  # 0
    (1, TType.MAP, 'metadata', (TType.I64, None, TType.STRING, 'BINARY', False), None, ),  # 1
    (2, TType.BOOL, 'isSupported', None, None, ),  # 2
)
all_structs.append(GetFileMetadataRequest)
GetFileMetadataRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'fileIds', (TType.I64, None, False), None, ),  # 1
)
all_structs.append(PutFileMetadataResult)
PutFileMetadataResult.thrift_spec = (
)
all_structs.append(PutFileMetadataRequest)
PutFileMetadataRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'fileIds', (TType.I64, None, False), None, ),  # 1
    (2, TType.LIST, 'metadata', (TType.STRING, 'BINARY', False), None, ),  # 2
    (3, TType.I32, 'type', None, None, ),  # 3
)
all_structs.append(ClearFileMetadataResult)
ClearFileMetadataResult.thrift_spec = (
)
all_structs.append(ClearFileMetadataRequest)
ClearFileMetadataRequest.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'fileIds', (TType.I64, None, False), None, ),  # 1
)
all_structs.append(CacheFileMetadataResult)
CacheFileMetadataResult.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'isSupported', None, None, ),  # 1
)
all_structs.append(CacheFileMetadataRequest)
CacheFileMetadataRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tblName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'partName', 'UTF8', None, ),  # 3
    (4, TType.BOOL, 'isAllParts', None, None, ),  # 4
)
all_structs.append(GetAllFunctionsResponse)
GetAllFunctionsResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'functions', (TType.STRUCT, [Function, None], False), None, ),  # 1
)
all_structs.append(ClientCapabilities)
ClientCapabilities.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'values', (TType.I32, None, False), None, ),  # 1
)
all_structs.append(GetTableRequest)
GetTableRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tblName', 'UTF8', None, ),  # 2
    (3, TType.STRUCT, 'capabilities', [ClientCapabilities, None], None, ),  # 3
    (4, TType.STRING, 'catName', 'UTF8', None, ),  # 4
)
all_structs.append(GetTableResult)
GetTableResult.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'table', [Table, None], None, ),  # 1
)
all_structs.append(GetTablesRequest)
GetTablesRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.LIST, 'tblNames', (TType.STRING, 'UTF8', False), None, ),  # 2
    (3, TType.STRUCT, 'capabilities', [ClientCapabilities, None], None, ),  # 3
    (4, TType.STRING, 'catName', 'UTF8', None, ),  # 4
)
all_structs.append(GetTablesResult)
GetTablesResult.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'tables', (TType.STRUCT, [Table, None], False), None, ),  # 1
)
all_structs.append(CmRecycleRequest)
CmRecycleRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dataPath', 'UTF8', None, ),  # 1
    (2, TType.BOOL, 'purge', None, None, ),  # 2
)
all_structs.append(CmRecycleResponse)
CmRecycleResponse.thrift_spec = (
)
all_structs.append(TableMeta)
TableMeta.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'dbName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'tableName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'tableType', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'comments', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'catName', 'UTF8', None, ),  # 5
)
all_structs.append(Materialization)
Materialization.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'sourceTablesUpdateDeleteModified', None, None, ),  # 1
)
all_structs.append(WMResourcePlan)
WMResourcePlan.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.I32, 'status', None, None, ),  # 2
    (3, TType.I32, 'queryParallelism', None, None, ),  # 3
    (4, TType.STRING, 'defaultPoolPath', 'UTF8', None, ),  # 4
)
all_structs.append(WMNullableResourcePlan)
WMNullableResourcePlan.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
    (2, TType.I32, 'status', None, None, ),  # 2
    None,  # 3
    (4, TType.I32, 'queryParallelism', None, None, ),  # 4
    (5, TType.BOOL, 'isSetQueryParallelism', None, None, ),  # 5
    (6, TType.STRING, 'defaultPoolPath', 'UTF8', None, ),  # 6
    (7, TType.BOOL, 'isSetDefaultPoolPath', None, None, ),  # 7
)
all_structs.append(WMPool)
WMPool.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'poolPath', 'UTF8', None, ),  # 2
    (3, TType.DOUBLE, 'allocFraction', None, None, ),  # 3
    (4, TType.I32, 'queryParallelism', None, None, ),  # 4
    (5, TType.STRING, 'schedulingPolicy', 'UTF8', None, ),  # 5
)
all_structs.append(WMNullablePool)
WMNullablePool.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'poolPath', 'UTF8', None, ),  # 2
    (3, TType.DOUBLE, 'allocFraction', None, None, ),  # 3
    (4, TType.I32, 'queryParallelism', None, None, ),  # 4
    (5, TType.STRING, 'schedulingPolicy', 'UTF8', None, ),  # 5
    (6, TType.BOOL, 'isSetSchedulingPolicy', None, None, ),  # 6
)
all_structs.append(WMTrigger)
WMTrigger.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'triggerName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'triggerExpression', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'actionExpression', 'UTF8', None, ),  # 4
    (5, TType.BOOL, 'isInUnmanaged', None, None, ),  # 5
)
all_structs.append(WMMapping)
WMMapping.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'entityType', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'entityName', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'poolPath', 'UTF8', None, ),  # 4
    (5, TType.I32, 'ordering', None, None, ),  # 5
)
all_structs.append(WMPoolTrigger)
WMPoolTrigger.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'pool', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'trigger', 'UTF8', None, ),  # 2
)
all_structs.append(WMFullResourcePlan)
WMFullResourcePlan.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'plan', [WMResourcePlan, None], None, ),  # 1
    (2, TType.LIST, 'pools', (TType.STRUCT, [WMPool, None], False), None, ),  # 2
    (3, TType.LIST, 'mappings', (TType.STRUCT, [WMMapping, None], False), None, ),  # 3
    (4, TType.LIST, 'triggers', (TType.STRUCT, [WMTrigger, None], False), None, ),  # 4
    (5, TType.LIST, 'poolTriggers', (TType.STRUCT, [WMPoolTrigger, None], False), None, ),  # 5
)
all_structs.append(WMCreateResourcePlanRequest)
WMCreateResourcePlanRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'resourcePlan', [WMResourcePlan, None], None, ),  # 1
    (2, TType.STRING, 'copyFrom', 'UTF8', None, ),  # 2
)
all_structs.append(WMCreateResourcePlanResponse)
WMCreateResourcePlanResponse.thrift_spec = (
)
all_structs.append(WMGetActiveResourcePlanRequest)
WMGetActiveResourcePlanRequest.thrift_spec = (
)
all_structs.append(WMGetActiveResourcePlanResponse)
WMGetActiveResourcePlanResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'resourcePlan', [WMFullResourcePlan, None], None, ),  # 1
)
all_structs.append(WMGetResourcePlanRequest)
WMGetResourcePlanRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
)
all_structs.append(WMGetResourcePlanResponse)
WMGetResourcePlanResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'resourcePlan', [WMFullResourcePlan, None], None, ),  # 1
)
all_structs.append(WMGetAllResourcePlanRequest)
WMGetAllResourcePlanRequest.thrift_spec = (
)
all_structs.append(WMGetAllResourcePlanResponse)
WMGetAllResourcePlanResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'resourcePlans', (TType.STRUCT, [WMResourcePlan, None], False), None, ),  # 1
)
all_structs.append(WMAlterResourcePlanRequest)
WMAlterResourcePlanRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
    (2, TType.STRUCT, 'resourcePlan', [WMNullableResourcePlan, None], None, ),  # 2
    (3, TType.BOOL, 'isEnableAndActivate', None, None, ),  # 3
    (4, TType.BOOL, 'isForceDeactivate', None, None, ),  # 4
    (5, TType.BOOL, 'isReplace', None, None, ),  # 5
)
all_structs.append(WMAlterResourcePlanResponse)
WMAlterResourcePlanResponse.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'fullResourcePlan', [WMFullResourcePlan, None], None, ),  # 1
)
all_structs.append(WMValidateResourcePlanRequest)
WMValidateResourcePlanRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
)
all_structs.append(WMValidateResourcePlanResponse)
WMValidateResourcePlanResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'errors', (TType.STRING, 'UTF8', False), None, ),  # 1
    (2, TType.LIST, 'warnings', (TType.STRING, 'UTF8', False), None, ),  # 2
)
all_structs.append(WMDropResourcePlanRequest)
WMDropResourcePlanRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
)
all_structs.append(WMDropResourcePlanResponse)
WMDropResourcePlanResponse.thrift_spec = (
)
all_structs.append(WMCreateTriggerRequest)
WMCreateTriggerRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'trigger', [WMTrigger, None], None, ),  # 1
)
all_structs.append(WMCreateTriggerResponse)
WMCreateTriggerResponse.thrift_spec = (
)
all_structs.append(WMAlterTriggerRequest)
WMAlterTriggerRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'trigger', [WMTrigger, None], None, ),  # 1
)
all_structs.append(WMAlterTriggerResponse)
WMAlterTriggerResponse.thrift_spec = (
)
all_structs.append(WMDropTriggerRequest)
WMDropTriggerRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'triggerName', 'UTF8', None, ),  # 2
)
all_structs.append(WMDropTriggerResponse)
WMDropTriggerResponse.thrift_spec = (
)
all_structs.append(WMGetTriggersForResourePlanRequest)
WMGetTriggersForResourePlanRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
)
all_structs.append(WMGetTriggersForResourePlanResponse)
WMGetTriggersForResourePlanResponse.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'triggers', (TType.STRUCT, [WMTrigger, None], False), None, ),  # 1
)
all_structs.append(WMCreatePoolRequest)
WMCreatePoolRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'pool', [WMPool, None], None, ),  # 1
)
all_structs.append(WMCreatePoolResponse)
WMCreatePoolResponse.thrift_spec = (
)
all_structs.append(WMAlterPoolRequest)
WMAlterPoolRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'pool', [WMNullablePool, None], None, ),  # 1
    (2, TType.STRING, 'poolPath', 'UTF8', None, ),  # 2
)
all_structs.append(WMAlterPoolResponse)
WMAlterPoolResponse.thrift_spec = (
)
all_structs.append(WMDropPoolRequest)
WMDropPoolRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'poolPath', 'UTF8', None, ),  # 2
)
all_structs.append(WMDropPoolResponse)
WMDropPoolResponse.thrift_spec = (
)
all_structs.append(WMCreateOrUpdateMappingRequest)
WMCreateOrUpdateMappingRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'mapping', [WMMapping, None], None, ),  # 1
    (2, TType.BOOL, 'update', None, None, ),  # 2
)
all_structs.append(WMCreateOrUpdateMappingResponse)
WMCreateOrUpdateMappingResponse.thrift_spec = (
)
all_structs.append(WMDropMappingRequest)
WMDropMappingRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'mapping', [WMMapping, None], None, ),  # 1
)
all_structs.append(WMDropMappingResponse)
WMDropMappingResponse.thrift_spec = (
)
all_structs.append(WMCreateOrDropTriggerToPoolMappingRequest)
WMCreateOrDropTriggerToPoolMappingRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'resourcePlanName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'triggerName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'poolPath', 'UTF8', None, ),  # 3
    (4, TType.BOOL, 'drop', None, None, ),  # 4
)
all_structs.append(WMCreateOrDropTriggerToPoolMappingResponse)
WMCreateOrDropTriggerToPoolMappingResponse.thrift_spec = (
)
all_structs.append(ISchema)
ISchema.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'schemaType', None, None, ),  # 1
    (2, TType.STRING, 'name', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'catName', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'dbName', 'UTF8', None, ),  # 4
    (5, TType.I32, 'compatibility', None, None, ),  # 5
    (6, TType.I32, 'validationLevel', None, None, ),  # 6
    (7, TType.BOOL, 'canEvolve', None, None, ),  # 7
    (8, TType.STRING, 'schemaGroup', 'UTF8', None, ),  # 8
    (9, TType.STRING, 'description', 'UTF8', None, ),  # 9
)
all_structs.append(ISchemaName)
ISchemaName.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'catName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'dbName', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'schemaName', 'UTF8', None, ),  # 3
)
all_structs.append(AlterISchemaRequest)
AlterISchemaRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'name', [ISchemaName, None], None, ),  # 1
    None,  # 2
    (3, TType.STRUCT, 'newSchema', [ISchema, None], None, ),  # 3
)
all_structs.append(SchemaVersion)
SchemaVersion.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'schema', [ISchemaName, None], None, ),  # 1
    (2, TType.I32, 'version', None, None, ),  # 2
    (3, TType.I64, 'createdAt', None, None, ),  # 3
    (4, TType.LIST, 'cols', (TType.STRUCT, [FieldSchema, None], False), None, ),  # 4
    (5, TType.I32, 'state', None, None, ),  # 5
    (6, TType.STRING, 'description', 'UTF8', None, ),  # 6
    (7, TType.STRING, 'schemaText', 'UTF8', None, ),  # 7
    (8, TType.STRING, 'fingerprint', 'UTF8', None, ),  # 8
    (9, TType.STRING, 'name', 'UTF8', None, ),  # 9
    (10, TType.STRUCT, 'serDe', [SerDeInfo, None], None, ),  # 10
)
all_structs.append(SchemaVersionDescriptor)
SchemaVersionDescriptor.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'schema', [ISchemaName, None], None, ),  # 1
    (2, TType.I32, 'version', None, None, ),  # 2
)
all_structs.append(FindSchemasByColsRqst)
FindSchemasByColsRqst.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'colName', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'colNamespace', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'type', 'UTF8', None, ),  # 3
)
all_structs.append(FindSchemasByColsResp)
FindSchemasByColsResp.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'schemaVersions', (TType.STRUCT, [SchemaVersionDescriptor, None], False), None, ),  # 1
)
all_structs.append(MapSchemaVersionToSerdeRequest)
MapSchemaVersionToSerdeRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'schemaVersion', [SchemaVersionDescriptor, None], None, ),  # 1
    (2, TType.STRING, 'serdeName', 'UTF8', None, ),  # 2
)
all_structs.append(SetSchemaVersionStateRequest)
SetSchemaVersionStateRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'schemaVersion', [SchemaVersionDescriptor, None], None, ),  # 1
    (2, TType.I32, 'state', None, None, ),  # 2
)
all_structs.append(GetSerdeRequest)
GetSerdeRequest.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'serdeName', 'UTF8', None, ),  # 1
)
all_structs.append(RuntimeStat)
RuntimeStat.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'createTime', None, None, ),  # 1
    (2, TType.I32, 'weight', None, None, ),  # 2
    (3, TType.STRING, 'payload', 'BINARY', None, ),  # 3
)
all_structs.append(GetRuntimeStatsRequest)
GetRuntimeStatsRequest.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'maxWeight', None, None, ),  # 1
    (2, TType.I32, 'maxCreateTime', None, None, ),  # 2
)
all_structs.append(MetaException)
MetaException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(UnknownTableException)
UnknownTableException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(UnknownDBException)
UnknownDBException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(AlreadyExistsException)
AlreadyExistsException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(InvalidPartitionException)
InvalidPartitionException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(UnknownPartitionException)
UnknownPartitionException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(InvalidObjectException)
InvalidObjectException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(NoSuchObjectException)
NoSuchObjectException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(InvalidOperationException)
InvalidOperationException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(ConfigValSecurityException)
ConfigValSecurityException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(InvalidInputException)
InvalidInputException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(NoSuchTxnException)
NoSuchTxnException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(TxnAbortedException)
TxnAbortedException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(TxnOpenException)
TxnOpenException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
all_structs.append(NoSuchLockException)
NoSuchLockException.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
)
fix_spec(all_structs)
del all_structs
