@ThriftService("hive-metastore")
public interface HiveMetastore extends Closeable, FacebookHiveMetastore
{
    @Override
    void close();

    boolean isConnected();
} @ThriftStruct("AlreadyExistsException")
public class AlreadyExistsException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public AlreadyExistsException(
                                  @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public AlreadyExistsException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
} @ThriftStruct("ColumnStatistics")
public class ColumnStatistics
{
    @ThriftConstructor
    public ColumnStatistics(
                            @ThriftField(value = 1, name = "statsDesc") final ColumnStatisticsDesc statsDesc,
                            @ThriftField(value = 2, name = "statsObj") final List<ColumnStatisticsObj> statsObj)
    {
        this.statsDesc = statsDesc;
        this.statsObj = statsObj;
    }

    public ColumnStatistics()
    {
    }

    private ColumnStatisticsDesc statsDesc;

    @ThriftField(value = 1, name = "statsDesc")
    public ColumnStatisticsDesc getStatsDesc()
    {
        return statsDesc;
    }

    public void setStatsDesc(final ColumnStatisticsDesc statsDesc)
    {
        this.statsDesc = statsDesc;
    }

    private List<ColumnStatisticsObj> statsObj;

    @ThriftField(value = 2, name = "statsObj")
    public List<ColumnStatisticsObj> getStatsObj()
    {
        return statsObj;
    }

    public void setStatsObj(final List<ColumnStatisticsObj> statsObj)
    {
        this.statsObj = statsObj;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("statsDesc", statsDesc)
            .add("statsObj", statsObj)
            .toString();
    }
} @ThriftStruct("ConfigValSecurityException")
public class ConfigValSecurityException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public ConfigValSecurityException(
                                      @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public ConfigValSecurityException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
} @ThriftStruct("Database")
public class Database
{
    @ThriftConstructor
    public Database(
                    @ThriftField(value = 1, name = "name") final String name,
                    @ThriftField(value = 2, name = "description") final String description,
                    @ThriftField(value = 3, name = "locationUri") final String locationUri,
                    @ThriftField(value = 4, name = "parameters") final Map<String, String> parameters,
                    @ThriftField(value = 5, name = "privileges") final PrincipalPrivilegeSet privileges)
    {
        this.name = name;
        this.description = description;
        this.locationUri = locationUri;
        this.parameters = parameters;
        this.privileges = privileges;
    }

    public Database()
    {
    }

    private String name;

    @ThriftField(value = 1, name = "name")
    public String getName()
    {
        return name;
    }

    public void setName(final String name)
    {
        this.name = name;
    }

    private String description;

    @ThriftField(value = 2, name = "description")
    public String getDescription()
    {
        return description;
    }

    public void setDescription(final String description)
    {
        this.description = description;
    }

    private String locationUri;

    @ThriftField(value = 3, name = "locationUri")
    public String getLocationUri()
    {
        return locationUri;
    }

    public void setLocationUri(final String locationUri)
    {
        this.locationUri = locationUri;
    }

    private Map<String, String> parameters;

    @ThriftField(value = 4, name = "parameters")
    public Map<String, String> getParameters()
    {
        return parameters;
    }

    public void setParameters(final Map<String, String> parameters)
    {
        this.parameters = parameters;
    }

    private PrincipalPrivilegeSet privileges;

    @ThriftField(value = 5, name = "privileges")
    public PrincipalPrivilegeSet getPrivileges()
    {
        return privileges;
    }

    public void setPrivileges(final PrincipalPrivilegeSet privileges)
    {
        this.privileges = privileges;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("name", name)
            .add("description", description)
            .add("locationUri", locationUri)
            .add("parameters", parameters)
            .add("privileges", privileges)
            .toString();
    }
} @ThriftStruct("EnvironmentContext")
public class EnvironmentContext
{
    @ThriftConstructor
    public EnvironmentContext(
                              @ThriftField(value = 1, name = "properties") final Map<String, String> properties)
    {
        this.properties = properties;
    }

    public EnvironmentContext()
    {
    }

    private Map<String, String> properties;

    @ThriftField(value = 1, name = "properties")
    public Map<String, String> getProperties()
    {
        return properties;
    }

