// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function configRemediationConfigurationExecutionControlsSsmControlsToTerraform(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 {
        concurrent_execution_rate_percentage: cdktf.numberToTerraform(struct.concurrentExecutionRatePercentage),
        error_percentage: cdktf.numberToTerraform(struct.errorPercentage),
    };
}
export class ConfigRemediationConfigurationExecutionControlsSsmControlsOutputReference 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._concurrentExecutionRatePercentage !== undefined) {
            hasAnyValues = true;
            internalValueResult.concurrentExecutionRatePercentage = this._concurrentExecutionRatePercentage;
        }
        if (this._errorPercentage !== undefined) {
            hasAnyValues = true;
            internalValueResult.errorPercentage = this._errorPercentage;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._concurrentExecutionRatePercentage = undefined;
            this._errorPercentage = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._concurrentExecutionRatePercentage = value.concurrentExecutionRatePercentage;
            this._errorPercentage = value.errorPercentage;
        }
    }
    // concurrent_execution_rate_percentage - computed: false, optional: true, required: false
    _concurrentExecutionRatePercentage;
    get concurrentExecutionRatePercentage() {
        return this.getNumberAttribute('concurrent_execution_rate_percentage');
    }
    set concurrentExecutionRatePercentage(value) {
        this._concurrentExecutionRatePercentage = value;
    }
    resetConcurrentExecutionRatePercentage() {
        this._concurrentExecutionRatePercentage = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get concurrentExecutionRatePercentageInput() {
        return this._concurrentExecutionRatePercentage;
    }
    // error_percentage - computed: false, optional: true, required: false
    _errorPercentage;
    get errorPercentage() {
        return this.getNumberAttribute('error_percentage');
    }
    set errorPercentage(value) {
        this._errorPercentage = value;
    }
    resetErrorPercentage() {
        this._errorPercentage = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get errorPercentageInput() {
        return this._errorPercentage;
    }
}
export function configRemediationConfigurationExecutionControlsToTerraform(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 {
        ssm_controls: configRemediationConfigurationExecutionControlsSsmControlsToTerraform(struct.ssmControls),
    };
}
export class ConfigRemediationConfigurationExecutionControlsOutputReference 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._ssmControls?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.ssmControls = this._ssmControls?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._ssmControls.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._ssmControls.internalValue = value.ssmControls;
        }
    }
    // ssm_controls - computed: false, optional: true, required: false
    _ssmControls = new ConfigRemediationConfigurationExecutionControlsSsmControlsOutputReference(this, "ssm_controls", true);
    get ssmControls() {
        return this._ssmControls;
    }
    putSsmControls(value) {
        this._ssmControls.internalValue = value;
    }
    resetSsmControls() {
        this._ssmControls.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get ssmControlsInput() {
        return this._ssmControls.internalValue;
    }
}
export function configRemediationConfigurationParameterToTerraform(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),
        resource_value: cdktf.stringToTerraform(struct.resourceValue),
        static_value: cdktf.stringToTerraform(struct.staticValue),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/config_remediation_configuration aws_config_remediation_configuration}
