// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function gluePartitionStorageDescriptorColumnsToTerraform(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 {
        comment: cdktf.stringToTerraform(struct.comment),
        name: cdktf.stringToTerraform(struct.name),
        type: cdktf.stringToTerraform(struct.type),
    };
}
export function gluePartitionStorageDescriptorSerDeInfoToTerraform(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 {
        name: cdktf.stringToTerraform(struct.name),
        parameters: cdktf.hashMapper(cdktf.stringToTerraform)(struct.parameters),
        serialization_library: cdktf.stringToTerraform(struct.serializationLibrary),
    };
}
export class GluePartitionStorageDescriptorSerDeInfoOutputReference 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._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        if (this._parameters !== undefined) {
            hasAnyValues = true;
            internalValueResult.parameters = this._parameters;
        }
        if (this._serializationLibrary !== undefined) {
            hasAnyValues = true;
            internalValueResult.serializationLibrary = this._serializationLibrary;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._name = undefined;
            this._parameters = undefined;
            this._serializationLibrary = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._name = value.name;
            this._parameters = value.parameters;
            this._serializationLibrary = value.serializationLibrary;
        }
    }
    // name - computed: false, 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;
    }
    // parameters - computed: false, optional: true, required: false
    _parameters;
    get parameters() {
        return this.getStringMapAttribute('parameters');
    }
    set parameters(value) {
        this._parameters = value;
    }
    resetParameters() {
        this._parameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get parametersInput() {
        return this._parameters;
    }
    // serialization_library - computed: false, optional: true, required: false
    _serializationLibrary;
    get serializationLibrary() {
        return this.getStringAttribute('serialization_library');
    }
    set serializationLibrary(value) {
        this._serializationLibrary = value;
    }
    resetSerializationLibrary() {
        this._serializationLibrary = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get serializationLibraryInput() {
        return this._serializationLibrary;
    }
}
export function gluePartitionStorageDescriptorSkewedInfoToTerraform(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 {
        skewed_column_names: cdktf.listMapper(cdktf.stringToTerraform)(struct.skewedColumnNames),
        skewed_column_value_location_maps: cdktf.hashMapper(cdktf.stringToTerraform)(struct.skewedColumnValueLocationMaps),
        skewed_column_values: cdktf.listMapper(cdktf.stringToTerraform)(struct.skewedColumnValues),
    };
}
export class GluePartitionStorageDescriptorSkewedInfoOutputReference 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._skewedColumnNames !== undefined) {
            hasAnyValues = true;
            internalValueResult.skewedColumnNames = this._skewedColumnNames;
        }
        if (this._skewedColumnValueLocationMaps !== undefined) {
            hasAnyValues = true;
            internalValueResult.skewedColumnValueLocationMaps = this._skewedColumnValueLocationMaps;
        }
        if (this._skewedColumnValues !== undefined) {
            hasAnyValues = true;
            internalValueResult.skewedColumnValues = this._skewedColumnValues;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._skewedColumnNames = undefined;
            this._skewedColumnValueLocationMaps = undefined;
            this._skewedColumnValues = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._skewedColumnNames = value.skewedColumnNames;
            this._skewedColumnValueLocationMaps = value.skewedColumnValueLocationMaps;
            this._skewedColumnValues = value.skewedColumnValues;
        }
    }
    // skewed_column_names - computed: false, optional: true, required: false
    _skewedColumnNames;
    get skewedColumnNames() {
        return this.getListAttribute('skewed_column_names');
    }
    set skewedColumnNames(value) {
        this._skewedColumnNames = value;
    }
    resetSkewedColumnNames() {
        this._skewedColumnNames = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get skewedColumnNamesInput() {
        return this._skewedColumnNames;
    }
    // skewed_column_value_location_maps - computed: false, optional: true, required: false
    _skewedColumnValueLocationMaps;
    get skewedColumnValueLocationMaps() {
        return this.getStringMapAttribute('skewed_column_value_location_maps');
    }
    set skewedColumnValueLocationMaps(value) {
        this._skewedColumnValueLocationMaps = value;
    }
    resetSkewedColumnValueLocationMaps() {
        this._skewedColumnValueLocationMaps = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get skewedColumnValueLocationMapsInput() {
        return this._skewedColumnValueLocationMaps;
    }
    // skewed_column_values - computed: false, optional: true, required: false
    _skewedColumnValues;
    get skewedColumnValues() {
        return this.getListAttribute('skewed_column_values');
    }
    set skewedColumnValues(value) {
        this._skewedColumnValues = value;
    }
    resetSkewedColumnValues() {
        this._skewedColumnValues = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get skewedColumnValuesInput() {
        return this._skewedColumnValues;
    }
}
export function gluePartitionStorageDescriptorSortColumnsToTerraform(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 {
        column: cdktf.stringToTerraform(struct.column),
        sort_order: cdktf.numberToTerraform(struct.sortOrder),
    };
}
export function gluePartitionStorageDescriptorToTerraform(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 {
        bucket_columns: cdktf.listMapper(cdktf.stringToTerraform)(struct.bucketColumns),
        compressed: cdktf.booleanToTerraform(struct.compressed),
        input_format: cdktf.stringToTerraform(struct.inputFormat),
        location: cdktf.stringToTerraform(struct.location),
        number_of_buckets: cdktf.numberToTerraform(struct.numberOfBuckets),
        output_format: cdktf.stringToTerraform(struct.outputFormat),
        parameters: cdktf.hashMapper(cdktf.stringToTerraform)(struct.parameters),
        stored_as_sub_directories: cdktf.booleanToTerraform(struct.storedAsSubDirectories),
        columns: cdktf.listMapper(gluePartitionStorageDescriptorColumnsToTerraform)(struct.columns),
        ser_de_info: gluePartitionStorageDescriptorSerDeInfoToTerraform(struct.serDeInfo),
        skewed_info: gluePartitionStorageDescriptorSkewedInfoToTerraform(struct.skewedInfo),
        sort_columns: cdktf.listMapper(gluePartitionStorageDescriptorSortColumnsToTerraform)(struct.sortColumns),
    };
}
export class GluePartitionStorageDescriptorOutputReference 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._bucketColumns !== undefined) {
            hasAnyValues = true;
            internalValueResult.bucketColumns = this._bucketColumns;
        }
        if (this._compressed !== undefined) {
            hasAnyValues = true;
            internalValueResult.compressed = this._compressed;
        }
        if (this._inputFormat !== undefined) {
            hasAnyValues = true;
            internalValueResult.inputFormat = this._inputFormat;
        }
        if (this._location !== undefined) {
            hasAnyValues = true;
            internalValueResult.location = this._location;
        }
        if (this._numberOfBuckets !== undefined) {
            hasAnyValues = true;
            internalValueResult.numberOfBuckets = this._numberOfBuckets;
        }
        if (this._outputFormat !== undefined) {
            hasAnyValues = true;
            internalValueResult.outputFormat = this._outputFormat;
        }
        if (this._parameters !== undefined) {
            hasAnyValues = true;
            internalValueResult.parameters = this._parameters;
        }
        if (this._storedAsSubDirectories !== undefined) {
            hasAnyValues = true;
            internalValueResult.storedAsSubDirectories = this._storedAsSubDirectories;
        }
        if (this._columns !== undefined) {
            hasAnyValues = true;
            internalValueResult.columns = this._columns;
        }
        if (this._serDeInfo?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.serDeInfo = this._serDeInfo?.internalValue;
        }
        if (this._skewedInfo?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.skewedInfo = this._skewedInfo?.internalValue;
        }
        if (this._sortColumns !== undefined) {
            hasAnyValues = true;
            internalValueResult.sortColumns = this._sortColumns;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._bucketColumns = undefined;
            this._compressed = undefined;
            this._inputFormat = undefined;
            this._location = undefined;
            this._numberOfBuckets = undefined;
            this._outputFormat = undefined;
            this._parameters = undefined;
            this._storedAsSubDirectories = undefined;
            this._columns = undefined;
            this._serDeInfo.internalValue = undefined;
            this._skewedInfo.internalValue = undefined;
            this._sortColumns = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._bucketColumns = value.bucketColumns;
            this._compressed = value.compressed;
            this._inputFormat = value.inputFormat;
            this._location = value.location;
            this._numberOfBuckets = value.numberOfBuckets;
            this._outputFormat = value.outputFormat;
            this._parameters = value.parameters;
            this._storedAsSubDirectories = value.storedAsSubDirectories;
            this._columns = value.columns;
            this._serDeInfo.internalValue = value.serDeInfo;
            this._skewedInfo.internalValue = value.skewedInfo;
            this._sortColumns = value.sortColumns;
        }
    }
    // bucket_columns - computed: false, optional: true, required: false
    _bucketColumns;
    get bucketColumns() {
        return this.getListAttribute('bucket_columns');
    }
    set bucketColumns(value) {
        this._bucketColumns = value;
    }
    resetBucketColumns() {
        this._bucketColumns = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get bucketColumnsInput() {
        return this._bucketColumns;
    }
    // compressed - computed: false, optional: true, required: false
    _compressed;
    get compressed() {
        return this.getBooleanAttribute('compressed');
    }
    set compressed(value) {
        this._compressed = value;
    }
    resetCompressed() {
        this._compressed = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get compressedInput() {
        return this._compressed;
    }
    // input_format - computed: false, optional: true, required: false
    _inputFormat;
    get inputFormat() {
        return this.getStringAttribute('input_format');
    }
    set inputFormat(value) {
        this._inputFormat = value;
    }
    resetInputFormat() {
        this._inputFormat = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get inputFormatInput() {
        return this._inputFormat;
    }
    // location - computed: false, optional: true, required: false
    _location;
    get location() {
        return this.getStringAttribute('location');
    }
    set location(value) {
        this._location = value;
    }
    resetLocation() {
        this._location = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get locationInput() {
        return this._location;
    }
    // number_of_buckets - computed: false, optional: true, required: false
    _numberOfBuckets;
    get numberOfBuckets() {
        return this.getNumberAttribute('number_of_buckets');
    }
    set numberOfBuckets(value) {
        this._numberOfBuckets = value;
    }
    resetNumberOfBuckets() {
        this._numberOfBuckets = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get numberOfBucketsInput() {
        return this._numberOfBuckets;
    }
    // output_format - computed: false, optional: true, required: false
    _outputFormat;
    get outputFormat() {
        return this.getStringAttribute('output_format');
    }
    set outputFormat(value) {
        this._outputFormat = value;
    }
    resetOutputFormat() {
        this._outputFormat = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get outputFormatInput() {
        return this._outputFormat;
    }
    // parameters - computed: false, optional: true, required: false
    _parameters;
    get parameters() {
        return this.getStringMapAttribute('parameters');
    }
    set parameters(value) {
        this._parameters = value;
    }
    resetParameters() {
        this._parameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get parametersInput() {
        return this._parameters;
    }
    // stored_as_sub_directories - computed: false, optional: true, required: false
    _storedAsSubDirectories;
    get storedAsSubDirectories() {
        return this.getBooleanAttribute('stored_as_sub_directories');
    }
    set storedAsSubDirectories(value) {
        this._storedAsSubDirectories = value;
    }
    resetStoredAsSubDirectories() {
        this._storedAsSubDirectories = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get storedAsSubDirectoriesInput() {
        return this._storedAsSubDirectories;
    }
    // columns - computed: false, optional: true, required: false
    _columns;
    get columns() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('columns');
    }
    set columns(value) {
        this._columns = value;
    }
    resetColumns() {
        this._columns = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get columnsInput() {
        return this._columns;
    }
    // ser_de_info - computed: false, optional: true, required: false
    _serDeInfo = new GluePartitionStorageDescriptorSerDeInfoOutputReference(this, "ser_de_info", true);
    get serDeInfo() {
        return this._serDeInfo;
    }
    putSerDeInfo(value) {
        this._serDeInfo.internalValue = value;
    }
    resetSerDeInfo() {
        this._serDeInfo.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get serDeInfoInput() {
        return this._serDeInfo.internalValue;
    }
    // skewed_info - computed: false, optional: true, required: false
    _skewedInfo = new GluePartitionStorageDescriptorSkewedInfoOutputReference(this, "skewed_info", true);
    get skewedInfo() {
        return this._skewedInfo;
    }
    putSkewedInfo(value) {
        this._skewedInfo.internalValue = value;
    }
    resetSkewedInfo() {
        this._skewedInfo.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get skewedInfoInput() {
        return this._skewedInfo.internalValue;
    }
    // sort_columns - computed: false, optional: true, required: false
    _sortColumns;
    get sortColumns() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('sort_columns');
    }
    set sortColumns(value) {
        this._sortColumns = value;
    }
    resetSortColumns() {
        this._sortColumns = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sortColumnsInput() {
        return this._sortColumns;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/glue_partition aws_glue_partition}
*/
export class GluePartition extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_glue_partition";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/glue_partition aws_glue_partition} 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 GluePartitionConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_glue_partition',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._catalogId = config.catalogId;
        this._databaseName = config.databaseName;
        this._parameters = config.parameters;
        this._partitionValues = config.partitionValues;
        this._tableName = config.tableName;
        this._storageDescriptor.internalValue = config.storageDescriptor;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // 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;
    }
    // creation_time - computed: true, optional: false, required: false
    get creationTime() {
        return this.getStringAttribute('creation_time');
    }
    // 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;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // last_accessed_time - computed: true, optional: false, required: false
    get lastAccessedTime() {
        return this.getStringAttribute('last_accessed_time');
    }
    // last_analyzed_time - computed: true, optional: false, required: false
    get lastAnalyzedTime() {
        return this.getStringAttribute('last_analyzed_time');
    }
    // parameters - computed: false, optional: true, required: false
    _parameters;
    get parameters() {
        return this.getStringMapAttribute('parameters');
    }
    set parameters(value) {
        this._parameters = value;
    }
    resetParameters() {
        this._parameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get parametersInput() {
        return this._parameters;
    }
    // partition_values - computed: false, optional: false, required: true
    _partitionValues;
    get partitionValues() {
        return this.getListAttribute('partition_values');
    }
    set partitionValues(value) {
        this._partitionValues = value;
    }
    // Temporarily expose input value. Use with caution.
    get partitionValuesInput() {
        return this._partitionValues;
    }
    // table_name - computed: false, optional: false, required: true
    _tableName;
    get tableName() {
        return this.getStringAttribute('table_name');
    }
    set tableName(value) {
        this._tableName = value;
    }
    // Temporarily expose input value. Use with caution.
    get tableNameInput() {
        return this._tableName;
    }
    // storage_descriptor - computed: false, optional: true, required: false
    _storageDescriptor = new GluePartitionStorageDescriptorOutputReference(this, "storage_descriptor", true);
    get storageDescriptor() {
        return this._storageDescriptor;
    }
    putStorageDescriptor(value) {
        this._storageDescriptor.internalValue = value;
    }
    resetStorageDescriptor() {
        this._storageDescriptor.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get storageDescriptorInput() {
        return this._storageDescriptor.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            catalog_id: cdktf.stringToTerraform(this._catalogId),
            database_name: cdktf.stringToTerraform(this._databaseName),
            parameters: cdktf.hashMapper(cdktf.stringToTerraform)(this._parameters),
            partition_values: cdktf.listMapper(cdktf.stringToTerraform)(this._partitionValues),
            table_name: cdktf.stringToTerraform(this._tableName),
            storage_descriptor: gluePartitionStorageDescriptorToTerraform(this._storageDescriptor.internalValue),
        };
    }
}
//# sourceMappingURL=glue-partition.js.map