    public void setProperties(final Map<String, String> properties)
    {
        this.properties = properties;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("properties", properties)
            .toString();
    }
} @ThriftStruct("FieldSchema")
public class FieldSchema
{
    @ThriftConstructor
    public FieldSchema(
                       @ThriftField(value = 1, name = "name") final String name,
                       @ThriftField(value = 2, name = "type") final String type,
                       @ThriftField(value = 3, name = "comment") final String comment)
    {
        this.name = name;
        this.type = type;
        this.comment = comment;
    }

    public FieldSchema()
    {
    }

    private String name;

    @ThriftField(value = 1, name = "name")
    public String getName()
    {
        return name;
    }

    public void setName(final String name)
    {
        this.name = name;
    }

    private String type;

    @ThriftField(value = 2, name = "type")
    public String getType()
    {
        return type;
    }

    public void setType(final String type)
    {
        this.type = type;
    }

    private String comment;

    @ThriftField(value = 3, name = "comment")
    public String getComment()
    {
        return comment;
    }

    public void setComment(final String comment)
    {
        this.comment = comment;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("name", name)
            .add("type", type)
            .add("comment", comment)
            .toString();
    }
} @ThriftStruct("HiveObjectPrivilege")
public class HiveObjectPrivilege
{
    @ThriftConstructor
    public HiveObjectPrivilege(
                               @ThriftField(value = 1, name = "hiveObject") final HiveObjectRef hiveObject,
                               @ThriftField(value = 2, name = "principalName") final String principalName,
                               @ThriftField(value = 3, name = "principalType") final PrincipalType principalType,
                               @ThriftField(value = 4, name = "grantInfo") final PrivilegeGrantInfo grantInfo)
    {
        this.hiveObject = hiveObject;
        this.principalName = principalName;
        this.principalType = principalType;
        this.grantInfo = grantInfo;
    }

    public HiveObjectPrivilege()
    {
    }

    private HiveObjectRef hiveObject;

    @ThriftField(value = 1, name = "hiveObject")
    public HiveObjectRef getHiveObject()
    {
        return hiveObject;
    }

    public void setHiveObject(final HiveObjectRef hiveObject)
    {
        this.hiveObject = hiveObject;
    }

    private String principalName;

    @ThriftField(value = 2, name = "principalName")
    public String getPrincipalName()
    {
        return principalName;
    }

    public void setPrincipalName(final String principalName)
    {
        this.principalName = principalName;
    }

    private PrincipalType principalType;

    @ThriftField(value = 3, name = "principalType")
    public PrincipalType getPrincipalType()
    {
        return principalType;
    }

    public void setPrincipalType(final PrincipalType principalType)
    {
        this.principalType = principalType;
    }

    private PrivilegeGrantInfo grantInfo;

    @ThriftField(value = 4, name = "grantInfo")
    public PrivilegeGrantInfo getGrantInfo()
    {
        return grantInfo;
    }

    public void setGrantInfo(final PrivilegeGrantInfo grantInfo)
    {
        this.grantInfo = grantInfo;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("hiveObject", hiveObject)
            .add("principalName", principalName)
            .add("principalType", principalType)
            .add("grantInfo", grantInfo)
            .toString();
    }
} @ThriftStruct("HiveObjectRef")
public class HiveObjectRef
{
    @ThriftConstructor
    public HiveObjectRef(
                         @ThriftField(value = 1, name = "objectType") final HiveObjectType objectType,
                         @ThriftField(value = 2, name = "dbName") final String dbName,
                         @ThriftField(value = 3, name = "objectName") final String objectName,
                         @ThriftField(value = 4, name = "partValues") final List<String> partValues,
                         @ThriftField(value = 5, name = "columnName") final String columnName)
    {
        this.objectType = objectType;
        this.dbName = dbName;
        this.objectName = objectName;
        this.partValues = partValues;
        this.columnName = columnName;
    }

    public HiveObjectRef()
    {
    }

    private HiveObjectType objectType;

    @ThriftField(value = 1, name = "objectType")
    public HiveObjectType getObjectType()
    {
        return objectType;
    }

    public void setObjectType(final HiveObjectType objectType)
    {
        this.objectType = objectType;
    }

    private String dbName;

    @ThriftField(value = 2, name = "dbName")
    public String getDbName()
    {
        return dbName;
    }

    public void setDbName(final String dbName)
    {
        this.dbName = dbName;
    }

    private String objectName;

    @ThriftField(value = 3, name = "objectName")
    public String getObjectName()
    {
        return objectName;
    }

    public void setObjectName(final String objectName)
    {
        this.objectName = objectName;
    }

