#
# Autogenerated by Thrift Compiler (0.9.3)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

require 'thrift'
require 'fb303_types'


module HiveObjectType
  GLOBAL = 1
  DATABASE = 2
  TABLE = 3
  PARTITION = 4
  COLUMN = 5
  VALUE_MAP = {1 => "GLOBAL", 2 => "DATABASE", 3 => "TABLE", 4 => "PARTITION", 5 => "COLUMN"}
  VALID_VALUES = Set.new([GLOBAL, DATABASE, TABLE, PARTITION, COLUMN]).freeze
end

module PrincipalType
  USER = 1
  ROLE = 2
  GROUP = 3
  VALUE_MAP = {1 => "USER", 2 => "ROLE", 3 => "GROUP"}
  VALID_VALUES = Set.new([USER, ROLE, GROUP]).freeze
end

module PartitionEventType
  LOAD_DONE = 1
  VALUE_MAP = {1 => "LOAD_DONE"}
  VALID_VALUES = Set.new([LOAD_DONE]).freeze
end

module TxnState
  COMMITTED = 1
  ABORTED = 2
  OPEN = 3
  VALUE_MAP = {1 => "COMMITTED", 2 => "ABORTED", 3 => "OPEN"}
  VALID_VALUES = Set.new([COMMITTED, ABORTED, OPEN]).freeze
end

module LockLevel
  DB = 1
  TABLE = 2
  PARTITION = 3
  VALUE_MAP = {1 => "DB", 2 => "TABLE", 3 => "PARTITION"}
  VALID_VALUES = Set.new([DB, TABLE, PARTITION]).freeze
end

module LockState
  ACQUIRED = 1
  WAITING = 2
  ABORT = 3
  NOT_ACQUIRED = 4
  VALUE_MAP = {1 => "ACQUIRED", 2 => "WAITING", 3 => "ABORT", 4 => "NOT_ACQUIRED"}
  VALID_VALUES = Set.new([ACQUIRED, WAITING, ABORT, NOT_ACQUIRED]).freeze
end

module LockType
  SHARED_READ = 1
  SHARED_WRITE = 2
  EXCLUSIVE = 3
  VALUE_MAP = {1 => "SHARED_READ", 2 => "SHARED_WRITE", 3 => "EXCLUSIVE"}
  VALID_VALUES = Set.new([SHARED_READ, SHARED_WRITE, EXCLUSIVE]).freeze
end

module CompactionType
  MINOR = 1
  MAJOR = 2
  VALUE_MAP = {1 => "MINOR", 2 => "MAJOR"}
  VALID_VALUES = Set.new([MINOR, MAJOR]).freeze
end

module GrantRevokeType
  GRANT = 1
  REVOKE = 2
  VALUE_MAP = {1 => "GRANT", 2 => "REVOKE"}
  VALID_VALUES = Set.new([GRANT, REVOKE]).freeze
end

module DataOperationType
  SELECT = 1
  INSERT = 2
  UPDATE = 3
  DELETE = 4
  UNSET = 5
  NO_TXN = 6
  VALUE_MAP = {1 => "SELECT", 2 => "INSERT", 3 => "UPDATE", 4 => "DELETE", 5 => "UNSET", 6 => "NO_TXN"}
  VALID_VALUES = Set.new([SELECT, INSERT, UPDATE, DELETE, UNSET, NO_TXN]).freeze
end

module EventRequestType
  INSERT = 1
  UPDATE = 2
  DELETE = 3
  VALUE_MAP = {1 => "INSERT", 2 => "UPDATE", 3 => "DELETE"}
  VALID_VALUES = Set.new([INSERT, UPDATE, DELETE]).freeze
end

module FunctionType
  JAVA = 1
  VALUE_MAP = {1 => "JAVA"}
  VALID_VALUES = Set.new([JAVA]).freeze
end

module ResourceType
  JAR = 1
  FILE = 2
  ARCHIVE = 3
  VALUE_MAP = {1 => "JAR", 2 => "FILE", 3 => "ARCHIVE"}
  VALID_VALUES = Set.new([JAR, FILE, ARCHIVE]).freeze
end

module FileMetadataExprType
  ORC_SARG = 1
  VALUE_MAP = {1 => "ORC_SARG"}
  VALID_VALUES = Set.new([ORC_SARG]).freeze
end

module ClientCapability
  TEST_CAPABILITY = 1
  VALUE_MAP = {1 => "TEST_CAPABILITY"}
  VALID_VALUES = Set.new([TEST_CAPABILITY]).freeze
end

