/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Glue { namespace Model { /** *

The Database object represents a logical grouping of tables that * might reside in a Hive metastore or an RDBMS.

See Also:

AWS API * Reference

*/ class Database { public: AWS_GLUE_API Database(); AWS_GLUE_API Database(Aws::Utils::Json::JsonView jsonValue); AWS_GLUE_API Database& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_GLUE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the database. For Hive compatibility, this is folded to lowercase * when it is stored.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the database. For Hive compatibility, this is folded to lowercase * when it is stored.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the database. For Hive compatibility, this is folded to lowercase * when it is stored.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the database. For Hive compatibility, this is folded to lowercase * when it is stored.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the database. For Hive compatibility, this is folded to lowercase * when it is stored.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the database. For Hive compatibility, this is folded to lowercase * when it is stored.

*/ inline Database& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the database. For Hive compatibility, this is folded to lowercase * when it is stored.

*/ inline Database& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the database. For Hive compatibility, this is folded to lowercase * when it is stored.

*/ inline Database& WithName(const char* value) { SetName(value); return *this;} /** *

A description of the database.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the database.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description of the database.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description of the database.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description of the database.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description of the database.

*/ inline Database& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the database.

*/ inline Database& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the database.

*/ inline Database& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The location of the database (for example, an HDFS path).

*/ inline const Aws::String& GetLocationUri() const{ return m_locationUri; } /** *

The location of the database (for example, an HDFS path).

*/ inline bool LocationUriHasBeenSet() const { return m_locationUriHasBeenSet; } /** *

The location of the database (for example, an HDFS path).

*/ inline void SetLocationUri(const Aws::String& value) { m_locationUriHasBeenSet = true; m_locationUri = value; } /** *

The location of the database (for example, an HDFS path).

*/ inline void SetLocationUri(Aws::String&& value) { m_locationUriHasBeenSet = true; m_locationUri = std::move(value); } /** *

The location of the database (for example, an HDFS path).

*/ inline void SetLocationUri(const char* value) { m_locationUriHasBeenSet = true; m_locationUri.assign(value); } /** *

The location of the database (for example, an HDFS path).

*/ inline Database& WithLocationUri(const Aws::String& value) { SetLocationUri(value); return *this;} /** *

The location of the database (for example, an HDFS path).

*/ inline Database& WithLocationUri(Aws::String&& value) { SetLocationUri(std::move(value)); return *this;} /** *

The location of the database (for example, an HDFS path).

*/ inline Database& WithLocationUri(const char* value) { SetLocationUri(value); return *this;} /** *

These key-value pairs define parameters and properties of the database.

*/ inline const Aws::Map& GetParameters() const{ return m_parameters; } /** *

These key-value pairs define parameters and properties of the database.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

These key-value pairs define parameters and properties of the database.

*/ inline void SetParameters(const Aws::Map& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

These key-value pairs define parameters and properties of the database.

*/ inline void SetParameters(Aws::Map&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

These key-value pairs define parameters and properties of the database.

*/ inline Database& WithParameters(const Aws::Map& value) { SetParameters(value); return *this;} /** *

These key-value pairs define parameters and properties of the database.

*/ inline Database& WithParameters(Aws::Map&& value) { SetParameters(std::move(value)); return *this;} /** *

These key-value pairs define parameters and properties of the database.

*/ inline Database& AddParameters(const Aws::String& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } /** *

These key-value pairs define parameters and properties of the database.

*/ inline Database& AddParameters(Aws::String&& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

These key-value pairs define parameters and properties of the database.

*/ inline Database& AddParameters(const Aws::String& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

These key-value pairs define parameters and properties of the database.

*/ inline Database& AddParameters(Aws::String&& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), std::move(value)); return *this; } /** *

These key-value pairs define parameters and properties of the database.

*/ inline Database& AddParameters(const char* key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

These key-value pairs define parameters and properties of the database.

*/ inline Database& AddParameters(Aws::String&& key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

These key-value pairs define parameters and properties of the database.

*/ inline Database& AddParameters(const char* key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } /** *

The time at which the metadata database was created in the catalog.

*/ inline const Aws::Utils::DateTime& GetCreateTime() const{ return m_createTime; } /** *

The time at which the metadata database was created in the catalog.

*/ inline bool CreateTimeHasBeenSet() const { return m_createTimeHasBeenSet; } /** *

The time at which the metadata database was created in the catalog.

*/ inline void SetCreateTime(const Aws::Utils::DateTime& value) { m_createTimeHasBeenSet = true; m_createTime = value; } /** *

The time at which the metadata database was created in the catalog.

*/ inline void SetCreateTime(Aws::Utils::DateTime&& value) { m_createTimeHasBeenSet = true; m_createTime = std::move(value); } /** *

The time at which the metadata database was created in the catalog.

*/ inline Database& WithCreateTime(const Aws::Utils::DateTime& value) { SetCreateTime(value); return *this;} /** *

The time at which the metadata database was created in the catalog.

*/ inline Database& WithCreateTime(Aws::Utils::DateTime&& value) { SetCreateTime(std::move(value)); return *this;} /** *

Creates a set of default permissions on the table for principals. Used by * Lake Formation. Not used in the normal course of Glue operations.

*/ inline const Aws::Vector& GetCreateTableDefaultPermissions() const{ return m_createTableDefaultPermissions; } /** *

Creates a set of default permissions on the table for principals. Used by * Lake Formation. Not used in the normal course of Glue operations.

*/ inline bool CreateTableDefaultPermissionsHasBeenSet() const { return m_createTableDefaultPermissionsHasBeenSet; } /** *

Creates a set of default permissions on the table for principals. Used by * Lake Formation. Not used in the normal course of Glue operations.

*/ inline void SetCreateTableDefaultPermissions(const Aws::Vector& value) { m_createTableDefaultPermissionsHasBeenSet = true; m_createTableDefaultPermissions = value; } /** *

Creates a set of default permissions on the table for principals. Used by * Lake Formation. Not used in the normal course of Glue operations.

*/ inline void SetCreateTableDefaultPermissions(Aws::Vector&& value) { m_createTableDefaultPermissionsHasBeenSet = true; m_createTableDefaultPermissions = std::move(value); } /** *

Creates a set of default permissions on the table for principals. Used by * Lake Formation. Not used in the normal course of Glue operations.

*/ inline Database& WithCreateTableDefaultPermissions(const Aws::Vector& value) { SetCreateTableDefaultPermissions(value); return *this;} /** *

Creates a set of default permissions on the table for principals. Used by * Lake Formation. Not used in the normal course of Glue operations.

*/ inline Database& WithCreateTableDefaultPermissions(Aws::Vector&& value) { SetCreateTableDefaultPermissions(std::move(value)); return *this;} /** *

Creates a set of default permissions on the table for principals. Used by * Lake Formation. Not used in the normal course of Glue operations.

*/ inline Database& AddCreateTableDefaultPermissions(const PrincipalPermissions& value) { m_createTableDefaultPermissionsHasBeenSet = true; m_createTableDefaultPermissions.push_back(value); return *this; } /** *

Creates a set of default permissions on the table for principals. Used by * Lake Formation. Not used in the normal course of Glue operations.

*/ inline Database& AddCreateTableDefaultPermissions(PrincipalPermissions&& value) { m_createTableDefaultPermissionsHasBeenSet = true; m_createTableDefaultPermissions.push_back(std::move(value)); return *this; } /** *

A DatabaseIdentifier structure that describes a target database * for resource linking.

*/ inline const DatabaseIdentifier& GetTargetDatabase() const{ return m_targetDatabase; } /** *

A DatabaseIdentifier structure that describes a target database * for resource linking.

*/ inline bool TargetDatabaseHasBeenSet() const { return m_targetDatabaseHasBeenSet; } /** *

A DatabaseIdentifier structure that describes a target database * for resource linking.

*/ inline void SetTargetDatabase(const DatabaseIdentifier& value) { m_targetDatabaseHasBeenSet = true; m_targetDatabase = value; } /** *

A DatabaseIdentifier structure that describes a target database * for resource linking.

*/ inline void SetTargetDatabase(DatabaseIdentifier&& value) { m_targetDatabaseHasBeenSet = true; m_targetDatabase = std::move(value); } /** *

A DatabaseIdentifier structure that describes a target database * for resource linking.

*/ inline Database& WithTargetDatabase(const DatabaseIdentifier& value) { SetTargetDatabase(value); return *this;} /** *

A DatabaseIdentifier structure that describes a target database * for resource linking.

*/ inline Database& WithTargetDatabase(DatabaseIdentifier&& value) { SetTargetDatabase(std::move(value)); return *this;} /** *

The ID of the Data Catalog in which the database resides.

*/ inline const Aws::String& GetCatalogId() const{ return m_catalogId; } /** *

The ID of the Data Catalog in which the database resides.

*/ inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; } /** *

The ID of the Data Catalog in which the database resides.

*/ inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; } /** *

The ID of the Data Catalog in which the database resides.

*/ inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); } /** *

The ID of the Data Catalog in which the database resides.

*/ inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); } /** *

The ID of the Data Catalog in which the database resides.

*/ inline Database& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;} /** *

The ID of the Data Catalog in which the database resides.

*/ inline Database& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;} /** *

The ID of the Data Catalog in which the database resides.

*/ inline Database& WithCatalogId(const char* value) { SetCatalogId(value); return *this;} /** *

A FederatedDatabase structure that references an entity outside * the Glue Data Catalog.

*/ inline const FederatedDatabase& GetFederatedDatabase() const{ return m_federatedDatabase; } /** *

A FederatedDatabase structure that references an entity outside * the Glue Data Catalog.

*/ inline bool FederatedDatabaseHasBeenSet() const { return m_federatedDatabaseHasBeenSet; } /** *

A FederatedDatabase structure that references an entity outside * the Glue Data Catalog.

*/ inline void SetFederatedDatabase(const FederatedDatabase& value) { m_federatedDatabaseHasBeenSet = true; m_federatedDatabase = value; } /** *

A FederatedDatabase structure that references an entity outside * the Glue Data Catalog.

*/ inline void SetFederatedDatabase(FederatedDatabase&& value) { m_federatedDatabaseHasBeenSet = true; m_federatedDatabase = std::move(value); } /** *

A FederatedDatabase structure that references an entity outside * the Glue Data Catalog.

*/ inline Database& WithFederatedDatabase(const FederatedDatabase& value) { SetFederatedDatabase(value); return *this;} /** *

A FederatedDatabase structure that references an entity outside * the Glue Data Catalog.

*/ inline Database& WithFederatedDatabase(FederatedDatabase&& value) { SetFederatedDatabase(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_locationUri; bool m_locationUriHasBeenSet = false; Aws::Map m_parameters; bool m_parametersHasBeenSet = false; Aws::Utils::DateTime m_createTime; bool m_createTimeHasBeenSet = false; Aws::Vector m_createTableDefaultPermissions; bool m_createTableDefaultPermissionsHasBeenSet = false; DatabaseIdentifier m_targetDatabase; bool m_targetDatabaseHasBeenSet = false; Aws::String m_catalogId; bool m_catalogIdHasBeenSet = false; FederatedDatabase m_federatedDatabase; bool m_federatedDatabaseHasBeenSet = false; }; } // namespace Model } // namespace Glue } // namespace Aws