*/
export class ConfigRemediationConfiguration extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_config_remediation_configuration";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/config_remediation_configuration aws_config_remediation_configuration} 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 ConfigRemediationConfigurationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_config_remediation_configuration',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._automatic = config.automatic;
        this._configRuleName = config.configRuleName;
        this._maximumAutomaticAttempts = config.maximumAutomaticAttempts;
        this._resourceType = config.resourceType;
        this._retryAttemptSeconds = config.retryAttemptSeconds;
        this._targetId = config.targetId;
        this._targetType = config.targetType;
        this._targetVersion = config.targetVersion;
        this._executionControls.internalValue = config.executionControls;
        this._parameter = config.parameter;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // automatic - computed: false, optional: true, required: false
    _automatic;
    get automatic() {
        return this.getBooleanAttribute('automatic');
    }
    set automatic(value) {
        this._automatic = value;
    }
    resetAutomatic() {
        this._automatic = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get automaticInput() {
        return this._automatic;
    }
    // config_rule_name - computed: false, optional: false, required: true
    _configRuleName;
    get configRuleName() {
        return this.getStringAttribute('config_rule_name');
    }
    set configRuleName(value) {
        this._configRuleName = value;
    }
    // Temporarily expose input value. Use with caution.
    get configRuleNameInput() {
        return this._configRuleName;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // maximum_automatic_attempts - computed: false, optional: true, required: false
    _maximumAutomaticAttempts;
    get maximumAutomaticAttempts() {
        return this.getNumberAttribute('maximum_automatic_attempts');
    }
    set maximumAutomaticAttempts(value) {
        this._maximumAutomaticAttempts = value;
    }
    resetMaximumAutomaticAttempts() {
        this._maximumAutomaticAttempts = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maximumAutomaticAttemptsInput() {
        return this._maximumAutomaticAttempts;
    }
    // resource_type - computed: false, optional: true, required: false
    _resourceType;
    get resourceType() {
        return this.getStringAttribute('resource_type');
    }
    set resourceType(value) {
        this._resourceType = value;
    }
    resetResourceType() {
        this._resourceType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resourceTypeInput() {
        return this._resourceType;
    }
    // retry_attempt_seconds - computed: false, optional: true, required: false
    _retryAttemptSeconds;
    get retryAttemptSeconds() {
        return this.getNumberAttribute('retry_attempt_seconds');
    }
    set retryAttemptSeconds(value) {
        this._retryAttemptSeconds = value;
    }
    resetRetryAttemptSeconds() {
        this._retryAttemptSeconds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get retryAttemptSecondsInput() {
        return this._retryAttemptSeconds;
    }
    // target_id - computed: false, optional: false, required: true
    _targetId;
    get targetId() {
        return this.getStringAttribute('target_id');
    }
    set targetId(value) {
        this._targetId = value;
    }
    // Temporarily expose input value. Use with caution.
    get targetIdInput() {
        return this._targetId;
    }
    // target_type - computed: false, optional: false, required: true
    _targetType;
    get targetType() {
        return this.getStringAttribute('target_type');
    }
    set targetType(value) {
        this._targetType = value;
    }
    // Temporarily expose input value. Use with caution.
    get targetTypeInput() {
        return this._targetType;
    }
    // target_version - computed: false, optional: true, required: false
    _targetVersion;
    get targetVersion() {
        return this.getStringAttribute('target_version');
    }
    set targetVersion(value) {
        this._targetVersion = value;
    }
    resetTargetVersion() {
        this._targetVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get targetVersionInput() {
        return this._targetVersion;
    }
    // execution_controls - computed: false, optional: true, required: false
    _executionControls = new ConfigRemediationConfigurationExecutionControlsOutputReference(this, "execution_controls", true);
    get executionControls() {
        return this._executionControls;
    }
    putExecutionControls(value) {
        this._executionControls.internalValue = value;
    }
    resetExecutionControls() {
        this._executionControls.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get executionControlsInput() {
        return this._executionControls.internalValue;
    }
    // parameter - computed: false, optional: true, required: false
    _parameter;
    get parameter() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('parameter')));
    }
    set parameter(value) {
        this._parameter = value;
    }
    resetParameter() {
        this._parameter = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get parameterInput() {
        return this._parameter;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            automatic: cdktf.booleanToTerraform(this._automatic),
            config_rule_name: cdktf.stringToTerraform(this._configRuleName),
            maximum_automatic_attempts: cdktf.numberToTerraform(this._maximumAutomaticAttempts),
            resource_type: cdktf.stringToTerraform(this._resourceType),
            retry_attempt_seconds: cdktf.numberToTerraform(this._retryAttemptSeconds),
            target_id: cdktf.stringToTerraform(this._targetId),
            target_type: cdktf.stringToTerraform(this._targetType),
            target_version: cdktf.stringToTerraform(this._targetVersion),
            execution_controls: configRemediationConfigurationExecutionControlsToTerraform(this._executionControls.internalValue),
            parameter: cdktf.listMapper(configRemediationConfigurationParameterToTerraform)(this._parameter),
        };
    }
}
//# sourceMappingURL=config-remediation-configuration.js.map