// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function configConfigurationRecorderRecordingGroupToTerraform(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 {
        all_supported: cdktf.booleanToTerraform(struct.allSupported),
        include_global_resource_types: cdktf.booleanToTerraform(struct.includeGlobalResourceTypes),
        resource_types: cdktf.listMapper(cdktf.stringToTerraform)(struct.resourceTypes),
    };
}
export class ConfigConfigurationRecorderRecordingGroupOutputReference 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._allSupported !== undefined) {
            hasAnyValues = true;
            internalValueResult.allSupported = this._allSupported;
        }
        if (this._includeGlobalResourceTypes !== undefined) {
            hasAnyValues = true;
            internalValueResult.includeGlobalResourceTypes = this._includeGlobalResourceTypes;
        }
        if (this._resourceTypes !== undefined) {
            hasAnyValues = true;
            internalValueResult.resourceTypes = this._resourceTypes;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._allSupported = undefined;
            this._includeGlobalResourceTypes = undefined;
            this._resourceTypes = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._allSupported = value.allSupported;
            this._includeGlobalResourceTypes = value.includeGlobalResourceTypes;
            this._resourceTypes = value.resourceTypes;
        }
    }
    // all_supported - computed: false, optional: true, required: false
    _allSupported;
    get allSupported() {
        return this.getBooleanAttribute('all_supported');
    }
    set allSupported(value) {
        this._allSupported = value;
    }
    resetAllSupported() {
        this._allSupported = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get allSupportedInput() {
        return this._allSupported;
    }
    // include_global_resource_types - computed: false, optional: true, required: false
    _includeGlobalResourceTypes;
    get includeGlobalResourceTypes() {
        return this.getBooleanAttribute('include_global_resource_types');
    }
    set includeGlobalResourceTypes(value) {
        this._includeGlobalResourceTypes = value;
    }
    resetIncludeGlobalResourceTypes() {
        this._includeGlobalResourceTypes = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get includeGlobalResourceTypesInput() {
        return this._includeGlobalResourceTypes;
    }
    // resource_types - computed: false, optional: true, required: false
    _resourceTypes;
    get resourceTypes() {
        return cdktf.Fn.tolist(this.getListAttribute('resource_types'));
    }
    set resourceTypes(value) {
        this._resourceTypes = value;
    }
    resetResourceTypes() {
        this._resourceTypes = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resourceTypesInput() {
        return this._resourceTypes;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/config_configuration_recorder aws_config_configuration_recorder}
*/
export class ConfigConfigurationRecorder extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_config_configuration_recorder";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/config_configuration_recorder aws_config_configuration_recorder} 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 ConfigConfigurationRecorderConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_config_configuration_recorder',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._name = config.name;
        this._roleArn = config.roleArn;
        this._recordingGroup.internalValue = config.recordingGroup;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // name - computed: false, optional: true, required: false
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    resetName() {
        this._name = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // recording_group - computed: false, optional: true, required: false
    _recordingGroup = new ConfigConfigurationRecorderRecordingGroupOutputReference(this, "recording_group", true);
    get recordingGroup() {
        return this._recordingGroup;
    }
    putRecordingGroup(value) {
        this._recordingGroup.internalValue = value;
    }
    resetRecordingGroup() {
        this._recordingGroup.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get recordingGroupInput() {
        return this._recordingGroup.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            name: cdktf.stringToTerraform(this._name),
            role_arn: cdktf.stringToTerraform(this._roleArn),
            recording_group: configConfigurationRecorderRecordingGroupToTerraform(this._recordingGroup.internalValue),
        };
    }
}
//# sourceMappingURL=config-configuration-recorder.js.map