    private List<String> partValues;

    @ThriftField(value = 4, name = "partValues")
    public List<String> getPartValues()
    {
        return partValues;
    }

    public void setPartValues(final List<String> partValues)
    {
        this.partValues = partValues;
    }

    private String columnName;

    @ThriftField(value = 5, name = "columnName")
    public String getColumnName()
    {
        return columnName;
    }

    public void setColumnName(final String columnName)
    {
        this.columnName = columnName;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("objectType", objectType)
            .add("dbName", dbName)
            .add("objectName", objectName)
            .add("partValues", partValues)
            .add("columnName", columnName)
            .toString();
    }
} @ThriftStruct("Index")
public class Index
{
    @ThriftConstructor
    public Index(
                 @ThriftField(value = 1, name = "indexName") final String indexName,
                 @ThriftField(value = 2, name = "indexHandlerClass") final String indexHandlerClass,
                 @ThriftField(value = 3, name = "dbName") final String dbName,
                 @ThriftField(value = 4, name = "origTableName") final String origTableName,
                 @ThriftField(value = 5, name = "createTime") final int createTime,
                 @ThriftField(value = 6, name = "lastAccessTime") final int lastAccessTime,
                 @ThriftField(value = 7, name = "indexTableName") final String indexTableName,
                 @ThriftField(value = 8, name = "sd") final StorageDescriptor sd,
                 @ThriftField(value = 9, name = "parameters") final Map<String, String> parameters,
                 @ThriftField(value = 10, name = "deferredRebuild") final boolean deferredRebuild)
    {
        this.indexName = indexName;
        this.indexHandlerClass = indexHandlerClass;
        this.dbName = dbName;
        this.origTableName = origTableName;
        this.createTime = createTime;
        this.lastAccessTime = lastAccessTime;
        this.indexTableName = indexTableName;
        this.sd = sd;
        this.parameters = parameters;
        this.deferredRebuild = deferredRebuild;
    }

    public Index()
    {
    }

    private String indexName;

    @ThriftField(value = 1, name = "indexName")
    public String getIndexName()
    {
        return indexName;
    }

    public void setIndexName(final String indexName)
    {
        this.indexName = indexName;
    }

    private String indexHandlerClass;

    @ThriftField(value = 2, name = "indexHandlerClass")
    public String getIndexHandlerClass()
    {
        return indexHandlerClass;
    }

    public void setIndexHandlerClass(final String indexHandlerClass)
    {
        this.indexHandlerClass = indexHandlerClass;
    }

    private String dbName;

    @ThriftField(value = 3, name = "dbName")
    public String getDbName()
    {
        return dbName;
    }

    public void setDbName(final String dbName)
    {
        this.dbName = dbName;
    }

    private String origTableName;

    @ThriftField(value = 4, name = "origTableName")
    public String getOrigTableName()
    {
        return origTableName;
    }

    public void setOrigTableName(final String origTableName)
    {
        this.origTableName = origTableName;
    }

    private int createTime;

    @ThriftField(value = 5, name = "createTime")
    public int getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(final int createTime)
    {
        this.createTime = createTime;
    }

    private int lastAccessTime;

    @ThriftField(value = 6, name = "lastAccessTime")
    public int getLastAccessTime()
    {
        return lastAccessTime;
    }

    public void setLastAccessTime(final int lastAccessTime)
    {
        this.lastAccessTime = lastAccessTime;
    }

    private String indexTableName;

    @ThriftField(value = 7, name = "indexTableName")
    public String getIndexTableName()
    {
        return indexTableName;
    }

    public void setIndexTableName(final String indexTableName)
    {
        this.indexTableName = indexTableName;
    }

    private StorageDescriptor sd;

    @ThriftField(value = 8, name = "sd")
    public StorageDescriptor getSd()
    {
        return sd;
    }

    public void setSd(final StorageDescriptor sd)
    {
        this.sd = sd;
    }

    private Map<String, String> parameters;

    @ThriftField(value = 9, name = "parameters")
    public Map<String, String> getParameters()
    {
        return parameters;
    }

    public void setParameters(final Map<String, String> parameters)
    {
        this.parameters = parameters;
    }

    private boolean deferredRebuild;

    @ThriftField(value = 10, name = "deferredRebuild")
    public boolean isDeferredRebuild()
    {
        return deferredRebuild;
    }

