// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function amplifyDomainAssociationSubDomainToTerraform(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 {
        branch_name: cdktf.stringToTerraform(struct.branchName),
        prefix: cdktf.stringToTerraform(struct.prefix),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/amplify_domain_association aws_amplify_domain_association}
*/
export class AmplifyDomainAssociation extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_amplify_domain_association";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/amplify_domain_association aws_amplify_domain_association} 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 AmplifyDomainAssociationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_amplify_domain_association',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._appId = config.appId;
        this._domainName = config.domainName;
        this._waitForVerification = config.waitForVerification;
        this._subDomain = config.subDomain;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // app_id - computed: false, optional: false, required: true
    _appId;
    get appId() {
        return this.getStringAttribute('app_id');
    }
    set appId(value) {
        this._appId = value;
    }
    // Temporarily expose input value. Use with caution.
    get appIdInput() {
        return this._appId;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // certificate_verification_dns_record - computed: true, optional: false, required: false
    get certificateVerificationDnsRecord() {
        return this.getStringAttribute('certificate_verification_dns_record');
    }
    // domain_name - computed: false, optional: false, required: true
    _domainName;
    get domainName() {
        return this.getStringAttribute('domain_name');
    }
    set domainName(value) {
        this._domainName = value;
    }
    // Temporarily expose input value. Use with caution.
    get domainNameInput() {
        return this._domainName;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // wait_for_verification - computed: false, optional: true, required: false
    _waitForVerification;
    get waitForVerification() {
        return this.getBooleanAttribute('wait_for_verification');
    }
    set waitForVerification(value) {
        this._waitForVerification = value;
    }
    resetWaitForVerification() {
        this._waitForVerification = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get waitForVerificationInput() {
        return this._waitForVerification;
    }
    // sub_domain - computed: false, optional: false, required: true
    _subDomain;
    get subDomain() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('sub_domain')));
    }
    set subDomain(value) {
        this._subDomain = value;
    }
    // Temporarily expose input value. Use with caution.
    get subDomainInput() {
        return this._subDomain;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            app_id: cdktf.stringToTerraform(this._appId),
            domain_name: cdktf.stringToTerraform(this._domainName),
            wait_for_verification: cdktf.booleanToTerraform(this._waitForVerification),
            sub_domain: cdktf.listMapper(amplifyDomainAssociationSubDomainToTerraform)(this._subDomain),
        };
    }
}
//# sourceMappingURL=amplify-domain-association.js.map