// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function backupSelectionConditionStringEqualsToTerraform(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 {
        key: cdktf.stringToTerraform(struct.key),
        value: cdktf.stringToTerraform(struct.value),
    };
}
export function backupSelectionConditionStringLikeToTerraform(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 {
        key: cdktf.stringToTerraform(struct.key),
        value: cdktf.stringToTerraform(struct.value),
    };
}
export function backupSelectionConditionStringNotEqualsToTerraform(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 {
        key: cdktf.stringToTerraform(struct.key),
        value: cdktf.stringToTerraform(struct.value),
    };
}
export function backupSelectionConditionStringNotLikeToTerraform(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 {
        key: cdktf.stringToTerraform(struct.key),
        value: cdktf.stringToTerraform(struct.value),
    };
}
export function backupSelectionConditionToTerraform(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 {
        string_equals: cdktf.listMapper(backupSelectionConditionStringEqualsToTerraform)(struct.stringEquals),
        string_like: cdktf.listMapper(backupSelectionConditionStringLikeToTerraform)(struct.stringLike),
        string_not_equals: cdktf.listMapper(backupSelectionConditionStringNotEqualsToTerraform)(struct.stringNotEquals),
        string_not_like: cdktf.listMapper(backupSelectionConditionStringNotLikeToTerraform)(struct.stringNotLike),
    };
}
export function backupSelectionSelectionTagToTerraform(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 {
        key: cdktf.stringToTerraform(struct.key),
        type: cdktf.stringToTerraform(struct.type),
        value: cdktf.stringToTerraform(struct.value),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/backup_selection aws_backup_selection}
*/
export class BackupSelection extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_backup_selection";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/backup_selection aws_backup_selection} 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 BackupSelectionConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_backup_selection',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._iamRoleArn = config.iamRoleArn;
        this._name = config.name;
        this._notResources = config.notResources;
        this._planId = config.planId;
        this._resources = config.resources;
        this._condition = config.condition;
        this._selectionTag = config.selectionTag;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // iam_role_arn - computed: false, optional: false, required: true
    _iamRoleArn;
    get iamRoleArn() {
        return this.getStringAttribute('iam_role_arn');
    }
    set iamRoleArn(value) {
        this._iamRoleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get iamRoleArnInput() {
        return this._iamRoleArn;
    }
    // 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;
    }
    // not_resources - computed: true, optional: true, required: false
    _notResources;
    get notResources() {
        return cdktf.Fn.tolist(this.getListAttribute('not_resources'));
    }
    set notResources(value) {
        this._notResources = value;
    }
    resetNotResources() {
        this._notResources = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get notResourcesInput() {
        return this._notResources;
    }
    // plan_id - computed: false, optional: false, required: true
    _planId;
    get planId() {
        return this.getStringAttribute('plan_id');
    }
    set planId(value) {
        this._planId = value;
    }
    // Temporarily expose input value. Use with caution.
    get planIdInput() {
        return this._planId;
    }
    // resources - computed: false, optional: true, required: false
    _resources;
    get resources() {
        return cdktf.Fn.tolist(this.getListAttribute('resources'));
    }
    set resources(value) {
        this._resources = value;
    }
    resetResources() {
        this._resources = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resourcesInput() {
        return this._resources;
    }
    // condition - computed: false, optional: true, required: false
    _condition;
    get condition() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('condition')));
    }
    set condition(value) {
        this._condition = value;
    }
    resetCondition() {
        this._condition = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get conditionInput() {
        return this._condition;
    }
    // selection_tag - computed: false, optional: true, required: false
    _selectionTag;
    get selectionTag() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('selection_tag')));
    }
    set selectionTag(value) {
        this._selectionTag = value;
    }
    resetSelectionTag() {
        this._selectionTag = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get selectionTagInput() {
        return this._selectionTag;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            iam_role_arn: cdktf.stringToTerraform(this._iamRoleArn),
            name: cdktf.stringToTerraform(this._name),
            not_resources: cdktf.listMapper(cdktf.stringToTerraform)(this._notResources),
            plan_id: cdktf.stringToTerraform(this._planId),
            resources: cdktf.listMapper(cdktf.stringToTerraform)(this._resources),
            condition: cdktf.listMapper(backupSelectionConditionToTerraform)(this._condition),
            selection_tag: cdktf.listMapper(backupSelectionSelectionTagToTerraform)(this._selectionTag),
        };
    }
}
//# sourceMappingURL=backup-selection.js.map