    public void setDeferredRebuild(final boolean deferredRebuild)
    {
        this.deferredRebuild = deferredRebuild;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("indexName", indexName)
            .add("indexHandlerClass", indexHandlerClass)
            .add("dbName", dbName)
            .add("origTableName", origTableName)
            .add("createTime", createTime)
            .add("lastAccessTime", lastAccessTime)
            .add("indexTableName", indexTableName)
            .add("sd", sd)
            .add("parameters", parameters)
            .add("deferredRebuild", deferredRebuild)
            .toString();
    }
} @ThriftStruct("InvalidInputException")
public class InvalidInputException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public InvalidInputException(
                                 @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public InvalidInputException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
} @ThriftStruct("InvalidObjectException")
public class InvalidObjectException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public InvalidObjectException(
                                  @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public InvalidObjectException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
} @ThriftStruct("InvalidOperationException")
public class InvalidOperationException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public InvalidOperationException(
                                     @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public InvalidOperationException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
} @ThriftStruct("InvalidPartitionException")
public class InvalidPartitionException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public InvalidPartitionException(
                                     @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public InvalidPartitionException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
} @ThriftStruct("InvalidTableLinkDescriptionException")
public class InvalidTableLinkDescriptionException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public InvalidTableLinkDescriptionException(
                                                @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public InvalidTableLinkDescriptionException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
} @ThriftStruct("MetaException")
public class MetaException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public MetaException(@ThriftField(value = 1, name = "message") final String message)
    {
        super(message);
    }

    public MetaException(final Throwable t)
    {
        super(t);
    }

    public MetaException(final String message, final Throwable t)
    {
        super(message, t);
    }

    public MetaException()
    {
    }

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return super.getMessage();
    }
} @ThriftStruct("NoSuchObjectException")
public class NoSuchObjectException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public NoSuchObjectException(
                                 @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public NoSuchObjectException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
} @ThriftStruct("Partition")
public class Partition
{
    @ThriftConstructor
    public Partition(
                     @ThriftField(value = 1, name = "values") final List<String> values,
                     @ThriftField(value = 2, name = "dbName") final String dbName,
                     @ThriftField(value = 3, name = "tableName") final String tableName,
                     @ThriftField(value = 4, name = "createTime") final int createTime,
                     @ThriftField(value = 5, name = "lastAccessTime") final int lastAccessTime,
                     @ThriftField(value = 6, name = "sd") final StorageDescriptor sd,
                     @ThriftField(value = 7, name = "parameters") final Map<String, String> parameters,
                     @ThriftField(value = 8, name = "privileges") final PrincipalPrivilegeSet privileges,
                     @ThriftField(value = 9, name = "linkTarget") final PartitionIdentifier linkTarget,
                     @ThriftField(value = 10, name = "linkPartitions") final List<PartitionIdentifier> linkPartitions)
    {
        this.values = values;
        this.dbName = dbName;
        this.tableName = tableName;
        this.createTime = createTime;
        this.lastAccessTime = lastAccessTime;
        this.sd = sd;
        this.parameters = parameters;
        this.privileges = privileges;
        this.linkTarget = linkTarget;
        this.linkPartitions = linkPartitions;
    }

    public Partition()
    {
    }

    private List<String> values;

    @ThriftField(value = 1, name = "values")
    public List<String> getValues()
    {
        return values;
    }

    public void setValues(final List<String> values)
    {
        this.values = values;
    }

    private String dbName;

    @ThriftField(value = 2, name = "dbName")
    public String getDbName()
    {
        return dbName;
    }

    public void setDbName(final String dbName)
    {
        this.dbName = dbName;
    }

    private String tableName;

    @ThriftField(value = 3, name = "tableName")
    public String getTableName()
    {
        return tableName;
    }

    public void setTableName(final String tableName)
    {
        this.tableName = tableName;
    }

    private int createTime;

    @ThriftField(value = 4, name = "createTime")
    public int getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(final int createTime)
    {
        this.createTime = createTime;
    }

    private int lastAccessTime;

    @ThriftField(value = 5, name = "lastAccessTime")
    public int getLastAccessTime()
    {
        return lastAccessTime;
    }

    public void setLastAccessTime(final int lastAccessTime)
    {
        this.lastAccessTime = lastAccessTime;
    }

    private StorageDescriptor sd;

    @ThriftField(value = 6, name = "sd")
    public StorageDescriptor getSd()
    {
        return sd;
    }

