#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing,
#  software distributed under the License is distributed on an
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
#  specific language governing permissions and limitations
#  under the License.
#
# Autogenerated by Thrift Compiler (0.16.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
#  options string: py
#

import sys

from thrift.protocol.TProtocol import TProtocolException
from thrift.Thrift import (
    TException,
    TType,
)
from thrift.transport import TTransport
from thrift.TRecursive import fix_spec

all_structs = []


class HiveObjectType:
    GLOBAL = 1
    DATABASE = 2
    TABLE = 3
    PARTITION = 4
    COLUMN = 5
    DATACONNECTOR = 6

    _VALUES_TO_NAMES = {
        1: "GLOBAL",
        2: "DATABASE",
        3: "TABLE",
        4: "PARTITION",
        5: "COLUMN",
        6: "DATACONNECTOR",
    }

    _NAMES_TO_VALUES = {
        "GLOBAL": 1,
        "DATABASE": 2,
        "TABLE": 3,
        "PARTITION": 4,
        "COLUMN": 5,
        "DATACONNECTOR": 6,
    }


class PrincipalType:
    USER = 1
    ROLE = 2
    GROUP = 3

    _VALUES_TO_NAMES = {
        1: "USER",
        2: "ROLE",
        3: "GROUP",
    }

    _NAMES_TO_VALUES = {
        "USER": 1,
        "ROLE": 2,
        "GROUP": 3,
    }


class PartitionEventType:
    LOAD_DONE = 1

    _VALUES_TO_NAMES = {
        1: "LOAD_DONE",
    }

    _NAMES_TO_VALUES = {
        "LOAD_DONE": 1,
    }


class TxnState:
    COMMITTED = 1
    ABORTED = 2
    OPEN = 3

    _VALUES_TO_NAMES = {
        1: "COMMITTED",
        2: "ABORTED",
        3: "OPEN",
    }

    _NAMES_TO_VALUES = {
        "COMMITTED": 1,
        "ABORTED": 2,
        "OPEN": 3,
    }


class LockLevel:
    DB = 1
    TABLE = 2
    PARTITION = 3

    _VALUES_TO_NAMES = {
        1: "DB",
        2: "TABLE",
        3: "PARTITION",
    }

    _NAMES_TO_VALUES = {
        "DB": 1,
        "TABLE": 2,
        "PARTITION": 3,
    }


class LockState:
    ACQUIRED = 1
    WAITING = 2
    ABORT = 3
    NOT_ACQUIRED = 4

    _VALUES_TO_NAMES = {
        1: "ACQUIRED",
        2: "WAITING",
        3: "ABORT",
        4: "NOT_ACQUIRED",
    }

    _NAMES_TO_VALUES = {
        "ACQUIRED": 1,
        "WAITING": 2,
        "ABORT": 3,
        "NOT_ACQUIRED": 4,
    }


class LockType:
    SHARED_READ = 1
    SHARED_WRITE = 2
    EXCLUSIVE = 3
    EXCL_WRITE = 4

    _VALUES_TO_NAMES = {
        1: "SHARED_READ",
        2: "SHARED_WRITE",
        3: "EXCLUSIVE",
        4: "EXCL_WRITE",
    }

    _NAMES_TO_VALUES = {
        "SHARED_READ": 1,
        "SHARED_WRITE": 2,
        "EXCLUSIVE": 3,
        "EXCL_WRITE": 4,
    }


class CompactionType:
    MINOR = 1
    MAJOR = 2

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

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


class GrantRevokeType:
    GRANT = 1
    REVOKE = 2

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

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


class DataOperationType:
    SELECT = 1
    INSERT = 2
    UPDATE = 3
    DELETE = 4
    UNSET = 5
    NO_TXN = 6

    _VALUES_TO_NAMES = {
        1: "SELECT",
        2: "INSERT",
        3: "UPDATE",
        4: "DELETE",
        5: "UNSET",
        6: "NO_TXN",
    }

    _NAMES_TO_VALUES = {
        "SELECT": 1,
        "INSERT": 2,
        "UPDATE": 3,
        "DELETE": 4,
        "UNSET": 5,
        "NO_TXN": 6,
    }


class EventRequestType:
    INSERT = 1
    UPDATE = 2
    DELETE = 3

    _VALUES_TO_NAMES = {
        1: "INSERT",
        2: "UPDATE",
        3: "DELETE",
    }

    _NAMES_TO_VALUES = {
        "INSERT": 1,
        "UPDATE": 2,
        "DELETE": 3,
    }


class SerdeType:
    HIVE = 1
    SCHEMA_REGISTRY = 2

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

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


class SchemaType:
    HIVE = 1
    AVRO = 2

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

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


class SchemaCompatibility:
    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:
    LATEST = 1
    ALL = 2

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

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


class SchemaVersionState:
    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 DatabaseType:
    NATIVE = 1
    REMOTE = 2

    _VALUES_TO_NAMES = {
        1: "NATIVE",
        2: "REMOTE",
    }

    _NAMES_TO_VALUES = {
        "NATIVE": 1,
        "REMOTE": 2,
    }


class FunctionType:
    JAVA = 1

    _VALUES_TO_NAMES = {
        1: "JAVA",
    }

    _NAMES_TO_VALUES = {
        "JAVA": 1,
    }


class ResourceType:
    JAR = 1
    FILE = 2
    ARCHIVE = 3

    _VALUES_TO_NAMES = {
        1: "JAR",
        2: "FILE",
        3: "ARCHIVE",
    }

    _NAMES_TO_VALUES = {
        "JAR": 1,
        "FILE": 2,
        "ARCHIVE": 3,
    }


class TxnType:
    DEFAULT = 0
    REPL_CREATED = 1
    READ_ONLY = 2
    COMPACTION = 3
    MATER_VIEW_REBUILD = 4
    SOFT_DELETE = 5

    _VALUES_TO_NAMES = {
        0: "DEFAULT",
        1: "REPL_CREATED",
        2: "READ_ONLY",
        3: "COMPACTION",
        4: "MATER_VIEW_REBUILD",
        5: "SOFT_DELETE",
    }

    _NAMES_TO_VALUES = {
        "DEFAULT": 0,
        "REPL_CREATED": 1,
        "READ_ONLY": 2,
        "COMPACTION": 3,
        "MATER_VIEW_REBUILD": 4,
        "SOFT_DELETE": 5,
    }


class GetTablesExtRequestFields:
    ACCESS_TYPE = 1
    PROCESSOR_CAPABILITIES = 2
    ALL = 2147483647

    _VALUES_TO_NAMES = {
        1: "ACCESS_TYPE",
        2: "PROCESSOR_CAPABILITIES",
        2147483647: "ALL",
    }

    _NAMES_TO_VALUES = {
        "ACCESS_TYPE": 1,
        "PROCESSOR_CAPABILITIES": 2,
        "ALL": 2147483647,
    }


class CompactionMetricsMetricType:
    NUM_OBSOLETE_DELTAS = 0
    NUM_DELTAS = 1
    NUM_SMALL_DELTAS = 2

    _VALUES_TO_NAMES = {
        0: "NUM_OBSOLETE_DELTAS",
        1: "NUM_DELTAS",
        2: "NUM_SMALL_DELTAS",
    }

    _NAMES_TO_VALUES = {
        "NUM_OBSOLETE_DELTAS": 0,
        "NUM_DELTAS": 1,
        "NUM_SMALL_DELTAS": 2,
    }


class FileMetadataExprType:
    ORC_SARG = 1

    _VALUES_TO_NAMES = {
        1: "ORC_SARG",
    }

    _NAMES_TO_VALUES = {
        "ORC_SARG": 1,
    }


class ClientCapability:
    TEST_CAPABILITY = 1
    INSERT_ONLY_TABLES = 2

    _VALUES_TO_NAMES = {
        1: "TEST_CAPABILITY",
        2: "INSERT_ONLY_TABLES",
    }

    _NAMES_TO_VALUES = {
        "TEST_CAPABILITY": 1,
        "INSERT_ONLY_TABLES": 2,
    }


class WMResourcePlanStatus:
    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:
    FAIR = 1
    FIFO = 2

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

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


class ScheduledQueryMaintenanceRequestType:
    CREATE = 1
    ALTER = 2
    DROP = 3

    _VALUES_TO_NAMES = {
        1: "CREATE",
        2: "ALTER",
        3: "DROP",
    }

    _NAMES_TO_VALUES = {
        "CREATE": 1,
        "ALTER": 2,
        "DROP": 3,
    }


class QueryState:
    INITED = 0
    EXECUTING = 1
    FAILED = 2
    FINISHED = 3
    TIMED_OUT = 4
    AUTO_DISABLED = 5

    _VALUES_TO_NAMES = {
        0: "INITED",
        1: "EXECUTING",
        2: "FAILED",
        3: "FINISHED",
        4: "TIMED_OUT",
        5: "AUTO_DISABLED",
    }

    _NAMES_TO_VALUES = {
        "INITED": 0,
        "EXECUTING": 1,
        "FAILED": 2,
        "FINISHED": 3,
        "TIMED_OUT": 4,
        "AUTO_DISABLED": 5,
    }


class PartitionFilterMode:
    BY_NAMES = 0
    BY_VALUES = 1
    BY_EXPR = 2

    _VALUES_TO_NAMES = {
        0: "BY_NAMES",
        1: "BY_VALUES",
        2: "BY_EXPR",
    }

    _NAMES_TO_VALUES = {
        "BY_NAMES": 0,
        "BY_VALUES": 1,
        "BY_EXPR": 2,
    }


