// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function lakeformationPermissionsDataLocationToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        arn: cdktf.stringToTerraform(struct.arn),
        catalog_id: cdktf.stringToTerraform(struct.catalogId),
    };
}
export class LakeformationPermissionsDataLocationOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._arn !== undefined) {
            hasAnyValues = true;
            internalValueResult.arn = this._arn;
        }
        if (this._catalogId !== undefined) {
            hasAnyValues = true;
            internalValueResult.catalogId = this._catalogId;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._arn = undefined;
            this._catalogId = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._arn = value.arn;
            this._catalogId = value.catalogId;
        }
    }
    // arn - computed: false, optional: false, required: true
    _arn;
    get arn() {
        return this.getStringAttribute('arn');
    }
    set arn(value) {
        this._arn = value;
    }
    // Temporarily expose input value. Use with caution.
    get arnInput() {
        return this._arn;
    }
    // catalog_id - computed: true, optional: true, required: false
    _catalogId;
    get catalogId() {
        return this.getStringAttribute('catalog_id');
    }
    set catalogId(value) {
        this._catalogId = value;
    }
    resetCatalogId() {
        this._catalogId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get catalogIdInput() {
        return this._catalogId;
    }
}
export function lakeformationPermissionsDatabaseToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        catalog_id: cdktf.stringToTerraform(struct.catalogId),
        name: cdktf.stringToTerraform(struct.name),
    };
}
export class LakeformationPermissionsDatabaseOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._catalogId !== undefined) {
            hasAnyValues = true;
            internalValueResult.catalogId = this._catalogId;
        }
        if (this._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._catalogId = undefined;
            this._name = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._catalogId = value.catalogId;
            this._name = value.name;
        }
    }
    // catalog_id - computed: true, optional: true, required: false
    _catalogId;
    get catalogId() {
        return this.getStringAttribute('catalog_id');
    }
    set catalogId(value) {
        this._catalogId = value;
    }
    resetCatalogId() {
        this._catalogId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get catalogIdInput() {
        return this._catalogId;
    }
    // name - computed: false, optional: false, required: true
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
}
export function lakeformationPermissionsTableToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        catalog_id: cdktf.stringToTerraform(struct.catalogId),
        database_name: cdktf.stringToTerraform(struct.databaseName),
        name: cdktf.stringToTerraform(struct.name),
        wildcard: cdktf.booleanToTerraform(struct.wildcard),
    };
}
export class LakeformationPermissionsTableOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._catalogId !== undefined) {
            hasAnyValues = true;
            internalValueResult.catalogId = this._catalogId;
        }
        if (this._databaseName !== undefined) {
            hasAnyValues = true;
            internalValueResult.databaseName = this._databaseName;
        }
        if (this._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        if (this._wildcard !== undefined) {
            hasAnyValues = true;
            internalValueResult.wildcard = this._wildcard;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._catalogId = undefined;
            this._databaseName = undefined;
            this._name = undefined;
            this._wildcard = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._catalogId = value.catalogId;
            this._databaseName = value.databaseName;
            this._name = value.name;
            this._wildcard = value.wildcard;
        }
    }
    // catalog_id - computed: true, optional: true, required: false
    _catalogId;
    get catalogId() {
        return this.getStringAttribute('catalog_id');
    }
    set catalogId(value) {
        this._catalogId = value;
    }
    resetCatalogId() {
        this._catalogId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get catalogIdInput() {
        return this._catalogId;
    }
    // database_name - computed: false, optional: false, required: true
    _databaseName;
    get databaseName() {
        return this.getStringAttribute('database_name');
    }
    set databaseName(value) {
        this._databaseName = value;
    }
    // Temporarily expose input value. Use with caution.
    get databaseNameInput() {
        return this._databaseName;
    }
    // name - computed: true, optional: true, required: false
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    resetName() {
        this._name = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // wildcard - computed: false, optional: true, required: false
    _wildcard;
    get wildcard() {
        return this.getBooleanAttribute('wildcard');
    }
    set wildcard(value) {
        this._wildcard = value;
    }
    resetWildcard() {
        this._wildcard = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get wildcardInput() {
        return this._wildcard;
    }
}
export function lakeformationPermissionsTableWithColumnsToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        catalog_id: cdktf.stringToTerraform(struct.catalogId),
        column_names: cdktf.listMapper(cdktf.stringToTerraform)(struct.columnNames),
        database_name: cdktf.stringToTerraform(struct.databaseName),
        excluded_column_names: cdktf.listMapper(cdktf.stringToTerraform)(struct.excludedColumnNames),
        name: cdktf.stringToTerraform(struct.name),
        wildcard: cdktf.booleanToTerraform(struct.wildcard),
    };
}
export class LakeformationPermissionsTableWithColumnsOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._catalogId !== undefined) {
            hasAnyValues = true;
            internalValueResult.catalogId = this._catalogId;
        }
        if (this._columnNames !== undefined) {
            hasAnyValues = true;
            internalValueResult.columnNames = this._columnNames;
        }
        if (this._databaseName !== undefined) {
            hasAnyValues = true;
            internalValueResult.databaseName = this._databaseName;
        }
        if (this._excludedColumnNames !== undefined) {
            hasAnyValues = true;
            internalValueResult.excludedColumnNames = this._excludedColumnNames;
        }
        if (this._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        if (this._wildcard !== undefined) {
            hasAnyValues = true;
            internalValueResult.wildcard = this._wildcard;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._catalogId = undefined;
            this._columnNames = undefined;
            this._databaseName = undefined;
            this._excludedColumnNames = undefined;
            this._name = undefined;
            this._wildcard = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._catalogId = value.catalogId;
            this._columnNames = value.columnNames;
            this._databaseName = value.databaseName;
            this._excludedColumnNames = value.excludedColumnNames;
            this._name = value.name;
            this._wildcard = value.wildcard;
        }
    }
    // catalog_id - computed: true, optional: true, required: false
    _catalogId;
    get catalogId() {
        return this.getStringAttribute('catalog_id');
    }
    set catalogId(value) {
        this._catalogId = value;
    }
    resetCatalogId() {
        this._catalogId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get catalogIdInput() {
        return this._catalogId;
    }
    // column_names - computed: false, optional: true, required: false
    _columnNames;
    get columnNames() {
        return cdktf.Fn.tolist(this.getListAttribute('column_names'));
    }
    set columnNames(value) {
        this._columnNames = value;
    }
    resetColumnNames() {
        this._columnNames = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get columnNamesInput() {
        return this._columnNames;
    }
    // database_name - computed: false, optional: false, required: true
    _databaseName;
    get databaseName() {
        return this.getStringAttribute('database_name');
    }
    set databaseName(value) {
        this._databaseName = value;
    }
    // Temporarily expose input value. Use with caution.
    get databaseNameInput() {
        return this._databaseName;
    }
    // excluded_column_names - computed: false, optional: true, required: false
    _excludedColumnNames;
    get excludedColumnNames() {
        return cdktf.Fn.tolist(this.getListAttribute('excluded_column_names'));
    }
    set excludedColumnNames(value) {
        this._excludedColumnNames = value;
    }
    resetExcludedColumnNames() {
        this._excludedColumnNames = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get excludedColumnNamesInput() {
        return this._excludedColumnNames;
    }
    // name - computed: false, optional: false, required: true
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // wildcard - computed: false, optional: true, required: false
    _wildcard;
    get wildcard() {
        return this.getBooleanAttribute('wildcard');
    }
    set wildcard(value) {
        this._wildcard = value;
    }
    resetWildcard() {
        this._wildcard = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get wildcardInput() {
        return this._wildcard;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/lakeformation_permissions aws_lakeformation_permissions}
*/
export class LakeformationPermissions extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_lakeformation_permissions";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/lakeformation_permissions aws_lakeformation_permissions} Resource
    *
    * @param scope The scope in which to define this construct
    * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
    * @param options LakeformationPermissionsConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_lakeformation_permissions',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._catalogId = config.catalogId;
        this._catalogResource = config.catalogResource;
        this._permissions = config.permissions;
        this._permissionsWithGrantOption = config.permissionsWithGrantOption;
        this._principal = config.principal;
        this._dataLocation.internalValue = config.dataLocation;
        this._database.internalValue = config.database;
        this._table.internalValue = config.table;
        this._tableWithColumns.internalValue = config.tableWithColumns;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // catalog_id - computed: false, optional: true, required: false
    _catalogId;
    get catalogId() {
        return this.getStringAttribute('catalog_id');
    }
    set catalogId(value) {
        this._catalogId = value;
    }
    resetCatalogId() {
        this._catalogId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get catalogIdInput() {
        return this._catalogId;
    }
    // catalog_resource - computed: false, optional: true, required: false
    _catalogResource;
    get catalogResource() {
        return this.getBooleanAttribute('catalog_resource');
    }
    set catalogResource(value) {
        this._catalogResource = value;
    }
    resetCatalogResource() {
        this._catalogResource = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get catalogResourceInput() {
        return this._catalogResource;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // permissions - computed: false, optional: false, required: true
    _permissions;
    get permissions() {
        return this.getListAttribute('permissions');
    }
    set permissions(value) {
        this._permissions = value;
    }
    // Temporarily expose input value. Use with caution.
    get permissionsInput() {
        return this._permissions;
    }
    // permissions_with_grant_option - computed: true, optional: true, required: false
    _permissionsWithGrantOption;
    get permissionsWithGrantOption() {
        return this.getListAttribute('permissions_with_grant_option');
    }
    set permissionsWithGrantOption(value) {
        this._permissionsWithGrantOption = value;
    }
    resetPermissionsWithGrantOption() {
        this._permissionsWithGrantOption = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get permissionsWithGrantOptionInput() {
        return this._permissionsWithGrantOption;
    }
    // principal - computed: false, optional: false, required: true
    _principal;
    get principal() {
        return this.getStringAttribute('principal');
    }
    set principal(value) {
        this._principal = value;
    }
    // Temporarily expose input value. Use with caution.
    get principalInput() {
        return this._principal;
    }
    // data_location - computed: false, optional: true, required: false
    _dataLocation = new LakeformationPermissionsDataLocationOutputReference(this, "data_location", true);
    get dataLocation() {
        return this._dataLocation;
    }
    putDataLocation(value) {
        this._dataLocation.internalValue = value;
    }
    resetDataLocation() {
        this._dataLocation.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dataLocationInput() {
        return this._dataLocation.internalValue;
    }
    // database - computed: false, optional: true, required: false
    _database = new LakeformationPermissionsDatabaseOutputReference(this, "database", true);
    get database() {
        return this._database;
    }
    putDatabase(value) {
        this._database.internalValue = value;
    }
    resetDatabase() {
        this._database.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get databaseInput() {
        return this._database.internalValue;
    }
    // table - computed: false, optional: true, required: false
    _table = new LakeformationPermissionsTableOutputReference(this, "table", true);
    get table() {
        return this._table;
    }
    putTable(value) {
        this._table.internalValue = value;
    }
    resetTable() {
        this._table.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tableInput() {
        return this._table.internalValue;
    }
    // table_with_columns - computed: false, optional: true, required: false
    _tableWithColumns = new LakeformationPermissionsTableWithColumnsOutputReference(this, "table_with_columns", true);
    get tableWithColumns() {
        return this._tableWithColumns;
    }
    putTableWithColumns(value) {
        this._tableWithColumns.internalValue = value;
    }
    resetTableWithColumns() {
        this._tableWithColumns.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tableWithColumnsInput() {
        return this._tableWithColumns.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            catalog_id: cdktf.stringToTerraform(this._catalogId),
            catalog_resource: cdktf.booleanToTerraform(this._catalogResource),
            permissions: cdktf.listMapper(cdktf.stringToTerraform)(this._permissions),
            permissions_with_grant_option: cdktf.listMapper(cdktf.stringToTerraform)(this._permissionsWithGrantOption),
            principal: cdktf.stringToTerraform(this._principal),
            data_location: lakeformationPermissionsDataLocationToTerraform(this._dataLocation.internalValue),
            database: lakeformationPermissionsDatabaseToTerraform(this._database.internalValue),
            table: lakeformationPermissionsTableToTerraform(this._table.internalValue),
            table_with_columns: lakeformationPermissionsTableWithColumnsToTerraform(this._tableWithColumns.internalValue),
        };
    }
}
//# sourceMappingURL=lakeformation-permissions.js.map