    public void setSd(final StorageDescriptor sd)
    {
        this.sd = sd;
    }

    private Map<String, String> parameters;

    @ThriftField(value = 7, name = "parameters")
    public Map<String, String> getParameters()
    {
        return parameters;
    }

    public void setParameters(final Map<String, String> parameters)
    {
        this.parameters = parameters;
    }

    private PrincipalPrivilegeSet privileges;

    @ThriftField(value = 8, name = "privileges")
    public PrincipalPrivilegeSet getPrivileges()
    {
        return privileges;
    }

    public void setPrivileges(final PrincipalPrivilegeSet privileges)
    {
        this.privileges = privileges;
    }

    private PartitionIdentifier linkTarget;

    @ThriftField(value = 9, name = "linkTarget")
    public PartitionIdentifier getLinkTarget()
    {
        return linkTarget;
    }

    public void setLinkTarget(final PartitionIdentifier linkTarget)
    {
        this.linkTarget = linkTarget;
    }

    private List<PartitionIdentifier> linkPartitions;

    @ThriftField(value = 10, name = "linkPartitions")
    public List<PartitionIdentifier> getLinkPartitions()
    {
        return linkPartitions;
    }

    public void setLinkPartitions(final List<PartitionIdentifier> linkPartitions)
    {
        this.linkPartitions = linkPartitions;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("values", values)
            .add("dbName", dbName)
            .add("tableName", tableName)
            .add("createTime", createTime)
            .add("lastAccessTime", lastAccessTime)
            .add("sd", sd)
            .add("parameters", parameters)
            .add("privileges", privileges)
            .add("linkTarget", linkTarget)
            .add("linkPartitions", linkPartitions)
            .toString();
    }
} public enum PartitionEventType
{
    LOAD__DONE(1);

    private final int value;

    PartitionEventType(final int value)
    {
        this.value = value;
    }

    @ThriftEnumValue
    public int getValue()
    {
        return value;
    }
} @ThriftStruct("PrincipalPrivilegeSet")
public class PrincipalPrivilegeSet
{
    @ThriftConstructor
    public PrincipalPrivilegeSet(
                                 @ThriftField(value = 1, name = "userPrivileges") final Map<String, List<PrivilegeGrantInfo>> userPrivileges,
                                 @ThriftField(value = 2, name = "groupPrivileges") final Map<String, List<PrivilegeGrantInfo>> groupPrivileges,
                                 @ThriftField(value = 3, name = "rolePrivileges") final Map<String, List<PrivilegeGrantInfo>> rolePrivileges)
    {
        this.userPrivileges = userPrivileges;
        this.groupPrivileges = groupPrivileges;
        this.rolePrivileges = rolePrivileges;
    }

    public PrincipalPrivilegeSet()
    {
    }

    private Map<String, List<PrivilegeGrantInfo>> userPrivileges;

    @ThriftField(value = 1, name = "userPrivileges")
    public Map<String, List<PrivilegeGrantInfo>> getUserPrivileges()
    {
        return userPrivileges;
    }

    public void setUserPrivileges(final Map<String, List<PrivilegeGrantInfo>> userPrivileges)
    {
        this.userPrivileges = userPrivileges;
    }

    private Map<String, List<PrivilegeGrantInfo>> groupPrivileges;

    @ThriftField(value = 2, name = "groupPrivileges")
    public Map<String, List<PrivilegeGrantInfo>> getGroupPrivileges()
    {
        return groupPrivileges;
    }

    public void setGroupPrivileges(final Map<String, List<PrivilegeGrantInfo>> groupPrivileges)
    {
        this.groupPrivileges = groupPrivileges;
    }

    private Map<String, List<PrivilegeGrantInfo>> rolePrivileges;

    @ThriftField(value = 3, name = "rolePrivileges")
    public Map<String, List<PrivilegeGrantInfo>> getRolePrivileges()
    {
        return rolePrivileges;
    }

    public void setRolePrivileges(final Map<String, List<PrivilegeGrantInfo>> rolePrivileges)
    {
        this.rolePrivileges = rolePrivileges;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("userPrivileges", userPrivileges)
            .add("groupPrivileges", groupPrivileges)
            .add("rolePrivileges", rolePrivileges)
            .toString();
    }
} public enum PrincipalType
{
    USER(1), ROLE(2), GROUP(3);

    private final int value;

    PrincipalType(final int value)
    {
        this.value = value;
    }

    @ThriftEnumValue
    public int getValue()
    {
        return value;
    }
} @ThriftStruct("PrivilegeBag")
public class PrivilegeBag
{
    @ThriftConstructor
    public PrivilegeBag(
                        @ThriftField(value = 1, name = "privileges") final List<HiveObjectPrivilege> privileges)
    {
        this.privileges = privileges;
    }