class Version:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class FieldSchema:
    """
    Attributes:
     - name
     - type
     - comment

    """

    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = {}
                    (_ktype1, _vtype2, _size0) = iprot.readMapBegin()
                    for _i4 in range(_size0):
                        _key5 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val6 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.properties[_key5] = _val6
                    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 kiter7, viter8 in self.properties.items():
                oprot.writeString(kiter7.encode("utf-8") if sys.version_info[0] == 2 else kiter7)
                oprot.writeString(viter8.encode("utf-8") if sys.version_info[0] == 2 else viter8)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SQLPrimaryKey:
    """
    Attributes:
     - table_db
     - table_name
     - column_name
     - key_seq
     - pk_name
     - enable_cstr
     - validate_cstr
     - rely_cstr
     - 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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SQLForeignKey:
    """
    Attributes:
     - pktable_db
     - pktable_name
     - pkcolumn_name
     - fktable_db
     - fktable_name
     - fkcolumn_name
     - key_seq
     - update_rule
     - delete_rule
     - fk_name
     - pk_name
     - enable_cstr
     - validate_cstr
     - rely_cstr
     - 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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SQLUniqueConstraint:
    """
    Attributes:
     - 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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SQLNotNullConstraint:
    """
    Attributes:
     - 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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SQLAllTableConstraints:
    """
    Attributes:
     - primaryKeys
     - foreignKeys
     - uniqueConstraints
     - notNullConstraints
     - defaultConstraints
     - checkConstraints

    """

    def __init__(
        self,
        primaryKeys=None,
        foreignKeys=None,
        uniqueConstraints=None,
        notNullConstraints=None,
        defaultConstraints=None,
        checkConstraints=None,
    ):
        self.primaryKeys = primaryKeys
        self.foreignKeys = foreignKeys
        self.uniqueConstraints = uniqueConstraints
        self.notNullConstraints = notNullConstraints
        self.defaultConstraints = defaultConstraints
        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.primaryKeys = []
                    (_etype12, _size9) = iprot.readListBegin()
                    for _i13 in range(_size9):
                        _elem14 = SQLPrimaryKey()
                        _elem14.read(iprot)
                        self.primaryKeys.append(_elem14)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.foreignKeys = []
                    (_etype18, _size15) = iprot.readListBegin()
                    for _i19 in range(_size15):
                        _elem20 = SQLForeignKey()
                        _elem20.read(iprot)
                        self.foreignKeys.append(_elem20)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.uniqueConstraints = []
                    (_etype24, _size21) = iprot.readListBegin()
                    for _i25 in range(_size21):
                        _elem26 = SQLUniqueConstraint()
                        _elem26.read(iprot)
                        self.uniqueConstraints.append(_elem26)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.notNullConstraints = []
                    (_etype30, _size27) = iprot.readListBegin()
                    for _i31 in range(_size27):
                        _elem32 = SQLNotNullConstraint()
                        _elem32.read(iprot)
                        self.notNullConstraints.append(_elem32)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.defaultConstraints = []
                    (_etype36, _size33) = iprot.readListBegin()
                    for _i37 in range(_size33):
                        _elem38 = SQLDefaultConstraint()
                        _elem38.read(iprot)
                        self.defaultConstraints.append(_elem38)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.LIST:
                    self.checkConstraints = []
                    (_etype42, _size39) = iprot.readListBegin()
                    for _i43 in range(_size39):
                        _elem44 = SQLCheckConstraint()
                        _elem44.read(iprot)
                        self.checkConstraints.append(_elem44)
                    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("SQLAllTableConstraints")
        if self.primaryKeys is not None:
            oprot.writeFieldBegin("primaryKeys", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys))
            for iter45 in self.primaryKeys:
                iter45.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.foreignKeys is not None:
            oprot.writeFieldBegin("foreignKeys", TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys))
            for iter46 in self.foreignKeys:
                iter46.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.uniqueConstraints is not None:
            oprot.writeFieldBegin("uniqueConstraints", TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints))
            for iter47 in self.uniqueConstraints:
                iter47.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.notNullConstraints is not None:
            oprot.writeFieldBegin("notNullConstraints", TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints))
            for iter48 in self.notNullConstraints:
                iter48.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.defaultConstraints is not None:
            oprot.writeFieldBegin("defaultConstraints", TType.LIST, 5)
            oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraints))
            for iter49 in self.defaultConstraints:
                iter49.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.checkConstraints is not None:
            oprot.writeFieldBegin("checkConstraints", TType.LIST, 6)
            oprot.writeListBegin(TType.STRUCT, len(self.checkConstraints))
            for iter50 in self.checkConstraints:
                iter50.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Type:
    """
    Attributes:
     - name
     - type1
     - type2
     - fields

    """

    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 = []
                    (_etype54, _size51) = iprot.readListBegin()
                    for _i55 in range(_size51):
                        _elem56 = FieldSchema()
                        _elem56.read(iprot)
                        self.fields.append(_elem56)
                    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 iter57 in self.fields:
                iter57.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class HiveObjectRef:
    """
    Attributes:
     - objectType
     - dbName
     - objectName
     - partValues
     - columnName
     - 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 = []
                    (_etype61, _size58) = iprot.readListBegin()
                    for _i62 in range(_size58):
                        _elem63 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partValues.append(_elem63)
                    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 iter64 in self.partValues:
                oprot.writeString(iter64.encode("utf-8") if sys.version_info[0] == 2 else iter64)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PrivilegeGrantInfo:
    """
    Attributes:
     - privilege
     - createTime
     - grantor
     - grantorType
     - grantOption

    """

    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class HiveObjectPrivilege:
    """
    Attributes:
     - hiveObject
     - principalName
     - principalType
     - grantInfo
     - 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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PrivilegeBag:
    """
    Attributes:
     - privileges

    """

    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 = []
                    (_etype68, _size65) = iprot.readListBegin()
                    for _i69 in range(_size65):
                        _elem70 = HiveObjectPrivilege()
                        _elem70.read(iprot)
                        self.privileges.append(_elem70)
                    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 iter71 in self.privileges:
                iter71.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PrincipalPrivilegeSet:
    """
    Attributes:
     - userPrivileges
     - groupPrivileges
     - rolePrivileges

    """

    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 = {}
                    (_ktype73, _vtype74, _size72) = iprot.readMapBegin()
                    for _i76 in range(_size72):
                        _key77 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val78 = []
                        (_etype82, _size79) = iprot.readListBegin()
                        for _i83 in range(_size79):
                            _elem84 = PrivilegeGrantInfo()
                            _elem84.read(iprot)
                            _val78.append(_elem84)
                        iprot.readListEnd()
                        self.userPrivileges[_key77] = _val78
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.groupPrivileges = {}
                    (_ktype86, _vtype87, _size85) = iprot.readMapBegin()
                    for _i89 in range(_size85):
                        _key90 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val91 = []
                        (_etype95, _size92) = iprot.readListBegin()
                        for _i96 in range(_size92):
                            _elem97 = PrivilegeGrantInfo()
                            _elem97.read(iprot)
                            _val91.append(_elem97)
                        iprot.readListEnd()
                        self.groupPrivileges[_key90] = _val91
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.rolePrivileges = {}
                    (_ktype99, _vtype100, _size98) = iprot.readMapBegin()
                    for _i102 in range(_size98):
                        _key103 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val104 = []
                        (_etype108, _size105) = iprot.readListBegin()
                        for _i109 in range(_size105):
                            _elem110 = PrivilegeGrantInfo()
                            _elem110.read(iprot)
                            _val104.append(_elem110)
                        iprot.readListEnd()
                        self.rolePrivileges[_key103] = _val104
                    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 kiter111, viter112 in self.userPrivileges.items():
                oprot.writeString(kiter111.encode("utf-8") if sys.version_info[0] == 2 else kiter111)
                oprot.writeListBegin(TType.STRUCT, len(viter112))
                for iter113 in viter112:
                    iter113.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 kiter114, viter115 in self.groupPrivileges.items():
                oprot.writeString(kiter114.encode("utf-8") if sys.version_info[0] == 2 else kiter114)
                oprot.writeListBegin(TType.STRUCT, len(viter115))
                for iter116 in viter115:
                    iter116.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 kiter117, viter118 in self.rolePrivileges.items():
                oprot.writeString(kiter117.encode("utf-8") if sys.version_info[0] == 2 else kiter117)
                oprot.writeListBegin(TType.STRUCT, len(viter118))
                for iter119 in viter118:
                    iter119.write(oprot)
                oprot.writeListEnd()
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GrantRevokePrivilegeRequest:
    """
    Attributes:
     - requestType
     - privileges
     - revokeGrantOption

    """

    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GrantRevokePrivilegeResponse:
    """
    Attributes:
     - success

    """

    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TruncateTableRequest:
    """
    Attributes:
     - dbName
     - tableName
     - partNames
     - writeId
     - validWriteIdList
     - environmentContext

    """

    def __init__(
        self,
        dbName=None,
        tableName=None,
        partNames=None,
        writeId=-1,
        validWriteIdList=None,
        environmentContext=None,
    ):
        self.dbName = dbName
        self.tableName = tableName
        self.partNames = partNames
        self.writeId = writeId
        self.validWriteIdList = validWriteIdList
        self.environmentContext = environmentContext

    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.partNames = []
                    (_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()
                        )
                        self.partNames.append(_elem125)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.writeId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                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 == 6:
                if ftype == TType.STRUCT:
                    self.environmentContext = EnvironmentContext()
                    self.environmentContext.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("TruncateTableRequest")
        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.partNames is not None:
            oprot.writeFieldBegin("partNames", TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.partNames))
            for iter126 in self.partNames:
                oprot.writeString(iter126.encode("utf-8") if sys.version_info[0] == 2 else iter126)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.writeId is not None:
            oprot.writeFieldBegin("writeId", TType.I64, 4)
            oprot.writeI64(self.writeId)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.environmentContext is not None:
            oprot.writeFieldBegin("environmentContext", TType.STRUCT, 6)
            self.environmentContext.write(oprot)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TruncateTableResponse:
    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("TruncateTableResponse")
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Role:
    """
    Attributes:
     - roleName
     - createTime
     - ownerName

    """

    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class RolePrincipalGrant:
    """
    Attributes:
     - roleName
     - principalName
     - principalType
     - grantOption
     - grantTime
     - grantorName
     - grantorPrincipalType

    """

    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetRoleGrantsForPrincipalRequest:
    """
    Attributes:
     - principal_name
     - principal_type

    """

    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetRoleGrantsForPrincipalResponse:
    """
    Attributes:
     - principalGrants

    """

    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 = []
                    (_etype130, _size127) = iprot.readListBegin()
                    for _i131 in range(_size127):
                        _elem132 = RolePrincipalGrant()
                        _elem132.read(iprot)
                        self.principalGrants.append(_elem132)
                    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 iter133 in self.principalGrants:
                iter133.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPrincipalsInRoleRequest:
    """
    Attributes:
     - roleName

    """

    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPrincipalsInRoleResponse:
    """
    Attributes:
     - principalGrants

    """

    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 = []
                    (_etype137, _size134) = iprot.readListBegin()
                    for _i138 in range(_size134):
                        _elem139 = RolePrincipalGrant()
                        _elem139.read(iprot)
                        self.principalGrants.append(_elem139)
                    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 iter140 in self.principalGrants:
                iter140.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GrantRevokeRoleRequest:
    """
    Attributes:
     - requestType
     - roleName
     - principalName
     - principalType
     - grantor
     - grantorType
     - grantOption

    """

    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GrantRevokeRoleResponse:
    """
    Attributes:
     - success

    """

    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - name
     - description
     - locationUri
     - createTime

    """

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

    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.I32:
                    self.createTime = 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("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()
        if self.createTime is not None:
            oprot.writeFieldBegin("createTime", TType.I32, 4)
            oprot.writeI32(self.createTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype144, _size141) = iprot.readListBegin()
                    for _i145 in range(_size141):
                        _elem146 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.names.append(_elem146)
                    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 iter147 in self.names:
                oprot.writeString(iter147.encode("utf-8") if sys.version_info[0] == 2 else iter147)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - name
     - description
     - locationUri
     - parameters
     - privileges
     - ownerName
     - ownerType
     - catalogName
     - createTime
     - managedLocationUri
     - type
     - connector_name
     - remote_dbname

    """

    def __init__(
        self,
        name=None,
        description=None,
        locationUri=None,
        parameters=None,
        privileges=None,
        ownerName=None,
        ownerType=None,
        catalogName=None,
        createTime=None,
        managedLocationUri=None,
        type=None,
        connector_name=None,
        remote_dbname=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
        self.createTime = createTime
        self.managedLocationUri = managedLocationUri
        self.type = type
        self.connector_name = connector_name
        self.remote_dbname = remote_dbname

    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 = {}
                    (_ktype149, _vtype150, _size148) = iprot.readMapBegin()
                    for _i152 in range(_size148):
                        _key153 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val154 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameters[_key153] = _val154
                    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)
            elif fid == 9:
                if ftype == TType.I32:
                    self.createTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.managedLocationUri = (
                        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.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRING:
                    self.connector_name = (
                        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.STRING:
                    self.remote_dbname = (
                        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 kiter155, viter156 in self.parameters.items():
                oprot.writeString(kiter155.encode("utf-8") if sys.version_info[0] == 2 else kiter155)
                oprot.writeString(viter156.encode("utf-8") if sys.version_info[0] == 2 else viter156)
            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()
        if self.createTime is not None:
            oprot.writeFieldBegin("createTime", TType.I32, 9)
            oprot.writeI32(self.createTime)
            oprot.writeFieldEnd()
        if self.managedLocationUri is not None:
            oprot.writeFieldBegin("managedLocationUri", TType.STRING, 10)
            oprot.writeString(self.managedLocationUri.encode("utf-8") if sys.version_info[0] == 2 else self.managedLocationUri)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin("type", TType.I32, 11)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.connector_name is not None:
            oprot.writeFieldBegin("connector_name", TType.STRING, 12)
            oprot.writeString(self.connector_name.encode("utf-8") if sys.version_info[0] == 2 else self.connector_name)
            oprot.writeFieldEnd()
        if self.remote_dbname is not None:
            oprot.writeFieldBegin("remote_dbname", TType.STRING, 13)
            oprot.writeString(self.remote_dbname.encode("utf-8") if sys.version_info[0] == 2 else self.remote_dbname)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = {}
                    (_ktype158, _vtype159, _size157) = iprot.readMapBegin()
                    for _i161 in range(_size157):
                        _key162 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val163 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameters[_key162] = _val163
                    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 kiter164, viter165 in self.parameters.items():
                oprot.writeString(kiter164.encode("utf-8") if sys.version_info[0] == 2 else kiter164)
                oprot.writeString(viter165.encode("utf-8") if sys.version_info[0] == 2 else viter165)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype169, _size166) = iprot.readListBegin()
                    for _i170 in range(_size166):
                        _elem171 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.skewedColNames.append(_elem171)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.skewedColValues = []
                    (_etype175, _size172) = iprot.readListBegin()
                    for _i176 in range(_size172):
                        _elem177 = []
                        (_etype181, _size178) = iprot.readListBegin()
                        for _i182 in range(_size178):
                            _elem183 = (
                                iprot.readString().decode("utf-8", errors="replace")
                                if sys.version_info[0] == 2
                                else iprot.readString()
                            )
                            _elem177.append(_elem183)
                        iprot.readListEnd()
                        self.skewedColValues.append(_elem177)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.skewedColValueLocationMaps = {}
                    (_ktype185, _vtype186, _size184) = iprot.readMapBegin()
                    for _i188 in range(_size184):
                        _key189 = []
                        (_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()
                            )
                            _key189.append(_elem196)
                        iprot.readListEnd()
                        _val190 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.skewedColValueLocationMaps[_key189] = _val190
                    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 iter197 in self.skewedColNames:
                oprot.writeString(iter197.encode("utf-8") if sys.version_info[0] == 2 else iter197)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.skewedColValues is not None:
            oprot.writeFieldBegin("skewedColValues", TType.LIST, 2)
            oprot.writeListBegin(TType.LIST, len(self.skewedColValues))
            for iter198 in self.skewedColValues:
                oprot.writeListBegin(TType.STRING, len(iter198))
                for iter199 in iter198:
                    oprot.writeString(iter199.encode("utf-8") if sys.version_info[0] == 2 else iter199)
                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 kiter200, viter201 in self.skewedColValueLocationMaps.items():
                oprot.writeListBegin(TType.STRING, len(kiter200))
                for iter202 in kiter200:
                    oprot.writeString(iter202.encode("utf-8") if sys.version_info[0] == 2 else iter202)
                oprot.writeListEnd()
                oprot.writeString(viter201.encode("utf-8") if sys.version_info[0] == 2 else viter201)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype206, _size203) = iprot.readListBegin()
                    for _i207 in range(_size203):
                        _elem208 = FieldSchema()
                        _elem208.read(iprot)
                        self.cols.append(_elem208)
                    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 = []
                    (_etype212, _size209) = iprot.readListBegin()
                    for _i213 in range(_size209):
                        _elem214 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.bucketCols.append(_elem214)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.LIST:
                    self.sortCols = []
                    (_etype218, _size215) = iprot.readListBegin()
                    for _i219 in range(_size215):
                        _elem220 = Order()
                        _elem220.read(iprot)
                        self.sortCols.append(_elem220)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.MAP:
                    self.parameters = {}
                    (_ktype222, _vtype223, _size221) = iprot.readMapBegin()
                    for _i225 in range(_size221):
                        _key226 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val227 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameters[_key226] = _val227
                    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 iter228 in self.cols:
                iter228.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 iter229 in self.bucketCols:
                oprot.writeString(iter229.encode("utf-8") if sys.version_info[0] == 2 else iter229)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.sortCols is not None:
            oprot.writeFieldBegin("sortCols", TType.LIST, 9)
            oprot.writeListBegin(TType.STRUCT, len(self.sortCols))
            for iter230 in self.sortCols:
                iter230.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 kiter231, viter232 in self.parameters.items():
                oprot.writeString(kiter231.encode("utf-8") if sys.version_info[0] == 2 else kiter231)
                oprot.writeString(viter232.encode("utf-8") if sys.version_info[0] == 2 else viter232)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - catName
     - dbName
     - tblName
     - tablesUsed
     - validTxnList
     - materializationTime
     - sourceTables

    """

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

    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()
                    (_etype236, _size233) = iprot.readSetBegin()
                    for _i237 in range(_size233):
                        _elem238 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.tablesUsed.add(_elem238)
                    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)
            elif fid == 7:
                if ftype == TType.LIST:
                    self.sourceTables = []
                    (_etype242, _size239) = iprot.readListBegin()
                    for _i243 in range(_size239):
                        _elem244 = SourceTable()
                        _elem244.read(iprot)
                        self.sourceTables.append(_elem244)
                    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("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 iter245 in self.tablesUsed:
                oprot.writeString(iter245.encode("utf-8") if sys.version_info[0] == 2 else iter245)
            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()
        if self.sourceTables is not None:
            oprot.writeFieldBegin("sourceTables", TType.LIST, 7)
            oprot.writeListBegin(TType.STRUCT, len(self.sourceTables))
            for iter246 in self.sourceTables:
                iter246.write(oprot)
            oprot.writeListEnd()
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Timestamp:
    """
    Attributes:
     - secondsSinceEpoch

    """

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

    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.secondsSinceEpoch = 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("Timestamp")
        if self.secondsSinceEpoch is not None:
            oprot.writeFieldBegin("secondsSinceEpoch", TType.I64, 1)
            oprot.writeI64(self.secondsSinceEpoch)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TimestampColumnStatsData:
    """
    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 = Timestamp()
                    self.lowValue.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.highValue = Timestamp()
                    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("TimestampColumnStatsData")
        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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - booleanStats
     - longStats
     - doubleStats
     - stringStats
     - binaryStats
     - decimalStats
     - dateStats
     - timestampStats

    """

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

    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)
            elif fid == 8:
                if ftype == TType.STRUCT:
                    self.timestampStats = TimestampColumnStatsData()
                    self.timestampStats.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()
        if self.timestampStats is not None:
            oprot.writeFieldBegin("timestampStats", TType.STRUCT, 8)
            self.timestampStats.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - statsDesc
     - statsObj
     - isStatsCompliant
     - engine

    """

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

    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 = []
                    (_etype250, _size247) = iprot.readListBegin()
                    for _i251 in range(_size247):
                        _elem252 = ColumnStatisticsObj()
                        _elem252.read(iprot)
                        self.statsObj.append(_elem252)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.isStatsCompliant = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.engine = (
                        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("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 iter253 in self.statsObj:
                iter253.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.isStatsCompliant is not None:
            oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 3)
            oprot.writeBool(self.isStatsCompliant)
            oprot.writeFieldEnd()
        if self.engine is not None:
            oprot.writeFieldBegin("engine", TType.STRING, 4)
            oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class FileMetadata:
    """
    Attributes:
     - type
     - version
     - data

    """

    def __init__(
        self,
        type=1,
        version=1,
        data=None,
    ):
        self.type = type
        self.version = version
        self.data = data

    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.BYTE:
                    self.type = iprot.readByte()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BYTE:
                    self.version = iprot.readByte()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.data = []
                    (_etype257, _size254) = iprot.readListBegin()
                    for _i258 in range(_size254):
                        _elem259 = iprot.readBinary()
                        self.data.append(_elem259)
                    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("FileMetadata")
        if self.type is not None:
            oprot.writeFieldBegin("type", TType.BYTE, 1)
            oprot.writeByte(self.type)
            oprot.writeFieldEnd()
        if self.version is not None:
            oprot.writeFieldBegin("version", TType.BYTE, 2)
            oprot.writeByte(self.version)
            oprot.writeFieldEnd()
        if self.data is not None:
            oprot.writeFieldBegin("data", TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.data))
            for iter260 in self.data:
                oprot.writeBinary(iter260)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ObjectDictionary:
    """
    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.MAP:
                    self.values = {}
                    (_ktype262, _vtype263, _size261) = iprot.readMapBegin()
                    for _i265 in range(_size261):
                        _key266 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val267 = []
                        (_etype271, _size268) = iprot.readListBegin()
                        for _i272 in range(_size268):
                            _elem273 = iprot.readBinary()
                            _val267.append(_elem273)
                        iprot.readListEnd()
                        self.values[_key266] = _val267
                    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("ObjectDictionary")
        if self.values is not None:
            oprot.writeFieldBegin("values", TType.MAP, 1)
            oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.values))
            for kiter274, viter275 in self.values.items():
                oprot.writeString(kiter274.encode("utf-8") if sys.version_info[0] == 2 else kiter274)
                oprot.writeListBegin(TType.STRING, len(viter275))
                for iter276 in viter275:
                    oprot.writeBinary(iter276)
                oprot.writeListEnd()
            oprot.writeMapEnd()
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - tableName
     - dbName
     - owner
     - createTime
     - lastAccessTime
     - retention
     - sd
     - partitionKeys
     - parameters
     - viewOriginalText
     - viewExpandedText
     - tableType
     - privileges
     - temporary
     - rewriteEnabled
     - creationMetadata
     - catName
     - ownerType
     - writeId
     - isStatsCompliant
     - colStats
     - accessType
     - requiredReadCapabilities
     - requiredWriteCapabilities
     - id
     - fileMetadata
     - dictionary
     - txnId

    """

    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,
        writeId=-1,
        isStatsCompliant=None,
        colStats=None,
        accessType=None,
        requiredReadCapabilities=None,
        requiredWriteCapabilities=None,
        id=None,
        fileMetadata=None,
        dictionary=None,
        txnId=None,
    ):
        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
        self.writeId = writeId
        self.isStatsCompliant = isStatsCompliant
        self.colStats = colStats
        self.accessType = accessType
        self.requiredReadCapabilities = requiredReadCapabilities
        self.requiredWriteCapabilities = requiredWriteCapabilities
        self.id = id
        self.fileMetadata = fileMetadata
        self.dictionary = dictionary
        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.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 = []
                    (_etype280, _size277) = iprot.readListBegin()
                    for _i281 in range(_size277):
                        _elem282 = FieldSchema()
                        _elem282.read(iprot)
                        self.partitionKeys.append(_elem282)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.MAP:
                    self.parameters = {}
                    (_ktype284, _vtype285, _size283) = iprot.readMapBegin()
                    for _i287 in range(_size283):
                        _key288 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val289 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameters[_key288] = _val289
                    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)
            elif fid == 19:
                if ftype == TType.I64:
                    self.writeId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 20:
                if ftype == TType.BOOL:
                    self.isStatsCompliant = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 21:
                if ftype == TType.STRUCT:
                    self.colStats = ColumnStatistics()
                    self.colStats.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 22:
                if ftype == TType.BYTE:
                    self.accessType = iprot.readByte()
                else:
                    iprot.skip(ftype)
            elif fid == 23:
                if ftype == TType.LIST:
                    self.requiredReadCapabilities = []
                    (_etype293, _size290) = iprot.readListBegin()
                    for _i294 in range(_size290):
                        _elem295 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.requiredReadCapabilities.append(_elem295)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 24:
                if ftype == TType.LIST:
                    self.requiredWriteCapabilities = []
                    (_etype299, _size296) = iprot.readListBegin()
                    for _i300 in range(_size296):
                        _elem301 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.requiredWriteCapabilities.append(_elem301)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 25:
                if ftype == TType.I64:
                    self.id = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 26:
                if ftype == TType.STRUCT:
                    self.fileMetadata = FileMetadata()
                    self.fileMetadata.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 27:
                if ftype == TType.STRUCT:
                    self.dictionary = ObjectDictionary()
                    self.dictionary.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 28:
                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("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 iter302 in self.partitionKeys:
                iter302.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 kiter303, viter304 in self.parameters.items():
                oprot.writeString(kiter303.encode("utf-8") if sys.version_info[0] == 2 else kiter303)
                oprot.writeString(viter304.encode("utf-8") if sys.version_info[0] == 2 else viter304)
            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()
        if self.writeId is not None:
            oprot.writeFieldBegin("writeId", TType.I64, 19)
            oprot.writeI64(self.writeId)
            oprot.writeFieldEnd()
        if self.isStatsCompliant is not None:
            oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 20)
            oprot.writeBool(self.isStatsCompliant)
            oprot.writeFieldEnd()
        if self.colStats is not None:
            oprot.writeFieldBegin("colStats", TType.STRUCT, 21)
            self.colStats.write(oprot)
            oprot.writeFieldEnd()
        if self.accessType is not None:
            oprot.writeFieldBegin("accessType", TType.BYTE, 22)
            oprot.writeByte(self.accessType)
            oprot.writeFieldEnd()
        if self.requiredReadCapabilities is not None:
            oprot.writeFieldBegin("requiredReadCapabilities", TType.LIST, 23)
            oprot.writeListBegin(TType.STRING, len(self.requiredReadCapabilities))
            for iter305 in self.requiredReadCapabilities:
                oprot.writeString(iter305.encode("utf-8") if sys.version_info[0] == 2 else iter305)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.requiredWriteCapabilities is not None:
            oprot.writeFieldBegin("requiredWriteCapabilities", TType.LIST, 24)
            oprot.writeListBegin(TType.STRING, len(self.requiredWriteCapabilities))
            for iter306 in self.requiredWriteCapabilities:
                oprot.writeString(iter306.encode("utf-8") if sys.version_info[0] == 2 else iter306)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 25)
            oprot.writeI64(self.id)
            oprot.writeFieldEnd()
        if self.fileMetadata is not None:
            oprot.writeFieldBegin("fileMetadata", TType.STRUCT, 26)
            self.fileMetadata.write(oprot)
            oprot.writeFieldEnd()
        if self.dictionary is not None:
            oprot.writeFieldBegin("dictionary", TType.STRUCT, 27)
            self.dictionary.write(oprot)
            oprot.writeFieldEnd()
        if self.txnId is not None:
            oprot.writeFieldBegin("txnId", TType.I64, 28)
            oprot.writeI64(self.txnId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SourceTable:
    """
    Attributes:
     - table
     - insertedCount
     - updatedCount
     - deletedCount

    """

    def __init__(
        self,
        table=None,
        insertedCount=None,
        updatedCount=None,
        deletedCount=None,
    ):
        self.table = table
        self.insertedCount = insertedCount
        self.updatedCount = updatedCount
        self.deletedCount = deletedCount

    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)
            elif fid == 2:
                if ftype == TType.I64:
                    self.insertedCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.updatedCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.deletedCount = 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("SourceTable")
        if self.table is not None:
            oprot.writeFieldBegin("table", TType.STRUCT, 1)
            self.table.write(oprot)
            oprot.writeFieldEnd()
        if self.insertedCount is not None:
            oprot.writeFieldBegin("insertedCount", TType.I64, 2)
            oprot.writeI64(self.insertedCount)
            oprot.writeFieldEnd()
        if self.updatedCount is not None:
            oprot.writeFieldBegin("updatedCount", TType.I64, 3)
            oprot.writeI64(self.updatedCount)
            oprot.writeFieldEnd()
        if self.deletedCount is not None:
            oprot.writeFieldBegin("deletedCount", TType.I64, 4)
            oprot.writeI64(self.deletedCount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - values
     - dbName
     - tableName
     - createTime
     - lastAccessTime
     - sd
     - parameters
     - privileges
     - catName
     - writeId
     - isStatsCompliant
     - colStats
     - fileMetadata

    """

    def __init__(
        self,
        values=None,
        dbName=None,
        tableName=None,
        createTime=None,
        lastAccessTime=None,
        sd=None,
        parameters=None,
        privileges=None,
        catName=None,
        writeId=-1,
        isStatsCompliant=None,
        colStats=None,
        fileMetadata=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
        self.writeId = writeId
        self.isStatsCompliant = isStatsCompliant
        self.colStats = colStats
        self.fileMetadata = fileMetadata

    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 = []
                    (_etype310, _size307) = iprot.readListBegin()
                    for _i311 in range(_size307):
                        _elem312 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.values.append(_elem312)
                    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 = {}
                    (_ktype314, _vtype315, _size313) = iprot.readMapBegin()
                    for _i317 in range(_size313):
                        _key318 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val319 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameters[_key318] = _val319
                    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)
            elif fid == 10:
                if ftype == TType.I64:
                    self.writeId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.BOOL:
                    self.isStatsCompliant = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.STRUCT:
                    self.colStats = ColumnStatistics()
                    self.colStats.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                if ftype == TType.STRUCT:
                    self.fileMetadata = FileMetadata()
                    self.fileMetadata.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("Partition")
        if self.values is not None:
            oprot.writeFieldBegin("values", TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.values))
            for iter320 in self.values:
                oprot.writeString(iter320.encode("utf-8") if sys.version_info[0] == 2 else iter320)
            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 kiter321, viter322 in self.parameters.items():
                oprot.writeString(kiter321.encode("utf-8") if sys.version_info[0] == 2 else kiter321)
                oprot.writeString(viter322.encode("utf-8") if sys.version_info[0] == 2 else viter322)
            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()
        if self.writeId is not None:
            oprot.writeFieldBegin("writeId", TType.I64, 10)
            oprot.writeI64(self.writeId)
            oprot.writeFieldEnd()
        if self.isStatsCompliant is not None:
            oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 11)
            oprot.writeBool(self.isStatsCompliant)
            oprot.writeFieldEnd()
        if self.colStats is not None:
            oprot.writeFieldBegin("colStats", TType.STRUCT, 12)
            self.colStats.write(oprot)
            oprot.writeFieldEnd()
        if self.fileMetadata is not None:
            oprot.writeFieldBegin("fileMetadata", TType.STRUCT, 13)
            self.fileMetadata.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype326, _size323) = iprot.readListBegin()
                    for _i327 in range(_size323):
                        _elem328 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.values.append(_elem328)
                    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 = {}
                    (_ktype330, _vtype331, _size329) = iprot.readMapBegin()
                    for _i333 in range(_size329):
                        _key334 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val335 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameters[_key334] = _val335
                    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 iter336 in self.values:
                oprot.writeString(iter336.encode("utf-8") if sys.version_info[0] == 2 else iter336)
            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 kiter337, viter338 in self.parameters.items():
                oprot.writeString(kiter337.encode("utf-8") if sys.version_info[0] == 2 else kiter337)
                oprot.writeString(viter338.encode("utf-8") if sys.version_info[0] == 2 else viter338)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype342, _size339) = iprot.readListBegin()
                    for _i343 in range(_size339):
                        _elem344 = PartitionWithoutSD()
                        _elem344.read(iprot)
                        self.partitions.append(_elem344)
                    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 iter345 in self.partitions:
                iter345.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype349, _size346) = iprot.readListBegin()
                    for _i350 in range(_size346):
                        _elem351 = Partition()
                        _elem351.read(iprot)
                        self.partitions.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("PartitionListComposingSpec")
        if self.partitions is not None:
            oprot.writeFieldBegin("partitions", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter352 in self.partitions:
                iter352.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbName
     - tableName
     - rootPath
     - sharedSDPartitionSpec
     - partitionList
     - catName
     - writeId
     - isStatsCompliant

    """

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

    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)
            elif fid == 7:
                if ftype == TType.I64:
                    self.writeId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.BOOL:
                    self.isStatsCompliant = 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("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()
        if self.writeId is not None:
            oprot.writeFieldBegin("writeId", TType.I64, 7)
            oprot.writeI64(self.writeId)
            oprot.writeFieldEnd()
        if self.isStatsCompliant is not None:
            oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 8)
            oprot.writeBool(self.isStatsCompliant)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - colStats
     - partsFound
     - isStatsCompliant

    """

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

    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 = []
                    (_etype356, _size353) = iprot.readListBegin()
                    for _i357 in range(_size353):
                        _elem358 = ColumnStatisticsObj()
                        _elem358.read(iprot)
                        self.colStats.append(_elem358)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.partsFound = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.isStatsCompliant = 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("AggrStats")
        if self.colStats is not None:
            oprot.writeFieldBegin("colStats", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.colStats))
            for iter359 in self.colStats:
                iter359.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.partsFound is not None:
            oprot.writeFieldBegin("partsFound", TType.I64, 2)
            oprot.writeI64(self.partsFound)
            oprot.writeFieldEnd()
        if self.isStatsCompliant is not None:
            oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 3)
            oprot.writeBool(self.isStatsCompliant)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - colStats
     - needMerge
     - writeId
     - validWriteIdList
     - engine

    """

    def __init__(
        self,
        colStats=None,
        needMerge=None,
        writeId=-1,
        validWriteIdList=None,
        engine=None,
    ):
        self.colStats = colStats
        self.needMerge = needMerge
        self.writeId = writeId
        self.validWriteIdList = validWriteIdList
        self.engine = engine

    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 = []
                    (_etype363, _size360) = iprot.readListBegin()
                    for _i364 in range(_size360):
                        _elem365 = ColumnStatistics()
                        _elem365.read(iprot)
                        self.colStats.append(_elem365)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.needMerge = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.writeId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                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 == 5:
                if ftype == TType.STRING:
                    self.engine = (
                        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("SetPartitionsStatsRequest")
        if self.colStats is not None:
            oprot.writeFieldBegin("colStats", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.colStats))
            for iter366 in self.colStats:
                iter366.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.needMerge is not None:
            oprot.writeFieldBegin("needMerge", TType.BOOL, 2)
            oprot.writeBool(self.needMerge)
            oprot.writeFieldEnd()
        if self.writeId is not None:
            oprot.writeFieldBegin("writeId", TType.I64, 3)
            oprot.writeI64(self.writeId)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.engine is not None:
            oprot.writeFieldBegin("engine", TType.STRING, 5)
            oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SetPartitionsStatsResponse:
    """
    Attributes:
     - result

    """

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

    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.result = 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("SetPartitionsStatsResponse")
        if self.result is not None:
            oprot.writeFieldBegin("result", TType.BOOL, 1)
            oprot.writeBool(self.result)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype370, _size367) = iprot.readListBegin()
                    for _i371 in range(_size367):
                        _elem372 = FieldSchema()
                        _elem372.read(iprot)
                        self.fieldSchemas.append(_elem372)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.properties = {}
                    (_ktype374, _vtype375, _size373) = iprot.readMapBegin()
                    for _i377 in range(_size373):
                        _key378 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val379 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.properties[_key378] = _val379
                    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 iter380 in self.fieldSchemas:
                iter380.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 kiter381, viter382 in self.properties.items():
                oprot.writeString(kiter381.encode("utf-8") if sys.version_info[0] == 2 else kiter381)
                oprot.writeString(viter382.encode("utf-8") if sys.version_info[0] == 2 else viter382)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - db_name
     - tbl_name
     - catName
     - validWriteIdList
     - tableId

    """

    def __init__(
        self,
        db_name=None,
        tbl_name=None,
        catName=None,
        validWriteIdList=None,
        tableId=-1,
    ):
        self.db_name = db_name
        self.tbl_name = tbl_name
        self.catName = catName
        self.validWriteIdList = validWriteIdList
        self.tableId = tableId

    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)
            elif fid == 4:
                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 == 5:
                if ftype == TType.I64:
                    self.tableId = 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("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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.tableId is not None:
            oprot.writeFieldBegin("tableId", TType.I64, 5)
            oprot.writeI64(self.tableId)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype386, _size383) = iprot.readListBegin()
                    for _i387 in range(_size383):
                        _elem388 = SQLPrimaryKey()
                        _elem388.read(iprot)
                        self.primaryKeys.append(_elem388)
                    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 iter389 in self.primaryKeys:
                iter389.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - parent_db_name
     - parent_tbl_name
     - foreign_db_name
     - foreign_tbl_name
     - catName
     - validWriteIdList
     - tableId

    """

    def __init__(
        self,
        parent_db_name=None,
        parent_tbl_name=None,
        foreign_db_name=None,
        foreign_tbl_name=None,
        catName=None,
        validWriteIdList=None,
        tableId=-1,
    ):
        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
        self.validWriteIdList = validWriteIdList
        self.tableId = tableId

    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)
            elif fid == 6:
                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 == 7:
                if ftype == TType.I64:
                    self.tableId = 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("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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 6)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.tableId is not None:
            oprot.writeFieldBegin("tableId", TType.I64, 7)
            oprot.writeI64(self.tableId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype393, _size390) = iprot.readListBegin()
                    for _i394 in range(_size390):
                        _elem395 = SQLForeignKey()
                        _elem395.read(iprot)
                        self.foreignKeys.append(_elem395)
                    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 iter396 in self.foreignKeys:
                iter396.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - catName
     - db_name
     - tbl_name
     - validWriteIdList
     - tableId

    """

    def __init__(
        self,
        catName=None,
        db_name=None,
        tbl_name=None,
        validWriteIdList=None,
        tableId=-1,
    ):
        self.catName = catName
        self.db_name = db_name
        self.tbl_name = tbl_name
        self.validWriteIdList = validWriteIdList
        self.tableId = tableId

    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)
            elif fid == 4:
                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 == 5:
                if ftype == TType.I64:
                    self.tableId = 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("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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.tableId is not None:
            oprot.writeFieldBegin("tableId", TType.I64, 5)
            oprot.writeI64(self.tableId)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype400, _size397) = iprot.readListBegin()
                    for _i401 in range(_size397):
                        _elem402 = SQLUniqueConstraint()
                        _elem402.read(iprot)
                        self.uniqueConstraints.append(_elem402)
                    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 iter403 in self.uniqueConstraints:
                iter403.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - catName
     - db_name
     - tbl_name
     - validWriteIdList
     - tableId

    """

    def __init__(
        self,
        catName=None,
        db_name=None,
        tbl_name=None,
        validWriteIdList=None,
        tableId=-1,
    ):
        self.catName = catName
        self.db_name = db_name
        self.tbl_name = tbl_name
        self.validWriteIdList = validWriteIdList
        self.tableId = tableId

    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)
            elif fid == 4:
                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 == 5:
                if ftype == TType.I64:
                    self.tableId = 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("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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.tableId is not None:
            oprot.writeFieldBegin("tableId", TType.I64, 5)
            oprot.writeI64(self.tableId)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype407, _size404) = iprot.readListBegin()
                    for _i408 in range(_size404):
                        _elem409 = SQLNotNullConstraint()
                        _elem409.read(iprot)
                        self.notNullConstraints.append(_elem409)
                    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 iter410 in self.notNullConstraints:
                iter410.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - catName
     - db_name
     - tbl_name
     - validWriteIdList
     - tableId

    """

    def __init__(
        self,
        catName=None,
        db_name=None,
        tbl_name=None,
        validWriteIdList=None,
        tableId=-1,
    ):
        self.catName = catName
        self.db_name = db_name
        self.tbl_name = tbl_name
        self.validWriteIdList = validWriteIdList
        self.tableId = tableId

    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)
            elif fid == 4:
                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 == 5:
                if ftype == TType.I64:
                    self.tableId = 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("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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.tableId is not None:
            oprot.writeFieldBegin("tableId", TType.I64, 5)
            oprot.writeI64(self.tableId)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype414, _size411) = iprot.readListBegin()
                    for _i415 in range(_size411):
                        _elem416 = SQLDefaultConstraint()
                        _elem416.read(iprot)
                        self.defaultConstraints.append(_elem416)
                    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 iter417 in self.defaultConstraints:
                iter417.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - catName
     - db_name
     - tbl_name
     - validWriteIdList
     - tableId

    """

    def __init__(
        self,
        catName=None,
        db_name=None,
        tbl_name=None,
        validWriteIdList=None,
        tableId=-1,
    ):
        self.catName = catName
        self.db_name = db_name
        self.tbl_name = tbl_name
        self.validWriteIdList = validWriteIdList
        self.tableId = tableId

    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)
            elif fid == 4:
                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 == 5:
                if ftype == TType.I64:
                    self.tableId = 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("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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.tableId is not None:
            oprot.writeFieldBegin("tableId", TType.I64, 5)
            oprot.writeI64(self.tableId)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype421, _size418) = iprot.readListBegin()
                    for _i422 in range(_size418):
                        _elem423 = SQLCheckConstraint()
                        _elem423.read(iprot)
                        self.checkConstraints.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("CheckConstraintsResponse")
        if self.checkConstraints is not None:
            oprot.writeFieldBegin("checkConstraints", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.checkConstraints))
            for iter424 in self.checkConstraints:
                iter424.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AllTableConstraintsRequest:
    """
    Attributes:
     - dbName
     - tblName
     - catName
     - validWriteIdList
     - tableId

    """

    def __init__(
        self,
        dbName=None,
        tblName=None,
        catName=None,
        validWriteIdList=None,
        tableId=-1,
    ):
        self.dbName = dbName
        self.tblName = tblName
        self.catName = catName
        self.validWriteIdList = validWriteIdList
        self.tableId = tableId

    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.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.validWriteIdList = (
                        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.tableId = 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("AllTableConstraintsRequest")
        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.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.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 4)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.tableId is not None:
            oprot.writeFieldBegin("tableId", TType.I64, 5)
            oprot.writeI64(self.tableId)
            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.catName is None:
            raise TProtocolException(message="Required field catName is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AllTableConstraintsResponse:
    """
    Attributes:
     - allTableConstraints

    """

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

    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.allTableConstraints = SQLAllTableConstraints()
                    self.allTableConstraints.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("AllTableConstraintsResponse")
        if self.allTableConstraints is not None:
            oprot.writeFieldBegin("allTableConstraints", TType.STRUCT, 1)
            self.allTableConstraints.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype428, _size425) = iprot.readListBegin()
                    for _i429 in range(_size425):
                        _elem430 = SQLPrimaryKey()
                        _elem430.read(iprot)
                        self.primaryKeyCols.append(_elem430)
                    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 iter431 in self.primaryKeyCols:
                iter431.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype435, _size432) = iprot.readListBegin()
                    for _i436 in range(_size432):
                        _elem437 = SQLForeignKey()
                        _elem437.read(iprot)
                        self.foreignKeyCols.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("AddForeignKeyRequest")
        if self.foreignKeyCols is not None:
            oprot.writeFieldBegin("foreignKeyCols", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.foreignKeyCols))
            for iter438 in self.foreignKeyCols:
                iter438.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype442, _size439) = iprot.readListBegin()
                    for _i443 in range(_size439):
                        _elem444 = SQLUniqueConstraint()
                        _elem444.read(iprot)
                        self.uniqueConstraintCols.append(_elem444)
                    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 iter445 in self.uniqueConstraintCols:
                iter445.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype449, _size446) = iprot.readListBegin()
                    for _i450 in range(_size446):
                        _elem451 = SQLNotNullConstraint()
                        _elem451.read(iprot)
                        self.notNullConstraintCols.append(_elem451)
                    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 iter452 in self.notNullConstraintCols:
                iter452.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype456, _size453) = iprot.readListBegin()
                    for _i457 in range(_size453):
                        _elem458 = SQLDefaultConstraint()
                        _elem458.read(iprot)
                        self.defaultConstraintCols.append(_elem458)
                    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 iter459 in self.defaultConstraintCols:
                iter459.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype463, _size460) = iprot.readListBegin()
                    for _i464 in range(_size460):
                        _elem465 = SQLCheckConstraint()
                        _elem465.read(iprot)
                        self.checkConstraintCols.append(_elem465)
                    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 iter466 in self.checkConstraintCols:
                iter466.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype470, _size467) = iprot.readListBegin()
                    for _i471 in range(_size467):
                        _elem472 = Partition()
                        _elem472.read(iprot)
                        self.partitions.append(_elem472)
                    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 iter473 in self.partitions:
                iter473.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PartitionsSpecByExprResult:
    """
    Attributes:
     - partitionsSpec
     - hasUnknownPartitions

    """

    def __init__(
        self,
        partitionsSpec=None,
        hasUnknownPartitions=None,
    ):
        self.partitionsSpec = partitionsSpec
        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.partitionsSpec = []
                    (_etype477, _size474) = iprot.readListBegin()
                    for _i478 in range(_size474):
                        _elem479 = PartitionSpec()
                        _elem479.read(iprot)
                        self.partitionsSpec.append(_elem479)
                    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("PartitionsSpecByExprResult")
        if self.partitionsSpec is not None:
            oprot.writeFieldBegin("partitionsSpec", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitionsSpec))
            for iter480 in self.partitionsSpec:
                iter480.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.partitionsSpec is None:
            raise TProtocolException(message="Required field partitionsSpec is unset!")
        if self.hasUnknownPartitions is None:
            raise TProtocolException(message="Required field hasUnknownPartitions is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbName
     - tblName
     - expr
     - defaultPartitionName
     - maxParts
     - catName
     - order
     - validWriteIdList
     - id

    """

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

    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)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.order = (
                        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.validWriteIdList = (
                        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.id = 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("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()
        if self.order is not None:
            oprot.writeFieldBegin("order", TType.STRING, 7)
            oprot.writeString(self.order.encode("utf-8") if sys.version_info[0] == 2 else self.order)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 8)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 9)
            oprot.writeI64(self.id)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - tableStats
     - isStatsCompliant

    """

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

    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 = []
                    (_etype484, _size481) = iprot.readListBegin()
                    for _i485 in range(_size481):
                        _elem486 = ColumnStatisticsObj()
                        _elem486.read(iprot)
                        self.tableStats.append(_elem486)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.isStatsCompliant = 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("TableStatsResult")
        if self.tableStats is not None:
            oprot.writeFieldBegin("tableStats", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.tableStats))
            for iter487 in self.tableStats:
                iter487.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.isStatsCompliant is not None:
            oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 2)
            oprot.writeBool(self.isStatsCompliant)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - partStats
     - isStatsCompliant

    """

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

    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 = {}
                    (_ktype489, _vtype490, _size488) = iprot.readMapBegin()
                    for _i492 in range(_size488):
                        _key493 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val494 = []
                        (_etype498, _size495) = iprot.readListBegin()
                        for _i499 in range(_size495):
                            _elem500 = ColumnStatisticsObj()
                            _elem500.read(iprot)
                            _val494.append(_elem500)
                        iprot.readListEnd()
                        self.partStats[_key493] = _val494
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.isStatsCompliant = 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("PartitionsStatsResult")
        if self.partStats is not None:
            oprot.writeFieldBegin("partStats", TType.MAP, 1)
            oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.partStats))
            for kiter501, viter502 in self.partStats.items():
                oprot.writeString(kiter501.encode("utf-8") if sys.version_info[0] == 2 else kiter501)
                oprot.writeListBegin(TType.STRUCT, len(viter502))
                for iter503 in viter502:
                    iter503.write(oprot)
                oprot.writeListEnd()
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.isStatsCompliant is not None:
            oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 2)
            oprot.writeBool(self.isStatsCompliant)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbName
     - tblName
     - colNames
     - catName
     - validWriteIdList
     - engine
     - id

    """

    def __init__(
        self,
        dbName=None,
        tblName=None,
        colNames=None,
        catName=None,
        validWriteIdList=None,
        engine=None,
        id=-1,
    ):
        self.dbName = dbName
        self.tblName = tblName
        self.colNames = colNames
        self.catName = catName
        self.validWriteIdList = validWriteIdList
        self.engine = engine
        self.id = id

    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 = []
                    (_etype507, _size504) = iprot.readListBegin()
                    for _i508 in range(_size504):
                        _elem509 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.colNames.append(_elem509)
                    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)
            elif fid == 5:
                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 == 6:
                if ftype == TType.STRING:
                    self.engine = (
                        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.id = 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("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 iter510 in self.colNames:
                oprot.writeString(iter510.encode("utf-8") if sys.version_info[0] == 2 else iter510)
            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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.engine is not None:
            oprot.writeFieldBegin("engine", TType.STRING, 6)
            oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 7)
            oprot.writeI64(self.id)
            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.engine is None:
            raise TProtocolException(message="Required field engine is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbName
     - tblName
     - colNames
     - partNames
     - catName
     - validWriteIdList
     - engine

    """

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

    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 = []
                    (_etype514, _size511) = iprot.readListBegin()
                    for _i515 in range(_size511):
                        _elem516 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.colNames.append(_elem516)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.partNames = []
                    (_etype520, _size517) = iprot.readListBegin()
                    for _i521 in range(_size517):
                        _elem522 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partNames.append(_elem522)
                    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)
            elif fid == 6:
                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 == 7:
                if ftype == TType.STRING:
                    self.engine = (
                        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 iter523 in self.colNames:
                oprot.writeString(iter523.encode("utf-8") if sys.version_info[0] == 2 else iter523)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.partNames is not None:
            oprot.writeFieldBegin("partNames", TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.partNames))
            for iter524 in self.partNames:
                oprot.writeString(iter524.encode("utf-8") if sys.version_info[0] == 2 else iter524)
            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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 6)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.engine is not None:
            oprot.writeFieldBegin("engine", TType.STRING, 7)
            oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine)
            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!")
        if self.engine is None:
            raise TProtocolException(message="Required field engine is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - partitions
     - isStatsCompliant

    """

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

    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 = []
                    (_etype528, _size525) = iprot.readListBegin()
                    for _i529 in range(_size525):
                        _elem530 = Partition()
                        _elem530.read(iprot)
                        self.partitions.append(_elem530)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.isStatsCompliant = 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("AddPartitionsResult")
        if self.partitions is not None:
            oprot.writeFieldBegin("partitions", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter531 in self.partitions:
                iter531.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.isStatsCompliant is not None:
            oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 2)
            oprot.writeBool(self.isStatsCompliant)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbName
     - tblName
     - parts
     - ifNotExists
     - needResult
     - catName
     - validWriteIdList

    """

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

    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 = []
                    (_etype535, _size532) = iprot.readListBegin()
                    for _i536 in range(_size532):
                        _elem537 = Partition()
                        _elem537.read(iprot)
                        self.parts.append(_elem537)
                    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)
            elif fid == 7:
                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)
            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 iter538 in self.parts:
                iter538.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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 7)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype542, _size539) = iprot.readListBegin()
                    for _i543 in range(_size539):
                        _elem544 = Partition()
                        _elem544.read(iprot)
                        self.partitions.append(_elem544)
                    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 iter545 in self.partitions:
                iter545.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype549, _size546) = iprot.readListBegin()
                    for _i550 in range(_size546):
                        _elem551 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.names.append(_elem551)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.exprs = []
                    (_etype555, _size552) = iprot.readListBegin()
                    for _i556 in range(_size552):
                        _elem557 = DropPartitionsExpr()
                        _elem557.read(iprot)
                        self.exprs.append(_elem557)
                    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 iter558 in self.names:
                oprot.writeString(iter558.encode("utf-8") if sys.version_info[0] == 2 else iter558)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.exprs is not None:
            oprot.writeFieldBegin("exprs", TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.exprs))
            for iter559 in self.exprs:
                iter559.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbName
     - tblName
     - partitionKeys
     - applyDistinct
     - filter
     - partitionOrder
     - ascending
     - maxParts
     - catName
     - validWriteIdList

    """

    def __init__(
        self,
        dbName=None,
        tblName=None,
        partitionKeys=None,
        applyDistinct=True,
        filter=None,
        partitionOrder=None,
        ascending=True,
        maxParts=-1,
        catName=None,
        validWriteIdList=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
        self.validWriteIdList = validWriteIdList

    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 = []
                    (_etype563, _size560) = iprot.readListBegin()
                    for _i564 in range(_size560):
                        _elem565 = FieldSchema()
                        _elem565.read(iprot)
                        self.partitionKeys.append(_elem565)
                    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 = []
                    (_etype569, _size566) = iprot.readListBegin()
                    for _i570 in range(_size566):
                        _elem571 = FieldSchema()
                        _elem571.read(iprot)
                        self.partitionOrder.append(_elem571)
                    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)
            elif fid == 10:
                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)
            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 iter572 in self.partitionKeys:
                iter572.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 iter573 in self.partitionOrder:
                iter573.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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 10)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype577, _size574) = iprot.readListBegin()
                    for _i578 in range(_size574):
                        _elem579 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.row.append(_elem579)
                    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 iter580 in self.row:
                oprot.writeString(iter580.encode("utf-8") if sys.version_info[0] == 2 else iter580)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype584, _size581) = iprot.readListBegin()
                    for _i585 in range(_size581):
                        _elem586 = PartitionValuesRow()
                        _elem586.read(iprot)
                        self.partitionValues.append(_elem586)
                    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 iter587 in self.partitionValues:
                iter587.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionsByNamesRequest:
    """
    Attributes:
     - db_name
     - tbl_name
     - names
     - get_col_stats
     - processorCapabilities
     - processorIdentifier
     - engine
     - validWriteIdList
     - getFileMetadata
     - id

    """

    def __init__(
        self,
        db_name=None,
        tbl_name=None,
        names=None,
        get_col_stats=None,
        processorCapabilities=None,
        processorIdentifier=None,
        engine=None,
        validWriteIdList=None,
        getFileMetadata=None,
        id=-1,
    ):
        self.db_name = db_name
        self.tbl_name = tbl_name
        self.names = names
        self.get_col_stats = get_col_stats
        self.processorCapabilities = processorCapabilities
        self.processorIdentifier = processorIdentifier
        self.engine = engine
        self.validWriteIdList = validWriteIdList
        self.getFileMetadata = getFileMetadata
        self.id = id

    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.LIST:
                    self.names = []
                    (_etype591, _size588) = iprot.readListBegin()
                    for _i592 in range(_size588):
                        _elem593 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.names.append(_elem593)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.get_col_stats = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.processorCapabilities = []
                    (_etype597, _size594) = iprot.readListBegin()
                    for _i598 in range(_size594):
                        _elem599 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.processorCapabilities.append(_elem599)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.processorIdentifier = (
                        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.engine = (
                        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.validWriteIdList = (
                        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.BOOL:
                    self.getFileMetadata = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I64:
                    self.id = 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("GetPartitionsByNamesRequest")
        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.names is not None:
            oprot.writeFieldBegin("names", TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.names))
            for iter600 in self.names:
                oprot.writeString(iter600.encode("utf-8") if sys.version_info[0] == 2 else iter600)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.get_col_stats is not None:
            oprot.writeFieldBegin("get_col_stats", TType.BOOL, 4)
            oprot.writeBool(self.get_col_stats)
            oprot.writeFieldEnd()
        if self.processorCapabilities is not None:
            oprot.writeFieldBegin("processorCapabilities", TType.LIST, 5)
            oprot.writeListBegin(TType.STRING, len(self.processorCapabilities))
            for iter601 in self.processorCapabilities:
                oprot.writeString(iter601.encode("utf-8") if sys.version_info[0] == 2 else iter601)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.processorIdentifier is not None:
            oprot.writeFieldBegin("processorIdentifier", TType.STRING, 6)
            oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier)
            oprot.writeFieldEnd()
        if self.engine is not None:
            oprot.writeFieldBegin("engine", TType.STRING, 7)
            oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 8)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.getFileMetadata is not None:
            oprot.writeFieldBegin("getFileMetadata", TType.BOOL, 9)
            oprot.writeBool(self.getFileMetadata)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 10)
            oprot.writeI64(self.id)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionsByNamesResult:
    """
    Attributes:
     - partitions
     - dictionary

    """

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

    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 = []
                    (_etype605, _size602) = iprot.readListBegin()
                    for _i606 in range(_size602):
                        _elem607 = Partition()
                        _elem607.read(iprot)
                        self.partitions.append(_elem607)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.dictionary = ObjectDictionary()
                    self.dictionary.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("GetPartitionsByNamesResult")
        if self.partitions is not None:
            oprot.writeFieldBegin("partitions", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter608 in self.partitions:
                iter608.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.dictionary is not None:
            oprot.writeFieldBegin("dictionary", TType.STRUCT, 2)
            self.dictionary.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DataConnector:
    """
    Attributes:
     - name
     - type
     - url
     - description
     - parameters
     - ownerName
     - ownerType
     - createTime

    """

    def __init__(
        self,
        name=None,
        type=None,
        url=None,
        description=None,
        parameters=None,
        ownerName=None,
        ownerType=None,
        createTime=None,
    ):
        self.name = name
        self.type = type
        self.url = url
        self.description = description
        self.parameters = parameters
        self.ownerName = ownerName
        self.ownerType = ownerType
        self.createTime = createTime

    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.url = (
                        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.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.MAP:
                    self.parameters = {}
                    (_ktype610, _vtype611, _size609) = iprot.readMapBegin()
                    for _i613 in range(_size609):
                        _key614 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val615 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameters[_key614] = _val615
                    iprot.readMapEnd()
                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.I32:
                    self.createTime = 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("DataConnector")
        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.url is not None:
            oprot.writeFieldBegin("url", TType.STRING, 3)
            oprot.writeString(self.url.encode("utf-8") if sys.version_info[0] == 2 else self.url)
            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.parameters is not None:
            oprot.writeFieldBegin("parameters", TType.MAP, 5)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
            for kiter616, viter617 in self.parameters.items():
                oprot.writeString(kiter616.encode("utf-8") if sys.version_info[0] == 2 else kiter616)
                oprot.writeString(viter617.encode("utf-8") if sys.version_info[0] == 2 else viter617)
            oprot.writeMapEnd()
            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.createTime is not None:
            oprot.writeFieldBegin("createTime", TType.I32, 8)
            oprot.writeI32(self.createTime)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype621, _size618) = iprot.readListBegin()
                    for _i622 in range(_size618):
                        _elem623 = ResourceUri()
                        _elem623.read(iprot)
                        self.resourceUris.append(_elem623)
                    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 iter624 in self.resourceUris:
                iter624.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype628, _size625) = iprot.readListBegin()
                    for _i629 in range(_size625):
                        _elem630 = TxnInfo()
                        _elem630.read(iprot)
                        self.open_txns.append(_elem630)
                    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 iter631 in self.open_txns:
                iter631.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype635, _size632) = iprot.readListBegin()
                    for _i636 in range(_size632):
                        _elem637 = iprot.readI64()
                        self.open_txns.append(_elem637)
                    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 iter638 in self.open_txns:
                oprot.writeI64(iter638)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - num_txns
     - user
     - hostname
     - agentInfo
     - replPolicy
     - replSrcTxnIds
     - txn_type

    """

    def __init__(
        self,
        num_txns=None,
        user=None,
        hostname=None,
        agentInfo="Unknown",
        replPolicy=None,
        replSrcTxnIds=None,
        txn_type=0,
    ):
        self.num_txns = num_txns
        self.user = user
        self.hostname = hostname
        self.agentInfo = agentInfo
        self.replPolicy = replPolicy
        self.replSrcTxnIds = replSrcTxnIds
        self.txn_type = txn_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.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 = []
                    (_etype642, _size639) = iprot.readListBegin()
                    for _i643 in range(_size639):
                        _elem644 = iprot.readI64()
                        self.replSrcTxnIds.append(_elem644)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.txn_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("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 iter645 in self.replSrcTxnIds:
                oprot.writeI64(iter645)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.txn_type is not None:
            oprot.writeFieldBegin("txn_type", TType.I32, 7)
            oprot.writeI32(self.txn_type)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype649, _size646) = iprot.readListBegin()
                    for _i650 in range(_size646):
                        _elem651 = iprot.readI64()
                        self.txn_ids.append(_elem651)
                    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 iter652 in self.txn_ids:
                oprot.writeI64(iter652)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - txnid
     - replPolicy
     - txn_type

    """

    def __init__(
        self,
        txnid=None,
        replPolicy=None,
        txn_type=None,
    ):
        self.txnid = txnid
        self.replPolicy = replPolicy
        self.txn_type = txn_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.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)
            elif fid == 3:
                if ftype == TType.I32:
                    self.txn_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("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()
        if self.txn_type is not None:
            oprot.writeFieldBegin("txn_type", TType.I32, 3)
            oprot.writeI32(self.txn_type)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype656, _size653) = iprot.readListBegin()
                    for _i657 in range(_size653):
                        _elem658 = iprot.readI64()
                        self.txn_ids.append(_elem658)
                    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 iter659 in self.txn_ids:
                oprot.writeI64(iter659)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CommitTxnKeyValue:
    """
    Attributes:
     - tableId
     - key
     - value

    """

    def __init__(
        self,
        tableId=None,
        key=None,
        value=None,
    ):
        self.tableId = tableId
        self.key = key
        self.value = value

    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.tableId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.key = (
                        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.value = (
                        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("CommitTxnKeyValue")
        if self.tableId is not None:
            oprot.writeFieldBegin("tableId", TType.I64, 1)
            oprot.writeI64(self.tableId)
            oprot.writeFieldEnd()
        if self.key is not None:
            oprot.writeFieldBegin("key", TType.STRING, 2)
            oprot.writeString(self.key.encode("utf-8") if sys.version_info[0] == 2 else self.key)
            oprot.writeFieldEnd()
        if self.value is not None:
            oprot.writeFieldBegin("value", TType.STRING, 3)
            oprot.writeString(self.value.encode("utf-8") if sys.version_info[0] == 2 else self.value)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.tableId is None:
            raise TProtocolException(message="Required field tableId is unset!")
        if self.key is None:
            raise TProtocolException(message="Required field key is unset!")
        if self.value is None:
            raise TProtocolException(message="Required field value is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class WriteEventInfo:
    """
    Attributes:
     - writeId
     - database
     - table
     - files
     - partition
     - tableObj
     - partitionObj

    """

    def __init__(
        self,
        writeId=None,
        database=None,
        table=None,
        files=None,
        partition=None,
        tableObj=None,
        partitionObj=None,
    ):
        self.writeId = writeId
        self.database = database
        self.table = table
        self.files = files
        self.partition = partition
        self.tableObj = tableObj
        self.partitionObj = partitionObj

    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.writeId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.database = (
                        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 = (
                        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.files = (
                        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.partition = (
                        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.tableObj = (
                        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.partitionObj = (
                        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("WriteEventInfo")
        if self.writeId is not None:
            oprot.writeFieldBegin("writeId", TType.I64, 1)
            oprot.writeI64(self.writeId)
            oprot.writeFieldEnd()
        if self.database is not None:
            oprot.writeFieldBegin("database", TType.STRING, 2)
            oprot.writeString(self.database.encode("utf-8") if sys.version_info[0] == 2 else self.database)
            oprot.writeFieldEnd()
        if self.table is not None:
            oprot.writeFieldBegin("table", TType.STRING, 3)
            oprot.writeString(self.table.encode("utf-8") if sys.version_info[0] == 2 else self.table)
            oprot.writeFieldEnd()
        if self.files is not None:
            oprot.writeFieldBegin("files", TType.STRING, 4)
            oprot.writeString(self.files.encode("utf-8") if sys.version_info[0] == 2 else self.files)
            oprot.writeFieldEnd()
        if self.partition is not None:
            oprot.writeFieldBegin("partition", TType.STRING, 5)
            oprot.writeString(self.partition.encode("utf-8") if sys.version_info[0] == 2 else self.partition)
            oprot.writeFieldEnd()
        if self.tableObj is not None:
            oprot.writeFieldBegin("tableObj", TType.STRING, 6)
            oprot.writeString(self.tableObj.encode("utf-8") if sys.version_info[0] == 2 else self.tableObj)
            oprot.writeFieldEnd()
        if self.partitionObj is not None:
            oprot.writeFieldBegin("partitionObj", TType.STRING, 7)
            oprot.writeString(self.partitionObj.encode("utf-8") if sys.version_info[0] == 2 else self.partitionObj)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReplLastIdInfo:
    """
    Attributes:
     - database
     - lastReplId
     - table
     - catalog
     - partitionList

    """

    def __init__(
        self,
        database=None,
        lastReplId=None,
        table=None,
        catalog=None,
        partitionList=None,
    ):
        self.database = database
        self.lastReplId = lastReplId
        self.table = table
        self.catalog = catalog
        self.partitionList = partitionList

    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.database = (
                        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.lastReplId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.table = (
                        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.catalog = (
                        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.partitionList = []
                    (_etype663, _size660) = iprot.readListBegin()
                    for _i664 in range(_size660):
                        _elem665 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partitionList.append(_elem665)
                    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("ReplLastIdInfo")
        if self.database is not None:
            oprot.writeFieldBegin("database", TType.STRING, 1)
            oprot.writeString(self.database.encode("utf-8") if sys.version_info[0] == 2 else self.database)
            oprot.writeFieldEnd()
        if self.lastReplId is not None:
            oprot.writeFieldBegin("lastReplId", TType.I64, 2)
            oprot.writeI64(self.lastReplId)
            oprot.writeFieldEnd()
        if self.table is not None:
            oprot.writeFieldBegin("table", TType.STRING, 3)
            oprot.writeString(self.table.encode("utf-8") if sys.version_info[0] == 2 else self.table)
            oprot.writeFieldEnd()
        if self.catalog is not None:
            oprot.writeFieldBegin("catalog", TType.STRING, 4)
            oprot.writeString(self.catalog.encode("utf-8") if sys.version_info[0] == 2 else self.catalog)
            oprot.writeFieldEnd()
        if self.partitionList is not None:
            oprot.writeFieldBegin("partitionList", TType.LIST, 5)
            oprot.writeListBegin(TType.STRING, len(self.partitionList))
            for iter666 in self.partitionList:
                oprot.writeString(iter666.encode("utf-8") if sys.version_info[0] == 2 else iter666)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.database is None:
            raise TProtocolException(message="Required field database is unset!")
        if self.lastReplId is None:
            raise TProtocolException(message="Required field lastReplId is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class UpdateTransactionalStatsRequest:
    """
    Attributes:
     - tableId
     - insertCount
     - updatedCount
     - deletedCount

    """

    def __init__(
        self,
        tableId=None,
        insertCount=None,
        updatedCount=None,
        deletedCount=None,
    ):
        self.tableId = tableId
        self.insertCount = insertCount
        self.updatedCount = updatedCount
        self.deletedCount = deletedCount

    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.tableId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.insertCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.updatedCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.deletedCount = 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("UpdateTransactionalStatsRequest")
        if self.tableId is not None:
            oprot.writeFieldBegin("tableId", TType.I64, 1)
            oprot.writeI64(self.tableId)
            oprot.writeFieldEnd()
        if self.insertCount is not None:
            oprot.writeFieldBegin("insertCount", TType.I64, 2)
            oprot.writeI64(self.insertCount)
            oprot.writeFieldEnd()
        if self.updatedCount is not None:
            oprot.writeFieldBegin("updatedCount", TType.I64, 3)
            oprot.writeI64(self.updatedCount)
            oprot.writeFieldEnd()
        if self.deletedCount is not None:
            oprot.writeFieldBegin("deletedCount", TType.I64, 4)
            oprot.writeI64(self.deletedCount)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.tableId is None:
            raise TProtocolException(message="Required field tableId is unset!")
        if self.insertCount is None:
            raise TProtocolException(message="Required field insertCount is unset!")
        if self.updatedCount is None:
            raise TProtocolException(message="Required field updatedCount is unset!")
        if self.deletedCount is None:
            raise TProtocolException(message="Required field deletedCount is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - txnid
     - replPolicy
     - writeEventInfos
     - replLastIdInfo
     - keyValue
     - exclWriteEnabled
     - txn_type

    """

    def __init__(
        self,
        txnid=None,
        replPolicy=None,
        writeEventInfos=None,
        replLastIdInfo=None,
        keyValue=None,
        exclWriteEnabled=True,
        txn_type=None,
    ):
        self.txnid = txnid
        self.replPolicy = replPolicy
        self.writeEventInfos = writeEventInfos
        self.replLastIdInfo = replLastIdInfo
        self.keyValue = keyValue
        self.exclWriteEnabled = exclWriteEnabled
        self.txn_type = txn_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.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)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.writeEventInfos = []
                    (_etype670, _size667) = iprot.readListBegin()
                    for _i671 in range(_size667):
                        _elem672 = WriteEventInfo()
                        _elem672.read(iprot)
                        self.writeEventInfos.append(_elem672)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.replLastIdInfo = ReplLastIdInfo()
                    self.replLastIdInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.keyValue = CommitTxnKeyValue()
                    self.keyValue.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.exclWriteEnabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.txn_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("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()
        if self.writeEventInfos is not None:
            oprot.writeFieldBegin("writeEventInfos", TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.writeEventInfos))
            for iter673 in self.writeEventInfos:
                iter673.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.replLastIdInfo is not None:
            oprot.writeFieldBegin("replLastIdInfo", TType.STRUCT, 4)
            self.replLastIdInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.keyValue is not None:
            oprot.writeFieldBegin("keyValue", TType.STRUCT, 5)
            self.keyValue.write(oprot)
            oprot.writeFieldEnd()
        if self.exclWriteEnabled is not None:
            oprot.writeFieldBegin("exclWriteEnabled", TType.BOOL, 6)
            oprot.writeBool(self.exclWriteEnabled)
            oprot.writeFieldEnd()
        if self.txn_type is not None:
            oprot.writeFieldBegin("txn_type", TType.I32, 7)
            oprot.writeI32(self.txn_type)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype677, _size674) = iprot.readListBegin()
                    for _i678 in range(_size674):
                        _elem679 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partNames.append(_elem679)
                    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 iter680 in self.partNames:
                oprot.writeString(iter680.encode("utf-8") if sys.version_info[0] == 2 else iter680)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - fullTableNames
     - validTxnList
     - writeId

    """

    def __init__(
        self,
        fullTableNames=None,
        validTxnList=None,
        writeId=None,
    ):
        self.fullTableNames = fullTableNames
        self.validTxnList = validTxnList
        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.LIST:
                    self.fullTableNames = []
                    (_etype684, _size681) = iprot.readListBegin()
                    for _i685 in range(_size681):
                        _elem686 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.fullTableNames.append(_elem686)
                    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)
            elif fid == 3:
                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("GetValidWriteIdsRequest")
        if self.fullTableNames is not None:
            oprot.writeFieldBegin("fullTableNames", TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.fullTableNames))
            for iter687 in self.fullTableNames:
                oprot.writeString(iter687.encode("utf-8") if sys.version_info[0] == 2 else iter687)
            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()
        if self.writeId is not None:
            oprot.writeFieldBegin("writeId", TType.I64, 3)
            oprot.writeI64(self.writeId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype691, _size688) = iprot.readListBegin()
                    for _i692 in range(_size688):
                        _elem693 = iprot.readI64()
                        self.invalidWriteIds.append(_elem693)
                    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 iter694 in self.invalidWriteIds:
                oprot.writeI64(iter694)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype698, _size695) = iprot.readListBegin()
                    for _i699 in range(_size695):
                        _elem700 = TableValidWriteIds()
                        _elem700.read(iprot)
                        self.tblValidWriteIds.append(_elem700)
                    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 iter701 in self.tblValidWriteIds:
                iter701.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype705, _size702) = iprot.readListBegin()
                    for _i706 in range(_size702):
                        _elem707 = iprot.readI64()
                        self.txnIds.append(_elem707)
                    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 = []
                    (_etype711, _size708) = iprot.readListBegin()
                    for _i712 in range(_size708):
                        _elem713 = TxnToWriteId()
                        _elem713.read(iprot)
                        self.srcTxnToWriteIdList.append(_elem713)
                    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 iter714 in self.txnIds:
                oprot.writeI64(iter714)
            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 iter715 in self.srcTxnToWriteIdList:
                iter715.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype719, _size716) = iprot.readListBegin()
                    for _i720 in range(_size716):
                        _elem721 = TxnToWriteId()
                        _elem721.read(iprot)
                        self.txnToWriteIds.append(_elem721)
                    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 iter722 in self.txnToWriteIds:
                iter722.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class MaxAllocatedTableWriteIdRequest:
    """
    Attributes:
     - dbName
     - tableName

    """

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

    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)
            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("MaxAllocatedTableWriteIdRequest")
        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()
        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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class MaxAllocatedTableWriteIdResponse:
    """
    Attributes:
     - maxWriteId

    """

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

    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.maxWriteId = 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("MaxAllocatedTableWriteIdResponse")
        if self.maxWriteId is not None:
            oprot.writeFieldBegin("maxWriteId", TType.I64, 1)
            oprot.writeI64(self.maxWriteId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SeedTableWriteIdsRequest:
    """
    Attributes:
     - dbName
     - tableName
     - seedWriteId

    """

    def __init__(
        self,
        dbName=None,
        tableName=None,
        seedWriteId=None,
    ):
        self.dbName = dbName
        self.tableName = tableName
        self.seedWriteId = seedWriteId

    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.I64:
                    self.seedWriteId = 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("SeedTableWriteIdsRequest")
        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.seedWriteId is not None:
            oprot.writeFieldBegin("seedWriteId", TType.I64, 3)
            oprot.writeI64(self.seedWriteId)
            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.seedWriteId is None:
            raise TProtocolException(message="Required field seedWriteId is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class SeedTxnIdRequest:
    """
    Attributes:
     - seedTxnId

    """

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

    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.seedTxnId = 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("SeedTxnIdRequest")
        if self.seedTxnId is not None:
            oprot.writeFieldBegin("seedTxnId", TType.I64, 1)
            oprot.writeI64(self.seedTxnId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - component
     - txnid
     - user
     - hostname
     - agentInfo
     - zeroWaitReadEnabled
     - exclusiveCTAS

    """

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

    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 = []
                    (_etype726, _size723) = iprot.readListBegin()
                    for _i727 in range(_size723):
                        _elem728 = LockComponent()
                        _elem728.read(iprot)
                        self.component.append(_elem728)
                    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)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.zeroWaitReadEnabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.BOOL:
                    self.exclusiveCTAS = 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("LockRequest")
        if self.component is not None:
            oprot.writeFieldBegin("component", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.component))
            for iter729 in self.component:
                iter729.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()
        if self.zeroWaitReadEnabled is not None:
            oprot.writeFieldBegin("zeroWaitReadEnabled", TType.BOOL, 6)
            oprot.writeBool(self.zeroWaitReadEnabled)
            oprot.writeFieldEnd()
        if self.exclusiveCTAS is not None:
            oprot.writeFieldBegin("exclusiveCTAS", TType.BOOL, 7)
            oprot.writeBool(self.exclusiveCTAS)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - lockid
     - state
     - errorMessage

    """

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

    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)
            elif fid == 3:
                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)
            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()
        if self.errorMessage is not None:
            oprot.writeFieldBegin("errorMessage", TType.STRING, 3)
            oprot.writeString(self.errorMessage.encode("utf-8") if sys.version_info[0] == 2 else self.errorMessage)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbname
     - tablename
     - partname
     - isExtended
     - txnid

    """

    def __init__(
        self,
        dbname=None,
        tablename=None,
        partname=None,
        isExtended=False,
        txnid=None,
    ):
        self.dbname = dbname
        self.tablename = tablename
        self.partname = partname
        self.isExtended = isExtended
        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.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)
            elif fid == 5:
                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("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()
        if self.txnid is not None:
            oprot.writeFieldBegin("txnid", TType.I64, 5)
            oprot.writeI64(self.txnid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype733, _size730) = iprot.readListBegin()
                    for _i734 in range(_size730):
                        _elem735 = ShowLocksResponseElement()
                        _elem735.read(iprot)
                        self.locks.append(_elem735)
                    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 iter736 in self.locks:
                iter736.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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()
                    (_etype740, _size737) = iprot.readSetBegin()
                    for _i741 in range(_size737):
                        _elem742 = iprot.readI64()
                        self.aborted.add(_elem742)
                    iprot.readSetEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.SET:
                    self.nosuch = set()
                    (_etype746, _size743) = iprot.readSetBegin()
                    for _i747 in range(_size743):
                        _elem748 = iprot.readI64()
                        self.nosuch.add(_elem748)
                    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 iter749 in self.aborted:
                oprot.writeI64(iter749)
            oprot.writeSetEnd()
            oprot.writeFieldEnd()
        if self.nosuch is not None:
            oprot.writeFieldBegin("nosuch", TType.SET, 2)
            oprot.writeSetBegin(TType.I64, len(self.nosuch))
            for iter750 in self.nosuch:
                oprot.writeI64(iter750)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbname
     - tablename
     - partitionname
     - type
     - runas
     - properties
     - initiatorId
     - initiatorVersion

    """

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

    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 = {}
                    (_ktype752, _vtype753, _size751) = iprot.readMapBegin()
                    for _i755 in range(_size751):
                        _key756 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val757 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.properties[_key756] = _val757
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.initiatorId = (
                        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.initiatorVersion = (
                        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("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 kiter758, viter759 in self.properties.items():
                oprot.writeString(kiter758.encode("utf-8") if sys.version_info[0] == 2 else kiter758)
                oprot.writeString(viter759.encode("utf-8") if sys.version_info[0] == 2 else viter759)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.initiatorId is not None:
            oprot.writeFieldBegin("initiatorId", TType.STRING, 7)
            oprot.writeString(self.initiatorId.encode("utf-8") if sys.version_info[0] == 2 else self.initiatorId)
            oprot.writeFieldEnd()
        if self.initiatorVersion is not None:
            oprot.writeFieldBegin("initiatorVersion", TType.STRING, 8)
            oprot.writeString(self.initiatorVersion.encode("utf-8") if sys.version_info[0] == 2 else self.initiatorVersion)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CompactionInfoStruct:
    """
    Attributes:
     - id
     - dbname
     - tablename
     - partitionname
     - type
     - runas
     - properties
     - toomanyaborts
     - state
     - workerId
     - start
     - highestWriteId
     - errorMessage
     - hasoldabort
     - enqueueTime
     - retryRetention

    """

    def __init__(
        self,
        id=None,
        dbname=None,
        tablename=None,
        partitionname=None,
        type=None,
        runas=None,
        properties=None,
        toomanyaborts=None,
        state=None,
        workerId=None,
        start=None,
        highestWriteId=None,
        errorMessage=None,
        hasoldabort=None,
        enqueueTime=None,
        retryRetention=None,
    ):
        self.id = id
        self.dbname = dbname
        self.tablename = tablename
        self.partitionname = partitionname
        self.type = type
        self.runas = runas
        self.properties = properties
        self.toomanyaborts = toomanyaborts
        self.state = state
        self.workerId = workerId
        self.start = start
        self.highestWriteId = highestWriteId
        self.errorMessage = errorMessage
        self.hasoldabort = hasoldabort
        self.enqueueTime = enqueueTime
        self.retryRetention = retryRetention

    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.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.partitionname = (
                        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.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                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 == 7:
                if ftype == TType.STRING:
                    self.properties = (
                        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.BOOL:
                    self.toomanyaborts = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                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 == 10:
                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 == 11:
                if ftype == TType.I64:
                    self.start = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I64:
                    self.highestWriteId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 13:
                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 == 14:
                if ftype == TType.BOOL:
                    self.hasoldabort = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 15:
                if ftype == TType.I64:
                    self.enqueueTime = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 16:
                if ftype == TType.I64:
                    self.retryRetention = 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("CompactionInfoStruct")
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 1)
            oprot.writeI64(self.id)
            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.partitionname is not None:
            oprot.writeFieldBegin("partitionname", TType.STRING, 4)
            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, 5)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.runas is not None:
            oprot.writeFieldBegin("runas", TType.STRING, 6)
            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.STRING, 7)
            oprot.writeString(self.properties.encode("utf-8") if sys.version_info[0] == 2 else self.properties)
            oprot.writeFieldEnd()
        if self.toomanyaborts is not None:
            oprot.writeFieldBegin("toomanyaborts", TType.BOOL, 8)
            oprot.writeBool(self.toomanyaborts)
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin("state", TType.STRING, 9)
            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, 10)
            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, 11)
            oprot.writeI64(self.start)
            oprot.writeFieldEnd()
        if self.highestWriteId is not None:
            oprot.writeFieldBegin("highestWriteId", TType.I64, 12)
            oprot.writeI64(self.highestWriteId)
            oprot.writeFieldEnd()
        if self.errorMessage is not None:
            oprot.writeFieldBegin("errorMessage", TType.STRING, 13)
            oprot.writeString(self.errorMessage.encode("utf-8") if sys.version_info[0] == 2 else self.errorMessage)
            oprot.writeFieldEnd()
        if self.hasoldabort is not None:
            oprot.writeFieldBegin("hasoldabort", TType.BOOL, 14)
            oprot.writeBool(self.hasoldabort)
            oprot.writeFieldEnd()
        if self.enqueueTime is not None:
            oprot.writeFieldBegin("enqueueTime", TType.I64, 15)
            oprot.writeI64(self.enqueueTime)
            oprot.writeFieldEnd()
        if self.retryRetention is not None:
            oprot.writeFieldBegin("retryRetention", TType.I64, 16)
            oprot.writeI64(self.retryRetention)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.id is None:
            raise TProtocolException(message="Required field id 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.type is None:
            raise TProtocolException(message="Required field type is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class OptionalCompactionInfoStruct:
    """
    Attributes:
     - ci

    """

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

    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.ci = CompactionInfoStruct()
                    self.ci.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("OptionalCompactionInfoStruct")
        if self.ci is not None:
            oprot.writeFieldBegin("ci", TType.STRUCT, 1)
            self.ci.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CompactionMetricsDataStruct:
    """
    Attributes:
     - dbname
     - tblname
     - partitionname
     - type
     - metricvalue
     - version
     - threshold

    """

    def __init__(
        self,
        dbname=None,
        tblname=None,
        partitionname=None,
        type=None,
        metricvalue=None,
        version=None,
        threshold=None,
    ):
        self.dbname = dbname
        self.tblname = tblname
        self.partitionname = partitionname
        self.type = type
        self.metricvalue = metricvalue
        self.version = version
        self.threshold = threshold

    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.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.I32:
                    self.metricvalue = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.version = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.threshold = 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("CompactionMetricsDataStruct")
        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.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.metricvalue is not None:
            oprot.writeFieldBegin("metricvalue", TType.I32, 5)
            oprot.writeI32(self.metricvalue)
            oprot.writeFieldEnd()
        if self.version is not None:
            oprot.writeFieldBegin("version", TType.I32, 6)
            oprot.writeI32(self.version)
            oprot.writeFieldEnd()
        if self.threshold is not None:
            oprot.writeFieldBegin("threshold", TType.I32, 7)
            oprot.writeI32(self.threshold)
            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.type is None:
            raise TProtocolException(message="Required field type is unset!")
        if self.metricvalue is None:
            raise TProtocolException(message="Required field metricvalue is unset!")
        if self.version is None:
            raise TProtocolException(message="Required field version is unset!")
        if self.threshold is None:
            raise TProtocolException(message="Required field threshold is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CompactionMetricsDataResponse:
    """
    Attributes:
     - data

    """

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

    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.data = CompactionMetricsDataStruct()
                    self.data.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("CompactionMetricsDataResponse")
        if self.data is not None:
            oprot.writeFieldBegin("data", TType.STRUCT, 1)
            self.data.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CompactionMetricsDataRequest:
    """
    Attributes:
     - dbName
     - tblName
     - partitionName
     - type

    """

    def __init__(
        self,
        dbName=None,
        tblName=None,
        partitionName=None,
        type=None,
    ):
        self.dbName = dbName
        self.tblName = tblName
        self.partitionName = partitionName
        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.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.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)
            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("CompactionMetricsDataRequest")
        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.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()
        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.type is None:
            raise TProtocolException(message="Required field type is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - id
     - state
     - accepted
     - errormessage

    """

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

    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)
            elif fid == 4:
                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)
            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()
        if self.errormessage is not None:
            oprot.writeFieldBegin("errormessage", TType.STRING, 4)
            oprot.writeString(self.errormessage.encode("utf-8") if sys.version_info[0] == 2 else self.errormessage)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbname
     - tablename
     - partitionname
     - type
     - state
     - workerid
     - start
     - runAs
     - hightestTxnId
     - metaInfo
     - endTime
     - hadoopJobId
     - id
     - errorMessage
     - enqueueTime
     - workerVersion
     - initiatorId
     - initiatorVersion
     - cleanerStart

    """

    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,
        workerVersion=None,
        initiatorId=None,
        initiatorVersion=None,
        cleanerStart=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
        self.workerVersion = workerVersion
        self.initiatorId = initiatorId
        self.initiatorVersion = initiatorVersion
        self.cleanerStart = cleanerStart

    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)
            elif fid == 16:
                if ftype == TType.STRING:
                    self.workerVersion = (
                        iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 17:
                if ftype == TType.STRING:
                    self.initiatorId = (
                        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.STRING:
                    self.initiatorVersion = (
                        iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 19:
                if ftype == TType.I64:
                    self.cleanerStart = 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()
        if self.workerVersion is not None:
            oprot.writeFieldBegin("workerVersion", TType.STRING, 16)
            oprot.writeString(self.workerVersion.encode("utf-8") if sys.version_info[0] == 2 else self.workerVersion)
            oprot.writeFieldEnd()
        if self.initiatorId is not None:
            oprot.writeFieldBegin("initiatorId", TType.STRING, 17)
            oprot.writeString(self.initiatorId.encode("utf-8") if sys.version_info[0] == 2 else self.initiatorId)
            oprot.writeFieldEnd()
        if self.initiatorVersion is not None:
            oprot.writeFieldBegin("initiatorVersion", TType.STRING, 18)
            oprot.writeString(self.initiatorVersion.encode("utf-8") if sys.version_info[0] == 2 else self.initiatorVersion)
            oprot.writeFieldEnd()
        if self.cleanerStart is not None:
            oprot.writeFieldBegin("cleanerStart", TType.I64, 19)
            oprot.writeI64(self.cleanerStart)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype763, _size760) = iprot.readListBegin()
                    for _i764 in range(_size760):
                        _elem765 = ShowCompactResponseElement()
                        _elem765.read(iprot)
                        self.compacts.append(_elem765)
                    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 iter766 in self.compacts:
                iter766.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetLatestCommittedCompactionInfoRequest:
    """
    Attributes:
     - dbname
     - tablename
     - partitionnames
     - lastCompactionId

    """

    def __init__(
        self,
        dbname=None,
        tablename=None,
        partitionnames=None,
        lastCompactionId=None,
    ):
        self.dbname = dbname
        self.tablename = tablename
        self.partitionnames = partitionnames
        self.lastCompactionId = lastCompactionId

    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.partitionnames = []
                    (_etype770, _size767) = iprot.readListBegin()
                    for _i771 in range(_size767):
                        _elem772 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partitionnames.append(_elem772)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.lastCompactionId = 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("GetLatestCommittedCompactionInfoRequest")
        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.partitionnames is not None:
            oprot.writeFieldBegin("partitionnames", TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.partitionnames))
            for iter773 in self.partitionnames:
                oprot.writeString(iter773.encode("utf-8") if sys.version_info[0] == 2 else iter773)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.lastCompactionId is not None:
            oprot.writeFieldBegin("lastCompactionId", TType.I64, 4)
            oprot.writeI64(self.lastCompactionId)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetLatestCommittedCompactionInfoResponse:
    """
    Attributes:
     - compactions

    """

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

    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.compactions = []
                    (_etype777, _size774) = iprot.readListBegin()
                    for _i778 in range(_size774):
                        _elem779 = CompactionInfoStruct()
                        _elem779.read(iprot)
                        self.compactions.append(_elem779)
                    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("GetLatestCommittedCompactionInfoResponse")
        if self.compactions is not None:
            oprot.writeFieldBegin("compactions", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.compactions))
            for iter780 in self.compactions:
                iter780.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class FindNextCompactRequest:
    """
    Attributes:
     - workerId
     - workerVersion

    """

    def __init__(
        self,
        workerId=None,
        workerVersion=None,
    ):
        self.workerId = workerId
        self.workerVersion = workerVersion

    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.workerId = (
                        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.workerVersion = (
                        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("FindNextCompactRequest")
        if self.workerId is not None:
            oprot.writeFieldBegin("workerId", TType.STRING, 1)
            oprot.writeString(self.workerId.encode("utf-8") if sys.version_info[0] == 2 else self.workerId)
            oprot.writeFieldEnd()
        if self.workerVersion is not None:
            oprot.writeFieldBegin("workerVersion", TType.STRING, 2)
            oprot.writeString(self.workerVersion.encode("utf-8") if sys.version_info[0] == 2 else self.workerVersion)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype784, _size781) = iprot.readListBegin()
                    for _i785 in range(_size781):
                        _elem786 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partitionnames.append(_elem786)
                    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 iter787 in self.partitionnames:
                oprot.writeString(iter787.encode("utf-8") if sys.version_info[0] == 2 else iter787)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - lastEvent
     - maxEvents
     - eventTypeSkipList

    """

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

    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)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.eventTypeSkipList = []
                    (_etype791, _size788) = iprot.readListBegin()
                    for _i792 in range(_size788):
                        _elem793 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.eventTypeSkipList.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("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()
        if self.eventTypeSkipList is not None:
            oprot.writeFieldBegin("eventTypeSkipList", TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.eventTypeSkipList))
            for iter794 in self.eventTypeSkipList:
                oprot.writeString(iter794.encode("utf-8") if sys.version_info[0] == 2 else iter794)
            oprot.writeListEnd()
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype798, _size795) = iprot.readListBegin()
                    for _i799 in range(_size795):
                        _elem800 = NotificationEvent()
                        _elem800.read(iprot)
                        self.events.append(_elem800)
                    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 iter801 in self.events:
                iter801.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - fromEventId
     - dbName
     - catName
     - toEventId
     - limit

    """

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

    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)
            elif fid == 4:
                if ftype == TType.I64:
                    self.toEventId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.limit = 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("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()
        if self.toEventId is not None:
            oprot.writeFieldBegin("toEventId", TType.I64, 4)
            oprot.writeI64(self.toEventId)
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin("limit", TType.I64, 5)
            oprot.writeI64(self.limit)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - replace
     - filesAdded
     - filesAddedChecksum
     - subDirectoryList
     - partitionVal

    """

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

    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 = []
                    (_etype805, _size802) = iprot.readListBegin()
                    for _i806 in range(_size802):
                        _elem807 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.filesAdded.append(_elem807)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.filesAddedChecksum = []
                    (_etype811, _size808) = iprot.readListBegin()
                    for _i812 in range(_size808):
                        _elem813 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.filesAddedChecksum.append(_elem813)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.subDirectoryList = []
                    (_etype817, _size814) = iprot.readListBegin()
                    for _i818 in range(_size814):
                        _elem819 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.subDirectoryList.append(_elem819)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.partitionVal = []
                    (_etype823, _size820) = iprot.readListBegin()
                    for _i824 in range(_size820):
                        _elem825 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partitionVal.append(_elem825)
                    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 iter826 in self.filesAdded:
                oprot.writeString(iter826.encode("utf-8") if sys.version_info[0] == 2 else iter826)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.filesAddedChecksum is not None:
            oprot.writeFieldBegin("filesAddedChecksum", TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.filesAddedChecksum))
            for iter827 in self.filesAddedChecksum:
                oprot.writeString(iter827.encode("utf-8") if sys.version_info[0] == 2 else iter827)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.subDirectoryList is not None:
            oprot.writeFieldBegin("subDirectoryList", TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.subDirectoryList))
            for iter828 in self.subDirectoryList:
                oprot.writeString(iter828.encode("utf-8") if sys.version_info[0] == 2 else iter828)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.partitionVal is not None:
            oprot.writeFieldBegin("partitionVal", TType.LIST, 5)
            oprot.writeListBegin(TType.STRING, len(self.partitionVal))
            for iter829 in self.partitionVal:
                oprot.writeString(iter829.encode("utf-8") if sys.version_info[0] == 2 else iter829)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - insertData
     - insertDatas

    """

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

    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)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.insertDatas = []
                    (_etype833, _size830) = iprot.readListBegin()
                    for _i834 in range(_size830):
                        _elem835 = InsertEventRequestData()
                        _elem835.read(iprot)
                        self.insertDatas.append(_elem835)
                    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("FireEventRequestData")
        if self.insertData is not None:
            oprot.writeFieldBegin("insertData", TType.STRUCT, 1)
            self.insertData.write(oprot)
            oprot.writeFieldEnd()
        if self.insertDatas is not None:
            oprot.writeFieldBegin("insertDatas", TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.insertDatas))
            for iter836 in self.insertDatas:
                iter836.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype840, _size837) = iprot.readListBegin()
                    for _i841 in range(_size837):
                        _elem842 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partitionVals.append(_elem842)
                    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 iter843 in self.partitionVals:
                oprot.writeString(iter843.encode("utf-8") if sys.version_info[0] == 2 else iter843)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - eventIds

    """

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

    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.eventIds = []
                    (_etype847, _size844) = iprot.readListBegin()
                    for _i848 in range(_size844):
                        _elem849 = iprot.readI64()
                        self.eventIds.append(_elem849)
                    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("FireEventResponse")
        if self.eventIds is not None:
            oprot.writeFieldBegin("eventIds", TType.LIST, 1)
            oprot.writeListBegin(TType.I64, len(self.eventIds))
            for iter850 in self.eventIds:
                oprot.writeI64(iter850)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class WriteNotificationLogRequest:
    """
    Attributes:
     - txnId
     - writeId
     - db
     - table
     - fileInfo
     - partitionVals

    """

    def __init__(
        self,
        txnId=None,
        writeId=None,
        db=None,
        table=None,
        fileInfo=None,
        partitionVals=None,
    ):
        self.txnId = txnId
        self.writeId = writeId
        self.db = db
        self.table = table
        self.fileInfo = fileInfo
        self.partitionVals = partitionVals

    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.db = (
                        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.table = (
                        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.STRUCT:
                    self.fileInfo = InsertEventRequestData()
                    self.fileInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.LIST:
                    self.partitionVals = []
                    (_etype854, _size851) = iprot.readListBegin()
                    for _i855 in range(_size851):
                        _elem856 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partitionVals.append(_elem856)
                    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("WriteNotificationLogRequest")
        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.db is not None:
            oprot.writeFieldBegin("db", TType.STRING, 3)
            oprot.writeString(self.db.encode("utf-8") if sys.version_info[0] == 2 else self.db)
            oprot.writeFieldEnd()
        if self.table is not None:
            oprot.writeFieldBegin("table", TType.STRING, 4)
            oprot.writeString(self.table.encode("utf-8") if sys.version_info[0] == 2 else self.table)
            oprot.writeFieldEnd()
        if self.fileInfo is not None:
            oprot.writeFieldBegin("fileInfo", TType.STRUCT, 5)
            self.fileInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.partitionVals is not None:
            oprot.writeFieldBegin("partitionVals", TType.LIST, 6)
            oprot.writeListBegin(TType.STRING, len(self.partitionVals))
            for iter857 in self.partitionVals:
                oprot.writeString(iter857.encode("utf-8") if sys.version_info[0] == 2 else iter857)
            oprot.writeListEnd()
            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.db is None:
            raise TProtocolException(message="Required field db is unset!")
        if self.table is None:
            raise TProtocolException(message="Required field table is unset!")
        if self.fileInfo is None:
            raise TProtocolException(message="Required field fileInfo is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class WriteNotificationLogResponse:
    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("WriteNotificationLogResponse")
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class WriteNotificationLogBatchRequest:
    """
    Attributes:
     - catalog
     - db
     - table
     - requestList

    """

    def __init__(
        self,
        catalog=None,
        db=None,
        table=None,
        requestList=None,
    ):
        self.catalog = catalog
        self.db = db
        self.table = table
        self.requestList = requestList

    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.catalog = (
                        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 = (
                        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 = (
                        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.requestList = []
                    (_etype861, _size858) = iprot.readListBegin()
                    for _i862 in range(_size858):
                        _elem863 = WriteNotificationLogRequest()
                        _elem863.read(iprot)
                        self.requestList.append(_elem863)
                    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("WriteNotificationLogBatchRequest")
        if self.catalog is not None:
            oprot.writeFieldBegin("catalog", TType.STRING, 1)
            oprot.writeString(self.catalog.encode("utf-8") if sys.version_info[0] == 2 else self.catalog)
            oprot.writeFieldEnd()
        if self.db is not None:
            oprot.writeFieldBegin("db", TType.STRING, 2)
            oprot.writeString(self.db.encode("utf-8") if sys.version_info[0] == 2 else self.db)
            oprot.writeFieldEnd()
        if self.table is not None:
            oprot.writeFieldBegin("table", TType.STRING, 3)
            oprot.writeString(self.table.encode("utf-8") if sys.version_info[0] == 2 else self.table)
            oprot.writeFieldEnd()
        if self.requestList is not None:
            oprot.writeFieldBegin("requestList", TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.requestList))
            for iter864 in self.requestList:
                iter864.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class WriteNotificationLogBatchResponse:
    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("WriteNotificationLogBatchResponse")
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = {}
                    (_ktype866, _vtype867, _size865) = iprot.readMapBegin()
                    for _i869 in range(_size865):
                        _key870 = iprot.readI64()
                        _val871 = MetadataPpdResult()
                        _val871.read(iprot)
                        self.metadata[_key870] = _val871
                    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 kiter872, viter873 in self.metadata.items():
                oprot.writeI64(kiter872)
                viter873.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype877, _size874) = iprot.readListBegin()
                    for _i878 in range(_size874):
                        _elem879 = iprot.readI64()
                        self.fileIds.append(_elem879)
                    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 iter880 in self.fileIds:
                oprot.writeI64(iter880)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = {}
                    (_ktype882, _vtype883, _size881) = iprot.readMapBegin()
                    for _i885 in range(_size881):
                        _key886 = iprot.readI64()
                        _val887 = iprot.readBinary()
                        self.metadata[_key886] = _val887
                    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 kiter888, viter889 in self.metadata.items():
                oprot.writeI64(kiter888)
                oprot.writeBinary(viter889)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype893, _size890) = iprot.readListBegin()
                    for _i894 in range(_size890):
                        _elem895 = iprot.readI64()
                        self.fileIds.append(_elem895)
                    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 iter896 in self.fileIds:
                oprot.writeI64(iter896)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype900, _size897) = iprot.readListBegin()
                    for _i901 in range(_size897):
                        _elem902 = iprot.readI64()
                        self.fileIds.append(_elem902)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.metadata = []
                    (_etype906, _size903) = iprot.readListBegin()
                    for _i907 in range(_size903):
                        _elem908 = iprot.readBinary()
                        self.metadata.append(_elem908)
                    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 iter909 in self.fileIds:
                oprot.writeI64(iter909)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.metadata is not None:
            oprot.writeFieldBegin("metadata", TType.LIST, 2)
            oprot.writeListBegin(TType.STRING, len(self.metadata))
            for iter910 in self.metadata:
                oprot.writeBinary(iter910)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype914, _size911) = iprot.readListBegin()
                    for _i915 in range(_size911):
                        _elem916 = iprot.readI64()
                        self.fileIds.append(_elem916)
                    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 iter917 in self.fileIds:
                oprot.writeI64(iter917)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype921, _size918) = iprot.readListBegin()
                    for _i922 in range(_size918):
                        _elem923 = Function()
                        _elem923.read(iprot)
                        self.functions.append(_elem923)
                    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 iter924 in self.functions:
                iter924.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype928, _size925) = iprot.readListBegin()
                    for _i929 in range(_size925):
                        _elem930 = iprot.readI32()
                        self.values.append(_elem930)
                    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 iter931 in self.values:
                oprot.writeI32(iter931)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetProjectionsSpec:
    """
    Attributes:
     - fieldList
     - includeParamKeyPattern
     - excludeParamKeyPattern

    """

    def __init__(
        self,
        fieldList=None,
        includeParamKeyPattern=None,
        excludeParamKeyPattern=None,
    ):
        self.fieldList = fieldList
        self.includeParamKeyPattern = includeParamKeyPattern
        self.excludeParamKeyPattern = excludeParamKeyPattern

    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.fieldList = []
                    (_etype935, _size932) = iprot.readListBegin()
                    for _i936 in range(_size932):
                        _elem937 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.fieldList.append(_elem937)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.includeParamKeyPattern = (
                        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.excludeParamKeyPattern = (
                        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("GetProjectionsSpec")
        if self.fieldList is not None:
            oprot.writeFieldBegin("fieldList", TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.fieldList))
            for iter938 in self.fieldList:
                oprot.writeString(iter938.encode("utf-8") if sys.version_info[0] == 2 else iter938)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.includeParamKeyPattern is not None:
            oprot.writeFieldBegin("includeParamKeyPattern", TType.STRING, 2)
            oprot.writeString(
                self.includeParamKeyPattern.encode("utf-8") if sys.version_info[0] == 2 else self.includeParamKeyPattern
            )
            oprot.writeFieldEnd()
        if self.excludeParamKeyPattern is not None:
            oprot.writeFieldBegin("excludeParamKeyPattern", TType.STRING, 3)
            oprot.writeString(
                self.excludeParamKeyPattern.encode("utf-8") if sys.version_info[0] == 2 else self.excludeParamKeyPattern
            )
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbName
     - tblName
     - capabilities
     - catName
     - validWriteIdList
     - getColumnStats
     - processorCapabilities
     - processorIdentifier
     - engine
     - id

    """

    def __init__(
        self,
        dbName=None,
        tblName=None,
        capabilities=None,
        catName=None,
        validWriteIdList=None,
        getColumnStats=None,
        processorCapabilities=None,
        processorIdentifier=None,
        engine=None,
        id=-1,
    ):
        self.dbName = dbName
        self.tblName = tblName
        self.capabilities = capabilities
        self.catName = catName
        self.validWriteIdList = validWriteIdList
        self.getColumnStats = getColumnStats
        self.processorCapabilities = processorCapabilities
        self.processorIdentifier = processorIdentifier
        self.engine = engine
        self.id = id

    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)
            elif fid == 6:
                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 == 7:
                if ftype == TType.BOOL:
                    self.getColumnStats = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.LIST:
                    self.processorCapabilities = []
                    (_etype942, _size939) = iprot.readListBegin()
                    for _i943 in range(_size939):
                        _elem944 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.processorCapabilities.append(_elem944)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.processorIdentifier = (
                        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.STRING:
                    self.engine = (
                        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.id = 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("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()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 6)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.getColumnStats is not None:
            oprot.writeFieldBegin("getColumnStats", TType.BOOL, 7)
            oprot.writeBool(self.getColumnStats)
            oprot.writeFieldEnd()
        if self.processorCapabilities is not None:
            oprot.writeFieldBegin("processorCapabilities", TType.LIST, 8)
            oprot.writeListBegin(TType.STRING, len(self.processorCapabilities))
            for iter945 in self.processorCapabilities:
                oprot.writeString(iter945.encode("utf-8") if sys.version_info[0] == 2 else iter945)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.processorIdentifier is not None:
            oprot.writeFieldBegin("processorIdentifier", TType.STRING, 9)
            oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier)
            oprot.writeFieldEnd()
        if self.engine is not None:
            oprot.writeFieldBegin("engine", TType.STRING, 10)
            oprot.writeString(self.engine.encode("utf-8") if sys.version_info[0] == 2 else self.engine)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 11)
            oprot.writeI64(self.id)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - table
     - isStatsCompliant

    """

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

    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)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.isStatsCompliant = 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("GetTableResult")
        if self.table is not None:
            oprot.writeFieldBegin("table", TType.STRUCT, 1)
            self.table.write(oprot)
            oprot.writeFieldEnd()
        if self.isStatsCompliant is not None:
            oprot.writeFieldBegin("isStatsCompliant", TType.BOOL, 2)
            oprot.writeBool(self.isStatsCompliant)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - dbName
     - tblNames
     - capabilities
     - catName
     - processorCapabilities
     - processorIdentifier
     - projectionSpec
     - tablesPattern

    """

    def __init__(
        self,
        dbName=None,
        tblNames=None,
        capabilities=None,
        catName=None,
        processorCapabilities=None,
        processorIdentifier=None,
        projectionSpec=None,
        tablesPattern=None,
    ):
        self.dbName = dbName
        self.tblNames = tblNames
        self.capabilities = capabilities
        self.catName = catName
        self.processorCapabilities = processorCapabilities
        self.processorIdentifier = processorIdentifier
        self.projectionSpec = projectionSpec
        self.tablesPattern = tablesPattern

    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 = []
                    (_etype949, _size946) = iprot.readListBegin()
                    for _i950 in range(_size946):
                        _elem951 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.tblNames.append(_elem951)
                    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)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.processorCapabilities = []
                    (_etype955, _size952) = iprot.readListBegin()
                    for _i956 in range(_size952):
                        _elem957 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.processorCapabilities.append(_elem957)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.processorIdentifier = (
                        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.STRUCT:
                    self.projectionSpec = GetProjectionsSpec()
                    self.projectionSpec.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.tablesPattern = (
                        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 iter958 in self.tblNames:
                oprot.writeString(iter958.encode("utf-8") if sys.version_info[0] == 2 else iter958)
            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()
        if self.processorCapabilities is not None:
            oprot.writeFieldBegin("processorCapabilities", TType.LIST, 5)
            oprot.writeListBegin(TType.STRING, len(self.processorCapabilities))
            for iter959 in self.processorCapabilities:
                oprot.writeString(iter959.encode("utf-8") if sys.version_info[0] == 2 else iter959)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.processorIdentifier is not None:
            oprot.writeFieldBegin("processorIdentifier", TType.STRING, 6)
            oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier)
            oprot.writeFieldEnd()
        if self.projectionSpec is not None:
            oprot.writeFieldBegin("projectionSpec", TType.STRUCT, 7)
            self.projectionSpec.write(oprot)
            oprot.writeFieldEnd()
        if self.tablesPattern is not None:
            oprot.writeFieldBegin("tablesPattern", TType.STRING, 8)
            oprot.writeString(self.tablesPattern.encode("utf-8") if sys.version_info[0] == 2 else self.tablesPattern)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype963, _size960) = iprot.readListBegin()
                    for _i964 in range(_size960):
                        _elem965 = Table()
                        _elem965.read(iprot)
                        self.tables.append(_elem965)
                    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 iter966 in self.tables:
                iter966.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetTablesExtRequest:
    """
    Attributes:
     - catalog
     - database
     - tableNamePattern
     - requestedFields
     - limit
     - processorCapabilities
     - processorIdentifier

    """

    def __init__(
        self,
        catalog=None,
        database=None,
        tableNamePattern=None,
        requestedFields=None,
        limit=None,
        processorCapabilities=None,
        processorIdentifier=None,
    ):
        self.catalog = catalog
        self.database = database
        self.tableNamePattern = tableNamePattern
        self.requestedFields = requestedFields
        self.limit = limit
        self.processorCapabilities = processorCapabilities
        self.processorIdentifier = processorIdentifier

    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.catalog = (
                        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.database = (
                        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.tableNamePattern = (
                        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.requestedFields = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.limit = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.LIST:
                    self.processorCapabilities = []
                    (_etype970, _size967) = iprot.readListBegin()
                    for _i971 in range(_size967):
                        _elem972 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.processorCapabilities.append(_elem972)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.processorIdentifier = (
                        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("GetTablesExtRequest")
        if self.catalog is not None:
            oprot.writeFieldBegin("catalog", TType.STRING, 1)
            oprot.writeString(self.catalog.encode("utf-8") if sys.version_info[0] == 2 else self.catalog)
            oprot.writeFieldEnd()
        if self.database is not None:
            oprot.writeFieldBegin("database", TType.STRING, 2)
            oprot.writeString(self.database.encode("utf-8") if sys.version_info[0] == 2 else self.database)
            oprot.writeFieldEnd()
        if self.tableNamePattern is not None:
            oprot.writeFieldBegin("tableNamePattern", TType.STRING, 3)
            oprot.writeString(self.tableNamePattern.encode("utf-8") if sys.version_info[0] == 2 else self.tableNamePattern)
            oprot.writeFieldEnd()
        if self.requestedFields is not None:
            oprot.writeFieldBegin("requestedFields", TType.I32, 4)
            oprot.writeI32(self.requestedFields)
            oprot.writeFieldEnd()
        if self.limit is not None:
            oprot.writeFieldBegin("limit", TType.I32, 5)
            oprot.writeI32(self.limit)
            oprot.writeFieldEnd()
        if self.processorCapabilities is not None:
            oprot.writeFieldBegin("processorCapabilities", TType.LIST, 6)
            oprot.writeListBegin(TType.STRING, len(self.processorCapabilities))
            for iter973 in self.processorCapabilities:
                oprot.writeString(iter973.encode("utf-8") if sys.version_info[0] == 2 else iter973)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.processorIdentifier is not None:
            oprot.writeFieldBegin("processorIdentifier", TType.STRING, 7)
            oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.catalog is None:
            raise TProtocolException(message="Required field catalog is unset!")
        if self.database is None:
            raise TProtocolException(message="Required field database is unset!")
        if self.tableNamePattern is None:
            raise TProtocolException(message="Required field tableNamePattern is unset!")
        if self.requestedFields is None:
            raise TProtocolException(message="Required field requestedFields is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ExtendedTableInfo:
    """
    Attributes:
     - tblName
     - accessType
     - requiredReadCapabilities
     - requiredWriteCapabilities

    """

    def __init__(
        self,
        tblName=None,
        accessType=None,
        requiredReadCapabilities=None,
        requiredWriteCapabilities=None,
    ):
        self.tblName = tblName
        self.accessType = accessType
        self.requiredReadCapabilities = requiredReadCapabilities
        self.requiredWriteCapabilities = requiredWriteCapabilities

    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.tblName = (
                        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.accessType = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.requiredReadCapabilities = []
                    (_etype977, _size974) = iprot.readListBegin()
                    for _i978 in range(_size974):
                        _elem979 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.requiredReadCapabilities.append(_elem979)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.requiredWriteCapabilities = []
                    (_etype983, _size980) = iprot.readListBegin()
                    for _i984 in range(_size980):
                        _elem985 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.requiredWriteCapabilities.append(_elem985)
                    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("ExtendedTableInfo")
        if self.tblName is not None:
            oprot.writeFieldBegin("tblName", TType.STRING, 1)
            oprot.writeString(self.tblName.encode("utf-8") if sys.version_info[0] == 2 else self.tblName)
            oprot.writeFieldEnd()
        if self.accessType is not None:
            oprot.writeFieldBegin("accessType", TType.I32, 2)
            oprot.writeI32(self.accessType)
            oprot.writeFieldEnd()
        if self.requiredReadCapabilities is not None:
            oprot.writeFieldBegin("requiredReadCapabilities", TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.requiredReadCapabilities))
            for iter986 in self.requiredReadCapabilities:
                oprot.writeString(iter986.encode("utf-8") if sys.version_info[0] == 2 else iter986)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.requiredWriteCapabilities is not None:
            oprot.writeFieldBegin("requiredWriteCapabilities", TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.requiredWriteCapabilities))
            for iter987 in self.requiredWriteCapabilities:
                oprot.writeString(iter987.encode("utf-8") if sys.version_info[0] == 2 else iter987)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetDatabaseRequest:
    """
    Attributes:
     - name
     - catalogName
     - processorCapabilities
     - processorIdentifier

    """

    def __init__(
        self,
        name=None,
        catalogName=None,
        processorCapabilities=None,
        processorIdentifier=None,
    ):
        self.name = name
        self.catalogName = catalogName
        self.processorCapabilities = processorCapabilities
        self.processorIdentifier = processorIdentifier

    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.catalogName = (
                        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.processorCapabilities = []
                    (_etype991, _size988) = iprot.readListBegin()
                    for _i992 in range(_size988):
                        _elem993 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.processorCapabilities.append(_elem993)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.processorIdentifier = (
                        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("GetDatabaseRequest")
        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.catalogName is not None:
            oprot.writeFieldBegin("catalogName", TType.STRING, 2)
            oprot.writeString(self.catalogName.encode("utf-8") if sys.version_info[0] == 2 else self.catalogName)
            oprot.writeFieldEnd()
        if self.processorCapabilities is not None:
            oprot.writeFieldBegin("processorCapabilities", TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.processorCapabilities))
            for iter994 in self.processorCapabilities:
                oprot.writeString(iter994.encode("utf-8") if sys.version_info[0] == 2 else iter994)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.processorIdentifier is not None:
            oprot.writeFieldBegin("processorIdentifier", TType.STRING, 4)
            oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DropDatabaseRequest:
    """
    Attributes:
     - name
     - catalogName
     - ignoreUnknownDb
     - deleteData
     - cascade
     - softDelete
     - txnId
     - deleteManagedDir

    """

    def __init__(
        self,
        name=None,
        catalogName=None,
        ignoreUnknownDb=None,
        deleteData=None,
        cascade=None,
        softDelete=False,
        txnId=0,
        deleteManagedDir=True,
    ):
        self.name = name
        self.catalogName = catalogName
        self.ignoreUnknownDb = ignoreUnknownDb
        self.deleteData = deleteData
        self.cascade = cascade
        self.softDelete = softDelete
        self.txnId = txnId
        self.deleteManagedDir = deleteManagedDir

    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.catalogName = (
                        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.ignoreUnknownDb = iprot.readBool()
                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.cascade = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.BOOL:
                    self.softDelete = iprot.readBool()
                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.BOOL:
                    self.deleteManagedDir = 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("DropDatabaseRequest")
        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.catalogName is not None:
            oprot.writeFieldBegin("catalogName", TType.STRING, 2)
            oprot.writeString(self.catalogName.encode("utf-8") if sys.version_info[0] == 2 else self.catalogName)
            oprot.writeFieldEnd()
        if self.ignoreUnknownDb is not None:
            oprot.writeFieldBegin("ignoreUnknownDb", TType.BOOL, 3)
            oprot.writeBool(self.ignoreUnknownDb)
            oprot.writeFieldEnd()
        if self.deleteData is not None:
            oprot.writeFieldBegin("deleteData", TType.BOOL, 4)
            oprot.writeBool(self.deleteData)
            oprot.writeFieldEnd()
        if self.cascade is not None:
            oprot.writeFieldBegin("cascade", TType.BOOL, 5)
            oprot.writeBool(self.cascade)
            oprot.writeFieldEnd()
        if self.softDelete is not None:
            oprot.writeFieldBegin("softDelete", TType.BOOL, 6)
            oprot.writeBool(self.softDelete)
            oprot.writeFieldEnd()
        if self.txnId is not None:
            oprot.writeFieldBegin("txnId", TType.I64, 7)
            oprot.writeI64(self.txnId)
            oprot.writeFieldEnd()
        if self.deleteManagedDir is not None:
            oprot.writeFieldBegin("deleteManagedDir", TType.BOOL, 8)
            oprot.writeBool(self.deleteManagedDir)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - sourceTablesUpdateDeleteModified
     - sourceTablesCompacted

    """

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

    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)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.sourceTablesCompacted = 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()
        if self.sourceTablesCompacted is not None:
            oprot.writeFieldBegin("sourceTablesCompacted", TType.BOOL, 2)
            oprot.writeBool(self.sourceTablesCompacted)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - name
     - status
     - queryParallelism
     - defaultPoolPath
     - ns

    """

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

    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)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.ns = (
                        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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 5)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - name
     - status
     - queryParallelism
     - isSetQueryParallelism
     - defaultPoolPath
     - isSetDefaultPoolPath
     - ns

    """

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

    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)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.ns = (
                        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("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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 8)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - poolPath
     - allocFraction
     - queryParallelism
     - schedulingPolicy
     - ns

    """

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

    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.STRING:
                    self.ns = (
                        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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 6)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - poolPath
     - allocFraction
     - queryParallelism
     - schedulingPolicy
     - isSetSchedulingPolicy
     - ns

    """

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

    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)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.ns = (
                        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("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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 7)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - triggerName
     - triggerExpression
     - actionExpression
     - isInUnmanaged
     - ns

    """

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

    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)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.ns = (
                        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("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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 6)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - entityType
     - entityName
     - poolPath
     - ordering
     - ns

    """

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

    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)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.ns = (
                        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("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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 6)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - pool
     - trigger
     - ns

    """

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

    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)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.ns = (
                        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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 3)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype998, _size995) = iprot.readListBegin()
                    for _i999 in range(_size995):
                        _elem1000 = WMPool()
                        _elem1000.read(iprot)
                        self.pools.append(_elem1000)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.mappings = []
                    (_etype1004, _size1001) = iprot.readListBegin()
                    for _i1005 in range(_size1001):
                        _elem1006 = WMMapping()
                        _elem1006.read(iprot)
                        self.mappings.append(_elem1006)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.triggers = []
                    (_etype1010, _size1007) = iprot.readListBegin()
                    for _i1011 in range(_size1007):
                        _elem1012 = WMTrigger()
                        _elem1012.read(iprot)
                        self.triggers.append(_elem1012)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.poolTriggers = []
                    (_etype1016, _size1013) = iprot.readListBegin()
                    for _i1017 in range(_size1013):
                        _elem1018 = WMPoolTrigger()
                        _elem1018.read(iprot)
                        self.poolTriggers.append(_elem1018)
                    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 iter1019 in self.pools:
                iter1019.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 iter1020 in self.mappings:
                iter1020.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 iter1021 in self.triggers:
                iter1021.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 iter1022 in self.poolTriggers:
                iter1022.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - ns

    """

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

    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.ns = (
                        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("WMGetActiveResourcePlanRequest")
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 1)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - ns

    """

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

    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.ns = (
                        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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 2)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - ns

    """

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

    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.ns = (
                        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("WMGetAllResourcePlanRequest")
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 1)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype1026, _size1023) = iprot.readListBegin()
                    for _i1027 in range(_size1023):
                        _elem1028 = WMResourcePlan()
                        _elem1028.read(iprot)
                        self.resourcePlans.append(_elem1028)
                    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 iter1029 in self.resourcePlans:
                iter1029.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - resourcePlan
     - isEnableAndActivate
     - isForceDeactivate
     - isReplace
     - ns

    """

    def __init__(
        self,
        resourcePlanName=None,
        resourcePlan=None,
        isEnableAndActivate=None,
        isForceDeactivate=None,
        isReplace=None,
        ns=None,
    ):
        self.resourcePlanName = resourcePlanName
        self.resourcePlan = resourcePlan
        self.isEnableAndActivate = isEnableAndActivate
        self.isForceDeactivate = isForceDeactivate
        self.isReplace = isReplace
        self.ns = ns

    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)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.ns = (
                        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("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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 6)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - ns

    """

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

    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.ns = (
                        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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 2)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype1033, _size1030) = iprot.readListBegin()
                    for _i1034 in range(_size1030):
                        _elem1035 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.errors.append(_elem1035)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.warnings = []
                    (_etype1039, _size1036) = iprot.readListBegin()
                    for _i1040 in range(_size1036):
                        _elem1041 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.warnings.append(_elem1041)
                    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 iter1042 in self.errors:
                oprot.writeString(iter1042.encode("utf-8") if sys.version_info[0] == 2 else iter1042)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.warnings is not None:
            oprot.writeFieldBegin("warnings", TType.LIST, 2)
            oprot.writeListBegin(TType.STRING, len(self.warnings))
            for iter1043 in self.warnings:
                oprot.writeString(iter1043.encode("utf-8") if sys.version_info[0] == 2 else iter1043)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - ns

    """

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

    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.ns = (
                        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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 2)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - triggerName
     - ns

    """

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

    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.ns = (
                        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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 3)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - ns

    """

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

    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.ns = (
                        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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 2)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype1047, _size1044) = iprot.readListBegin()
                    for _i1048 in range(_size1044):
                        _elem1049 = WMTrigger()
                        _elem1049.read(iprot)
                        self.triggers.append(_elem1049)
                    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 iter1050 in self.triggers:
                iter1050.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - poolPath
     - ns

    """

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

    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.STRING:
                    self.ns = (
                        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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 3)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    Attributes:
     - resourcePlanName
     - triggerName
     - poolPath
     - drop
     - ns

    """

    def __init__(
        self,
        resourcePlanName=None,
        triggerName=None,
        poolPath=None,
        drop=None,
        ns=None,
    ):
        self.resourcePlanName = resourcePlanName
        self.triggerName = triggerName
        self.poolPath = poolPath
        self.drop = drop
        self.ns = ns

    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)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.ns = (
                        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("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()
        if self.ns is not None:
            oprot.writeFieldBegin("ns", TType.STRING, 5)
            oprot.writeString(self.ns.encode("utf-8") if sys.version_info[0] == 2 else self.ns)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype1054, _size1051) = iprot.readListBegin()
                    for _i1055 in range(_size1051):
                        _elem1056 = FieldSchema()
                        _elem1056.read(iprot)
                        self.cols.append(_elem1056)
                    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 iter1057 in self.cols:
                iter1057.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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = []
                    (_etype1061, _size1058) = iprot.readListBegin()
                    for _i1062 in range(_size1058):
                        _elem1063 = SchemaVersionDescriptor()
                        _elem1063.read(iprot)
                        self.schemaVersions.append(_elem1063)
                    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 iter1064 in self.schemaVersions:
                iter1064.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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:
    """
    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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CreateTableRequest:
    """
    Attributes:
     - table
     - envContext
     - primaryKeys
     - foreignKeys
     - uniqueConstraints
     - notNullConstraints
     - defaultConstraints
     - checkConstraints
     - processorCapabilities
     - processorIdentifier

    """

    def __init__(
        self,
        table=None,
        envContext=None,
        primaryKeys=None,
        foreignKeys=None,
        uniqueConstraints=None,
        notNullConstraints=None,
        defaultConstraints=None,
        checkConstraints=None,
        processorCapabilities=None,
        processorIdentifier=None,
    ):
        self.table = table
        self.envContext = envContext
        self.primaryKeys = primaryKeys
        self.foreignKeys = foreignKeys
        self.uniqueConstraints = uniqueConstraints
        self.notNullConstraints = notNullConstraints
        self.defaultConstraints = defaultConstraints
        self.checkConstraints = checkConstraints
        self.processorCapabilities = processorCapabilities
        self.processorIdentifier = processorIdentifier

    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)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.envContext = EnvironmentContext()
                    self.envContext.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.primaryKeys = []
                    (_etype1068, _size1065) = iprot.readListBegin()
                    for _i1069 in range(_size1065):
                        _elem1070 = SQLPrimaryKey()
                        _elem1070.read(iprot)
                        self.primaryKeys.append(_elem1070)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.foreignKeys = []
                    (_etype1074, _size1071) = iprot.readListBegin()
                    for _i1075 in range(_size1071):
                        _elem1076 = SQLForeignKey()
                        _elem1076.read(iprot)
                        self.foreignKeys.append(_elem1076)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.uniqueConstraints = []
                    (_etype1080, _size1077) = iprot.readListBegin()
                    for _i1081 in range(_size1077):
                        _elem1082 = SQLUniqueConstraint()
                        _elem1082.read(iprot)
                        self.uniqueConstraints.append(_elem1082)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.LIST:
                    self.notNullConstraints = []
                    (_etype1086, _size1083) = iprot.readListBegin()
                    for _i1087 in range(_size1083):
                        _elem1088 = SQLNotNullConstraint()
                        _elem1088.read(iprot)
                        self.notNullConstraints.append(_elem1088)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.LIST:
                    self.defaultConstraints = []
                    (_etype1092, _size1089) = iprot.readListBegin()
                    for _i1093 in range(_size1089):
                        _elem1094 = SQLDefaultConstraint()
                        _elem1094.read(iprot)
                        self.defaultConstraints.append(_elem1094)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.LIST:
                    self.checkConstraints = []
                    (_etype1098, _size1095) = iprot.readListBegin()
                    for _i1099 in range(_size1095):
                        _elem1100 = SQLCheckConstraint()
                        _elem1100.read(iprot)
                        self.checkConstraints.append(_elem1100)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.LIST:
                    self.processorCapabilities = []
                    (_etype1104, _size1101) = iprot.readListBegin()
                    for _i1105 in range(_size1101):
                        _elem1106 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.processorCapabilities.append(_elem1106)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.processorIdentifier = (
                        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("CreateTableRequest")
        if self.table is not None:
            oprot.writeFieldBegin("table", TType.STRUCT, 1)
            self.table.write(oprot)
            oprot.writeFieldEnd()
        if self.envContext is not None:
            oprot.writeFieldBegin("envContext", TType.STRUCT, 2)
            self.envContext.write(oprot)
            oprot.writeFieldEnd()
        if self.primaryKeys is not None:
            oprot.writeFieldBegin("primaryKeys", TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys))
            for iter1107 in self.primaryKeys:
                iter1107.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.foreignKeys is not None:
            oprot.writeFieldBegin("foreignKeys", TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys))
            for iter1108 in self.foreignKeys:
                iter1108.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.uniqueConstraints is not None:
            oprot.writeFieldBegin("uniqueConstraints", TType.LIST, 5)
            oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints))
            for iter1109 in self.uniqueConstraints:
                iter1109.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.notNullConstraints is not None:
            oprot.writeFieldBegin("notNullConstraints", TType.LIST, 6)
            oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints))
            for iter1110 in self.notNullConstraints:
                iter1110.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.defaultConstraints is not None:
            oprot.writeFieldBegin("defaultConstraints", TType.LIST, 7)
            oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraints))
            for iter1111 in self.defaultConstraints:
                iter1111.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.checkConstraints is not None:
            oprot.writeFieldBegin("checkConstraints", TType.LIST, 8)
            oprot.writeListBegin(TType.STRUCT, len(self.checkConstraints))
            for iter1112 in self.checkConstraints:
                iter1112.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.processorCapabilities is not None:
            oprot.writeFieldBegin("processorCapabilities", TType.LIST, 9)
            oprot.writeListBegin(TType.STRING, len(self.processorCapabilities))
            for iter1113 in self.processorCapabilities:
                oprot.writeString(iter1113.encode("utf-8") if sys.version_info[0] == 2 else iter1113)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.processorIdentifier is not None:
            oprot.writeFieldBegin("processorIdentifier", TType.STRING, 10)
            oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CreateDatabaseRequest:
    """
    Attributes:
     - databaseName
     - description
     - locationUri
     - parameters
     - privileges
     - ownerName
     - ownerType
     - catalogName
     - createTime
     - managedLocationUri
     - type
     - dataConnectorName

    """

    def __init__(
        self,
        databaseName=None,
        description=None,
        locationUri=None,
        parameters=None,
        privileges=None,
        ownerName=None,
        ownerType=None,
        catalogName=None,
        createTime=None,
        managedLocationUri=None,
        type=None,
        dataConnectorName=None,
    ):
        self.databaseName = databaseName
        self.description = description
        self.locationUri = locationUri
        self.parameters = parameters
        self.privileges = privileges
        self.ownerName = ownerName
        self.ownerType = ownerType
        self.catalogName = catalogName
        self.createTime = createTime
        self.managedLocationUri = managedLocationUri
        self.type = type
        self.dataConnectorName = dataConnectorName

    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.databaseName = (
                        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 = {}
                    (_ktype1115, _vtype1116, _size1114) = iprot.readMapBegin()
                    for _i1118 in range(_size1114):
                        _key1119 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        _val1120 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.parameters[_key1119] = _val1120
                    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)
            elif fid == 9:
                if ftype == TType.I32:
                    self.createTime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.managedLocationUri = (
                        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.type = (
                        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.dataConnectorName = (
                        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("CreateDatabaseRequest")
        if self.databaseName is not None:
            oprot.writeFieldBegin("databaseName", TType.STRING, 1)
            oprot.writeString(self.databaseName.encode("utf-8") if sys.version_info[0] == 2 else self.databaseName)
            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 kiter1121, viter1122 in self.parameters.items():
                oprot.writeString(kiter1121.encode("utf-8") if sys.version_info[0] == 2 else kiter1121)
                oprot.writeString(viter1122.encode("utf-8") if sys.version_info[0] == 2 else viter1122)
            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()
        if self.createTime is not None:
            oprot.writeFieldBegin("createTime", TType.I32, 9)
            oprot.writeI32(self.createTime)
            oprot.writeFieldEnd()
        if self.managedLocationUri is not None:
            oprot.writeFieldBegin("managedLocationUri", TType.STRING, 10)
            oprot.writeString(self.managedLocationUri.encode("utf-8") if sys.version_info[0] == 2 else self.managedLocationUri)
            oprot.writeFieldEnd()
        if self.type is not None:
            oprot.writeFieldBegin("type", TType.STRING, 11)
            oprot.writeString(self.type.encode("utf-8") if sys.version_info[0] == 2 else self.type)
            oprot.writeFieldEnd()
        if self.dataConnectorName is not None:
            oprot.writeFieldBegin("dataConnectorName", TType.STRING, 12)
            oprot.writeString(self.dataConnectorName.encode("utf-8") if sys.version_info[0] == 2 else self.dataConnectorName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CreateDataConnectorRequest:
    """
    Attributes:
     - connector

    """

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

    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.connector = DataConnector()
                    self.connector.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("CreateDataConnectorRequest")
        if self.connector is not None:
            oprot.writeFieldBegin("connector", TType.STRUCT, 1)
            self.connector.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetDataConnectorRequest:
    """
    Attributes:
     - connectorName

    """

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

    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.connectorName = (
                        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("GetDataConnectorRequest")
        if self.connectorName is not None:
            oprot.writeFieldBegin("connectorName", TType.STRING, 1)
            oprot.writeString(self.connectorName.encode("utf-8") if sys.version_info[0] == 2 else self.connectorName)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ScheduledQueryPollRequest:
    """
    Attributes:
     - clusterNamespace

    """

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

    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.clusterNamespace = (
                        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("ScheduledQueryPollRequest")
        if self.clusterNamespace is not None:
            oprot.writeFieldBegin("clusterNamespace", TType.STRING, 1)
            oprot.writeString(self.clusterNamespace.encode("utf-8") if sys.version_info[0] == 2 else self.clusterNamespace)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ScheduledQueryKey:
    """
    Attributes:
     - scheduleName
     - clusterNamespace

    """

    def __init__(
        self,
        scheduleName=None,
        clusterNamespace=None,
    ):
        self.scheduleName = scheduleName
        self.clusterNamespace = clusterNamespace

    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.scheduleName = (
                        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.clusterNamespace = (
                        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("ScheduledQueryKey")
        if self.scheduleName is not None:
            oprot.writeFieldBegin("scheduleName", TType.STRING, 1)
            oprot.writeString(self.scheduleName.encode("utf-8") if sys.version_info[0] == 2 else self.scheduleName)
            oprot.writeFieldEnd()
        if self.clusterNamespace is not None:
            oprot.writeFieldBegin("clusterNamespace", TType.STRING, 2)
            oprot.writeString(self.clusterNamespace.encode("utf-8") if sys.version_info[0] == 2 else self.clusterNamespace)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.scheduleName is None:
            raise TProtocolException(message="Required field scheduleName is unset!")
        if self.clusterNamespace is None:
            raise TProtocolException(message="Required field clusterNamespace is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ScheduledQueryPollResponse:
    """
    Attributes:
     - scheduleKey
     - executionId
     - query
     - user

    """

    def __init__(
        self,
        scheduleKey=None,
        executionId=None,
        query=None,
        user=None,
    ):
        self.scheduleKey = scheduleKey
        self.executionId = executionId
        self.query = query
        self.user = user

    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.scheduleKey = ScheduledQueryKey()
                    self.scheduleKey.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.executionId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.query = (
                        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.user = (
                        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("ScheduledQueryPollResponse")
        if self.scheduleKey is not None:
            oprot.writeFieldBegin("scheduleKey", TType.STRUCT, 1)
            self.scheduleKey.write(oprot)
            oprot.writeFieldEnd()
        if self.executionId is not None:
            oprot.writeFieldBegin("executionId", TType.I64, 2)
            oprot.writeI64(self.executionId)
            oprot.writeFieldEnd()
        if self.query is not None:
            oprot.writeFieldBegin("query", TType.STRING, 3)
            oprot.writeString(self.query.encode("utf-8") if sys.version_info[0] == 2 else self.query)
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin("user", TType.STRING, 4)
            oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ScheduledQuery:
    """
    Attributes:
     - scheduleKey
     - enabled
     - schedule
     - user
     - query
     - nextExecution

    """

    def __init__(
        self,
        scheduleKey=None,
        enabled=None,
        schedule=None,
        user=None,
        query=None,
        nextExecution=None,
    ):
        self.scheduleKey = scheduleKey
        self.enabled = enabled
        self.schedule = schedule
        self.user = user
        self.query = query
        self.nextExecution = nextExecution

    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.scheduleKey = ScheduledQueryKey()
                    self.scheduleKey.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.enabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.schedule = (
                        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.user = (
                        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.query = (
                        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.nextExecution = 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("ScheduledQuery")
        if self.scheduleKey is not None:
            oprot.writeFieldBegin("scheduleKey", TType.STRUCT, 1)
            self.scheduleKey.write(oprot)
            oprot.writeFieldEnd()
        if self.enabled is not None:
            oprot.writeFieldBegin("enabled", TType.BOOL, 2)
            oprot.writeBool(self.enabled)
            oprot.writeFieldEnd()
        if self.schedule is not None:
            oprot.writeFieldBegin("schedule", TType.STRING, 4)
            oprot.writeString(self.schedule.encode("utf-8") if sys.version_info[0] == 2 else self.schedule)
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin("user", TType.STRING, 5)
            oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user)
            oprot.writeFieldEnd()
        if self.query is not None:
            oprot.writeFieldBegin("query", TType.STRING, 6)
            oprot.writeString(self.query.encode("utf-8") if sys.version_info[0] == 2 else self.query)
            oprot.writeFieldEnd()
        if self.nextExecution is not None:
            oprot.writeFieldBegin("nextExecution", TType.I32, 7)
            oprot.writeI32(self.nextExecution)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ScheduledQueryMaintenanceRequest:
    """
    Attributes:
     - type
     - scheduledQuery

    """

    def __init__(
        self,
        type=None,
        scheduledQuery=None,
    ):
        self.type = type
        self.scheduledQuery = scheduledQuery

    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.STRUCT:
                    self.scheduledQuery = ScheduledQuery()
                    self.scheduledQuery.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("ScheduledQueryMaintenanceRequest")
        if self.type is not None:
            oprot.writeFieldBegin("type", TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.scheduledQuery is not None:
            oprot.writeFieldBegin("scheduledQuery", TType.STRUCT, 2)
            self.scheduledQuery.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ScheduledQueryProgressInfo:
    """
    Attributes:
     - scheduledExecutionId
     - state
     - executorQueryId
     - errorMessage

    """

    def __init__(
        self,
        scheduledExecutionId=None,
        state=None,
        executorQueryId=None,
        errorMessage=None,
    ):
        self.scheduledExecutionId = scheduledExecutionId
        self.state = state
        self.executorQueryId = executorQueryId
        self.errorMessage = errorMessage

    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.scheduledExecutionId = 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.executorQueryId = (
                        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.errorMessage = (
                        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("ScheduledQueryProgressInfo")
        if self.scheduledExecutionId is not None:
            oprot.writeFieldBegin("scheduledExecutionId", TType.I64, 1)
            oprot.writeI64(self.scheduledExecutionId)
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin("state", TType.I32, 2)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.executorQueryId is not None:
            oprot.writeFieldBegin("executorQueryId", TType.STRING, 3)
            oprot.writeString(self.executorQueryId.encode("utf-8") if sys.version_info[0] == 2 else self.executorQueryId)
            oprot.writeFieldEnd()
        if self.errorMessage is not None:
            oprot.writeFieldBegin("errorMessage", TType.STRING, 4)
            oprot.writeString(self.errorMessage.encode("utf-8") if sys.version_info[0] == 2 else self.errorMessage)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AlterPartitionsRequest:
    """
    Attributes:
     - catName
     - dbName
     - tableName
     - partitions
     - environmentContext
     - writeId
     - validWriteIdList

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        tableName=None,
        partitions=None,
        environmentContext=None,
        writeId=-1,
        validWriteIdList=None,
    ):
        self.catName = catName
        self.dbName = dbName
        self.tableName = tableName
        self.partitions = partitions
        self.environmentContext = environmentContext
        self.writeId = writeId
        self.validWriteIdList = validWriteIdList

    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.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.LIST:
                    self.partitions = []
                    (_etype1126, _size1123) = iprot.readListBegin()
                    for _i1127 in range(_size1123):
                        _elem1128 = Partition()
                        _elem1128.read(iprot)
                        self.partitions.append(_elem1128)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.environmentContext = EnvironmentContext()
                    self.environmentContext.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.writeId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                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)
            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("AlterPartitionsRequest")
        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.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.partitions is not None:
            oprot.writeFieldBegin("partitions", TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter1129 in self.partitions:
                iter1129.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.environmentContext is not None:
            oprot.writeFieldBegin("environmentContext", TType.STRUCT, 5)
            self.environmentContext.write(oprot)
            oprot.writeFieldEnd()
        if self.writeId is not None:
            oprot.writeFieldBegin("writeId", TType.I64, 6)
            oprot.writeI64(self.writeId)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 7)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            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.partitions is None:
            raise TProtocolException(message="Required field partitions is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AlterPartitionsResponse:
    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("AlterPartitionsResponse")
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class RenamePartitionRequest:
    """
    Attributes:
     - catName
     - dbName
     - tableName
     - partVals
     - newPart
     - validWriteIdList
     - txnId
     - clonePart

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        tableName=None,
        partVals=None,
        newPart=None,
        validWriteIdList=None,
        txnId=None,
        clonePart=None,
    ):
        self.catName = catName
        self.dbName = dbName
        self.tableName = tableName
        self.partVals = partVals
        self.newPart = newPart
        self.validWriteIdList = validWriteIdList
        self.txnId = txnId
        self.clonePart = clonePart

    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.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.LIST:
                    self.partVals = []
                    (_etype1133, _size1130) = iprot.readListBegin()
                    for _i1134 in range(_size1130):
                        _elem1135 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partVals.append(_elem1135)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.newPart = Partition()
                    self.newPart.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                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 == 7:
                if ftype == TType.I64:
                    self.txnId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.BOOL:
                    self.clonePart = 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("RenamePartitionRequest")
        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.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.partVals is not None:
            oprot.writeFieldBegin("partVals", TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.partVals))
            for iter1136 in self.partVals:
                oprot.writeString(iter1136.encode("utf-8") if sys.version_info[0] == 2 else iter1136)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.newPart is not None:
            oprot.writeFieldBegin("newPart", TType.STRUCT, 5)
            self.newPart.write(oprot)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 6)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.txnId is not None:
            oprot.writeFieldBegin("txnId", TType.I64, 7)
            oprot.writeI64(self.txnId)
            oprot.writeFieldEnd()
        if self.clonePart is not None:
            oprot.writeFieldBegin("clonePart", TType.BOOL, 8)
            oprot.writeBool(self.clonePart)
            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.partVals is None:
            raise TProtocolException(message="Required field partVals is unset!")
        if self.newPart is None:
            raise TProtocolException(message="Required field newPart is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class RenamePartitionResponse:
    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("RenamePartitionResponse")
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AlterTableRequest:
    """
    Attributes:
     - catName
     - dbName
     - tableName
     - table
     - environmentContext
     - writeId
     - validWriteIdList
     - processorCapabilities
     - processorIdentifier

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        tableName=None,
        table=None,
        environmentContext=None,
        writeId=-1,
        validWriteIdList=None,
        processorCapabilities=None,
        processorIdentifier=None,
    ):
        self.catName = catName
        self.dbName = dbName
        self.tableName = tableName
        self.table = table
        self.environmentContext = environmentContext
        self.writeId = writeId
        self.validWriteIdList = validWriteIdList
        self.processorCapabilities = processorCapabilities
        self.processorIdentifier = processorIdentifier

    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.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.STRUCT:
                    self.table = Table()
                    self.table.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.environmentContext = EnvironmentContext()
                    self.environmentContext.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.writeId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                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 == 8:
                if ftype == TType.LIST:
                    self.processorCapabilities = []
                    (_etype1140, _size1137) = iprot.readListBegin()
                    for _i1141 in range(_size1137):
                        _elem1142 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.processorCapabilities.append(_elem1142)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.processorIdentifier = (
                        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("AlterTableRequest")
        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.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.table is not None:
            oprot.writeFieldBegin("table", TType.STRUCT, 4)
            self.table.write(oprot)
            oprot.writeFieldEnd()
        if self.environmentContext is not None:
            oprot.writeFieldBegin("environmentContext", TType.STRUCT, 5)
            self.environmentContext.write(oprot)
            oprot.writeFieldEnd()
        if self.writeId is not None:
            oprot.writeFieldBegin("writeId", TType.I64, 6)
            oprot.writeI64(self.writeId)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 7)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.processorCapabilities is not None:
            oprot.writeFieldBegin("processorCapabilities", TType.LIST, 8)
            oprot.writeListBegin(TType.STRING, len(self.processorCapabilities))
            for iter1143 in self.processorCapabilities:
                oprot.writeString(iter1143.encode("utf-8") if sys.version_info[0] == 2 else iter1143)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.processorIdentifier is not None:
            oprot.writeFieldBegin("processorIdentifier", TType.STRING, 9)
            oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier)
            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.table is None:
            raise TProtocolException(message="Required field table is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AlterTableResponse:
    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("AlterTableResponse")
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionsFilterSpec:
    """
    Attributes:
     - filterMode
     - filters

    """

    def __init__(
        self,
        filterMode=None,
        filters=None,
    ):
        self.filterMode = filterMode
        self.filters = filters

    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 == 7:
                if ftype == TType.I32:
                    self.filterMode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.LIST:
                    self.filters = []
                    (_etype1147, _size1144) = iprot.readListBegin()
                    for _i1148 in range(_size1144):
                        _elem1149 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.filters.append(_elem1149)
                    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("GetPartitionsFilterSpec")
        if self.filterMode is not None:
            oprot.writeFieldBegin("filterMode", TType.I32, 7)
            oprot.writeI32(self.filterMode)
            oprot.writeFieldEnd()
        if self.filters is not None:
            oprot.writeFieldBegin("filters", TType.LIST, 8)
            oprot.writeListBegin(TType.STRING, len(self.filters))
            for iter1150 in self.filters:
                oprot.writeString(iter1150.encode("utf-8") if sys.version_info[0] == 2 else iter1150)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionsResponse:
    """
    Attributes:
     - partitionSpec

    """

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

    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.partitionSpec = []
                    (_etype1154, _size1151) = iprot.readListBegin()
                    for _i1155 in range(_size1151):
                        _elem1156 = PartitionSpec()
                        _elem1156.read(iprot)
                        self.partitionSpec.append(_elem1156)
                    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("GetPartitionsResponse")
        if self.partitionSpec is not None:
            oprot.writeFieldBegin("partitionSpec", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitionSpec))
            for iter1157 in self.partitionSpec:
                iter1157.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionsRequest:
    """
    Attributes:
     - catName
     - dbName
     - tblName
     - withAuth
     - user
     - groupNames
     - projectionSpec
     - filterSpec
     - processorCapabilities
     - processorIdentifier
     - validWriteIdList

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        tblName=None,
        withAuth=None,
        user=None,
        groupNames=None,
        projectionSpec=None,
        filterSpec=None,
        processorCapabilities=None,
        processorIdentifier=None,
        validWriteIdList=None,
    ):
        self.catName = catName
        self.dbName = dbName
        self.tblName = tblName
        self.withAuth = withAuth
        self.user = user
        self.groupNames = groupNames
        self.projectionSpec = projectionSpec
        self.filterSpec = filterSpec
        self.processorCapabilities = processorCapabilities
        self.processorIdentifier = processorIdentifier
        self.validWriteIdList = validWriteIdList

    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.BOOL:
                    self.withAuth = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                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 == 6:
                if ftype == TType.LIST:
                    self.groupNames = []
                    (_etype1161, _size1158) = iprot.readListBegin()
                    for _i1162 in range(_size1158):
                        _elem1163 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.groupNames.append(_elem1163)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRUCT:
                    self.projectionSpec = GetProjectionsSpec()
                    self.projectionSpec.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRUCT:
                    self.filterSpec = GetPartitionsFilterSpec()
                    self.filterSpec.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.LIST:
                    self.processorCapabilities = []
                    (_etype1167, _size1164) = iprot.readListBegin()
                    for _i1168 in range(_size1164):
                        _elem1169 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.processorCapabilities.append(_elem1169)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.processorIdentifier = (
                        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.validWriteIdList = (
                        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("GetPartitionsRequest")
        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.withAuth is not None:
            oprot.writeFieldBegin("withAuth", TType.BOOL, 4)
            oprot.writeBool(self.withAuth)
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin("user", TType.STRING, 5)
            oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user)
            oprot.writeFieldEnd()
        if self.groupNames is not None:
            oprot.writeFieldBegin("groupNames", TType.LIST, 6)
            oprot.writeListBegin(TType.STRING, len(self.groupNames))
            for iter1170 in self.groupNames:
                oprot.writeString(iter1170.encode("utf-8") if sys.version_info[0] == 2 else iter1170)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.projectionSpec is not None:
            oprot.writeFieldBegin("projectionSpec", TType.STRUCT, 7)
            self.projectionSpec.write(oprot)
            oprot.writeFieldEnd()
        if self.filterSpec is not None:
            oprot.writeFieldBegin("filterSpec", TType.STRUCT, 8)
            self.filterSpec.write(oprot)
            oprot.writeFieldEnd()
        if self.processorCapabilities is not None:
            oprot.writeFieldBegin("processorCapabilities", TType.LIST, 9)
            oprot.writeListBegin(TType.STRING, len(self.processorCapabilities))
            for iter1171 in self.processorCapabilities:
                oprot.writeString(iter1171.encode("utf-8") if sys.version_info[0] == 2 else iter1171)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.processorIdentifier is not None:
            oprot.writeFieldBegin("processorIdentifier", TType.STRING, 10)
            oprot.writeString(self.processorIdentifier.encode("utf-8") if sys.version_info[0] == 2 else self.processorIdentifier)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 11)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetFieldsRequest:
    """
    Attributes:
     - catName
     - dbName
     - tblName
     - envContext
     - validWriteIdList
     - id

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        tblName=None,
        envContext=None,
        validWriteIdList=None,
        id=-1,
    ):
        self.catName = catName
        self.dbName = dbName
        self.tblName = tblName
        self.envContext = envContext
        self.validWriteIdList = validWriteIdList
        self.id = id

    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.STRUCT:
                    self.envContext = EnvironmentContext()
                    self.envContext.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                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 == 6:
                if ftype == TType.I64:
                    self.id = 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("GetFieldsRequest")
        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.envContext is not None:
            oprot.writeFieldBegin("envContext", TType.STRUCT, 4)
            self.envContext.write(oprot)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 6)
            oprot.writeI64(self.id)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetFieldsResponse:
    """
    Attributes:
     - fields

    """

    def __init__(
        self,
        fields=None,
    ):
        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.LIST:
                    self.fields = []
                    (_etype1175, _size1172) = iprot.readListBegin()
                    for _i1176 in range(_size1172):
                        _elem1177 = FieldSchema()
                        _elem1177.read(iprot)
                        self.fields.append(_elem1177)
                    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("GetFieldsResponse")
        if self.fields is not None:
            oprot.writeFieldBegin("fields", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.fields))
            for iter1178 in self.fields:
                iter1178.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSchemaRequest:
    """
    Attributes:
     - catName
     - dbName
     - tblName
     - envContext
     - validWriteIdList
     - id

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        tblName=None,
        envContext=None,
        validWriteIdList=None,
        id=-1,
    ):
        self.catName = catName
        self.dbName = dbName
        self.tblName = tblName
        self.envContext = envContext
        self.validWriteIdList = validWriteIdList
        self.id = id

    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.STRUCT:
                    self.envContext = EnvironmentContext()
                    self.envContext.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                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 == 6:
                if ftype == TType.I64:
                    self.id = 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("GetSchemaRequest")
        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.envContext is not None:
            oprot.writeFieldBegin("envContext", TType.STRUCT, 4)
            self.envContext.write(oprot)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 6)
            oprot.writeI64(self.id)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetSchemaResponse:
    """
    Attributes:
     - fields

    """

    def __init__(
        self,
        fields=None,
    ):
        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.LIST:
                    self.fields = []
                    (_etype1182, _size1179) = iprot.readListBegin()
                    for _i1183 in range(_size1179):
                        _elem1184 = FieldSchema()
                        _elem1184.read(iprot)
                        self.fields.append(_elem1184)
                    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("GetSchemaResponse")
        if self.fields is not None:
            oprot.writeFieldBegin("fields", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.fields))
            for iter1185 in self.fields:
                iter1185.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionRequest:
    """
    Attributes:
     - catName
     - dbName
     - tblName
     - partVals
     - validWriteIdList
     - id

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        tblName=None,
        partVals=None,
        validWriteIdList=None,
        id=-1,
    ):
        self.catName = catName
        self.dbName = dbName
        self.tblName = tblName
        self.partVals = partVals
        self.validWriteIdList = validWriteIdList
        self.id = id

    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.LIST:
                    self.partVals = []
                    (_etype1189, _size1186) = iprot.readListBegin()
                    for _i1190 in range(_size1186):
                        _elem1191 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partVals.append(_elem1191)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                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 == 6:
                if ftype == TType.I64:
                    self.id = 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("GetPartitionRequest")
        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.partVals is not None:
            oprot.writeFieldBegin("partVals", TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.partVals))
            for iter1192 in self.partVals:
                oprot.writeString(iter1192.encode("utf-8") if sys.version_info[0] == 2 else iter1192)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 6)
            oprot.writeI64(self.id)
            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.partVals is None:
            raise TProtocolException(message="Required field partVals is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionResponse:
    """
    Attributes:
     - partition

    """

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

    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.partition = Partition()
                    self.partition.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("GetPartitionResponse")
        if self.partition is not None:
            oprot.writeFieldBegin("partition", TType.STRUCT, 1)
            self.partition.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PartitionsRequest:
    """
    Attributes:
     - catName
     - dbName
     - tblName
     - maxParts
     - validWriteIdList
     - id

    """

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

    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.I16:
                    self.maxParts = iprot.readI16()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                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 == 6:
                if ftype == TType.I64:
                    self.id = 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("PartitionsRequest")
        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.maxParts is not None:
            oprot.writeFieldBegin("maxParts", TType.I16, 4)
            oprot.writeI16(self.maxParts)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 5)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 6)
            oprot.writeI64(self.id)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class PartitionsResponse:
    """
    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 = []
                    (_etype1196, _size1193) = iprot.readListBegin()
                    for _i1197 in range(_size1193):
                        _elem1198 = Partition()
                        _elem1198.read(iprot)
                        self.partitions.append(_elem1198)
                    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("PartitionsResponse")
        if self.partitions is not None:
            oprot.writeFieldBegin("partitions", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter1199 in self.partitions:
                iter1199.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionNamesPsRequest:
    """
    Attributes:
     - catName
     - dbName
     - tblName
     - partValues
     - maxParts
     - validWriteIdList
     - id

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        tblName=None,
        partValues=None,
        maxParts=-1,
        validWriteIdList=None,
        id=-1,
    ):
        self.catName = catName
        self.dbName = dbName
        self.tblName = tblName
        self.partValues = partValues
        self.maxParts = maxParts
        self.validWriteIdList = validWriteIdList
        self.id = id

    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.LIST:
                    self.partValues = []
                    (_etype1203, _size1200) = iprot.readListBegin()
                    for _i1204 in range(_size1200):
                        _elem1205 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partValues.append(_elem1205)
                    iprot.readListEnd()
                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.validWriteIdList = (
                        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.id = 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("GetPartitionNamesPsRequest")
        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.partValues is not None:
            oprot.writeFieldBegin("partValues", TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.partValues))
            for iter1206 in self.partValues:
                oprot.writeString(iter1206.encode("utf-8") if sys.version_info[0] == 2 else iter1206)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.maxParts is not None:
            oprot.writeFieldBegin("maxParts", TType.I16, 5)
            oprot.writeI16(self.maxParts)
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 6)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 7)
            oprot.writeI64(self.id)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionNamesPsResponse:
    """
    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 = []
                    (_etype1210, _size1207) = iprot.readListBegin()
                    for _i1211 in range(_size1207):
                        _elem1212 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.names.append(_elem1212)
                    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("GetPartitionNamesPsResponse")
        if self.names is not None:
            oprot.writeFieldBegin("names", TType.LIST, 1)
            oprot.writeListBegin(TType.STRING, len(self.names))
            for iter1213 in self.names:
                oprot.writeString(iter1213.encode("utf-8") if sys.version_info[0] == 2 else iter1213)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionsPsWithAuthRequest:
    """
    Attributes:
     - catName
     - dbName
     - tblName
     - partVals
     - maxParts
     - userName
     - groupNames
     - validWriteIdList
     - id

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        tblName=None,
        partVals=None,
        maxParts=-1,
        userName=None,
        groupNames=None,
        validWriteIdList=None,
        id=-1,
    ):
        self.catName = catName
        self.dbName = dbName
        self.tblName = tblName
        self.partVals = partVals
        self.maxParts = maxParts
        self.userName = userName
        self.groupNames = groupNames
        self.validWriteIdList = validWriteIdList
        self.id = id

    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.LIST:
                    self.partVals = []
                    (_etype1217, _size1214) = iprot.readListBegin()
                    for _i1218 in range(_size1214):
                        _elem1219 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.partVals.append(_elem1219)
                    iprot.readListEnd()
                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.userName = (
                        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.LIST:
                    self.groupNames = []
                    (_etype1223, _size1220) = iprot.readListBegin()
                    for _i1224 in range(_size1220):
                        _elem1225 = (
                            iprot.readString().decode("utf-8", errors="replace")
                            if sys.version_info[0] == 2
                            else iprot.readString()
                        )
                        self.groupNames.append(_elem1225)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                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 == 9:
                if ftype == TType.I64:
                    self.id = 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("GetPartitionsPsWithAuthRequest")
        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.partVals is not None:
            oprot.writeFieldBegin("partVals", TType.LIST, 4)
            oprot.writeListBegin(TType.STRING, len(self.partVals))
            for iter1226 in self.partVals:
                oprot.writeString(iter1226.encode("utf-8") if sys.version_info[0] == 2 else iter1226)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.maxParts is not None:
            oprot.writeFieldBegin("maxParts", TType.I16, 5)
            oprot.writeI16(self.maxParts)
            oprot.writeFieldEnd()
        if self.userName is not None:
            oprot.writeFieldBegin("userName", TType.STRING, 6)
            oprot.writeString(self.userName.encode("utf-8") if sys.version_info[0] == 2 else self.userName)
            oprot.writeFieldEnd()
        if self.groupNames is not None:
            oprot.writeFieldBegin("groupNames", TType.LIST, 7)
            oprot.writeListBegin(TType.STRING, len(self.groupNames))
            for iter1227 in self.groupNames:
                oprot.writeString(iter1227.encode("utf-8") if sys.version_info[0] == 2 else iter1227)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.validWriteIdList is not None:
            oprot.writeFieldBegin("validWriteIdList", TType.STRING, 8)
            oprot.writeString(self.validWriteIdList.encode("utf-8") if sys.version_info[0] == 2 else self.validWriteIdList)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin("id", TType.I64, 9)
            oprot.writeI64(self.id)
            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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPartitionsPsWithAuthResponse:
    """
    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 = []
                    (_etype1231, _size1228) = iprot.readListBegin()
                    for _i1232 in range(_size1228):
                        _elem1233 = Partition()
                        _elem1233.read(iprot)
                        self.partitions.append(_elem1233)
                    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("GetPartitionsPsWithAuthResponse")
        if self.partitions is not None:
            oprot.writeFieldBegin("partitions", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.partitions))
            for iter1234 in self.partitions:
                iter1234.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReplicationMetrics:
    """
    Attributes:
     - scheduledExecutionId
     - policy
     - dumpExecutionId
     - metadata
     - progress
     - messageFormat

    """

    def __init__(
        self,
        scheduledExecutionId=None,
        policy=None,
        dumpExecutionId=None,
        metadata=None,
        progress=None,
        messageFormat=None,
    ):
        self.scheduledExecutionId = scheduledExecutionId
        self.policy = policy
        self.dumpExecutionId = dumpExecutionId
        self.metadata = metadata
        self.progress = progress
        self.messageFormat = messageFormat

    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.scheduledExecutionId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.policy = (
                        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.I64:
                    self.dumpExecutionId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.metadata = (
                        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.progress = (
                        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.messageFormat = (
                        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("ReplicationMetrics")
        if self.scheduledExecutionId is not None:
            oprot.writeFieldBegin("scheduledExecutionId", TType.I64, 1)
            oprot.writeI64(self.scheduledExecutionId)
            oprot.writeFieldEnd()
        if self.policy is not None:
            oprot.writeFieldBegin("policy", TType.STRING, 2)
            oprot.writeString(self.policy.encode("utf-8") if sys.version_info[0] == 2 else self.policy)
            oprot.writeFieldEnd()
        if self.dumpExecutionId is not None:
            oprot.writeFieldBegin("dumpExecutionId", TType.I64, 3)
            oprot.writeI64(self.dumpExecutionId)
            oprot.writeFieldEnd()
        if self.metadata is not None:
            oprot.writeFieldBegin("metadata", TType.STRING, 4)
            oprot.writeString(self.metadata.encode("utf-8") if sys.version_info[0] == 2 else self.metadata)
            oprot.writeFieldEnd()
        if self.progress is not None:
            oprot.writeFieldBegin("progress", TType.STRING, 5)
            oprot.writeString(self.progress.encode("utf-8") if sys.version_info[0] == 2 else self.progress)
            oprot.writeFieldEnd()
        if self.messageFormat is not None:
            oprot.writeFieldBegin("messageFormat", TType.STRING, 6)
            oprot.writeString(self.messageFormat.encode("utf-8") if sys.version_info[0] == 2 else self.messageFormat)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.scheduledExecutionId is None:
            raise TProtocolException(message="Required field scheduledExecutionId is unset!")
        if self.policy is None:
            raise TProtocolException(message="Required field policy is unset!")
        if self.dumpExecutionId is None:
            raise TProtocolException(message="Required field dumpExecutionId is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ReplicationMetricList:
    """
    Attributes:
     - replicationMetricList

    """

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

    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.replicationMetricList = []
                    (_etype1238, _size1235) = iprot.readListBegin()
                    for _i1239 in range(_size1235):
                        _elem1240 = ReplicationMetrics()
                        _elem1240.read(iprot)
                        self.replicationMetricList.append(_elem1240)
                    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("ReplicationMetricList")
        if self.replicationMetricList is not None:
            oprot.writeFieldBegin("replicationMetricList", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.replicationMetricList))
            for iter1241 in self.replicationMetricList:
                iter1241.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetReplicationMetricsRequest:
    """
    Attributes:
     - scheduledExecutionId
     - policy
     - dumpExecutionId

    """

    def __init__(
        self,
        scheduledExecutionId=None,
        policy=None,
        dumpExecutionId=None,
    ):
        self.scheduledExecutionId = scheduledExecutionId
        self.policy = policy
        self.dumpExecutionId = dumpExecutionId

    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.scheduledExecutionId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.policy = (
                        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.I64:
                    self.dumpExecutionId = 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("GetReplicationMetricsRequest")
        if self.scheduledExecutionId is not None:
            oprot.writeFieldBegin("scheduledExecutionId", TType.I64, 1)
            oprot.writeI64(self.scheduledExecutionId)
            oprot.writeFieldEnd()
        if self.policy is not None:
            oprot.writeFieldBegin("policy", TType.STRING, 2)
            oprot.writeString(self.policy.encode("utf-8") if sys.version_info[0] == 2 else self.policy)
            oprot.writeFieldEnd()
        if self.dumpExecutionId is not None:
            oprot.writeFieldBegin("dumpExecutionId", TType.I64, 3)
            oprot.writeI64(self.dumpExecutionId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetOpenTxnsRequest:
    """
    Attributes:
     - excludeTxnTypes

    """

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

    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.excludeTxnTypes = []
                    (_etype1245, _size1242) = iprot.readListBegin()
                    for _i1246 in range(_size1242):
                        _elem1247 = iprot.readI32()
                        self.excludeTxnTypes.append(_elem1247)
                    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("GetOpenTxnsRequest")
        if self.excludeTxnTypes is not None:
            oprot.writeFieldBegin("excludeTxnTypes", TType.LIST, 1)
            oprot.writeListBegin(TType.I32, len(self.excludeTxnTypes))
            for iter1248 in self.excludeTxnTypes:
                oprot.writeI32(iter1248)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class StoredProcedureRequest:
    """
    Attributes:
     - catName
     - dbName
     - procName

    """

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

    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.procName = (
                        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("StoredProcedureRequest")
        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.procName is not None:
            oprot.writeFieldBegin("procName", TType.STRING, 3)
            oprot.writeString(self.procName.encode("utf-8") if sys.version_info[0] == 2 else self.procName)
            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.procName is None:
            raise TProtocolException(message="Required field procName is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ListStoredProcedureRequest:
    """
    Attributes:
     - catName
     - dbName

    """

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

    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)
            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("ListStoredProcedureRequest")
        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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class StoredProcedure:
    """
    Attributes:
     - name
     - dbName
     - catName
     - ownerName
     - source

    """

    def __init__(
        self,
        name=None,
        dbName=None,
        catName=None,
        ownerName=None,
        source=None,
    ):
        self.name = name
        self.dbName = dbName
        self.catName = catName
        self.ownerName = ownerName
        self.source = source

    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.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)
            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.STRING:
                    self.source = (
                        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("StoredProcedure")
        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.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()
        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.source is not None:
            oprot.writeFieldBegin("source", TType.STRING, 5)
            oprot.writeString(self.source.encode("utf-8") if sys.version_info[0] == 2 else self.source)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AddPackageRequest:
    """
    Attributes:
     - catName
     - dbName
     - packageName
     - ownerName
     - header
     - body

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        packageName=None,
        ownerName=None,
        header=None,
        body=None,
    ):
        self.catName = catName
        self.dbName = dbName
        self.packageName = packageName
        self.ownerName = ownerName
        self.header = header
        self.body = body

    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.packageName = (
                        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.STRING:
                    self.header = (
                        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.body = (
                        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("AddPackageRequest")
        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.packageName is not None:
            oprot.writeFieldBegin("packageName", TType.STRING, 3)
            oprot.writeString(self.packageName.encode("utf-8") if sys.version_info[0] == 2 else self.packageName)
            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.header is not None:
            oprot.writeFieldBegin("header", TType.STRING, 5)
            oprot.writeString(self.header.encode("utf-8") if sys.version_info[0] == 2 else self.header)
            oprot.writeFieldEnd()
        if self.body is not None:
            oprot.writeFieldBegin("body", TType.STRING, 6)
            oprot.writeString(self.body.encode("utf-8") if sys.version_info[0] == 2 else self.body)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetPackageRequest:
    """
    Attributes:
     - catName
     - dbName
     - packageName

    """

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

    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.packageName = (
                        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("GetPackageRequest")
        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.packageName is not None:
            oprot.writeFieldBegin("packageName", TType.STRING, 3)
            oprot.writeString(self.packageName.encode("utf-8") if sys.version_info[0] == 2 else self.packageName)
            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.packageName is None:
            raise TProtocolException(message="Required field packageName is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class DropPackageRequest:
    """
    Attributes:
     - catName
     - dbName
     - packageName

    """

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

    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.packageName = (
                        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("DropPackageRequest")
        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.packageName is not None:
            oprot.writeFieldBegin("packageName", TType.STRING, 3)
            oprot.writeString(self.packageName.encode("utf-8") if sys.version_info[0] == 2 else self.packageName)
            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.packageName is None:
            raise TProtocolException(message="Required field packageName is unset!")
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ListPackageRequest:
    """
    Attributes:
     - catName
     - dbName

    """

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

    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)
            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("ListPackageRequest")
        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()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

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

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Package:
    """
    Attributes:
     - catName
     - dbName
     - packageName
     - ownerName
     - header
     - body

    """

    def __init__(
        self,
        catName=None,
        dbName=None,
        packageName=None,
        ownerName=None,
        header=None,
        body=None,
    ):
        self.catName = catName
        self.dbName = dbName
        self.packageName = packageName
        self.ownerName = ownerName
        self.header = header
        self.body = body

    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.packageName = (
                        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.STRING:
                    self.header = (
                        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.body = (
                        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("Package")
        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.packageName is not None:
            oprot.writeFieldBegin("packageName", TType.STRING, 3)
            oprot.writeString(self.packageName.encode("utf-8") if sys.version_info[0] == 2 else self.packageName)
            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.header is not None:
            oprot.writeFieldBegin("header", TType.STRING, 5)
            oprot.writeString(self.header.encode("utf-8") if sys.version_info[0] == 2 else self.header)
            oprot.writeFieldEnd()
        if self.body is not None:
            oprot.writeFieldBegin("body", TType.STRING, 6)
            oprot.writeString(self.body.encode("utf-8") if sys.version_info[0] == 2 else self.body)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class GetAllWriteEventInfoRequest:
    """
    Attributes:
     - txnId
     - dbName
     - tableName

    """

    def __init__(
        self,
        txnId=None,
        dbName=None,
        tableName=None,
    ):
        self.txnId = txnId
        self.dbName = dbName
        self.tableName = tableName

    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.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)
            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("GetAllWriteEventInfoRequest")
        if self.txnId is not None:
            oprot.writeFieldBegin("txnId", TType.I64, 1)
            oprot.writeI64(self.txnId)
            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()
        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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".join(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().__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 = ["{}={!r}".format(key, value) for key, value in self.__dict__.items()]
        return "{}({})".format(self.__class__.__name__, ", ".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(EnvironmentContext)
EnvironmentContext.thrift_spec = (
    None,  # 0
    (
        1,
        TType.MAP,
        "properties",
        (TType.STRING, "UTF8", TType.STRING, "UTF8", False),
        None,
    ),  # 1
)
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(SQLAllTableConstraints)
SQLAllTableConstraints.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "primaryKeys",
        (TType.STRUCT, [SQLPrimaryKey, None], False),
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        "foreignKeys",
        (TType.STRUCT, [SQLForeignKey, None], False),
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        "uniqueConstraints",
        (TType.STRUCT, [SQLUniqueConstraint, None], False),
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        "notNullConstraints",
        (TType.STRUCT, [SQLNotNullConstraint, None], False),
        None,
    ),  # 4
    (
        5,
        TType.LIST,
        "defaultConstraints",
        (TType.STRUCT, [SQLDefaultConstraint, None], False),
        None,
    ),  # 5
    (
        6,
        TType.LIST,
        "checkConstraints",
        (TType.STRUCT, [SQLCheckConstraint, None], False),
        None,
    ),  # 6
)
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(TruncateTableRequest)
TruncateTableRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "tableName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        "partNames",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 3
    (
        4,
        TType.I64,
        "writeId",
        None,
        -1,
    ),  # 4
    (
        5,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.STRUCT,
        "environmentContext",
        [EnvironmentContext, None],
        None,
    ),  # 6
)
all_structs.append(TruncateTableResponse)
TruncateTableResponse.thrift_spec = ()
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
    (
        4,
        TType.I32,
        "createTime",
        None,
        None,
    ),  # 4
)
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
    (
        9,
        TType.I32,
        "createTime",
        None,
        None,
    ),  # 9
    (
        10,
        TType.STRING,
        "managedLocationUri",
        "UTF8",
        None,
    ),  # 10
    (
        11,
        TType.I32,
        "type",
        None,
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        "connector_name",
        "UTF8",
        None,
    ),  # 12
    (
        13,
        TType.STRING,
        "remote_dbname",
        "UTF8",
        None,
    ),  # 13
)
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(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
    (
        7,
        TType.LIST,
        "sourceTables",
        (TType.STRUCT, [SourceTable, None], False),
        None,
    ),  # 7
)
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(Timestamp)
Timestamp.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "secondsSinceEpoch",
        None,
        None,
    ),  # 1
)
all_structs.append(TimestampColumnStatsData)
TimestampColumnStatsData.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "lowValue",
        [Timestamp, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        "highValue",
        [Timestamp, 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
    (
        8,
        TType.STRUCT,
        "timestampStats",
        [TimestampColumnStatsData, None],
        None,
    ),  # 8
)
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
    (
        3,
        TType.BOOL,
        "isStatsCompliant",
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "engine",
        "UTF8",
        None,
    ),  # 4
)
all_structs.append(FileMetadata)
FileMetadata.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BYTE,
        "type",
        None,
        1,
    ),  # 1
    (
        2,
        TType.BYTE,
        "version",
        None,
        1,
    ),  # 2
    (
        3,
        TType.LIST,
        "data",
        (TType.STRING, "BINARY", False),
        None,
    ),  # 3
)
all_structs.append(ObjectDictionary)
ObjectDictionary.thrift_spec = (
    None,  # 0
    (
        1,
        TType.MAP,
        "values",
        (TType.STRING, "UTF8", TType.LIST, (TType.STRING, "BINARY", False), False),
        None,
    ),  # 1
)
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
    (
        19,
        TType.I64,
        "writeId",
        None,
        -1,
    ),  # 19
    (
        20,
        TType.BOOL,
        "isStatsCompliant",
        None,
        None,
    ),  # 20
    (
        21,
        TType.STRUCT,
        "colStats",
        [ColumnStatistics, None],
        None,
    ),  # 21
    (
        22,
        TType.BYTE,
        "accessType",
        None,
        None,
    ),  # 22
    (
        23,
        TType.LIST,
        "requiredReadCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 23
    (
        24,
        TType.LIST,
        "requiredWriteCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 24
    (
        25,
        TType.I64,
        "id",
        None,
        None,
    ),  # 25
    (
        26,
        TType.STRUCT,
        "fileMetadata",
        [FileMetadata, None],
        None,
    ),  # 26
    (
        27,
        TType.STRUCT,
        "dictionary",
        [ObjectDictionary, None],
        None,
    ),  # 27
    (
        28,
        TType.I64,
        "txnId",
        None,
        None,
    ),  # 28
)
all_structs.append(SourceTable)
SourceTable.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "table",
        [Table, None],
        None,
    ),  # 1
    (
        2,
        TType.I64,
        "insertedCount",
        None,
        None,
    ),  # 2
    (
        3,
        TType.I64,
        "updatedCount",
        None,
        None,
    ),  # 3
    (
        4,
        TType.I64,
        "deletedCount",
        None,
        None,
    ),  # 4
)
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
    (
        10,
        TType.I64,
        "writeId",
        None,
        -1,
    ),  # 10
    (
        11,
        TType.BOOL,
        "isStatsCompliant",
        None,
        None,
    ),  # 11
    (
        12,
        TType.STRUCT,
        "colStats",
        [ColumnStatistics, None],
        None,
    ),  # 12
    (
        13,
        TType.STRUCT,
        "fileMetadata",
        [FileMetadata, None],
        None,
    ),  # 13
)
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
    (
        7,
        TType.I64,
        "writeId",
        None,
        -1,
    ),  # 7
    (
        8,
        TType.BOOL,
        "isStatsCompliant",
        None,
        None,
    ),  # 8
)
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
    (
        3,
        TType.BOOL,
        "isStatsCompliant",
        None,
        None,
    ),  # 3
)
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
    (
        3,
        TType.I64,
        "writeId",
        None,
        -1,
    ),  # 3
    (
        4,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "engine",
        "UTF8",
        None,
    ),  # 5
)
all_structs.append(SetPartitionsStatsResponse)
SetPartitionsStatsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.BOOL,
        "result",
        None,
        None,
    ),  # 1
)
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(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
    (
        4,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.I64,
        "tableId",
        None,
        -1,
    ),  # 5
)
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
    (
        6,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.I64,
        "tableId",
        None,
        -1,
    ),  # 7
)
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
    (
        4,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.I64,
        "tableId",
        None,
        -1,
    ),  # 5
)
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
    (
        4,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.I64,
        "tableId",
        None,
        -1,
    ),  # 5
)
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
    (
        4,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.I64,
        "tableId",
        None,
        -1,
    ),  # 5
)
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
    (
        4,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.I64,
        "tableId",
        None,
        -1,
    ),  # 5
)
all_structs.append(CheckConstraintsResponse)
CheckConstraintsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "checkConstraints",
        (TType.STRUCT, [SQLCheckConstraint, None], False),
        None,
    ),  # 1
)
all_structs.append(AllTableConstraintsRequest)
AllTableConstraintsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "tblName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.I64,
        "tableId",
        None,
        -1,
    ),  # 5
)
all_structs.append(AllTableConstraintsResponse)
AllTableConstraintsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "allTableConstraints",
        [SQLAllTableConstraints, None],
        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(PartitionsSpecByExprResult)
PartitionsSpecByExprResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "partitionsSpec",
        (TType.STRUCT, [PartitionSpec, 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
    (
        7,
        TType.STRING,
        "order",
        "UTF8",
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 8
    (
        9,
        TType.I64,
        "id",
        None,
        -1,
    ),  # 9
)
all_structs.append(TableStatsResult)
TableStatsResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "tableStats",
        (TType.STRUCT, [ColumnStatisticsObj, None], False),
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        "isStatsCompliant",
        None,
        None,
    ),  # 2
)
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
    (
        2,
        TType.BOOL,
        "isStatsCompliant",
        None,
        None,
    ),  # 2
)
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
    (
        5,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "engine",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.I64,
        "id",
        None,
        -1,
    ),  # 7
)
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
    (
        6,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        "engine",
        "UTF8",
        None,
    ),  # 7
)
all_structs.append(AddPartitionsResult)
AddPartitionsResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "partitions",
        (TType.STRUCT, [Partition, None], False),
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        "isStatsCompliant",
        None,
        None,
    ),  # 2
)
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
    (
        7,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 7
)
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
    (
        10,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 10
)
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(GetPartitionsByNamesRequest)
GetPartitionsByNamesRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "db_name",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "tbl_name",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        "names",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        "get_col_stats",
        None,
        None,
    ),  # 4
    (
        5,
        TType.LIST,
        "processorCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "processorIdentifier",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        "engine",
        "UTF8",
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 8
    (
        9,
        TType.BOOL,
        "getFileMetadata",
        None,
        None,
    ),  # 9
    (
        10,
        TType.I64,
        "id",
        None,
        -1,
    ),  # 10
)
all_structs.append(GetPartitionsByNamesResult)
GetPartitionsByNamesResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "partitions",
        (TType.STRUCT, [Partition, None], False),
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        "dictionary",
        [ObjectDictionary, None],
        None,
    ),  # 2
)
all_structs.append(DataConnector)
DataConnector.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "name",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "type",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "url",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "description",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.MAP,
        "parameters",
        (TType.STRING, "UTF8", TType.STRING, "UTF8", False),
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "ownerName",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.I32,
        "ownerType",
        None,
        None,
    ),  # 7
    (
        8,
        TType.I32,
        "createTime",
        None,
        None,
    ),  # 8
)
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
    (
        7,
        TType.I32,
        "txn_type",
        None,
        0,
    ),  # 7
)
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
    (
        3,
        TType.I32,
        "txn_type",
        None,
        None,
    ),  # 3
)
all_structs.append(AbortTxnsRequest)
AbortTxnsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "txn_ids",
        (TType.I64, None, False),
        None,
    ),  # 1
)
all_structs.append(CommitTxnKeyValue)
CommitTxnKeyValue.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "tableId",
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "key",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "value",
        "UTF8",
        None,
    ),  # 3
)
all_structs.append(WriteEventInfo)
WriteEventInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "writeId",
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "database",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "table",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "files",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "partition",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "tableObj",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        "partitionObj",
        "UTF8",
        None,
    ),  # 7
)
all_structs.append(ReplLastIdInfo)
ReplLastIdInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "database",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.I64,
        "lastReplId",
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "table",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "catalog",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.LIST,
        "partitionList",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 5
)
all_structs.append(UpdateTransactionalStatsRequest)
UpdateTransactionalStatsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "tableId",
        None,
        None,
    ),  # 1
    (
        2,
        TType.I64,
        "insertCount",
        None,
        None,
    ),  # 2
    (
        3,
        TType.I64,
        "updatedCount",
        None,
        None,
    ),  # 3
    (
        4,
        TType.I64,
        "deletedCount",
        None,
        None,
    ),  # 4
)
all_structs.append(CommitTxnRequest)
CommitTxnRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "txnid",
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "replPolicy",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        "writeEventInfos",
        (TType.STRUCT, [WriteEventInfo, None], False),
        None,
    ),  # 3
    (
        4,
        TType.STRUCT,
        "replLastIdInfo",
        [ReplLastIdInfo, None],
        None,
    ),  # 4
    (
        5,
        TType.STRUCT,
        "keyValue",
        [CommitTxnKeyValue, None],
        None,
    ),  # 5
    (
        6,
        TType.BOOL,
        "exclWriteEnabled",
        None,
        True,
    ),  # 6
    (
        7,
        TType.I32,
        "txn_type",
        None,
        None,
    ),  # 7
)
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
    (
        3,
        TType.I64,
        "writeId",
        None,
        None,
    ),  # 3
)
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(TxnToWriteId)
TxnToWriteId.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "txnId",
        None,
        None,
    ),  # 1
    (
        2,
        TType.I64,
        "writeId",
        None,
        None,
    ),  # 2
)
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(AllocateTableWriteIdsResponse)
AllocateTableWriteIdsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "txnToWriteIds",
        (TType.STRUCT, [TxnToWriteId, None], False),
        None,
    ),  # 1
)
all_structs.append(MaxAllocatedTableWriteIdRequest)
MaxAllocatedTableWriteIdRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "tableName",
        "UTF8",
        None,
    ),  # 2
)
all_structs.append(MaxAllocatedTableWriteIdResponse)
MaxAllocatedTableWriteIdResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "maxWriteId",
        None,
        None,
    ),  # 1
)
all_structs.append(SeedTableWriteIdsRequest)
SeedTableWriteIdsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "tableName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.I64,
        "seedWriteId",
        None,
        None,
    ),  # 3
)
all_structs.append(SeedTxnIdRequest)
SeedTxnIdRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "seedTxnId",
        None,
        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
    (
        6,
        TType.BOOL,
        "zeroWaitReadEnabled",
        None,
        False,
    ),  # 6
    (
        7,
        TType.BOOL,
        "exclusiveCTAS",
        None,
        False,
    ),  # 7
)
all_structs.append(LockResponse)
LockResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "lockid",
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        "state",
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "errorMessage",
        "UTF8",
        None,
    ),  # 3
)
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
    (
        5,
        TType.I64,
        "txnid",
        None,
        None,
    ),  # 5
)
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
    (
        7,
        TType.STRING,
        "initiatorId",
        "UTF8",
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        "initiatorVersion",
        "UTF8",
        None,
    ),  # 8
)
all_structs.append(CompactionInfoStruct)
CompactionInfoStruct.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "id",
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbname",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "tablename",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "partitionname",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.I32,
        "type",
        None,
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "runas",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        "properties",
        "UTF8",
        None,
    ),  # 7
    (
        8,
        TType.BOOL,
        "toomanyaborts",
        None,
        None,
    ),  # 8
    (
        9,
        TType.STRING,
        "state",
        "UTF8",
        None,
    ),  # 9
    (
        10,
        TType.STRING,
        "workerId",
        "UTF8",
        None,
    ),  # 10
    (
        11,
        TType.I64,
        "start",
        None,
        None,
    ),  # 11
    (
        12,
        TType.I64,
        "highestWriteId",
        None,
        None,
    ),  # 12
    (
        13,
        TType.STRING,
        "errorMessage",
        "UTF8",
        None,
    ),  # 13
    (
        14,
        TType.BOOL,
        "hasoldabort",
        None,
        None,
    ),  # 14
    (
        15,
        TType.I64,
        "enqueueTime",
        None,
        None,
    ),  # 15
    (
        16,
        TType.I64,
        "retryRetention",
        None,
        None,
    ),  # 16
)
all_structs.append(OptionalCompactionInfoStruct)
OptionalCompactionInfoStruct.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "ci",
        [CompactionInfoStruct, None],
        None,
    ),  # 1
)
all_structs.append(CompactionMetricsDataStruct)
CompactionMetricsDataStruct.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "dbname",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "tblname",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "partitionname",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.I32,
        "type",
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        "metricvalue",
        None,
        None,
    ),  # 5
    (
        6,
        TType.I32,
        "version",
        None,
        None,
    ),  # 6
    (
        7,
        TType.I32,
        "threshold",
        None,
        None,
    ),  # 7
)
all_structs.append(CompactionMetricsDataResponse)
CompactionMetricsDataResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "data",
        [CompactionMetricsDataStruct, None],
        None,
    ),  # 1
)
all_structs.append(CompactionMetricsDataRequest)
CompactionMetricsDataRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "tblName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "partitionName",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.I32,
        "type",
        None,
        None,
    ),  # 4
)
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
    (
        4,
        TType.STRING,
        "errormessage",
        "UTF8",
        None,
    ),  # 4
)
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
    (
        16,
        TType.STRING,
        "workerVersion",
        "UTF8",
        None,
    ),  # 16
    (
        17,
        TType.STRING,
        "initiatorId",
        "UTF8",
        None,
    ),  # 17
    (
        18,
        TType.STRING,
        "initiatorVersion",
        "UTF8",
        None,
    ),  # 18
    (
        19,
        TType.I64,
        "cleanerStart",
        None,
        None,
    ),  # 19
)
all_structs.append(ShowCompactResponse)
ShowCompactResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "compacts",
        (TType.STRUCT, [ShowCompactResponseElement, None], False),
        None,
    ),  # 1
)
all_structs.append(GetLatestCommittedCompactionInfoRequest)
GetLatestCommittedCompactionInfoRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "dbname",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "tablename",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        "partitionnames",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 3
    (
        4,
        TType.I64,
        "lastCompactionId",
        None,
        None,
    ),  # 4
)
all_structs.append(GetLatestCommittedCompactionInfoResponse)
GetLatestCommittedCompactionInfoResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "compactions",
        (TType.STRUCT, [CompactionInfoStruct, None], False),
        None,
    ),  # 1
)
all_structs.append(FindNextCompactRequest)
FindNextCompactRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "workerId",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "workerVersion",
        "UTF8",
        None,
    ),  # 2
)
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(NotificationEventRequest)
NotificationEventRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "lastEvent",
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        "maxEvents",
        None,
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        "eventTypeSkipList",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 3
)
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
    (
        4,
        TType.I64,
        "toEventId",
        None,
        None,
    ),  # 4
    (
        5,
        TType.I64,
        "limit",
        None,
        None,
    ),  # 5
)
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
    (
        4,
        TType.LIST,
        "subDirectoryList",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 4
    (
        5,
        TType.LIST,
        "partitionVal",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 5
)
all_structs.append(FireEventRequestData)
FireEventRequestData.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "insertData",
        [InsertEventRequestData, None],
        None,
    ),  # 1
    (
        2,
        TType.LIST,
        "insertDatas",
        (TType.STRUCT, [InsertEventRequestData, None], False),
        None,
    ),  # 2
)
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 = (
    None,  # 0
    (
        1,
        TType.LIST,
        "eventIds",
        (TType.I64, None, False),
        None,
    ),  # 1
)
all_structs.append(WriteNotificationLogRequest)
WriteNotificationLogRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "txnId",
        None,
        None,
    ),  # 1
    (
        2,
        TType.I64,
        "writeId",
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "db",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "table",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.STRUCT,
        "fileInfo",
        [InsertEventRequestData, None],
        None,
    ),  # 5
    (
        6,
        TType.LIST,
        "partitionVals",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 6
)
all_structs.append(WriteNotificationLogResponse)
WriteNotificationLogResponse.thrift_spec = ()
all_structs.append(WriteNotificationLogBatchRequest)
WriteNotificationLogBatchRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catalog",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "db",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "table",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        "requestList",
        (TType.STRUCT, [WriteNotificationLogRequest, None], False),
        None,
    ),  # 4
)
all_structs.append(WriteNotificationLogBatchResponse)
WriteNotificationLogBatchResponse.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(GetProjectionsSpec)
GetProjectionsSpec.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "fieldList",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "includeParamKeyPattern",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "excludeParamKeyPattern",
        "UTF8",
        None,
    ),  # 3
)
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
    None,  # 5
    (
        6,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.BOOL,
        "getColumnStats",
        None,
        None,
    ),  # 7
    (
        8,
        TType.LIST,
        "processorCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 8
    (
        9,
        TType.STRING,
        "processorIdentifier",
        "UTF8",
        None,
    ),  # 9
    (
        10,
        TType.STRING,
        "engine",
        "UTF8",
        None,
    ),  # 10
    (
        11,
        TType.I64,
        "id",
        None,
        -1,
    ),  # 11
)
all_structs.append(GetTableResult)
GetTableResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "table",
        [Table, None],
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        "isStatsCompliant",
        None,
        None,
    ),  # 2
)
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
    (
        5,
        TType.LIST,
        "processorCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "processorIdentifier",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.STRUCT,
        "projectionSpec",
        [GetProjectionsSpec, None],
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        "tablesPattern",
        "UTF8",
        None,
    ),  # 8
)
all_structs.append(GetTablesResult)
GetTablesResult.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "tables",
        (TType.STRUCT, [Table, None], False),
        None,
    ),  # 1
)
all_structs.append(GetTablesExtRequest)
GetTablesExtRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catalog",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "database",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "tableNamePattern",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.I32,
        "requestedFields",
        None,
        None,
    ),  # 4
    (
        5,
        TType.I32,
        "limit",
        None,
        None,
    ),  # 5
    (
        6,
        TType.LIST,
        "processorCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 6
    (
        7,
        TType.STRING,
        "processorIdentifier",
        "UTF8",
        None,
    ),  # 7
)
all_structs.append(ExtendedTableInfo)
ExtendedTableInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "tblName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.I32,
        "accessType",
        None,
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        "requiredReadCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        "requiredWriteCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 4
)
all_structs.append(GetDatabaseRequest)
GetDatabaseRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "name",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "catalogName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        "processorCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "processorIdentifier",
        "UTF8",
        None,
    ),  # 4
)
all_structs.append(DropDatabaseRequest)
DropDatabaseRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "name",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "catalogName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.BOOL,
        "ignoreUnknownDb",
        None,
        None,
    ),  # 3
    (
        4,
        TType.BOOL,
        "deleteData",
        None,
        None,
    ),  # 4
    (
        5,
        TType.BOOL,
        "cascade",
        None,
        None,
    ),  # 5
    (
        6,
        TType.BOOL,
        "softDelete",
        None,
        False,
    ),  # 6
    (
        7,
        TType.I64,
        "txnId",
        None,
        0,
    ),  # 7
    (
        8,
        TType.BOOL,
        "deleteManagedDir",
        None,
        True,
    ),  # 8
)
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
    (
        2,
        TType.BOOL,
        "sourceTablesCompacted",
        None,
        None,
    ),  # 2
)
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
    (
        5,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 5
)
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
    (
        8,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 8
)
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
    (
        6,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 6
)
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
    (
        7,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 7
)
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
    (
        6,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 6
)
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
    (
        6,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 6
)
all_structs.append(WMPoolTrigger)
WMPoolTrigger.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "pool",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "trigger",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 3
)
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 = (
    None,  # 0
    (
        1,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 1
)
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
    (
        2,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 2
)
all_structs.append(WMGetResourcePlanResponse)
WMGetResourcePlanResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "resourcePlan",
        [WMFullResourcePlan, None],
        None,
    ),  # 1
)
all_structs.append(WMGetAllResourcePlanRequest)
WMGetAllResourcePlanRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 1
)
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
    (
        6,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 6
)
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
    (
        2,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 2
)
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
    (
        2,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 2
)
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
    (
        3,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 3
)
all_structs.append(WMDropTriggerResponse)
WMDropTriggerResponse.thrift_spec = ()
all_structs.append(WMGetTriggersForResourePlanRequest)
WMGetTriggersForResourePlanRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "resourcePlanName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 2
)
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
    (
        3,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 3
)
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
    (
        5,
        TType.STRING,
        "ns",
        "UTF8",
        None,
    ),  # 5
)
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(CreateTableRequest)
CreateTableRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "table",
        [Table, None],
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        "envContext",
        [EnvironmentContext, None],
        None,
    ),  # 2
    (
        3,
        TType.LIST,
        "primaryKeys",
        (TType.STRUCT, [SQLPrimaryKey, None], False),
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        "foreignKeys",
        (TType.STRUCT, [SQLForeignKey, None], False),
        None,
    ),  # 4
    (
        5,
        TType.LIST,
        "uniqueConstraints",
        (TType.STRUCT, [SQLUniqueConstraint, None], False),
        None,
    ),  # 5
    (
        6,
        TType.LIST,
        "notNullConstraints",
        (TType.STRUCT, [SQLNotNullConstraint, None], False),
        None,
    ),  # 6
    (
        7,
        TType.LIST,
        "defaultConstraints",
        (TType.STRUCT, [SQLDefaultConstraint, None], False),
        None,
    ),  # 7
    (
        8,
        TType.LIST,
        "checkConstraints",
        (TType.STRUCT, [SQLCheckConstraint, None], False),
        None,
    ),  # 8
    (
        9,
        TType.LIST,
        "processorCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 9
    (
        10,
        TType.STRING,
        "processorIdentifier",
        "UTF8",
        None,
    ),  # 10
)
all_structs.append(CreateDatabaseRequest)
CreateDatabaseRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "databaseName",
        "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
    (
        9,
        TType.I32,
        "createTime",
        None,
        None,
    ),  # 9
    (
        10,
        TType.STRING,
        "managedLocationUri",
        "UTF8",
        None,
    ),  # 10
    (
        11,
        TType.STRING,
        "type",
        "UTF8",
        None,
    ),  # 11
    (
        12,
        TType.STRING,
        "dataConnectorName",
        "UTF8",
        None,
    ),  # 12
)
all_structs.append(CreateDataConnectorRequest)
CreateDataConnectorRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "connector",
        [DataConnector, None],
        None,
    ),  # 1
)
all_structs.append(GetDataConnectorRequest)
GetDataConnectorRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "connectorName",
        "UTF8",
        None,
    ),  # 1
)
all_structs.append(ScheduledQueryPollRequest)
ScheduledQueryPollRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "clusterNamespace",
        "UTF8",
        None,
    ),  # 1
)
all_structs.append(ScheduledQueryKey)
ScheduledQueryKey.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "scheduleName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "clusterNamespace",
        "UTF8",
        None,
    ),  # 2
)
all_structs.append(ScheduledQueryPollResponse)
ScheduledQueryPollResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "scheduleKey",
        [ScheduledQueryKey, None],
        None,
    ),  # 1
    (
        2,
        TType.I64,
        "executionId",
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "query",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "user",
        "UTF8",
        None,
    ),  # 4
)
all_structs.append(ScheduledQuery)
ScheduledQuery.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "scheduleKey",
        [ScheduledQueryKey, None],
        None,
    ),  # 1
    (
        2,
        TType.BOOL,
        "enabled",
        None,
        None,
    ),  # 2
    None,  # 3
    (
        4,
        TType.STRING,
        "schedule",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "user",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "query",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.I32,
        "nextExecution",
        None,
        None,
    ),  # 7
)
all_structs.append(ScheduledQueryMaintenanceRequest)
ScheduledQueryMaintenanceRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I32,
        "type",
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRUCT,
        "scheduledQuery",
        [ScheduledQuery, None],
        None,
    ),  # 2
)
all_structs.append(ScheduledQueryProgressInfo)
ScheduledQueryProgressInfo.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "scheduledExecutionId",
        None,
        None,
    ),  # 1
    (
        2,
        TType.I32,
        "state",
        None,
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "executorQueryId",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "errorMessage",
        "UTF8",
        None,
    ),  # 4
)
all_structs.append(AlterPartitionsRequest)
AlterPartitionsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "tableName",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        "partitions",
        (TType.STRUCT, [Partition, None], False),
        None,
    ),  # 4
    (
        5,
        TType.STRUCT,
        "environmentContext",
        [EnvironmentContext, None],
        None,
    ),  # 5
    (
        6,
        TType.I64,
        "writeId",
        None,
        -1,
    ),  # 6
    (
        7,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 7
)
all_structs.append(AlterPartitionsResponse)
AlterPartitionsResponse.thrift_spec = ()
all_structs.append(RenamePartitionRequest)
RenamePartitionRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "tableName",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.LIST,
        "partVals",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 4
    (
        5,
        TType.STRUCT,
        "newPart",
        [Partition, None],
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.I64,
        "txnId",
        None,
        None,
    ),  # 7
    (
        8,
        TType.BOOL,
        "clonePart",
        None,
        None,
    ),  # 8
)
all_structs.append(RenamePartitionResponse)
RenamePartitionResponse.thrift_spec = ()
all_structs.append(AlterTableRequest)
AlterTableRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "tableName",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRUCT,
        "table",
        [Table, None],
        None,
    ),  # 4
    (
        5,
        TType.STRUCT,
        "environmentContext",
        [EnvironmentContext, None],
        None,
    ),  # 5
    (
        6,
        TType.I64,
        "writeId",
        None,
        -1,
    ),  # 6
    (
        7,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 7
    (
        8,
        TType.LIST,
        "processorCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 8
    (
        9,
        TType.STRING,
        "processorIdentifier",
        "UTF8",
        None,
    ),  # 9
)
all_structs.append(AlterTableResponse)
AlterTableResponse.thrift_spec = ()
all_structs.append(GetPartitionsFilterSpec)
GetPartitionsFilterSpec.thrift_spec = (
    None,  # 0
    None,  # 1
    None,  # 2
    None,  # 3
    None,  # 4
    None,  # 5
    None,  # 6
    (
        7,
        TType.I32,
        "filterMode",
        None,
        None,
    ),  # 7
    (
        8,
        TType.LIST,
        "filters",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 8
)
all_structs.append(GetPartitionsResponse)
GetPartitionsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "partitionSpec",
        (TType.STRUCT, [PartitionSpec, None], False),
        None,
    ),  # 1
)
all_structs.append(GetPartitionsRequest)
GetPartitionsRequest.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.BOOL,
        "withAuth",
        None,
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "user",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.LIST,
        "groupNames",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 6
    (
        7,
        TType.STRUCT,
        "projectionSpec",
        [GetProjectionsSpec, None],
        None,
    ),  # 7
    (
        8,
        TType.STRUCT,
        "filterSpec",
        [GetPartitionsFilterSpec, None],
        None,
    ),  # 8
    (
        9,
        TType.LIST,
        "processorCapabilities",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 9
    (
        10,
        TType.STRING,
        "processorIdentifier",
        "UTF8",
        None,
    ),  # 10
    (
        11,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 11
)
all_structs.append(GetFieldsRequest)
GetFieldsRequest.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.STRUCT,
        "envContext",
        [EnvironmentContext, None],
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.I64,
        "id",
        None,
        -1,
    ),  # 6
)
all_structs.append(GetFieldsResponse)
GetFieldsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "fields",
        (TType.STRUCT, [FieldSchema, None], False),
        None,
    ),  # 1
)
all_structs.append(GetSchemaRequest)
GetSchemaRequest.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.STRUCT,
        "envContext",
        [EnvironmentContext, None],
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.I64,
        "id",
        None,
        -1,
    ),  # 6
)
all_structs.append(GetSchemaResponse)
GetSchemaResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "fields",
        (TType.STRUCT, [FieldSchema, None], False),
        None,
    ),  # 1
)
all_structs.append(GetPartitionRequest)
GetPartitionRequest.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.LIST,
        "partVals",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.I64,
        "id",
        None,
        -1,
    ),  # 6
)
all_structs.append(GetPartitionResponse)
GetPartitionResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRUCT,
        "partition",
        [Partition, None],
        None,
    ),  # 1
)
all_structs.append(PartitionsRequest)
PartitionsRequest.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.I16,
        "maxParts",
        None,
        -1,
    ),  # 4
    (
        5,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.I64,
        "id",
        None,
        -1,
    ),  # 6
)
all_structs.append(PartitionsResponse)
PartitionsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "partitions",
        (TType.STRUCT, [Partition, None], False),
        None,
    ),  # 1
)
all_structs.append(GetPartitionNamesPsRequest)
GetPartitionNamesPsRequest.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.LIST,
        "partValues",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 4
    (
        5,
        TType.I16,
        "maxParts",
        None,
        -1,
    ),  # 5
    (
        6,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.I64,
        "id",
        None,
        -1,
    ),  # 7
)
all_structs.append(GetPartitionNamesPsResponse)
GetPartitionNamesPsResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "names",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 1
)
all_structs.append(GetPartitionsPsWithAuthRequest)
GetPartitionsPsWithAuthRequest.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.LIST,
        "partVals",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 4
    (
        5,
        TType.I16,
        "maxParts",
        None,
        -1,
    ),  # 5
    (
        6,
        TType.STRING,
        "userName",
        "UTF8",
        None,
    ),  # 6
    (
        7,
        TType.LIST,
        "groupNames",
        (TType.STRING, "UTF8", False),
        None,
    ),  # 7
    (
        8,
        TType.STRING,
        "validWriteIdList",
        "UTF8",
        None,
    ),  # 8
    (
        9,
        TType.I64,
        "id",
        None,
        -1,
    ),  # 9
)
all_structs.append(GetPartitionsPsWithAuthResponse)
GetPartitionsPsWithAuthResponse.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "partitions",
        (TType.STRUCT, [Partition, None], False),
        None,
    ),  # 1
)
all_structs.append(ReplicationMetrics)
ReplicationMetrics.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "scheduledExecutionId",
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "policy",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.I64,
        "dumpExecutionId",
        None,
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "metadata",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "progress",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "messageFormat",
        "UTF8",
        None,
    ),  # 6
)
all_structs.append(ReplicationMetricList)
ReplicationMetricList.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "replicationMetricList",
        (TType.STRUCT, [ReplicationMetrics, None], False),
        None,
    ),  # 1
)
all_structs.append(GetReplicationMetricsRequest)
GetReplicationMetricsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "scheduledExecutionId",
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "policy",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.I64,
        "dumpExecutionId",
        None,
        None,
    ),  # 3
)
all_structs.append(GetOpenTxnsRequest)
GetOpenTxnsRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.LIST,
        "excludeTxnTypes",
        (TType.I32, None, False),
        None,
    ),  # 1
)
all_structs.append(StoredProcedureRequest)
StoredProcedureRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "procName",
        "UTF8",
        None,
    ),  # 3
)
all_structs.append(ListStoredProcedureRequest)
ListStoredProcedureRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
)
all_structs.append(StoredProcedure)
StoredProcedure.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "name",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "ownerName",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "source",
        "UTF8",
        None,
    ),  # 5
)
all_structs.append(AddPackageRequest)
AddPackageRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "packageName",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "ownerName",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "header",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "body",
        "UTF8",
        None,
    ),  # 6
)
all_structs.append(GetPackageRequest)
GetPackageRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "packageName",
        "UTF8",
        None,
    ),  # 3
)
all_structs.append(DropPackageRequest)
DropPackageRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "packageName",
        "UTF8",
        None,
    ),  # 3
)
all_structs.append(ListPackageRequest)
ListPackageRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
)
all_structs.append(Package)
Package.thrift_spec = (
    None,  # 0
    (
        1,
        TType.STRING,
        "catName",
        "UTF8",
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "packageName",
        "UTF8",
        None,
    ),  # 3
    (
        4,
        TType.STRING,
        "ownerName",
        "UTF8",
        None,
    ),  # 4
    (
        5,
        TType.STRING,
        "header",
        "UTF8",
        None,
    ),  # 5
    (
        6,
        TType.STRING,
        "body",
        "UTF8",
        None,
    ),  # 6
)
all_structs.append(GetAllWriteEventInfoRequest)
GetAllWriteEventInfoRequest.thrift_spec = (
    None,  # 0
    (
        1,
        TType.I64,
        "txnId",
        None,
        None,
    ),  # 1
    (
        2,
        TType.STRING,
        "dbName",
        "UTF8",
        None,
    ),  # 2
    (
        3,
        TType.STRING,
        "tableName",
        "UTF8",
        None,
    ),  # 3
)
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
