// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function cloudformationStackSetAutoDeploymentToTerraform(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 {
        enabled: cdktf.booleanToTerraform(struct.enabled),
        retain_stacks_on_account_removal: cdktf.booleanToTerraform(struct.retainStacksOnAccountRemoval),
    };
}
export class CloudformationStackSetAutoDeploymentOutputReference 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._enabled !== undefined) {
            hasAnyValues = true;
            internalValueResult.enabled = this._enabled;
        }
        if (this._retainStacksOnAccountRemoval !== undefined) {
            hasAnyValues = true;
            internalValueResult.retainStacksOnAccountRemoval = this._retainStacksOnAccountRemoval;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._enabled = undefined;
            this._retainStacksOnAccountRemoval = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._enabled = value.enabled;
            this._retainStacksOnAccountRemoval = value.retainStacksOnAccountRemoval;
        }
    }
    // enabled - computed: false, optional: true, required: false
    _enabled;
    get enabled() {
        return this.getBooleanAttribute('enabled');
    }
    set enabled(value) {
        this._enabled = value;
    }
    resetEnabled() {
        this._enabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enabledInput() {
        return this._enabled;
    }
    // retain_stacks_on_account_removal - computed: false, optional: true, required: false
    _retainStacksOnAccountRemoval;
    get retainStacksOnAccountRemoval() {
        return this.getBooleanAttribute('retain_stacks_on_account_removal');
    }
    set retainStacksOnAccountRemoval(value) {
        this._retainStacksOnAccountRemoval = value;
    }
    resetRetainStacksOnAccountRemoval() {
        this._retainStacksOnAccountRemoval = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get retainStacksOnAccountRemovalInput() {
        return this._retainStacksOnAccountRemoval;
    }
}
export function cloudformationStackSetTimeoutsToTerraform(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 {
        update: cdktf.stringToTerraform(struct.update),
    };
}
export class CloudformationStackSetTimeoutsOutputReference 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._update !== undefined) {
            hasAnyValues = true;
            internalValueResult.update = this._update;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._update = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._update = value.update;
        }
    }
    // update - computed: false, optional: true, required: false
    _update;
    get update() {
        return this.getStringAttribute('update');
    }
    set update(value) {
        this._update = value;
    }
    resetUpdate() {
        this._update = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get updateInput() {
        return this._update;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set aws_cloudformation_stack_set}
*/
export class CloudformationStackSet extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_cloudformation_stack_set";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set aws_cloudformation_stack_set} 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 CloudformationStackSetConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_cloudformation_stack_set',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._administrationRoleArn = config.administrationRoleArn;
        this._callAs = config.callAs;
        this._capabilities = config.capabilities;
        this._description = config.description;
        this._executionRoleName = config.executionRoleName;
        this._name = config.name;
        this._parameters = config.parameters;
        this._permissionModel = config.permissionModel;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._templateBody = config.templateBody;
        this._templateUrl = config.templateUrl;
        this._autoDeployment.internalValue = config.autoDeployment;
        this._timeouts.internalValue = config.timeouts;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // administration_role_arn - computed: false, optional: true, required: false
    _administrationRoleArn;
    get administrationRoleArn() {
        return this.getStringAttribute('administration_role_arn');
    }
    set administrationRoleArn(value) {
        this._administrationRoleArn = value;
    }
    resetAdministrationRoleArn() {
        this._administrationRoleArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get administrationRoleArnInput() {
        return this._administrationRoleArn;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // call_as - computed: false, optional: true, required: false
    _callAs;
    get callAs() {
        return this.getStringAttribute('call_as');
    }
    set callAs(value) {
        this._callAs = value;
    }
    resetCallAs() {
        this._callAs = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get callAsInput() {
        return this._callAs;
    }
    // capabilities - computed: false, optional: true, required: false
    _capabilities;
    get capabilities() {
        return cdktf.Fn.tolist(this.getListAttribute('capabilities'));
    }
    set capabilities(value) {
        this._capabilities = value;
    }
    resetCapabilities() {
        this._capabilities = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get capabilitiesInput() {
        return this._capabilities;
    }
    // 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;
    }
    // execution_role_name - computed: true, optional: true, required: false
    _executionRoleName;
    get executionRoleName() {
        return this.getStringAttribute('execution_role_name');
    }
    set executionRoleName(value) {
        this._executionRoleName = value;
    }
    resetExecutionRoleName() {
        this._executionRoleName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get executionRoleNameInput() {
        return this._executionRoleName;
    }
    // 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;
    }
    // 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;
    }
    // permission_model - computed: false, optional: true, required: false
    _permissionModel;
    get permissionModel() {
        return this.getStringAttribute('permission_model');
    }
    set permissionModel(value) {
        this._permissionModel = value;
    }
    resetPermissionModel() {
        this._permissionModel = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get permissionModelInput() {
        return this._permissionModel;
    }
    // stack_set_id - computed: true, optional: false, required: false
    get stackSetId() {
        return this.getStringAttribute('stack_set_id');
    }
    // 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;
    }
    // template_body - computed: true, optional: true, required: false
    _templateBody;
    get templateBody() {
        return this.getStringAttribute('template_body');
    }
    set templateBody(value) {
        this._templateBody = value;
    }
    resetTemplateBody() {
        this._templateBody = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get templateBodyInput() {
        return this._templateBody;
    }
    // template_url - computed: false, optional: true, required: false
    _templateUrl;
    get templateUrl() {
        return this.getStringAttribute('template_url');
    }
    set templateUrl(value) {
        this._templateUrl = value;
    }
    resetTemplateUrl() {
        this._templateUrl = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get templateUrlInput() {
        return this._templateUrl;
    }
    // auto_deployment - computed: false, optional: true, required: false
    _autoDeployment = new CloudformationStackSetAutoDeploymentOutputReference(this, "auto_deployment", true);
    get autoDeployment() {
        return this._autoDeployment;
    }
    putAutoDeployment(value) {
        this._autoDeployment.internalValue = value;
    }
    resetAutoDeployment() {
        this._autoDeployment.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoDeploymentInput() {
        return this._autoDeployment.internalValue;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new CloudformationStackSetTimeoutsOutputReference(this, "timeouts", true);
    get timeouts() {
        return this._timeouts;
    }
    putTimeouts(value) {
        this._timeouts.internalValue = value;
    }
    resetTimeouts() {
        this._timeouts.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get timeoutsInput() {
        return this._timeouts.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            administration_role_arn: cdktf.stringToTerraform(this._administrationRoleArn),
            call_as: cdktf.stringToTerraform(this._callAs),
            capabilities: cdktf.listMapper(cdktf.stringToTerraform)(this._capabilities),
            description: cdktf.stringToTerraform(this._description),
            execution_role_name: cdktf.stringToTerraform(this._executionRoleName),
            name: cdktf.stringToTerraform(this._name),
            parameters: cdktf.hashMapper(cdktf.stringToTerraform)(this._parameters),
            permission_model: cdktf.stringToTerraform(this._permissionModel),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            template_body: cdktf.stringToTerraform(this._templateBody),
            template_url: cdktf.stringToTerraform(this._templateUrl),
            auto_deployment: cloudformationStackSetAutoDeploymentToTerraform(this._autoDeployment.internalValue),
            timeouts: cloudformationStackSetTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
}
//# sourceMappingURL=cloudformation-stack-set.js.map