    public PrivilegeBag()
    {
    }

    private List<HiveObjectPrivilege> privileges;

    @ThriftField(value = 1, name = "privileges")
    public List<HiveObjectPrivilege> getPrivileges()
    {
        return privileges;
    }

    public void setPrivileges(final List<HiveObjectPrivilege> privileges)
    {
        this.privileges = privileges;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("privileges", privileges)
            .toString();
    }
} @ThriftStruct("Role")
public class Role
{
    @ThriftConstructor
    public Role(
                @ThriftField(value = 1, name = "roleName") final String roleName,
                @ThriftField(value = 2, name = "createTime") final int createTime,
                @ThriftField(value = 3, name = "ownerName") final String ownerName)
    {
        this.roleName = roleName;
        this.createTime = createTime;
        this.ownerName = ownerName;
    }

    public Role()
    {
    }

    private String roleName;

    @ThriftField(value = 1, name = "roleName")
    public String getRoleName()
    {
        return roleName;
    }

    public void setRoleName(final String roleName)
    {
        this.roleName = roleName;
    }

    private int createTime;

    @ThriftField(value = 2, name = "createTime")
    public int getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(final int createTime)
    {
        this.createTime = createTime;
    }

    private String ownerName;

    @ThriftField(value = 3, name = "ownerName")
    public String getOwnerName()
    {
        return ownerName;
    }

    public void setOwnerName(final String ownerName)
    {
        this.ownerName = ownerName;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("roleName", roleName)
            .add("createTime", createTime)
            .add("ownerName", ownerName)
            .toString();
    }
} @ThriftStruct("Table")
public class Table
{
    @ThriftConstructor
    public Table(
                 @ThriftField(value = 1, name = "tableName") final String tableName,
                 @ThriftField(value = 2, name = "dbName") final String dbName,
                 @ThriftField(value = 3, name = "owner") final String owner,
                 @ThriftField(value = 4, name = "createTime") final int createTime,
                 @ThriftField(value = 5, name = "lastAccessTime") final int lastAccessTime,
                 @ThriftField(value = 6, name = "retention") final int retention,
                 @ThriftField(value = 7, name = "sd") final StorageDescriptor sd,
                 @ThriftField(value = 8, name = "partitionKeys") final List<FieldSchema> partitionKeys,
                 @ThriftField(value = 9, name = "parameters") final Map<String, String> parameters,
                 @ThriftField(value = 10, name = "viewOriginalText") final String viewOriginalText,
                 @ThriftField(value = 11, name = "viewExpandedText") final String viewExpandedText,
                 @ThriftField(value = 12, name = "tableType") final String tableType,
                 @ThriftField(value = 13, name = "privileges") final PrincipalPrivilegeSet privileges,
                 @ThriftField(value = 14, name = "linkTarget") final TableIdentifier linkTarget,
                 @ThriftField(value = 15, name = "linkTables") final List<TableIdentifier> linkTables)
    {
        this.tableName = tableName;
        this.dbName = dbName;
        this.owner = owner;
        this.createTime = createTime;
        this.lastAccessTime = lastAccessTime;
        this.retention = retention;
        this.sd = sd;
        this.partitionKeys = partitionKeys;
        this.parameters = parameters;
        this.viewOriginalText = viewOriginalText;
        this.viewExpandedText = viewExpandedText;
        this.tableType = tableType;
        this.privileges = privileges;
        this.linkTarget = linkTarget;
        this.linkTables = linkTables;
    }

    public Table()
    {
    }

    private String tableName;

    @ThriftField(value = 1, name = "tableName")
    public String getTableName()
    {
        return tableName;
    }

    public void setTableName(final String tableName)
    {
        this.tableName = tableName;
    }

    private String dbName;

    @ThriftField(value = 2, name = "dbName")
    public String getDbName()
    {
        return dbName;
    }

    public void setDbName(final String dbName)
    {
        this.dbName = dbName;
    }

    private String owner;

    @ThriftField(value = 3, name = "owner")
    public String getOwner()
    {
        return owner;
    }

