// generated from terraform resource schema
import * as cdktf from 'cdktf';
export class AcmCertificateDomainValidationOptions extends cdktf.ComplexComputedList {
    // domain_name - computed: true, optional: false, required: false
    get domainName() {
        return this.getStringAttribute('domain_name');
    }
    // resource_record_name - computed: true, optional: false, required: false
    get resourceRecordName() {
        return this.getStringAttribute('resource_record_name');
    }
    // resource_record_type - computed: true, optional: false, required: false
    get resourceRecordType() {
        return this.getStringAttribute('resource_record_type');
    }
    // resource_record_value - computed: true, optional: false, required: false
    get resourceRecordValue() {
        return this.getStringAttribute('resource_record_value');
    }
}
export function acmCertificateOptionsToTerraform(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 {
        certificate_transparency_logging_preference: cdktf.stringToTerraform(struct.certificateTransparencyLoggingPreference),
    };
}
export class AcmCertificateOptionsOutputReference 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._certificateTransparencyLoggingPreference !== undefined) {
            hasAnyValues = true;
            internalValueResult.certificateTransparencyLoggingPreference = this._certificateTransparencyLoggingPreference;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._certificateTransparencyLoggingPreference = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._certificateTransparencyLoggingPreference = value.certificateTransparencyLoggingPreference;
        }
    }
    // certificate_transparency_logging_preference - computed: false, optional: true, required: false
    _certificateTransparencyLoggingPreference;
    get certificateTransparencyLoggingPreference() {
        return this.getStringAttribute('certificate_transparency_logging_preference');
    }
    set certificateTransparencyLoggingPreference(value) {
        this._certificateTransparencyLoggingPreference = value;
    }
    resetCertificateTransparencyLoggingPreference() {
        this._certificateTransparencyLoggingPreference = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get certificateTransparencyLoggingPreferenceInput() {
        return this._certificateTransparencyLoggingPreference;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/acm_certificate aws_acm_certificate}
*/
export class AcmCertificate extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_acm_certificate";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/acm_certificate aws_acm_certificate} 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 AcmCertificateConfig = {}
    */
    constructor(scope, id, config = {}) {
        super(scope, id, {
            terraformResourceType: 'aws_acm_certificate',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._certificateAuthorityArn = config.certificateAuthorityArn;
        this._certificateBody = config.certificateBody;
        this._certificateChain = config.certificateChain;
        this._domainName = config.domainName;
        this._privateKey = config.privateKey;
        this._subjectAlternativeNames = config.subjectAlternativeNames;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._validationMethod = config.validationMethod;
        this._options.internalValue = config.options;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // certificate_authority_arn - computed: false, optional: true, required: false
    _certificateAuthorityArn;
    get certificateAuthorityArn() {
        return this.getStringAttribute('certificate_authority_arn');
    }
    set certificateAuthorityArn(value) {
        this._certificateAuthorityArn = value;
    }
    resetCertificateAuthorityArn() {
        this._certificateAuthorityArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get certificateAuthorityArnInput() {
        return this._certificateAuthorityArn;
    }
    // certificate_body - computed: false, optional: true, required: false
    _certificateBody;
    get certificateBody() {
        return this.getStringAttribute('certificate_body');
    }
    set certificateBody(value) {
        this._certificateBody = value;
    }
    resetCertificateBody() {
        this._certificateBody = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get certificateBodyInput() {
        return this._certificateBody;
    }
    // certificate_chain - computed: false, optional: true, required: false
    _certificateChain;
    get certificateChain() {
        return this.getStringAttribute('certificate_chain');
    }
    set certificateChain(value) {
        this._certificateChain = value;
    }
    resetCertificateChain() {
        this._certificateChain = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get certificateChainInput() {
        return this._certificateChain;
    }
    // domain_name - computed: true, optional: true, required: false
    _domainName;
    get domainName() {
        return this.getStringAttribute('domain_name');
    }
    set domainName(value) {
        this._domainName = value;
    }
    resetDomainName() {
        this._domainName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get domainNameInput() {
        return this._domainName;
    }
    // domain_validation_options - computed: true, optional: false, required: false
    domainValidationOptions(index) {
        return new AcmCertificateDomainValidationOptions(this, 'domain_validation_options', index, true);
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // private_key - computed: false, optional: true, required: false
    _privateKey;
    get privateKey() {
        return this.getStringAttribute('private_key');
    }
    set privateKey(value) {
        this._privateKey = value;
    }
    resetPrivateKey() {
        this._privateKey = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get privateKeyInput() {
        return this._privateKey;
    }
    // status - computed: true, optional: false, required: false
    get status() {
        return this.getStringAttribute('status');
    }
    // subject_alternative_names - computed: true, optional: true, required: false
    _subjectAlternativeNames;
    get subjectAlternativeNames() {
        return cdktf.Fn.tolist(this.getListAttribute('subject_alternative_names'));
    }
    set subjectAlternativeNames(value) {
        this._subjectAlternativeNames = value;
    }
    resetSubjectAlternativeNames() {
        this._subjectAlternativeNames = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get subjectAlternativeNamesInput() {
        return this._subjectAlternativeNames;
    }
    // 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;
    }
    // validation_emails - computed: true, optional: false, required: false
    get validationEmails() {
        return this.getListAttribute('validation_emails');
    }
    // validation_method - computed: true, optional: true, required: false
    _validationMethod;
    get validationMethod() {
        return this.getStringAttribute('validation_method');
    }
    set validationMethod(value) {
        this._validationMethod = value;
    }
    resetValidationMethod() {
        this._validationMethod = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get validationMethodInput() {
        return this._validationMethod;
    }
    // options - computed: false, optional: true, required: false
    _options = new AcmCertificateOptionsOutputReference(this, "options", true);
    get options() {
        return this._options;
    }
    putOptions(value) {
        this._options.internalValue = value;
    }
    resetOptions() {
        this._options.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get optionsInput() {
        return this._options.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            certificate_authority_arn: cdktf.stringToTerraform(this._certificateAuthorityArn),
            certificate_body: cdktf.stringToTerraform(this._certificateBody),
            certificate_chain: cdktf.stringToTerraform(this._certificateChain),
            domain_name: cdktf.stringToTerraform(this._domainName),
            private_key: cdktf.stringToTerraform(this._privateKey),
            subject_alternative_names: cdktf.listMapper(cdktf.stringToTerraform)(this._subjectAlternativeNames),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            validation_method: cdktf.stringToTerraform(this._validationMethod),
            options: acmCertificateOptionsToTerraform(this._options.internalValue),
        };
    }
}
//# sourceMappingURL=acm-certificate.js.map