// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function ssmPatchBaselineApprovalRulePatchFilterToTerraform(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),
        values: cdktf.listMapper(cdktf.stringToTerraform)(struct.values),
    };
}
export function ssmPatchBaselineApprovalRuleToTerraform(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 {
        approve_after_days: cdktf.numberToTerraform(struct.approveAfterDays),
        approve_until_date: cdktf.stringToTerraform(struct.approveUntilDate),
        compliance_level: cdktf.stringToTerraform(struct.complianceLevel),
        enable_non_security: cdktf.booleanToTerraform(struct.enableNonSecurity),
        patch_filter: cdktf.listMapper(ssmPatchBaselineApprovalRulePatchFilterToTerraform)(struct.patchFilter),
    };
}
export function ssmPatchBaselineGlobalFilterToTerraform(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),
        values: cdktf.listMapper(cdktf.stringToTerraform)(struct.values),
    };
}
export function ssmPatchBaselineSourceToTerraform(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 {
        configuration: cdktf.stringToTerraform(struct.configuration),
        name: cdktf.stringToTerraform(struct.name),
        products: cdktf.listMapper(cdktf.stringToTerraform)(struct.products),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/ssm_patch_baseline aws_ssm_patch_baseline}
*/
export class SsmPatchBaseline extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_ssm_patch_baseline";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/ssm_patch_baseline aws_ssm_patch_baseline} 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 SsmPatchBaselineConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_ssm_patch_baseline',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._approvedPatches = config.approvedPatches;
        this._approvedPatchesComplianceLevel = config.approvedPatchesComplianceLevel;
        this._approvedPatchesEnableNonSecurity = config.approvedPatchesEnableNonSecurity;
        this._description = config.description;
        this._name = config.name;
        this._operatingSystem = config.operatingSystem;
        this._rejectedPatches = config.rejectedPatches;
        this._rejectedPatchesAction = config.rejectedPatchesAction;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._approvalRule = config.approvalRule;
        this._globalFilter = config.globalFilter;
        this._source = config.source;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // approved_patches - computed: false, optional: true, required: false
    _approvedPatches;
    get approvedPatches() {
        return cdktf.Fn.tolist(this.getListAttribute('approved_patches'));
    }
    set approvedPatches(value) {
        this._approvedPatches = value;
    }
    resetApprovedPatches() {
        this._approvedPatches = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get approvedPatchesInput() {
        return this._approvedPatches;
    }
    // approved_patches_compliance_level - computed: false, optional: true, required: false
    _approvedPatchesComplianceLevel;
    get approvedPatchesComplianceLevel() {
        return this.getStringAttribute('approved_patches_compliance_level');
    }
    set approvedPatchesComplianceLevel(value) {
        this._approvedPatchesComplianceLevel = value;
    }
    resetApprovedPatchesComplianceLevel() {
        this._approvedPatchesComplianceLevel = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get approvedPatchesComplianceLevelInput() {
        return this._approvedPatchesComplianceLevel;
    }
    // approved_patches_enable_non_security - computed: false, optional: true, required: false
    _approvedPatchesEnableNonSecurity;
    get approvedPatchesEnableNonSecurity() {
        return this.getBooleanAttribute('approved_patches_enable_non_security');
    }
    set approvedPatchesEnableNonSecurity(value) {
        this._approvedPatchesEnableNonSecurity = value;
    }
    resetApprovedPatchesEnableNonSecurity() {
        this._approvedPatchesEnableNonSecurity = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get approvedPatchesEnableNonSecurityInput() {
        return this._approvedPatchesEnableNonSecurity;
    }
    // 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;
    }
    // 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;
    }
    // operating_system - computed: false, optional: true, required: false
    _operatingSystem;
    get operatingSystem() {
        return this.getStringAttribute('operating_system');
    }
    set operatingSystem(value) {
        this._operatingSystem = value;
    }
    resetOperatingSystem() {
        this._operatingSystem = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get operatingSystemInput() {
        return this._operatingSystem;
    }
    // rejected_patches - computed: false, optional: true, required: false
    _rejectedPatches;
    get rejectedPatches() {
        return cdktf.Fn.tolist(this.getListAttribute('rejected_patches'));
    }
    set rejectedPatches(value) {
        this._rejectedPatches = value;
    }
    resetRejectedPatches() {
        this._rejectedPatches = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get rejectedPatchesInput() {
        return this._rejectedPatches;
    }
    // rejected_patches_action - computed: true, optional: true, required: false
    _rejectedPatchesAction;
    get rejectedPatchesAction() {
        return this.getStringAttribute('rejected_patches_action');
    }
    set rejectedPatchesAction(value) {
        this._rejectedPatchesAction = value;
    }
    resetRejectedPatchesAction() {
        this._rejectedPatchesAction = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get rejectedPatchesActionInput() {
        return this._rejectedPatchesAction;
    }
    // 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;
    }
    // approval_rule - computed: false, optional: true, required: false
    _approvalRule;
    get approvalRule() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('approval_rule');
    }
    set approvalRule(value) {
        this._approvalRule = value;
    }
    resetApprovalRule() {
        this._approvalRule = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get approvalRuleInput() {
        return this._approvalRule;
    }
    // global_filter - computed: false, optional: true, required: false
    _globalFilter;
    get globalFilter() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('global_filter');
    }
    set globalFilter(value) {
        this._globalFilter = value;
    }
    resetGlobalFilter() {
        this._globalFilter = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get globalFilterInput() {
        return this._globalFilter;
    }
    // source - computed: false, optional: true, required: false
    _source;
    get source() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('source');
    }
    set source(value) {
        this._source = value;
    }
    resetSource() {
        this._source = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sourceInput() {
        return this._source;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            approved_patches: cdktf.listMapper(cdktf.stringToTerraform)(this._approvedPatches),
            approved_patches_compliance_level: cdktf.stringToTerraform(this._approvedPatchesComplianceLevel),
            approved_patches_enable_non_security: cdktf.booleanToTerraform(this._approvedPatchesEnableNonSecurity),
            description: cdktf.stringToTerraform(this._description),
            name: cdktf.stringToTerraform(this._name),
            operating_system: cdktf.stringToTerraform(this._operatingSystem),
            rejected_patches: cdktf.listMapper(cdktf.stringToTerraform)(this._rejectedPatches),
            rejected_patches_action: cdktf.stringToTerraform(this._rejectedPatchesAction),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            approval_rule: cdktf.listMapper(ssmPatchBaselineApprovalRuleToTerraform)(this._approvalRule),
            global_filter: cdktf.listMapper(ssmPatchBaselineGlobalFilterToTerraform)(this._globalFilter),
            source: cdktf.listMapper(ssmPatchBaselineSourceToTerraform)(this._source),
        };
    }
}
//# sourceMappingURL=ssm-patch-baseline.js.map