    public void setOwner(final String owner)
    {
        this.owner = owner;
    }

    private int createTime;

    @ThriftField(value = 4, name = "createTime")
    public int getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(final int createTime)
    {
        this.createTime = createTime;
    }

    private int lastAccessTime;

    @ThriftField(value = 5, name = "lastAccessTime")
    public int getLastAccessTime()
    {
        return lastAccessTime;
    }

    public void setLastAccessTime(final int lastAccessTime)
    {
        this.lastAccessTime = lastAccessTime;
    }

    private int retention;

    @ThriftField(value = 6, name = "retention")
    public int getRetention()
    {
        return retention;
    }

    public void setRetention(final int retention)
    {
        this.retention = retention;
    }

    private StorageDescriptor sd;

    @ThriftField(value = 7, name = "sd")
    public StorageDescriptor getSd()
    {
        return sd;
    }

    public void setSd(final StorageDescriptor sd)
    {
        this.sd = sd;
    }

    private List<FieldSchema> partitionKeys;

    @ThriftField(value = 8, name = "partitionKeys")
    public List<FieldSchema> getPartitionKeys()
    {
        return partitionKeys;
    }

    public void setPartitionKeys(final List<FieldSchema> partitionKeys)
    {
        this.partitionKeys = partitionKeys;
    }

    private Map<String, String> parameters;

    @ThriftField(value = 9, name = "parameters")
    public Map<String, String> getParameters()
    {
        return parameters;
    }

    public void setParameters(final Map<String, String> parameters)
    {
        this.parameters = parameters;
    }

    private String viewOriginalText;

    @ThriftField(value = 10, name = "viewOriginalText")
    public String getViewOriginalText()
    {
        return viewOriginalText;
    }

    public void setViewOriginalText(final String viewOriginalText)
    {
        this.viewOriginalText = viewOriginalText;
    }

    private String viewExpandedText;

    @ThriftField(value = 11, name = "viewExpandedText")
    public String getViewExpandedText()
    {
        return viewExpandedText;
    }

    public void setViewExpandedText(final String viewExpandedText)
    {
        this.viewExpandedText = viewExpandedText;
    }

    private String tableType;

    @ThriftField(value = 12, name = "tableType")
    public String getTableType()
    {
        return tableType;
    }

    public void setTableType(final String tableType)
    {
        this.tableType = tableType;
    }

    private PrincipalPrivilegeSet privileges;

    @ThriftField(value = 13, name = "privileges")
    public PrincipalPrivilegeSet getPrivileges()
    {
        return privileges;
    }

    public void setPrivileges(final PrincipalPrivilegeSet privileges)
    {
        this.privileges = privileges;
    }

    private TableIdentifier linkTarget;

    @ThriftField(value = 14, name = "linkTarget")
    public TableIdentifier getLinkTarget()
    {
        return linkTarget;
    }

    public void setLinkTarget(final TableIdentifier linkTarget)
    {
        this.linkTarget = linkTarget;
    }

    private List<TableIdentifier> linkTables;

    @ThriftField(value = 15, name = "linkTables")
    public List<TableIdentifier> getLinkTables()
    {
        return linkTables;
    }

    public void setLinkTables(final List<TableIdentifier> linkTables)
    {
        this.linkTables = linkTables;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("tableName", tableName)
            .add("dbName", dbName)
            .add("owner", owner)
            .add("createTime", createTime)
            .add("lastAccessTime", lastAccessTime)
            .add("retention", retention)
            .add("sd", sd)
            .add("partitionKeys", partitionKeys)
            .add("parameters", parameters)
            .add("viewOriginalText", viewOriginalText)
            .add("viewExpandedText", viewExpandedText)
            .add("tableType", tableType)
            .add("privileges", privileges)
            .add("linkTarget", linkTarget)
            .add("linkTables", linkTables)
            .toString();
    }
} @ThriftStruct("Type")
public class Type
{
    @ThriftConstructor
    public Type(
                @ThriftField(value = 1, name = "name") final String name,
                @ThriftField(value = 2, name = "type1") final String type1,
                @ThriftField(value = 3, name = "type2") final String type2,
                @ThriftField(value = 4, name = "fields") final List<FieldSchema> fields)
    {
        this.name = name;
        this.type1 = type1;
        this.type2 = type2;
        this.fields = fields;
    }

    public Type()
    {
    }

    private String name;

