// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function athenaWorkgroupConfigurationEngineVersionToTerraform(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 {
        selected_engine_version: cdktf.stringToTerraform(struct.selectedEngineVersion),
    };
}
export class AthenaWorkgroupConfigurationEngineVersionOutputReference 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._selectedEngineVersion !== undefined) {
            hasAnyValues = true;
            internalValueResult.selectedEngineVersion = this._selectedEngineVersion;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._selectedEngineVersion = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._selectedEngineVersion = value.selectedEngineVersion;
        }
    }
    // effective_engine_version - computed: true, optional: false, required: false
    get effectiveEngineVersion() {
        return this.getStringAttribute('effective_engine_version');
    }
    // selected_engine_version - computed: false, optional: true, required: false
    _selectedEngineVersion;
    get selectedEngineVersion() {
        return this.getStringAttribute('selected_engine_version');
    }
    set selectedEngineVersion(value) {
        this._selectedEngineVersion = value;
    }
    resetSelectedEngineVersion() {
        this._selectedEngineVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get selectedEngineVersionInput() {
        return this._selectedEngineVersion;
    }
}
export function athenaWorkgroupConfigurationResultConfigurationEncryptionConfigurationToTerraform(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 {
        encryption_option: cdktf.stringToTerraform(struct.encryptionOption),
        kms_key_arn: cdktf.stringToTerraform(struct.kmsKeyArn),
    };
}
export class AthenaWorkgroupConfigurationResultConfigurationEncryptionConfigurationOutputReference 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._encryptionOption !== undefined) {
            hasAnyValues = true;
            internalValueResult.encryptionOption = this._encryptionOption;
        }
        if (this._kmsKeyArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.kmsKeyArn = this._kmsKeyArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._encryptionOption = undefined;
            this._kmsKeyArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._encryptionOption = value.encryptionOption;
            this._kmsKeyArn = value.kmsKeyArn;
        }
    }
    // encryption_option - computed: false, optional: true, required: false
    _encryptionOption;
    get encryptionOption() {
        return this.getStringAttribute('encryption_option');
    }
    set encryptionOption(value) {
        this._encryptionOption = value;
    }
    resetEncryptionOption() {
        this._encryptionOption = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get encryptionOptionInput() {
        return this._encryptionOption;
    }
    // kms_key_arn - computed: false, optional: true, required: false
    _kmsKeyArn;
    get kmsKeyArn() {
        return this.getStringAttribute('kms_key_arn');
    }
    set kmsKeyArn(value) {
        this._kmsKeyArn = value;
    }
    resetKmsKeyArn() {
        this._kmsKeyArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kmsKeyArnInput() {
        return this._kmsKeyArn;
    }
}
export function athenaWorkgroupConfigurationResultConfigurationToTerraform(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 {
        output_location: cdktf.stringToTerraform(struct.outputLocation),
        encryption_configuration: athenaWorkgroupConfigurationResultConfigurationEncryptionConfigurationToTerraform(struct.encryptionConfiguration),
    };
}
export class AthenaWorkgroupConfigurationResultConfigurationOutputReference 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._outputLocation !== undefined) {
            hasAnyValues = true;
            internalValueResult.outputLocation = this._outputLocation;
        }
        if (this._encryptionConfiguration?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.encryptionConfiguration = this._encryptionConfiguration?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._outputLocation = undefined;
            this._encryptionConfiguration.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._outputLocation = value.outputLocation;
            this._encryptionConfiguration.internalValue = value.encryptionConfiguration;
        }
    }
    // output_location - computed: false, optional: true, required: false
    _outputLocation;
    get outputLocation() {
        return this.getStringAttribute('output_location');
    }
    set outputLocation(value) {
        this._outputLocation = value;
    }
    resetOutputLocation() {
        this._outputLocation = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get outputLocationInput() {
        return this._outputLocation;
    }
    // encryption_configuration - computed: false, optional: true, required: false
    _encryptionConfiguration = new AthenaWorkgroupConfigurationResultConfigurationEncryptionConfigurationOutputReference(this, "encryption_configuration", true);
    get encryptionConfiguration() {
        return this._encryptionConfiguration;
    }
    putEncryptionConfiguration(value) {
        this._encryptionConfiguration.internalValue = value;
    }
    resetEncryptionConfiguration() {
        this._encryptionConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get encryptionConfigurationInput() {
        return this._encryptionConfiguration.internalValue;
    }
}
export function athenaWorkgroupConfigurationToTerraform(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 {
        bytes_scanned_cutoff_per_query: cdktf.numberToTerraform(struct.bytesScannedCutoffPerQuery),
        enforce_workgroup_configuration: cdktf.booleanToTerraform(struct.enforceWorkgroupConfiguration),
        publish_cloudwatch_metrics_enabled: cdktf.booleanToTerraform(struct.publishCloudwatchMetricsEnabled),
        requester_pays_enabled: cdktf.booleanToTerraform(struct.requesterPaysEnabled),
        engine_version: athenaWorkgroupConfigurationEngineVersionToTerraform(struct.engineVersion),
        result_configuration: athenaWorkgroupConfigurationResultConfigurationToTerraform(struct.resultConfiguration),
    };
}
export class AthenaWorkgroupConfigurationOutputReference 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._bytesScannedCutoffPerQuery !== undefined) {
            hasAnyValues = true;
            internalValueResult.bytesScannedCutoffPerQuery = this._bytesScannedCutoffPerQuery;
        }
        if (this._enforceWorkgroupConfiguration !== undefined) {
            hasAnyValues = true;
            internalValueResult.enforceWorkgroupConfiguration = this._enforceWorkgroupConfiguration;
        }
        if (this._publishCloudwatchMetricsEnabled !== undefined) {
            hasAnyValues = true;
            internalValueResult.publishCloudwatchMetricsEnabled = this._publishCloudwatchMetricsEnabled;
        }
        if (this._requesterPaysEnabled !== undefined) {
            hasAnyValues = true;
            internalValueResult.requesterPaysEnabled = this._requesterPaysEnabled;
        }
        if (this._engineVersion?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.engineVersion = this._engineVersion?.internalValue;
        }
        if (this._resultConfiguration?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.resultConfiguration = this._resultConfiguration?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._bytesScannedCutoffPerQuery = undefined;
            this._enforceWorkgroupConfiguration = undefined;
            this._publishCloudwatchMetricsEnabled = undefined;
            this._requesterPaysEnabled = undefined;
            this._engineVersion.internalValue = undefined;
            this._resultConfiguration.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._bytesScannedCutoffPerQuery = value.bytesScannedCutoffPerQuery;
            this._enforceWorkgroupConfiguration = value.enforceWorkgroupConfiguration;
            this._publishCloudwatchMetricsEnabled = value.publishCloudwatchMetricsEnabled;
            this._requesterPaysEnabled = value.requesterPaysEnabled;
            this._engineVersion.internalValue = value.engineVersion;
            this._resultConfiguration.internalValue = value.resultConfiguration;
        }
    }
    // bytes_scanned_cutoff_per_query - computed: false, optional: true, required: false
    _bytesScannedCutoffPerQuery;
    get bytesScannedCutoffPerQuery() {
        return this.getNumberAttribute('bytes_scanned_cutoff_per_query');
    }
    set bytesScannedCutoffPerQuery(value) {
        this._bytesScannedCutoffPerQuery = value;
    }
    resetBytesScannedCutoffPerQuery() {
        this._bytesScannedCutoffPerQuery = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get bytesScannedCutoffPerQueryInput() {
        return this._bytesScannedCutoffPerQuery;
    }
    // enforce_workgroup_configuration - computed: false, optional: true, required: false
    _enforceWorkgroupConfiguration;
    get enforceWorkgroupConfiguration() {
        return this.getBooleanAttribute('enforce_workgroup_configuration');
    }
    set enforceWorkgroupConfiguration(value) {
        this._enforceWorkgroupConfiguration = value;
    }
    resetEnforceWorkgroupConfiguration() {
        this._enforceWorkgroupConfiguration = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enforceWorkgroupConfigurationInput() {
        return this._enforceWorkgroupConfiguration;
    }
    // publish_cloudwatch_metrics_enabled - computed: false, optional: true, required: false
    _publishCloudwatchMetricsEnabled;
    get publishCloudwatchMetricsEnabled() {
        return this.getBooleanAttribute('publish_cloudwatch_metrics_enabled');
    }
    set publishCloudwatchMetricsEnabled(value) {
        this._publishCloudwatchMetricsEnabled = value;
    }
    resetPublishCloudwatchMetricsEnabled() {
        this._publishCloudwatchMetricsEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get publishCloudwatchMetricsEnabledInput() {
        return this._publishCloudwatchMetricsEnabled;
    }
    // requester_pays_enabled - computed: false, optional: true, required: false
    _requesterPaysEnabled;
    get requesterPaysEnabled() {
        return this.getBooleanAttribute('requester_pays_enabled');
    }
    set requesterPaysEnabled(value) {
        this._requesterPaysEnabled = value;
    }
    resetRequesterPaysEnabled() {
        this._requesterPaysEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get requesterPaysEnabledInput() {
        return this._requesterPaysEnabled;
    }
    // engine_version - computed: false, optional: true, required: false
    _engineVersion = new AthenaWorkgroupConfigurationEngineVersionOutputReference(this, "engine_version", true);
    get engineVersion() {
        return this._engineVersion;
    }
    putEngineVersion(value) {
        this._engineVersion.internalValue = value;
    }
    resetEngineVersion() {
        this._engineVersion.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get engineVersionInput() {
        return this._engineVersion.internalValue;
    }
    // result_configuration - computed: false, optional: true, required: false
    _resultConfiguration = new AthenaWorkgroupConfigurationResultConfigurationOutputReference(this, "result_configuration", true);
    get resultConfiguration() {
        return this._resultConfiguration;
    }
    putResultConfiguration(value) {
        this._resultConfiguration.internalValue = value;
    }
    resetResultConfiguration() {
        this._resultConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resultConfigurationInput() {
        return this._resultConfiguration.internalValue;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/athena_workgroup aws_athena_workgroup}
*/
export class AthenaWorkgroup extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_athena_workgroup";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/athena_workgroup aws_athena_workgroup} 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 AthenaWorkgroupConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_athena_workgroup',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._forceDestroy = config.forceDestroy;
        this._name = config.name;
        this._state = config.state;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._configuration.internalValue = config.configuration;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // description - computed: false, optional: true, required: false
    _description;
    get description() {
        return this.getStringAttribute('description');
    }
    set description(value) {
        this._description = value;
    }
    resetDescription() {
        this._description = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get descriptionInput() {
        return this._description;
    }
    // force_destroy - computed: false, optional: true, required: false
    _forceDestroy;
    get forceDestroy() {
        return this.getBooleanAttribute('force_destroy');
    }
    set forceDestroy(value) {
        this._forceDestroy = value;
    }
    resetForceDestroy() {
        this._forceDestroy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get forceDestroyInput() {
        return this._forceDestroy;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // 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;
    }
    // state - computed: false, optional: true, required: false
    _state;
    get state() {
        return this.getStringAttribute('state');
    }
    set state(value) {
        this._state = value;
    }
    resetState() {
        this._state = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get stateInput() {
        return this._state;
    }
    // tags - computed: false, optional: true, required: false
    _tags;
    get tags() {
        return this.getStringMapAttribute('tags');
    }
    set tags(value) {
        this._tags = value;
    }
    resetTags() {
        this._tags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsInput() {
        return this._tags;
    }
    // tags_all - computed: true, optional: true, required: false
    _tagsAll;
    get tagsAll() {
        return this.getStringMapAttribute('tags_all');
    }
    set tagsAll(value) {
        this._tagsAll = value;
    }
    resetTagsAll() {
        this._tagsAll = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsAllInput() {
        return this._tagsAll;
    }
    // configuration - computed: false, optional: true, required: false
    _configuration = new AthenaWorkgroupConfigurationOutputReference(this, "configuration", true);
    get configuration() {
        return this._configuration;
    }
    putConfiguration(value) {
        this._configuration.internalValue = value;
    }
    resetConfiguration() {
        this._configuration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get configurationInput() {
        return this._configuration.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            description: cdktf.stringToTerraform(this._description),
            force_destroy: cdktf.booleanToTerraform(this._forceDestroy),
            name: cdktf.stringToTerraform(this._name),
            state: cdktf.stringToTerraform(this._state),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            configuration: athenaWorkgroupConfigurationToTerraform(this._configuration.internalValue),
        };
    }
}
//# sourceMappingURL=athena-workgroup.js.map