// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function configOrganizationManagedRuleTimeoutsToTerraform(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 {
        create: cdktf.stringToTerraform(struct.create),
        delete: cdktf.stringToTerraform(struct.delete),
        update: cdktf.stringToTerraform(struct.update),
    };
}
export class ConfigOrganizationManagedRuleTimeoutsOutputReference 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._create !== undefined) {
            hasAnyValues = true;
            internalValueResult.create = this._create;
        }
        if (this._delete !== undefined) {
            hasAnyValues = true;
            internalValueResult.delete = this._delete;
        }
        if (this._update !== undefined) {
            hasAnyValues = true;
            internalValueResult.update = this._update;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._create = undefined;
            this._delete = undefined;
            this._update = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._create = value.create;
            this._delete = value.delete;
            this._update = value.update;
        }
    }
    // create - computed: false, optional: true, required: false
    _create;
    get create() {
        return this.getStringAttribute('create');
    }
    set create(value) {
        this._create = value;
    }
    resetCreate() {
        this._create = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get createInput() {
        return this._create;
    }
    // delete - computed: false, optional: true, required: false
    _delete;
    get delete() {
        return this.getStringAttribute('delete');
    }
    set delete(value) {
        this._delete = value;
    }
    resetDelete() {
        this._delete = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteInput() {
        return this._delete;
    }
    // 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/config_organization_managed_rule aws_config_organization_managed_rule}
*/
export class ConfigOrganizationManagedRule extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_config_organization_managed_rule";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/config_organization_managed_rule aws_config_organization_managed_rule} 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 ConfigOrganizationManagedRuleConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_config_organization_managed_rule',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._excludedAccounts = config.excludedAccounts;
        this._inputParameters = config.inputParameters;
        this._maximumExecutionFrequency = config.maximumExecutionFrequency;
        this._name = config.name;
        this._resourceIdScope = config.resourceIdScope;
        this._resourceTypesScope = config.resourceTypesScope;
        this._ruleIdentifier = config.ruleIdentifier;
        this._tagKeyScope = config.tagKeyScope;
        this._tagValueScope = config.tagValueScope;
        this._timeouts.internalValue = config.timeouts;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // 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;
    }
    // excluded_accounts - computed: false, optional: true, required: false
    _excludedAccounts;
    get excludedAccounts() {
        return cdktf.Fn.tolist(this.getListAttribute('excluded_accounts'));
    }
    set excludedAccounts(value) {
        this._excludedAccounts = value;
    }
    resetExcludedAccounts() {
        this._excludedAccounts = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get excludedAccountsInput() {
        return this._excludedAccounts;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // input_parameters - computed: false, optional: true, required: false
    _inputParameters;
    get inputParameters() {
        return this.getStringAttribute('input_parameters');
    }
    set inputParameters(value) {
        this._inputParameters = value;
    }
    resetInputParameters() {
        this._inputParameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get inputParametersInput() {
        return this._inputParameters;
    }
    // maximum_execution_frequency - computed: false, optional: true, required: false
    _maximumExecutionFrequency;
    get maximumExecutionFrequency() {
        return this.getStringAttribute('maximum_execution_frequency');
    }
    set maximumExecutionFrequency(value) {
        this._maximumExecutionFrequency = value;
    }
    resetMaximumExecutionFrequency() {
        this._maximumExecutionFrequency = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maximumExecutionFrequencyInput() {
        return this._maximumExecutionFrequency;
    }
    // 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;
    }
    // resource_id_scope - computed: false, optional: true, required: false
    _resourceIdScope;
    get resourceIdScope() {
        return this.getStringAttribute('resource_id_scope');
    }
    set resourceIdScope(value) {
        this._resourceIdScope = value;
    }
    resetResourceIdScope() {
        this._resourceIdScope = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resourceIdScopeInput() {
        return this._resourceIdScope;
    }
    // resource_types_scope - computed: false, optional: true, required: false
    _resourceTypesScope;
    get resourceTypesScope() {
        return cdktf.Fn.tolist(this.getListAttribute('resource_types_scope'));
    }
    set resourceTypesScope(value) {
        this._resourceTypesScope = value;
    }
    resetResourceTypesScope() {
        this._resourceTypesScope = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resourceTypesScopeInput() {
        return this._resourceTypesScope;
    }
    // rule_identifier - computed: false, optional: false, required: true
    _ruleIdentifier;
    get ruleIdentifier() {
        return this.getStringAttribute('rule_identifier');
    }
    set ruleIdentifier(value) {
        this._ruleIdentifier = value;
    }
    // Temporarily expose input value. Use with caution.
    get ruleIdentifierInput() {
        return this._ruleIdentifier;
    }
    // tag_key_scope - computed: false, optional: true, required: false
    _tagKeyScope;
    get tagKeyScope() {
        return this.getStringAttribute('tag_key_scope');
    }
    set tagKeyScope(value) {
        this._tagKeyScope = value;
    }
    resetTagKeyScope() {
        this._tagKeyScope = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagKeyScopeInput() {
        return this._tagKeyScope;
    }
    // tag_value_scope - computed: false, optional: true, required: false
    _tagValueScope;
    get tagValueScope() {
        return this.getStringAttribute('tag_value_scope');
    }
    set tagValueScope(value) {
        this._tagValueScope = value;
    }
    resetTagValueScope() {
        this._tagValueScope = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagValueScopeInput() {
        return this._tagValueScope;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new ConfigOrganizationManagedRuleTimeoutsOutputReference(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 {
            description: cdktf.stringToTerraform(this._description),
            excluded_accounts: cdktf.listMapper(cdktf.stringToTerraform)(this._excludedAccounts),
            input_parameters: cdktf.stringToTerraform(this._inputParameters),
            maximum_execution_frequency: cdktf.stringToTerraform(this._maximumExecutionFrequency),
            name: cdktf.stringToTerraform(this._name),
            resource_id_scope: cdktf.stringToTerraform(this._resourceIdScope),
            resource_types_scope: cdktf.listMapper(cdktf.stringToTerraform)(this._resourceTypesScope),
            rule_identifier: cdktf.stringToTerraform(this._ruleIdentifier),
            tag_key_scope: cdktf.stringToTerraform(this._tagKeyScope),
            tag_value_scope: cdktf.stringToTerraform(this._tagValueScope),
            timeouts: configOrganizationManagedRuleTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
}
//# sourceMappingURL=config-organization-managed-rule.js.map