    @ThriftField(value = 1, name = "name")
    public String getName()
    {
        return name;
    }

    public void setName(final String name)
    {
        this.name = name;
    }

    private String type1;

    @ThriftField(value = 2, name = "type1")
    public String getType1()
    {
        return type1;
    }

    public void setType1(final String type1)
    {
        this.type1 = type1;
    }

    private String type2;

    @ThriftField(value = 3, name = "type2")
    public String getType2()
    {
        return type2;
    }

    public void setType2(final String type2)
    {
        this.type2 = type2;
    }

    private List<FieldSchema> fields;

    @ThriftField(value = 4, name = "fields")
    public List<FieldSchema> getFields()
    {
        return fields;
    }

    public void setFields(final List<FieldSchema> fields)
    {
        this.fields = fields;
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
            .add("name", name)
            .add("type1", type1)
            .add("type2", type2)
            .add("fields", fields)
            .toString();
    }
} @ThriftStruct("UnknownDBException")
public class UnknownDBException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public UnknownDBException(
                              @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public UnknownDBException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
} @ThriftStruct("UnknownPartitionException")
public class UnknownPartitionException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public UnknownPartitionException(
                                     @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public UnknownPartitionException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
} @ThriftStruct("UnknownTableException")
public class UnknownTableException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    @ThriftConstructor
    public UnknownTableException(
                                 @ThriftField(value = 1, name = "message") final String message)
    {
        this.message = message;
    }

    public UnknownTableException()
    {
    }

    private String message;

    @Override
    @ThriftField(value = 1, name = "message")
    public String getMessage()
    {
        return message;
    }

    public void setMessage(final String message)
    {
        this.message = message;
    }
}
import com.facebook.hive.metastore.client.HiveMetastore;
import org.apache.hadoop.hive.metastore.api.AlreadyExistsException;
import org.apache.hadoop.hive.metastore.api.ColumnStatistics;
import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException;
import org.apache.hadoop.hive.metastore.api.Database;
import org.apache.hadoop.hive.metastore.api.EnvironmentContext;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege;
import org.apache.hadoop.hive.metastore.api.HiveObjectRef;
import org.apache.hadoop.hive.metastore.api.Index;
import org.apache.hadoop.hive.metastore.api.InvalidInputException;
import org.apache.hadoop.hive.metastore.api.InvalidObjectException;
import org.apache.hadoop.hive.metastore.api.InvalidOperationException;
import org.apache.hadoop.hive.metastore.api.InvalidPartitionException;
import org.apache.hadoop.hive.metastore.api.InvalidTableLinkDescriptionException;
import org.apache.hadoop.hive.metastore.api.MetaException;
import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
import org.apache.hadoop.hive.metastore.api.Partition;
import org.apache.hadoop.hive.metastore.api.PartitionEventType;
import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet;
import org.apache.hadoop.hive.metastore.api.PrincipalType;
import org.apache.hadoop.hive.metastore.api.PrivilegeBag;
import org.apache.hadoop.hive.metastore.api.Role;
import org.apache.hadoop.hive.metastore.api.Table;
import org.apache.hadoop.hive.metastore.api.Type;
import org.apache.hadoop.hive.metastore.api.UnknownDBException;
import org.apache.hadoop.hive.metastore.api.UnknownPartitionException;
import org.apache.hadoop.hive.metastore.api.UnknownTableException;
import org.apache.thrift.TException;
import java.io.Closeable;
import java.util.List;
import java.util.Map;
import static com.google.common.base.Preconditions.checkNotNull;
/*
 * Copyright (C) 2013 Facebook, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may
 * not use this file except in compliance with the License. You may obtain
 * a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
package com.facebook.hive.metastore.api;





/**
 * Identical to the old ThriftMetaStore.Iface class generated by the IDL compiler.
 */
public interface ThriftHiveMetastore extends Closeable
{
    void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException;

    Database get_database(String name) throws NoSuchObjectException, MetaException, TException;

    void drop_database(String name, boolean deleteData, boolean cascade) throws NoSuchObjectException, InvalidOperationException, MetaException, TException;

    List<String> get_databases(String pattern) throws MetaException, TException;

    List<String> get_all_databases() throws MetaException, TException;

    void alter_database(String dbname, Database db) throws MetaException, NoSuchObjectException, TException;

    Type get_type(String name) throws MetaException, NoSuchObjectException, TException;