class Version
  include ::Thrift::Struct, ::Thrift::Struct_Union
  VERSION = 1
  COMMENTS = 2

  FIELDS = {
    VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'},
    COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class FieldSchema
  include ::Thrift::Struct, ::Thrift::Struct_Union
  NAME = 1
  TYPE = 2
  COMMENT = 3

  FIELDS = {
    NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
    TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'},
    COMMENT => {:type => ::Thrift::Types::STRING, :name => 'comment'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class SQLPrimaryKey
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TABLE_DB = 1
  TABLE_NAME = 2
  COLUMN_NAME = 3
  KEY_SEQ = 4
  PK_NAME = 5
  ENABLE_CSTR = 6
  VALIDATE_CSTR = 7
  RELY_CSTR = 8

  FIELDS = {
    TABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'table_db'},
    TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'},
    COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name'},
    KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'},
    PK_NAME => {:type => ::Thrift::Types::STRING, :name => 'pk_name'},
    ENABLE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'enable_cstr'},
    VALIDATE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'validate_cstr'},
    RELY_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'rely_cstr'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class SQLForeignKey
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PKTABLE_DB = 1
  PKTABLE_NAME = 2
  PKCOLUMN_NAME = 3
  FKTABLE_DB = 4
  FKTABLE_NAME = 5
  FKCOLUMN_NAME = 6
  KEY_SEQ = 7
  UPDATE_RULE = 8
  DELETE_RULE = 9
  FK_NAME = 10
  PK_NAME = 11
  ENABLE_CSTR = 12
  VALIDATE_CSTR = 13
  RELY_CSTR = 14

  FIELDS = {
    PKTABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'pktable_db'},
    PKTABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'pktable_name'},
    PKCOLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'pkcolumn_name'},
    FKTABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'fktable_db'},
    FKTABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'fktable_name'},
    FKCOLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'fkcolumn_name'},
    KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'},
    UPDATE_RULE => {:type => ::Thrift::Types::I32, :name => 'update_rule'},
    DELETE_RULE => {:type => ::Thrift::Types::I32, :name => 'delete_rule'},
    FK_NAME => {:type => ::Thrift::Types::STRING, :name => 'fk_name'},
    PK_NAME => {:type => ::Thrift::Types::STRING, :name => 'pk_name'},
    ENABLE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'enable_cstr'},
    VALIDATE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'validate_cstr'},
    RELY_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'rely_cstr'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class Type
  include ::Thrift::Struct, ::Thrift::Struct_Union
  NAME = 1
  TYPE1 = 2
  TYPE2 = 3
  FIELDS = 4

  FIELDS = {
    NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
    TYPE1 => {:type => ::Thrift::Types::STRING, :name => 'type1', :optional => true},
    TYPE2 => {:type => ::Thrift::Types::STRING, :name => 'type2', :optional => true},
    FIELDS => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class HiveObjectRef
  include ::Thrift::Struct, ::Thrift::Struct_Union
  OBJECTTYPE = 1
  DBNAME = 2
  OBJECTNAME = 3
  PARTVALUES = 4
  COLUMNNAME = 5

  FIELDS = {
    OBJECTTYPE => {:type => ::Thrift::Types::I32, :name => 'objectType', :enum_class => ::HiveObjectType},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    OBJECTNAME => {:type => ::Thrift::Types::STRING, :name => 'objectName'},
    PARTVALUES => {:type => ::Thrift::Types::LIST, :name => 'partValues', :element => {:type => ::Thrift::Types::STRING}},
    COLUMNNAME => {:type => ::Thrift::Types::STRING, :name => 'columnName'}
  }

  def struct_fields; FIELDS; end

  def validate
    unless @objectType.nil? || ::HiveObjectType::VALID_VALUES.include?(@objectType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field objectType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class PrivilegeGrantInfo
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PRIVILEGE = 1
  CREATETIME = 2
  GRANTOR = 3
  GRANTORTYPE = 4
  GRANTOPTION = 5

  FIELDS = {
    PRIVILEGE => {:type => ::Thrift::Types::STRING, :name => 'privilege'},
    CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'},
    GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'},
    GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => ::PrincipalType},
    GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption'}
  }

  def struct_fields; FIELDS; end

  def validate
    unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class HiveObjectPrivilege
  include ::Thrift::Struct, ::Thrift::Struct_Union
  HIVEOBJECT = 1
  PRINCIPALNAME = 2
  PRINCIPALTYPE = 3
  GRANTINFO = 4

  FIELDS = {
    HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => ::HiveObjectRef},
    PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'},
    PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => ::PrincipalType},
    GRANTINFO => {:type => ::Thrift::Types::STRUCT, :name => 'grantInfo', :class => ::PrivilegeGrantInfo}
  }

  def struct_fields; FIELDS; end

  def validate
    unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class PrivilegeBag
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PRIVILEGES = 1

  FIELDS = {
    PRIVILEGES => {:type => ::Thrift::Types::LIST, :name => 'privileges', :element => {:type => ::Thrift::Types::STRUCT, :class => ::HiveObjectPrivilege}}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class PrincipalPrivilegeSet
  include ::Thrift::Struct, ::Thrift::Struct_Union
  USERPRIVILEGES = 1
  GROUPPRIVILEGES = 2
  ROLEPRIVILEGES = 3

  FIELDS = {
    USERPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'userPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::PrivilegeGrantInfo}}},
    GROUPPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'groupPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::PrivilegeGrantInfo}}},
    ROLEPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'rolePrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::PrivilegeGrantInfo}}}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class GrantRevokePrivilegeRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  REQUESTTYPE = 1
  PRIVILEGES = 2
  REVOKEGRANTOPTION = 3

  FIELDS = {
    REQUESTTYPE => {:type => ::Thrift::Types::I32, :name => 'requestType', :enum_class => ::GrantRevokeType},
    PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag},
    REVOKEGRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'revokeGrantOption', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    unless @requestType.nil? || ::GrantRevokeType::VALID_VALUES.include?(@requestType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field requestType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class GrantRevokePrivilegeResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  SUCCESS = 1

  FIELDS = {
    SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class Role
  include ::Thrift::Struct, ::Thrift::Struct_Union
  ROLENAME = 1
  CREATETIME = 2
  OWNERNAME = 3

  FIELDS = {
    ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'},
    CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'},
    OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class RolePrincipalGrant
  include ::Thrift::Struct, ::Thrift::Struct_Union
  ROLENAME = 1
  PRINCIPALNAME = 2
  PRINCIPALTYPE = 3
  GRANTOPTION = 4
  GRANTTIME = 5
  GRANTORNAME = 6
  GRANTORPRINCIPALTYPE = 7

  FIELDS = {
    ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'},
    PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'},
    PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => ::PrincipalType},
    GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption'},
    GRANTTIME => {:type => ::Thrift::Types::I32, :name => 'grantTime'},
    GRANTORNAME => {:type => ::Thrift::Types::STRING, :name => 'grantorName'},
    GRANTORPRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorPrincipalType', :enum_class => ::PrincipalType}
  }

  def struct_fields; FIELDS; end

  def validate
    unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!')
    end
    unless @grantorPrincipalType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorPrincipalType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorPrincipalType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class GetRoleGrantsForPrincipalRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PRINCIPAL_NAME = 1
  PRINCIPAL_TYPE = 2

  FIELDS = {
    PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'},
    PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principal_name is unset!') unless @principal_name
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principal_type is unset!') unless @principal_type
    unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class GetRoleGrantsForPrincipalResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PRINCIPALGRANTS = 1

  FIELDS = {
    PRINCIPALGRANTS => {:type => ::Thrift::Types::LIST, :name => 'principalGrants', :element => {:type => ::Thrift::Types::STRUCT, :class => ::RolePrincipalGrant}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principalGrants is unset!') unless @principalGrants
  end

  ::Thrift::Struct.generate_accessors self
end

class GetPrincipalsInRoleRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  ROLENAME = 1

  FIELDS = {
    ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field roleName is unset!') unless @roleName
  end

  ::Thrift::Struct.generate_accessors self
end

class GetPrincipalsInRoleResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PRINCIPALGRANTS = 1

  FIELDS = {
    PRINCIPALGRANTS => {:type => ::Thrift::Types::LIST, :name => 'principalGrants', :element => {:type => ::Thrift::Types::STRUCT, :class => ::RolePrincipalGrant}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principalGrants is unset!') unless @principalGrants
  end

  ::Thrift::Struct.generate_accessors self
end

class GrantRevokeRoleRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  REQUESTTYPE = 1
  ROLENAME = 2
  PRINCIPALNAME = 3
  PRINCIPALTYPE = 4
  GRANTOR = 5
  GRANTORTYPE = 6
  GRANTOPTION = 7

  FIELDS = {
    REQUESTTYPE => {:type => ::Thrift::Types::I32, :name => 'requestType', :enum_class => ::GrantRevokeType},
    ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'},
    PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'},
    PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => ::PrincipalType},
    GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor', :optional => true},
    GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :optional => true, :enum_class => ::PrincipalType},
    GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    unless @requestType.nil? || ::GrantRevokeType::VALID_VALUES.include?(@requestType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field requestType!')
    end
    unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!')
    end
    unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class GrantRevokeRoleResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  SUCCESS = 1

  FIELDS = {
    SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class Database
  include ::Thrift::Struct, ::Thrift::Struct_Union
  NAME = 1
  DESCRIPTION = 2
  LOCATIONURI = 3
  PARAMETERS = 4
  PRIVILEGES = 5
  OWNERNAME = 6
  OWNERTYPE = 7

  FIELDS = {
    NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
    DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'},
    LOCATIONURI => {:type => ::Thrift::Types::STRING, :name => 'locationUri'},
    PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
    PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true},
    OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName', :optional => true},
    OWNERTYPE => {:type => ::Thrift::Types::I32, :name => 'ownerType', :optional => true, :enum_class => ::PrincipalType}
  }

  def struct_fields; FIELDS; end

  def validate
    unless @ownerType.nil? || ::PrincipalType::VALID_VALUES.include?(@ownerType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ownerType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class SerDeInfo
  include ::Thrift::Struct, ::Thrift::Struct_Union
  NAME = 1
  SERIALIZATIONLIB = 2
  PARAMETERS = 3

  FIELDS = {
    NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
    SERIALIZATIONLIB => {:type => ::Thrift::Types::STRING, :name => 'serializationLib'},
    PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class Order
  include ::Thrift::Struct, ::Thrift::Struct_Union
  COL = 1
  ORDER = 2

  FIELDS = {
    COL => {:type => ::Thrift::Types::STRING, :name => 'col'},
    ORDER => {:type => ::Thrift::Types::I32, :name => 'order'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class SkewedInfo
  include ::Thrift::Struct, ::Thrift::Struct_Union
  SKEWEDCOLNAMES = 1
  SKEWEDCOLVALUES = 2
  SKEWEDCOLVALUELOCATIONMAPS = 3

  FIELDS = {
    SKEWEDCOLNAMES => {:type => ::Thrift::Types::LIST, :name => 'skewedColNames', :element => {:type => ::Thrift::Types::STRING}},
    SKEWEDCOLVALUES => {:type => ::Thrift::Types::LIST, :name => 'skewedColValues', :element => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRING}}},
    SKEWEDCOLVALUELOCATIONMAPS => {:type => ::Thrift::Types::MAP, :name => 'skewedColValueLocationMaps', :key => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRING}}, :value => {:type => ::Thrift::Types::STRING}}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class StorageDescriptor
  include ::Thrift::Struct, ::Thrift::Struct_Union
  COLS = 1
  LOCATION = 2
  INPUTFORMAT = 3
  OUTPUTFORMAT = 4
  COMPRESSED = 5
  NUMBUCKETS = 6
  SERDEINFO = 7
  BUCKETCOLS = 8
  SORTCOLS = 9
  PARAMETERS = 10
  SKEWEDINFO = 11
  STOREDASSUBDIRECTORIES = 12

  FIELDS = {
    COLS => {:type => ::Thrift::Types::LIST, :name => 'cols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}},
    LOCATION => {:type => ::Thrift::Types::STRING, :name => 'location'},
    INPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'inputFormat'},
    OUTPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'outputFormat'},
    COMPRESSED => {:type => ::Thrift::Types::BOOL, :name => 'compressed'},
    NUMBUCKETS => {:type => ::Thrift::Types::I32, :name => 'numBuckets'},
    SERDEINFO => {:type => ::Thrift::Types::STRUCT, :name => 'serdeInfo', :class => ::SerDeInfo},
    BUCKETCOLS => {:type => ::Thrift::Types::LIST, :name => 'bucketCols', :element => {:type => ::Thrift::Types::STRING}},
    SORTCOLS => {:type => ::Thrift::Types::LIST, :name => 'sortCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Order}},
    PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
    SKEWEDINFO => {:type => ::Thrift::Types::STRUCT, :name => 'skewedInfo', :class => ::SkewedInfo, :optional => true},
    STOREDASSUBDIRECTORIES => {:type => ::Thrift::Types::BOOL, :name => 'storedAsSubDirectories', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class Table
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TABLENAME = 1
  DBNAME = 2
  OWNER = 3
  CREATETIME = 4
  LASTACCESSTIME = 5
  RETENTION = 6
  SD = 7
  PARTITIONKEYS = 8
  PARAMETERS = 9
  VIEWORIGINALTEXT = 10
  VIEWEXPANDEDTEXT = 11
  TABLETYPE = 12
  PRIVILEGES = 13
  TEMPORARY = 14
  REWRITEENABLED = 15

  FIELDS = {
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'},
    CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'},
    LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'},
    RETENTION => {:type => ::Thrift::Types::I32, :name => 'retention'},
    SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor},
    PARTITIONKEYS => {:type => ::Thrift::Types::LIST, :name => 'partitionKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}},
    PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
    VIEWORIGINALTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewOriginalText'},
    VIEWEXPANDEDTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewExpandedText'},
    TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'},
    PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true},
    TEMPORARY => {:type => ::Thrift::Types::BOOL, :name => 'temporary', :default => false, :optional => true},
    REWRITEENABLED => {:type => ::Thrift::Types::BOOL, :name => 'rewriteEnabled', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class Partition
  include ::Thrift::Struct, ::Thrift::Struct_Union
  VALUES = 1
  DBNAME = 2
  TABLENAME = 3
  CREATETIME = 4
  LASTACCESSTIME = 5
  SD = 6
  PARAMETERS = 7
  PRIVILEGES = 8

  FIELDS = {
    VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
    CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'},
    LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'},
    SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor},
    PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
    PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class PartitionWithoutSD
  include ::Thrift::Struct, ::Thrift::Struct_Union
  VALUES = 1
  CREATETIME = 2
  LASTACCESSTIME = 3
  RELATIVEPATH = 4
  PARAMETERS = 5
  PRIVILEGES = 6

  FIELDS = {
    VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}},
    CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'},
    LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'},
    RELATIVEPATH => {:type => ::Thrift::Types::STRING, :name => 'relativePath'},
    PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
    PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class PartitionSpecWithSharedSD
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PARTITIONS = 1
  SD = 2

  FIELDS = {
    PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::PartitionWithoutSD}},
    SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class PartitionListComposingSpec
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PARTITIONS = 1

  FIELDS = {
    PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class PartitionSpec
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TABLENAME = 2
  ROOTPATH = 3
  SHAREDSDPARTITIONSPEC = 4
  PARTITIONLIST = 5

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
    ROOTPATH => {:type => ::Thrift::Types::STRING, :name => 'rootPath'},
    SHAREDSDPARTITIONSPEC => {:type => ::Thrift::Types::STRUCT, :name => 'sharedSDPartitionSpec', :class => ::PartitionSpecWithSharedSD, :optional => true},
    PARTITIONLIST => {:type => ::Thrift::Types::STRUCT, :name => 'partitionList', :class => ::PartitionListComposingSpec, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class Index
  include ::Thrift::Struct, ::Thrift::Struct_Union
  INDEXNAME = 1
  INDEXHANDLERCLASS = 2
  DBNAME = 3
  ORIGTABLENAME = 4
  CREATETIME = 5
  LASTACCESSTIME = 6
  INDEXTABLENAME = 7
  SD = 8
  PARAMETERS = 9
  DEFERREDREBUILD = 10

  FIELDS = {
    INDEXNAME => {:type => ::Thrift::Types::STRING, :name => 'indexName'},
    INDEXHANDLERCLASS => {:type => ::Thrift::Types::STRING, :name => 'indexHandlerClass'},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    ORIGTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'origTableName'},
    CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'},
    LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'},
    INDEXTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'indexTableName'},
    SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor},
    PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
    DEFERREDREBUILD => {:type => ::Thrift::Types::BOOL, :name => 'deferredRebuild'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class BooleanColumnStatsData
  include ::Thrift::Struct, ::Thrift::Struct_Union
  NUMTRUES = 1
  NUMFALSES = 2
  NUMNULLS = 3
  BITVECTORS = 4

  FIELDS = {
    NUMTRUES => {:type => ::Thrift::Types::I64, :name => 'numTrues'},
    NUMFALSES => {:type => ::Thrift::Types::I64, :name => 'numFalses'},
    NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numTrues is unset!') unless @numTrues
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numFalses is unset!') unless @numFalses
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
  end

  ::Thrift::Struct.generate_accessors self
end

class DoubleColumnStatsData
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LOWVALUE = 1
  HIGHVALUE = 2
  NUMNULLS = 3
  NUMDVS = 4
  BITVECTORS = 5

  FIELDS = {
    LOWVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'lowValue', :optional => true},
    HIGHVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'highValue', :optional => true},
    NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
    NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'},
    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs
  end

  ::Thrift::Struct.generate_accessors self
end

class LongColumnStatsData
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LOWVALUE = 1
  HIGHVALUE = 2
  NUMNULLS = 3
  NUMDVS = 4
  BITVECTORS = 5

  FIELDS = {
    LOWVALUE => {:type => ::Thrift::Types::I64, :name => 'lowValue', :optional => true},
    HIGHVALUE => {:type => ::Thrift::Types::I64, :name => 'highValue', :optional => true},
    NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
    NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'},
    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs
  end

  ::Thrift::Struct.generate_accessors self
end

class StringColumnStatsData
  include ::Thrift::Struct, ::Thrift::Struct_Union
  MAXCOLLEN = 1
  AVGCOLLEN = 2
  NUMNULLS = 3
  NUMDVS = 4
  BITVECTORS = 5

  FIELDS = {
    MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'},
    AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'},
    NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
    NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'},
    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxColLen is unset!') unless @maxColLen
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field avgColLen is unset!') unless @avgColLen
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs
  end

  ::Thrift::Struct.generate_accessors self
end

class BinaryColumnStatsData
  include ::Thrift::Struct, ::Thrift::Struct_Union
  MAXCOLLEN = 1
  AVGCOLLEN = 2
  NUMNULLS = 3
  BITVECTORS = 4

  FIELDS = {
    MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'},
    AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'},
    NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxColLen is unset!') unless @maxColLen
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field avgColLen is unset!') unless @avgColLen
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
  end

  ::Thrift::Struct.generate_accessors self
end

class Decimal
  include ::Thrift::Struct, ::Thrift::Struct_Union
  UNSCALED = 1
  SCALE = 3

  FIELDS = {
    UNSCALED => {:type => ::Thrift::Types::STRING, :name => 'unscaled', :binary => true},
    SCALE => {:type => ::Thrift::Types::I16, :name => 'scale'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field unscaled is unset!') unless @unscaled
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field scale is unset!') unless @scale
  end

  ::Thrift::Struct.generate_accessors self
end

class DecimalColumnStatsData
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LOWVALUE = 1
  HIGHVALUE = 2
  NUMNULLS = 3
  NUMDVS = 4
  BITVECTORS = 5

  FIELDS = {
    LOWVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'lowValue', :class => ::Decimal, :optional => true},
    HIGHVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'highValue', :class => ::Decimal, :optional => true},
    NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
    NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'},
    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs
  end

  ::Thrift::Struct.generate_accessors self
end

class Date
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DAYSSINCEEPOCH = 1

  FIELDS = {
    DAYSSINCEEPOCH => {:type => ::Thrift::Types::I64, :name => 'daysSinceEpoch'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field daysSinceEpoch is unset!') unless @daysSinceEpoch
  end

  ::Thrift::Struct.generate_accessors self
end

class DateColumnStatsData
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LOWVALUE = 1
  HIGHVALUE = 2
  NUMNULLS = 3
  NUMDVS = 4
  BITVECTORS = 5

  FIELDS = {
    LOWVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'lowValue', :class => ::Date, :optional => true},
    HIGHVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'highValue', :class => ::Date, :optional => true},
    NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
    NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'},
    BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs
  end

  ::Thrift::Struct.generate_accessors self
end

class ColumnStatisticsData < ::Thrift::Union
  include ::Thrift::Struct_Union
  class << self
    def booleanStats(val)
      ColumnStatisticsData.new(:booleanStats, val)
    end

    def longStats(val)
      ColumnStatisticsData.new(:longStats, val)
    end

    def doubleStats(val)
      ColumnStatisticsData.new(:doubleStats, val)
    end

    def stringStats(val)
      ColumnStatisticsData.new(:stringStats, val)
    end

    def binaryStats(val)
      ColumnStatisticsData.new(:binaryStats, val)
    end

    def decimalStats(val)
      ColumnStatisticsData.new(:decimalStats, val)
    end

    def dateStats(val)
      ColumnStatisticsData.new(:dateStats, val)
    end
  end

  BOOLEANSTATS = 1
  LONGSTATS = 2
  DOUBLESTATS = 3
  STRINGSTATS = 4
  BINARYSTATS = 5
  DECIMALSTATS = 6
  DATESTATS = 7

  FIELDS = {
    BOOLEANSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'booleanStats', :class => ::BooleanColumnStatsData},
    LONGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'longStats', :class => ::LongColumnStatsData},
    DOUBLESTATS => {:type => ::Thrift::Types::STRUCT, :name => 'doubleStats', :class => ::DoubleColumnStatsData},
    STRINGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'stringStats', :class => ::StringColumnStatsData},
    BINARYSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'binaryStats', :class => ::BinaryColumnStatsData},
    DECIMALSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'decimalStats', :class => ::DecimalColumnStatsData},
    DATESTATS => {:type => ::Thrift::Types::STRUCT, :name => 'dateStats', :class => ::DateColumnStatsData}
  }

  def struct_fields; FIELDS; end

  def validate
    raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
  end

  ::Thrift::Union.generate_accessors self
end

class ColumnStatisticsObj
  include ::Thrift::Struct, ::Thrift::Struct_Union
  COLNAME = 1
  COLTYPE = 2
  STATSDATA = 3

  FIELDS = {
    COLNAME => {:type => ::Thrift::Types::STRING, :name => 'colName'},
    COLTYPE => {:type => ::Thrift::Types::STRING, :name => 'colType'},
    STATSDATA => {:type => ::Thrift::Types::STRUCT, :name => 'statsData', :class => ::ColumnStatisticsData}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colName is unset!') unless @colName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colType is unset!') unless @colType
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsData is unset!') unless @statsData
  end

  ::Thrift::Struct.generate_accessors self
end

class ColumnStatisticsDesc
  include ::Thrift::Struct, ::Thrift::Struct_Union
  ISTBLLEVEL = 1
  DBNAME = 2
  TABLENAME = 3
  PARTNAME = 4
  LASTANALYZED = 5

  FIELDS = {
    ISTBLLEVEL => {:type => ::Thrift::Types::BOOL, :name => 'isTblLevel'},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
    PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partName', :optional => true},
    LASTANALYZED => {:type => ::Thrift::Types::I64, :name => 'lastAnalyzed', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isTblLevel is unset!') if @isTblLevel.nil?
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName
  end

  ::Thrift::Struct.generate_accessors self
end

class ColumnStatistics
  include ::Thrift::Struct, ::Thrift::Struct_Union
  STATSDESC = 1
  STATSOBJ = 2

  FIELDS = {
    STATSDESC => {:type => ::Thrift::Types::STRUCT, :name => 'statsDesc', :class => ::ColumnStatisticsDesc},
    STATSOBJ => {:type => ::Thrift::Types::LIST, :name => 'statsObj', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsDesc is unset!') unless @statsDesc
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsObj is unset!') unless @statsObj
  end

  ::Thrift::Struct.generate_accessors self
end

class AggrStats
  include ::Thrift::Struct, ::Thrift::Struct_Union
  COLSTATS = 1
  PARTSFOUND = 2

  FIELDS = {
    COLSTATS => {:type => ::Thrift::Types::LIST, :name => 'colStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}},
    PARTSFOUND => {:type => ::Thrift::Types::I64, :name => 'partsFound'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colStats is unset!') unless @colStats
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partsFound is unset!') unless @partsFound
  end

  ::Thrift::Struct.generate_accessors self
end

class SetPartitionsStatsRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  COLSTATS = 1
  NEEDMERGE = 2

  FIELDS = {
    COLSTATS => {:type => ::Thrift::Types::LIST, :name => 'colStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatistics}},
    NEEDMERGE => {:type => ::Thrift::Types::BOOL, :name => 'needMerge', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colStats is unset!') unless @colStats
  end

  ::Thrift::Struct.generate_accessors self
end

class Schema
  include ::Thrift::Struct, ::Thrift::Struct_Union
  FIELDSCHEMAS = 1
  PROPERTIES = 2

  FIELDS = {
    FIELDSCHEMAS => {:type => ::Thrift::Types::LIST, :name => 'fieldSchemas', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}},
    PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class EnvironmentContext
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PROPERTIES = 1

  FIELDS = {
    PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class PrimaryKeysRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DB_NAME = 1
  TBL_NAME = 2

  FIELDS = {
    DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
    TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tbl_name is unset!') unless @tbl_name
  end

  ::Thrift::Struct.generate_accessors self
end

class PrimaryKeysResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PRIMARYKEYS = 1

  FIELDS = {
    PRIMARYKEYS => {:type => ::Thrift::Types::LIST, :name => 'primaryKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLPrimaryKey}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field primaryKeys is unset!') unless @primaryKeys
  end

  ::Thrift::Struct.generate_accessors self
end

class ForeignKeysRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PARENT_DB_NAME = 1
  PARENT_TBL_NAME = 2
  FOREIGN_DB_NAME = 3
  FOREIGN_TBL_NAME = 4

  FIELDS = {
    PARENT_DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'parent_db_name'},
    PARENT_TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'parent_tbl_name'},
    FOREIGN_DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'foreign_db_name'},
    FOREIGN_TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'foreign_tbl_name'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class ForeignKeysResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  FOREIGNKEYS = 1

  FIELDS = {
    FOREIGNKEYS => {:type => ::Thrift::Types::LIST, :name => 'foreignKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLForeignKey}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field foreignKeys is unset!') unless @foreignKeys
  end

  ::Thrift::Struct.generate_accessors self
end

class DropConstraintRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TABLENAME = 2
  CONSTRAINTNAME = 3

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
    CONSTRAINTNAME => {:type => ::Thrift::Types::STRING, :name => 'constraintname'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field constraintname is unset!') unless @constraintname
  end

  ::Thrift::Struct.generate_accessors self
end

class AddPrimaryKeyRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PRIMARYKEYCOLS = 1

  FIELDS = {
    PRIMARYKEYCOLS => {:type => ::Thrift::Types::LIST, :name => 'primaryKeyCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLPrimaryKey}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field primaryKeyCols is unset!') unless @primaryKeyCols
  end

  ::Thrift::Struct.generate_accessors self
end

class AddForeignKeyRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  FOREIGNKEYCOLS = 1

  FIELDS = {
    FOREIGNKEYCOLS => {:type => ::Thrift::Types::LIST, :name => 'foreignKeyCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLForeignKey}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field foreignKeyCols is unset!') unless @foreignKeyCols
  end

  ::Thrift::Struct.generate_accessors self
end

class PartitionsByExprResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PARTITIONS = 1
  HASUNKNOWNPARTITIONS = 2

  FIELDS = {
    PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}},
    HASUNKNOWNPARTITIONS => {:type => ::Thrift::Types::BOOL, :name => 'hasUnknownPartitions'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitions is unset!') unless @partitions
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hasUnknownPartitions is unset!') if @hasUnknownPartitions.nil?
  end

  ::Thrift::Struct.generate_accessors self
end

class PartitionsByExprRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TBLNAME = 2
  EXPR = 3
  DEFAULTPARTITIONNAME = 4
  MAXPARTS = 5

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'},
    EXPR => {:type => ::Thrift::Types::STRING, :name => 'expr', :binary => true},
    DEFAULTPARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'defaultPartitionName', :optional => true},
    MAXPARTS => {:type => ::Thrift::Types::I16, :name => 'maxParts', :default => -1, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expr is unset!') unless @expr
  end

  ::Thrift::Struct.generate_accessors self
end

class TableStatsResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TABLESTATS = 1

  FIELDS = {
    TABLESTATS => {:type => ::Thrift::Types::LIST, :name => 'tableStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableStats is unset!') unless @tableStats
  end

  ::Thrift::Struct.generate_accessors self
end

class PartitionsStatsResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PARTSTATS = 1

  FIELDS = {
    PARTSTATS => {:type => ::Thrift::Types::MAP, :name => 'partStats', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partStats is unset!') unless @partStats
  end

  ::Thrift::Struct.generate_accessors self
end

class TableStatsRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TBLNAME = 2
  COLNAMES = 3

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'},
    COLNAMES => {:type => ::Thrift::Types::LIST, :name => 'colNames', :element => {:type => ::Thrift::Types::STRING}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colNames is unset!') unless @colNames
  end

  ::Thrift::Struct.generate_accessors self
end

class PartitionsStatsRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TBLNAME = 2
  COLNAMES = 3
  PARTNAMES = 4

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'},
    COLNAMES => {:type => ::Thrift::Types::LIST, :name => 'colNames', :element => {:type => ::Thrift::Types::STRING}},
    PARTNAMES => {:type => ::Thrift::Types::LIST, :name => 'partNames', :element => {:type => ::Thrift::Types::STRING}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colNames is unset!') unless @colNames
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partNames is unset!') unless @partNames
  end

  ::Thrift::Struct.generate_accessors self
end

class AddPartitionsResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PARTITIONS = 1

  FIELDS = {
    PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class AddPartitionsRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TBLNAME = 2
  PARTS = 3
  IFNOTEXISTS = 4
  NEEDRESULT = 5

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'},
    PARTS => {:type => ::Thrift::Types::LIST, :name => 'parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}},
    IFNOTEXISTS => {:type => ::Thrift::Types::BOOL, :name => 'ifNotExists'},
    NEEDRESULT => {:type => ::Thrift::Types::BOOL, :name => 'needResult', :default => true, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parts is unset!') unless @parts
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field ifNotExists is unset!') if @ifNotExists.nil?
  end

  ::Thrift::Struct.generate_accessors self
end

class DropPartitionsResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  PARTITIONS = 1

  FIELDS = {
    PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class DropPartitionsExpr
  include ::Thrift::Struct, ::Thrift::Struct_Union
  EXPR = 1
  PARTARCHIVELEVEL = 2

  FIELDS = {
    EXPR => {:type => ::Thrift::Types::STRING, :name => 'expr', :binary => true},
    PARTARCHIVELEVEL => {:type => ::Thrift::Types::I32, :name => 'partArchiveLevel', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expr is unset!') unless @expr
  end

  ::Thrift::Struct.generate_accessors self
end

class RequestPartsSpec < ::Thrift::Union
  include ::Thrift::Struct_Union
  class << self
    def names(val)
      RequestPartsSpec.new(:names, val)
    end

    def exprs(val)
      RequestPartsSpec.new(:exprs, val)
    end
  end

  NAMES = 1
  EXPRS = 2

  FIELDS = {
    NAMES => {:type => ::Thrift::Types::LIST, :name => 'names', :element => {:type => ::Thrift::Types::STRING}},
    EXPRS => {:type => ::Thrift::Types::LIST, :name => 'exprs', :element => {:type => ::Thrift::Types::STRUCT, :class => ::DropPartitionsExpr}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
  end

  ::Thrift::Union.generate_accessors self
end

class DropPartitionsRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TBLNAME = 2
  PARTS = 3
  DELETEDATA = 4
  IFEXISTS = 5
  IGNOREPROTECTION = 6
  ENVIRONMENTCONTEXT = 7
  NEEDRESULT = 8

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'},
    PARTS => {:type => ::Thrift::Types::STRUCT, :name => 'parts', :class => ::RequestPartsSpec},
    DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData', :optional => true},
    IFEXISTS => {:type => ::Thrift::Types::BOOL, :name => 'ifExists', :default => true, :optional => true},
    IGNOREPROTECTION => {:type => ::Thrift::Types::BOOL, :name => 'ignoreProtection', :optional => true},
    ENVIRONMENTCONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environmentContext', :class => ::EnvironmentContext, :optional => true},
    NEEDRESULT => {:type => ::Thrift::Types::BOOL, :name => 'needResult', :default => true, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parts is unset!') unless @parts
  end

  ::Thrift::Struct.generate_accessors self
end

class ResourceUri
  include ::Thrift::Struct, ::Thrift::Struct_Union
  RESOURCETYPE = 1
  URI = 2

  FIELDS = {
    RESOURCETYPE => {:type => ::Thrift::Types::I32, :name => 'resourceType', :enum_class => ::ResourceType},
    URI => {:type => ::Thrift::Types::STRING, :name => 'uri'}
  }

  def struct_fields; FIELDS; end

  def validate
    unless @resourceType.nil? || ::ResourceType::VALID_VALUES.include?(@resourceType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field resourceType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class Function
  include ::Thrift::Struct, ::Thrift::Struct_Union
  FUNCTIONNAME = 1
  DBNAME = 2
  CLASSNAME = 3
  OWNERNAME = 4
  OWNERTYPE = 5
  CREATETIME = 6
  FUNCTIONTYPE = 7
  RESOURCEURIS = 8

  FIELDS = {
    FUNCTIONNAME => {:type => ::Thrift::Types::STRING, :name => 'functionName'},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    CLASSNAME => {:type => ::Thrift::Types::STRING, :name => 'className'},
    OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName'},
    OWNERTYPE => {:type => ::Thrift::Types::I32, :name => 'ownerType', :enum_class => ::PrincipalType},
    CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'},
    FUNCTIONTYPE => {:type => ::Thrift::Types::I32, :name => 'functionType', :enum_class => ::FunctionType},
    RESOURCEURIS => {:type => ::Thrift::Types::LIST, :name => 'resourceUris', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ResourceUri}}
  }

  def struct_fields; FIELDS; end

  def validate
    unless @ownerType.nil? || ::PrincipalType::VALID_VALUES.include?(@ownerType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ownerType!')
    end
    unless @functionType.nil? || ::FunctionType::VALID_VALUES.include?(@functionType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field functionType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class TxnInfo
  include ::Thrift::Struct, ::Thrift::Struct_Union
  ID = 1
  STATE = 2
  USER = 3
  HOSTNAME = 4
  AGENTINFO = 5
  HEARTBEATCOUNT = 6
  METAINFO = 7
  STARTEDTIME = 8
  LASTHEARTBEATTIME = 9

  FIELDS = {
    ID => {:type => ::Thrift::Types::I64, :name => 'id'},
    STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::TxnState},
    USER => {:type => ::Thrift::Types::STRING, :name => 'user'},
    HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'},
    AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true},
    HEARTBEATCOUNT => {:type => ::Thrift::Types::I32, :name => 'heartbeatCount', :default => 0, :optional => true},
    METAINFO => {:type => ::Thrift::Types::STRING, :name => 'metaInfo', :optional => true},
    STARTEDTIME => {:type => ::Thrift::Types::I64, :name => 'startedTime', :optional => true},
    LASTHEARTBEATTIME => {:type => ::Thrift::Types::I64, :name => 'lastHeartbeatTime', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname
    unless @state.nil? || ::TxnState::VALID_VALUES.include?(@state)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class GetOpenTxnsInfoResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TXN_HIGH_WATER_MARK = 1
  OPEN_TXNS = 2

  FIELDS = {
    TXN_HIGH_WATER_MARK => {:type => ::Thrift::Types::I64, :name => 'txn_high_water_mark'},
    OPEN_TXNS => {:type => ::Thrift::Types::LIST, :name => 'open_txns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::TxnInfo}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_high_water_mark is unset!') unless @txn_high_water_mark
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field open_txns is unset!') unless @open_txns
  end

  ::Thrift::Struct.generate_accessors self
end

class GetOpenTxnsResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TXN_HIGH_WATER_MARK = 1
  OPEN_TXNS = 2
  MIN_OPEN_TXN = 3

  FIELDS = {
    TXN_HIGH_WATER_MARK => {:type => ::Thrift::Types::I64, :name => 'txn_high_water_mark'},
    OPEN_TXNS => {:type => ::Thrift::Types::SET, :name => 'open_txns', :element => {:type => ::Thrift::Types::I64}},
    MIN_OPEN_TXN => {:type => ::Thrift::Types::I64, :name => 'min_open_txn', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_high_water_mark is unset!') unless @txn_high_water_mark
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field open_txns is unset!') unless @open_txns
  end

  ::Thrift::Struct.generate_accessors self
end

class OpenTxnRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  NUM_TXNS = 1
  USER = 2
  HOSTNAME = 3
  AGENTINFO = 4

  FIELDS = {
    NUM_TXNS => {:type => ::Thrift::Types::I32, :name => 'num_txns'},
    USER => {:type => ::Thrift::Types::STRING, :name => 'user'},
    HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'},
    AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_txns is unset!') unless @num_txns
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname
  end

  ::Thrift::Struct.generate_accessors self
end

class OpenTxnsResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TXN_IDS = 1

  FIELDS = {
    TXN_IDS => {:type => ::Thrift::Types::LIST, :name => 'txn_ids', :element => {:type => ::Thrift::Types::I64}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_ids is unset!') unless @txn_ids
  end

  ::Thrift::Struct.generate_accessors self
end

class AbortTxnRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TXNID = 1

  FIELDS = {
    TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnid is unset!') unless @txnid
  end

  ::Thrift::Struct.generate_accessors self
end

class AbortTxnsRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TXN_IDS = 1

  FIELDS = {
    TXN_IDS => {:type => ::Thrift::Types::LIST, :name => 'txn_ids', :element => {:type => ::Thrift::Types::I64}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_ids is unset!') unless @txn_ids
  end

  ::Thrift::Struct.generate_accessors self
end

class CommitTxnRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TXNID = 1

  FIELDS = {
    TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnid is unset!') unless @txnid
  end

  ::Thrift::Struct.generate_accessors self
end

class LockComponent
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TYPE = 1
  LEVEL = 2
  DBNAME = 3
  TABLENAME = 4
  PARTITIONNAME = 5
  OPERATIONTYPE = 6
  ISACID = 7
  ISDYNAMICPARTITIONWRITE = 8

  FIELDS = {
    TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::LockType},
    LEVEL => {:type => ::Thrift::Types::I32, :name => 'level', :enum_class => ::LockLevel},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true},
    PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true},
    OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :default =>     5, :optional => true, :enum_class => ::DataOperationType},
    ISACID => {:type => ::Thrift::Types::BOOL, :name => 'isAcid', :default => false, :optional => true},
    ISDYNAMICPARTITIONWRITE => {:type => ::Thrift::Types::BOOL, :name => 'isDynamicPartitionWrite', :default => false, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field level is unset!') unless @level
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname
    unless @type.nil? || ::LockType::VALID_VALUES.include?(@type)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
    end
    unless @level.nil? || ::LockLevel::VALID_VALUES.include?(@level)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field level!')
    end
    unless @operationType.nil? || ::DataOperationType::VALID_VALUES.include?(@operationType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class LockRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  COMPONENT = 1
  TXNID = 2
  USER = 3
  HOSTNAME = 4
  AGENTINFO = 5

  FIELDS = {
    COMPONENT => {:type => ::Thrift::Types::LIST, :name => 'component', :element => {:type => ::Thrift::Types::STRUCT, :class => ::LockComponent}},
    TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true},
    USER => {:type => ::Thrift::Types::STRING, :name => 'user'},
    HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'},
    AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field component is unset!') unless @component
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname
  end

  ::Thrift::Struct.generate_accessors self
end

class LockResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LOCKID = 1
  STATE = 2

  FIELDS = {
    LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'},
    STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::LockState}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state
    unless @state.nil? || ::LockState::VALID_VALUES.include?(@state)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class CheckLockRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LOCKID = 1
  TXNID = 2
  ELAPSED_MS = 3

  FIELDS = {
    LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'},
    TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true},
    ELAPSED_MS => {:type => ::Thrift::Types::I64, :name => 'elapsed_ms', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid
  end

  ::Thrift::Struct.generate_accessors self
end

class UnlockRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LOCKID = 1

  FIELDS = {
    LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid
  end

  ::Thrift::Struct.generate_accessors self
end

class ShowLocksRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TABLENAME = 2
  PARTNAME = 3
  ISEXTENDED = 4

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname', :optional => true},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true},
    PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partname', :optional => true},
    ISEXTENDED => {:type => ::Thrift::Types::BOOL, :name => 'isExtended', :default => false, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class ShowLocksResponseElement
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LOCKID = 1
  DBNAME = 2
  TABLENAME = 3
  PARTNAME = 4
  STATE = 5
  TYPE = 6
  TXNID = 7
  LASTHEARTBEAT = 8
  ACQUIREDAT = 9
  USER = 10
  HOSTNAME = 11
  HEARTBEATCOUNT = 12
  AGENTINFO = 13
  BLOCKEDBYEXTID = 14
  BLOCKEDBYINTID = 15
  LOCKIDINTERNAL = 16

  FIELDS = {
    LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true},
    PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partname', :optional => true},
    STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::LockState},
    TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::LockType},
    TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true},
    LASTHEARTBEAT => {:type => ::Thrift::Types::I64, :name => 'lastheartbeat'},
    ACQUIREDAT => {:type => ::Thrift::Types::I64, :name => 'acquiredat', :optional => true},
    USER => {:type => ::Thrift::Types::STRING, :name => 'user'},
    HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'},
    HEARTBEATCOUNT => {:type => ::Thrift::Types::I32, :name => 'heartbeatCount', :default => 0, :optional => true},
    AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :optional => true},
    BLOCKEDBYEXTID => {:type => ::Thrift::Types::I64, :name => 'blockedByExtId', :optional => true},
    BLOCKEDBYINTID => {:type => ::Thrift::Types::I64, :name => 'blockedByIntId', :optional => true},
    LOCKIDINTERNAL => {:type => ::Thrift::Types::I64, :name => 'lockIdInternal', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lastheartbeat is unset!') unless @lastheartbeat
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname
    unless @state.nil? || ::LockState::VALID_VALUES.include?(@state)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
    end
    unless @type.nil? || ::LockType::VALID_VALUES.include?(@type)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class ShowLocksResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LOCKS = 1

  FIELDS = {
    LOCKS => {:type => ::Thrift::Types::LIST, :name => 'locks', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ShowLocksResponseElement}}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class HeartbeatRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LOCKID = 1
  TXNID = 2

  FIELDS = {
    LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid', :optional => true},
    TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class HeartbeatTxnRangeRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  MIN = 1
  MAX = 2

  FIELDS = {
    MIN => {:type => ::Thrift::Types::I64, :name => 'min'},
    MAX => {:type => ::Thrift::Types::I64, :name => 'max'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field min is unset!') unless @min
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field max is unset!') unless @max
  end

  ::Thrift::Struct.generate_accessors self
end

class HeartbeatTxnRangeResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  ABORTED = 1
  NOSUCH = 2

  FIELDS = {
    ABORTED => {:type => ::Thrift::Types::SET, :name => 'aborted', :element => {:type => ::Thrift::Types::I64}},
    NOSUCH => {:type => ::Thrift::Types::SET, :name => 'nosuch', :element => {:type => ::Thrift::Types::I64}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field aborted is unset!') unless @aborted
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nosuch is unset!') unless @nosuch
  end

  ::Thrift::Struct.generate_accessors self
end

class CompactionRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TABLENAME = 2
  PARTITIONNAME = 3
  TYPE = 4
  RUNAS = 5
  PROPERTIES = 6

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
    PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true},
    TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CompactionType},
    RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runas', :optional => true},
    PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
    unless @type.nil? || ::CompactionType::VALID_VALUES.include?(@type)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class CompactionResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  ID = 1
  STATE = 2
  ACCEPTED = 3

  FIELDS = {
    ID => {:type => ::Thrift::Types::I64, :name => 'id'},
    STATE => {:type => ::Thrift::Types::STRING, :name => 'state'},
    ACCEPTED => {:type => ::Thrift::Types::BOOL, :name => 'accepted'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field accepted is unset!') if @accepted.nil?
  end

  ::Thrift::Struct.generate_accessors self
end

class ShowCompactRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union

  FIELDS = {

  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class ShowCompactResponseElement
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TABLENAME = 2
  PARTITIONNAME = 3
  TYPE = 4
  STATE = 5
  WORKERID = 6
  START = 7
  RUNAS = 8
  HIGHTESTTXNID = 9
  METAINFO = 10
  ENDTIME = 11
  HADOOPJOBID = 12
  ID = 13

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
    PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true},
    TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CompactionType},
    STATE => {:type => ::Thrift::Types::STRING, :name => 'state'},
    WORKERID => {:type => ::Thrift::Types::STRING, :name => 'workerid', :optional => true},
    START => {:type => ::Thrift::Types::I64, :name => 'start', :optional => true},
    RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runAs', :optional => true},
    HIGHTESTTXNID => {:type => ::Thrift::Types::I64, :name => 'hightestTxnId', :optional => true},
    METAINFO => {:type => ::Thrift::Types::STRING, :name => 'metaInfo', :optional => true},
    ENDTIME => {:type => ::Thrift::Types::I64, :name => 'endTime', :optional => true},
    HADOOPJOBID => {:type => ::Thrift::Types::STRING, :name => 'hadoopJobId', :default => %q"None", :optional => true},
    ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state
    unless @type.nil? || ::CompactionType::VALID_VALUES.include?(@type)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class ShowCompactResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  COMPACTS = 1

  FIELDS = {
    COMPACTS => {:type => ::Thrift::Types::LIST, :name => 'compacts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ShowCompactResponseElement}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field compacts is unset!') unless @compacts
  end

  ::Thrift::Struct.generate_accessors self
end

class AddDynamicPartitions
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TXNID = 1
  DBNAME = 2
  TABLENAME = 3
  PARTITIONNAMES = 4
  OPERATIONTYPE = 5

  FIELDS = {
    TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
    PARTITIONNAMES => {:type => ::Thrift::Types::LIST, :name => 'partitionnames', :element => {:type => ::Thrift::Types::STRING}},
    OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :default =>     5, :optional => true, :enum_class => ::DataOperationType}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnid is unset!') unless @txnid
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitionnames is unset!') unless @partitionnames
    unless @operationType.nil? || ::DataOperationType::VALID_VALUES.include?(@operationType)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class NotificationEventRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  LASTEVENT = 1
  MAXEVENTS = 2

  FIELDS = {
    LASTEVENT => {:type => ::Thrift::Types::I64, :name => 'lastEvent'},
    MAXEVENTS => {:type => ::Thrift::Types::I32, :name => 'maxEvents', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lastEvent is unset!') unless @lastEvent
  end

  ::Thrift::Struct.generate_accessors self
end

class NotificationEvent
  include ::Thrift::Struct, ::Thrift::Struct_Union
  EVENTID = 1
  EVENTTIME = 2
  EVENTTYPE = 3
  DBNAME = 4
  TABLENAME = 5
  MESSAGE = 6
  MESSAGEFORMAT = 7

  FIELDS = {
    EVENTID => {:type => ::Thrift::Types::I64, :name => 'eventId'},
    EVENTTIME => {:type => ::Thrift::Types::I32, :name => 'eventTime'},
    EVENTTYPE => {:type => ::Thrift::Types::STRING, :name => 'eventType'},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName', :optional => true},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :optional => true},
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'},
    MESSAGEFORMAT => {:type => ::Thrift::Types::STRING, :name => 'messageFormat', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventId is unset!') unless @eventId
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventTime is unset!') unless @eventTime
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventType is unset!') unless @eventType
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field message is unset!') unless @message
  end

  ::Thrift::Struct.generate_accessors self
end

class NotificationEventResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  EVENTS = 1

  FIELDS = {
    EVENTS => {:type => ::Thrift::Types::LIST, :name => 'events', :element => {:type => ::Thrift::Types::STRUCT, :class => ::NotificationEvent}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field events is unset!') unless @events
  end

  ::Thrift::Struct.generate_accessors self
end

class CurrentNotificationEventId
  include ::Thrift::Struct, ::Thrift::Struct_Union
  EVENTID = 1

  FIELDS = {
    EVENTID => {:type => ::Thrift::Types::I64, :name => 'eventId'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventId is unset!') unless @eventId
  end

  ::Thrift::Struct.generate_accessors self
end

class InsertEventRequestData
  include ::Thrift::Struct, ::Thrift::Struct_Union
  FILESADDED = 1
  FILESADDEDCHECKSUM = 2

  FIELDS = {
    FILESADDED => {:type => ::Thrift::Types::LIST, :name => 'filesAdded', :element => {:type => ::Thrift::Types::STRING}},
    FILESADDEDCHECKSUM => {:type => ::Thrift::Types::LIST, :name => 'filesAddedChecksum', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field filesAdded is unset!') unless @filesAdded
  end

  ::Thrift::Struct.generate_accessors self
end

class FireEventRequestData < ::Thrift::Union
  include ::Thrift::Struct_Union
  class << self
    def insertData(val)
      FireEventRequestData.new(:insertData, val)
    end
  end

  INSERTDATA = 1

  FIELDS = {
    INSERTDATA => {:type => ::Thrift::Types::STRUCT, :name => 'insertData', :class => ::InsertEventRequestData}
  }

  def struct_fields; FIELDS; end

  def validate
    raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
  end

  ::Thrift::Union.generate_accessors self
end

class FireEventRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  SUCCESSFUL = 1
  DATA = 2
  DBNAME = 3
  TABLENAME = 4
  PARTITIONVALS = 5

  FIELDS = {
    SUCCESSFUL => {:type => ::Thrift::Types::BOOL, :name => 'successful'},
    DATA => {:type => ::Thrift::Types::STRUCT, :name => 'data', :class => ::FireEventRequestData},
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName', :optional => true},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :optional => true},
    PARTITIONVALS => {:type => ::Thrift::Types::LIST, :name => 'partitionVals', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field successful is unset!') if @successful.nil?
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field data is unset!') unless @data
  end

  ::Thrift::Struct.generate_accessors self
end

class FireEventResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union

  FIELDS = {

  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class MetadataPpdResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  METADATA = 1
  INCLUDEBITSET = 2

  FIELDS = {
    METADATA => {:type => ::Thrift::Types::STRING, :name => 'metadata', :binary => true, :optional => true},
    INCLUDEBITSET => {:type => ::Thrift::Types::STRING, :name => 'includeBitset', :binary => true, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class GetFileMetadataByExprResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  METADATA = 1
  ISSUPPORTED = 2

  FIELDS = {
    METADATA => {:type => ::Thrift::Types::MAP, :name => 'metadata', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::MetadataPpdResult}},
    ISSUPPORTED => {:type => ::Thrift::Types::BOOL, :name => 'isSupported'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field metadata is unset!') unless @metadata
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isSupported is unset!') if @isSupported.nil?
  end

  ::Thrift::Struct.generate_accessors self
end

class GetFileMetadataByExprRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  FILEIDS = 1
  EXPR = 2
  DOGETFOOTERS = 3
  TYPE = 4

  FIELDS = {
    FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}},
    EXPR => {:type => ::Thrift::Types::STRING, :name => 'expr', :binary => true},
    DOGETFOOTERS => {:type => ::Thrift::Types::BOOL, :name => 'doGetFooters', :optional => true},
    TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :optional => true, :enum_class => ::FileMetadataExprType}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expr is unset!') unless @expr
    unless @type.nil? || ::FileMetadataExprType::VALID_VALUES.include?(@type)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class GetFileMetadataResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  METADATA = 1
  ISSUPPORTED = 2

  FIELDS = {
    METADATA => {:type => ::Thrift::Types::MAP, :name => 'metadata', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::STRING, :binary => true}},
    ISSUPPORTED => {:type => ::Thrift::Types::BOOL, :name => 'isSupported'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field metadata is unset!') unless @metadata
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isSupported is unset!') if @isSupported.nil?
  end

  ::Thrift::Struct.generate_accessors self
end

class GetFileMetadataRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  FILEIDS = 1

  FIELDS = {
    FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds
  end

  ::Thrift::Struct.generate_accessors self
end

class PutFileMetadataResult
  include ::Thrift::Struct, ::Thrift::Struct_Union

  FIELDS = {

  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class PutFileMetadataRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  FILEIDS = 1
  METADATA = 2
  TYPE = 3

  FIELDS = {
    FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}},
    METADATA => {:type => ::Thrift::Types::LIST, :name => 'metadata', :element => {:type => ::Thrift::Types::STRING, :binary => true}},
    TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :optional => true, :enum_class => ::FileMetadataExprType}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field metadata is unset!') unless @metadata
    unless @type.nil? || ::FileMetadataExprType::VALID_VALUES.include?(@type)
      raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
    end
  end

  ::Thrift::Struct.generate_accessors self
end

class ClearFileMetadataResult
  include ::Thrift::Struct, ::Thrift::Struct_Union

  FIELDS = {

  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class ClearFileMetadataRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  FILEIDS = 1

  FIELDS = {
    FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds
  end

  ::Thrift::Struct.generate_accessors self
end

class CacheFileMetadataResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  ISSUPPORTED = 1

  FIELDS = {
    ISSUPPORTED => {:type => ::Thrift::Types::BOOL, :name => 'isSupported'}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isSupported is unset!') if @isSupported.nil?
  end

  ::Thrift::Struct.generate_accessors self
end

class CacheFileMetadataRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TBLNAME = 2
  PARTNAME = 3
  ISALLPARTS = 4

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'},
    PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partName', :optional => true},
    ISALLPARTS => {:type => ::Thrift::Types::BOOL, :name => 'isAllParts', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName
  end

  ::Thrift::Struct.generate_accessors self
end

class GetAllFunctionsResponse
  include ::Thrift::Struct, ::Thrift::Struct_Union
  FUNCTIONS = 1

  FIELDS = {
    FUNCTIONS => {:type => ::Thrift::Types::LIST, :name => 'functions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Function}, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class ClientCapabilities
  include ::Thrift::Struct, ::Thrift::Struct_Union
  VALUES = 1

  FIELDS = {
    VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::I32, :enum_class => ::ClientCapability}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values
  end

  ::Thrift::Struct.generate_accessors self
end

class GetTableRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TBLNAME = 2
  CAPABILITIES = 3

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'},
    CAPABILITIES => {:type => ::Thrift::Types::STRUCT, :name => 'capabilities', :class => ::ClientCapabilities, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName
  end

  ::Thrift::Struct.generate_accessors self
end

class GetTableResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TABLE = 1

  FIELDS = {
    TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'table', :class => ::Table}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table is unset!') unless @table
  end

  ::Thrift::Struct.generate_accessors self
end

class GetTablesRequest
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TBLNAMES = 2
  CAPABILITIES = 3

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TBLNAMES => {:type => ::Thrift::Types::LIST, :name => 'tblNames', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
    CAPABILITIES => {:type => ::Thrift::Types::STRUCT, :name => 'capabilities', :class => ::ClientCapabilities, :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
  end

  ::Thrift::Struct.generate_accessors self
end

class GetTablesResult
  include ::Thrift::Struct, ::Thrift::Struct_Union
  TABLES = 1

  FIELDS = {
    TABLES => {:type => ::Thrift::Types::LIST, :name => 'tables', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Table}}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tables is unset!') unless @tables
  end

  ::Thrift::Struct.generate_accessors self
end

class TableMeta
  include ::Thrift::Struct, ::Thrift::Struct_Union
  DBNAME = 1
  TABLENAME = 2
  TABLETYPE = 3
  COMMENTS = 4

  FIELDS = {
    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
    TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'},
    COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments', :optional => true}
  }

  def struct_fields; FIELDS; end

  def validate
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableType is unset!') unless @tableType
  end

  ::Thrift::Struct.generate_accessors self
end

class MetaException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class UnknownTableException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class UnknownDBException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class AlreadyExistsException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class InvalidPartitionException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class UnknownPartitionException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class InvalidObjectException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class NoSuchObjectException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class IndexAlreadyExistsException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class InvalidOperationException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class ConfigValSecurityException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class InvalidInputException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class NoSuchTxnException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class TxnAbortedException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class TxnOpenException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

class NoSuchLockException < ::Thrift::Exception
  include ::Thrift::Struct, ::Thrift::Struct_Union
  def initialize(message=nil)
    super()
    self.message = message
  end

  MESSAGE = 1

  FIELDS = {
    MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
  }

  def struct_fields; FIELDS; end

  def validate
  end

  ::Thrift::Struct.generate_accessors self
end

