// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function fmsPolicyExcludeMapToTerraform(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 {
        account: cdktf.listMapper(cdktf.stringToTerraform)(struct.account),
        orgunit: cdktf.listMapper(cdktf.stringToTerraform)(struct.orgunit),
    };
}
export class FmsPolicyExcludeMapOutputReference 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._account !== undefined) {
            hasAnyValues = true;
            internalValueResult.account = this._account;
        }
        if (this._orgunit !== undefined) {
            hasAnyValues = true;
            internalValueResult.orgunit = this._orgunit;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._account = undefined;
            this._orgunit = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._account = value.account;
            this._orgunit = value.orgunit;
        }
    }
    // account - computed: false, optional: true, required: false
    _account;
    get account() {
        return cdktf.Fn.tolist(this.getListAttribute('account'));
    }
    set account(value) {
        this._account = value;
    }
    resetAccount() {
        this._account = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accountInput() {
        return this._account;
    }
    // orgunit - computed: false, optional: true, required: false
    _orgunit;
    get orgunit() {
        return cdktf.Fn.tolist(this.getListAttribute('orgunit'));
    }
    set orgunit(value) {
        this._orgunit = value;
    }
    resetOrgunit() {
        this._orgunit = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get orgunitInput() {
        return this._orgunit;
    }
}
export function fmsPolicyIncludeMapToTerraform(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 {
        account: cdktf.listMapper(cdktf.stringToTerraform)(struct.account),
        orgunit: cdktf.listMapper(cdktf.stringToTerraform)(struct.orgunit),
    };
}
export class FmsPolicyIncludeMapOutputReference 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._account !== undefined) {
            hasAnyValues = true;
            internalValueResult.account = this._account;
        }
        if (this._orgunit !== undefined) {
            hasAnyValues = true;
            internalValueResult.orgunit = this._orgunit;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._account = undefined;
            this._orgunit = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._account = value.account;
            this._orgunit = value.orgunit;
        }
    }
    // account - computed: false, optional: true, required: false
    _account;
    get account() {
        return cdktf.Fn.tolist(this.getListAttribute('account'));
    }
    set account(value) {
        this._account = value;
    }
    resetAccount() {
        this._account = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accountInput() {
        return this._account;
    }
    // orgunit - computed: false, optional: true, required: false
    _orgunit;
    get orgunit() {
        return cdktf.Fn.tolist(this.getListAttribute('orgunit'));
    }
    set orgunit(value) {
        this._orgunit = value;
    }
    resetOrgunit() {
        this._orgunit = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get orgunitInput() {
        return this._orgunit;
    }
}
export function fmsPolicySecurityServicePolicyDataToTerraform(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 {
        managed_service_data: cdktf.stringToTerraform(struct.managedServiceData),
        type: cdktf.stringToTerraform(struct.type),
    };
}
export class FmsPolicySecurityServicePolicyDataOutputReference 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._managedServiceData !== undefined) {
            hasAnyValues = true;
            internalValueResult.managedServiceData = this._managedServiceData;
        }
        if (this._type !== undefined) {
            hasAnyValues = true;
            internalValueResult.type = this._type;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._managedServiceData = undefined;
            this._type = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._managedServiceData = value.managedServiceData;
            this._type = value.type;
        }
    }
    // managed_service_data - computed: false, optional: true, required: false
    _managedServiceData;
    get managedServiceData() {
        return this.getStringAttribute('managed_service_data');
    }
    set managedServiceData(value) {
        this._managedServiceData = value;
    }
    resetManagedServiceData() {
        this._managedServiceData = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get managedServiceDataInput() {
        return this._managedServiceData;
    }
    // type - computed: false, optional: false, required: true
    _type;
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/fms_policy aws_fms_policy}
*/
export class FmsPolicy extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_fms_policy";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/fms_policy aws_fms_policy} 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 FmsPolicyConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_fms_policy',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._deleteAllPolicyResources = config.deleteAllPolicyResources;
        this._deleteUnusedFmManagedResources = config.deleteUnusedFmManagedResources;
        this._excludeResourceTags = config.excludeResourceTags;
        this._name = config.name;
        this._remediationEnabled = config.remediationEnabled;
        this._resourceTags = config.resourceTags;
        this._resourceType = config.resourceType;
        this._resourceTypeList = config.resourceTypeList;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._excludeMap.internalValue = config.excludeMap;
        this._includeMap.internalValue = config.includeMap;
        this._securityServicePolicyData.internalValue = config.securityServicePolicyData;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // delete_all_policy_resources - computed: false, optional: true, required: false
    _deleteAllPolicyResources;
    get deleteAllPolicyResources() {
        return this.getBooleanAttribute('delete_all_policy_resources');
    }
    set deleteAllPolicyResources(value) {
        this._deleteAllPolicyResources = value;
    }
    resetDeleteAllPolicyResources() {
        this._deleteAllPolicyResources = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteAllPolicyResourcesInput() {
        return this._deleteAllPolicyResources;
    }
    // delete_unused_fm_managed_resources - computed: false, optional: true, required: false
    _deleteUnusedFmManagedResources;
    get deleteUnusedFmManagedResources() {
        return this.getBooleanAttribute('delete_unused_fm_managed_resources');
    }
    set deleteUnusedFmManagedResources(value) {
        this._deleteUnusedFmManagedResources = value;
    }
    resetDeleteUnusedFmManagedResources() {
        this._deleteUnusedFmManagedResources = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteUnusedFmManagedResourcesInput() {
        return this._deleteUnusedFmManagedResources;
    }
    // exclude_resource_tags - computed: false, optional: false, required: true
    _excludeResourceTags;
    get excludeResourceTags() {
        return this.getBooleanAttribute('exclude_resource_tags');
    }
    set excludeResourceTags(value) {
        this._excludeResourceTags = value;
    }
    // Temporarily expose input value. Use with caution.
    get excludeResourceTagsInput() {
        return this._excludeResourceTags;
    }
    // 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;
    }
    // policy_update_token - computed: true, optional: false, required: false
    get policyUpdateToken() {
        return this.getStringAttribute('policy_update_token');
    }
    // remediation_enabled - computed: false, optional: true, required: false
    _remediationEnabled;
    get remediationEnabled() {
        return this.getBooleanAttribute('remediation_enabled');
    }
    set remediationEnabled(value) {
        this._remediationEnabled = value;
    }
    resetRemediationEnabled() {
        this._remediationEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get remediationEnabledInput() {
        return this._remediationEnabled;
    }
    // resource_tags - computed: false, optional: true, required: false
    _resourceTags;
    get resourceTags() {
        return this.getStringMapAttribute('resource_tags');
    }
    set resourceTags(value) {
        this._resourceTags = value;
    }
    resetResourceTags() {
        this._resourceTags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resourceTagsInput() {
        return this._resourceTags;
    }
    // resource_type - computed: true, 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;
    }
    // resource_type_list - computed: true, optional: true, required: false
    _resourceTypeList;
    get resourceTypeList() {
        return cdktf.Fn.tolist(this.getListAttribute('resource_type_list'));
    }
    set resourceTypeList(value) {
        this._resourceTypeList = value;
    }
    resetResourceTypeList() {
        this._resourceTypeList = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resourceTypeListInput() {
        return this._resourceTypeList;
    }
    // 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;
    }
    // exclude_map - computed: false, optional: true, required: false
    _excludeMap = new FmsPolicyExcludeMapOutputReference(this, "exclude_map", true);
    get excludeMap() {
        return this._excludeMap;
    }
    putExcludeMap(value) {
        this._excludeMap.internalValue = value;
    }
    resetExcludeMap() {
        this._excludeMap.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get excludeMapInput() {
        return this._excludeMap.internalValue;
    }
    // include_map - computed: false, optional: true, required: false
    _includeMap = new FmsPolicyIncludeMapOutputReference(this, "include_map", true);
    get includeMap() {
        return this._includeMap;
    }
    putIncludeMap(value) {
        this._includeMap.internalValue = value;
    }
    resetIncludeMap() {
        this._includeMap.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get includeMapInput() {
        return this._includeMap.internalValue;
    }
    // security_service_policy_data - computed: false, optional: false, required: true
    _securityServicePolicyData = new FmsPolicySecurityServicePolicyDataOutputReference(this, "security_service_policy_data", true);
    get securityServicePolicyData() {
        return this._securityServicePolicyData;
    }
    putSecurityServicePolicyData(value) {
        this._securityServicePolicyData.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get securityServicePolicyDataInput() {
        return this._securityServicePolicyData.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            delete_all_policy_resources: cdktf.booleanToTerraform(this._deleteAllPolicyResources),
            delete_unused_fm_managed_resources: cdktf.booleanToTerraform(this._deleteUnusedFmManagedResources),
            exclude_resource_tags: cdktf.booleanToTerraform(this._excludeResourceTags),
            name: cdktf.stringToTerraform(this._name),
            remediation_enabled: cdktf.booleanToTerraform(this._remediationEnabled),
            resource_tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._resourceTags),
            resource_type: cdktf.stringToTerraform(this._resourceType),
            resource_type_list: cdktf.listMapper(cdktf.stringToTerraform)(this._resourceTypeList),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            exclude_map: fmsPolicyExcludeMapToTerraform(this._excludeMap.internalValue),
            include_map: fmsPolicyIncludeMapToTerraform(this._includeMap.internalValue),
            security_service_policy_data: fmsPolicySecurityServicePolicyDataToTerraform(this._securityServicePolicyData.internalValue),
        };
    }
}
//# sourceMappingURL=fms-policy.js.map