// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function apiGatewayDomainNameEndpointConfigurationToTerraform(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 {
        types: cdktf.listMapper(cdktf.stringToTerraform)(struct.types),
    };
}
export class ApiGatewayDomainNameEndpointConfigurationOutputReference 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._types !== undefined) {
            hasAnyValues = true;
            internalValueResult.types = this._types;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._types = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._types = value.types;
        }
    }
    // types - computed: false, optional: false, required: true
    _types;
    get types() {
        return this.getListAttribute('types');
    }
    set types(value) {
        this._types = value;
    }
    // Temporarily expose input value. Use with caution.
    get typesInput() {
        return this._types;
    }
}
export function apiGatewayDomainNameMutualTlsAuthenticationToTerraform(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 {
        truststore_uri: cdktf.stringToTerraform(struct.truststoreUri),
        truststore_version: cdktf.stringToTerraform(struct.truststoreVersion),
    };
}
export class ApiGatewayDomainNameMutualTlsAuthenticationOutputReference 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._truststoreUri !== undefined) {
            hasAnyValues = true;
            internalValueResult.truststoreUri = this._truststoreUri;
        }
        if (this._truststoreVersion !== undefined) {
            hasAnyValues = true;
            internalValueResult.truststoreVersion = this._truststoreVersion;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._truststoreUri = undefined;
            this._truststoreVersion = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._truststoreUri = value.truststoreUri;
            this._truststoreVersion = value.truststoreVersion;
        }
    }
    // truststore_uri - computed: false, optional: false, required: true
    _truststoreUri;
    get truststoreUri() {
        return this.getStringAttribute('truststore_uri');
    }
    set truststoreUri(value) {
        this._truststoreUri = value;
    }
    // Temporarily expose input value. Use with caution.
    get truststoreUriInput() {
        return this._truststoreUri;
    }
    // truststore_version - computed: false, optional: true, required: false
    _truststoreVersion;
    get truststoreVersion() {
        return this.getStringAttribute('truststore_version');
    }
    set truststoreVersion(value) {
        this._truststoreVersion = value;
    }
    resetTruststoreVersion() {
        this._truststoreVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get truststoreVersionInput() {
        return this._truststoreVersion;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_domain_name aws_api_gateway_domain_name}
*/
export class ApiGatewayDomainName extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_api_gateway_domain_name";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_domain_name aws_api_gateway_domain_name} 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 ApiGatewayDomainNameConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_api_gateway_domain_name',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._certificateArn = config.certificateArn;
        this._certificateBody = config.certificateBody;
        this._certificateChain = config.certificateChain;
        this._certificateName = config.certificateName;
        this._certificatePrivateKey = config.certificatePrivateKey;
        this._domainName = config.domainName;
        this._ownershipVerificationCertificateArn = config.ownershipVerificationCertificateArn;
        this._regionalCertificateArn = config.regionalCertificateArn;
        this._regionalCertificateName = config.regionalCertificateName;
        this._securityPolicy = config.securityPolicy;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._endpointConfiguration.internalValue = config.endpointConfiguration;
        this._mutualTlsAuthentication.internalValue = config.mutualTlsAuthentication;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // certificate_arn - computed: false, optional: true, required: false
    _certificateArn;
    get certificateArn() {
        return this.getStringAttribute('certificate_arn');
    }
    set certificateArn(value) {
        this._certificateArn = value;
    }
    resetCertificateArn() {
        this._certificateArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get certificateArnInput() {
        return this._certificateArn;
    }
    // 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;
    }
    // certificate_name - computed: false, optional: true, required: false
    _certificateName;
    get certificateName() {
        return this.getStringAttribute('certificate_name');
    }
    set certificateName(value) {
        this._certificateName = value;
    }
    resetCertificateName() {
        this._certificateName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get certificateNameInput() {
        return this._certificateName;
    }
    // certificate_private_key - computed: false, optional: true, required: false
    _certificatePrivateKey;
    get certificatePrivateKey() {
        return this.getStringAttribute('certificate_private_key');
    }
    set certificatePrivateKey(value) {
        this._certificatePrivateKey = value;
    }
    resetCertificatePrivateKey() {
        this._certificatePrivateKey = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get certificatePrivateKeyInput() {
        return this._certificatePrivateKey;
    }
    // certificate_upload_date - computed: true, optional: false, required: false
    get certificateUploadDate() {
        return this.getStringAttribute('certificate_upload_date');
    }
    // cloudfront_domain_name - computed: true, optional: false, required: false
    get cloudfrontDomainName() {
        return this.getStringAttribute('cloudfront_domain_name');
    }
    // cloudfront_zone_id - computed: true, optional: false, required: false
    get cloudfrontZoneId() {
        return this.getStringAttribute('cloudfront_zone_id');
    }
    // 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');
    }
    // ownership_verification_certificate_arn - computed: true, optional: true, required: false
    _ownershipVerificationCertificateArn;
    get ownershipVerificationCertificateArn() {
        return this.getStringAttribute('ownership_verification_certificate_arn');
    }
    set ownershipVerificationCertificateArn(value) {
        this._ownershipVerificationCertificateArn = value;
    }
    resetOwnershipVerificationCertificateArn() {
        this._ownershipVerificationCertificateArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get ownershipVerificationCertificateArnInput() {
        return this._ownershipVerificationCertificateArn;
    }
    // regional_certificate_arn - computed: false, optional: true, required: false
    _regionalCertificateArn;
    get regionalCertificateArn() {
        return this.getStringAttribute('regional_certificate_arn');
    }
    set regionalCertificateArn(value) {
        this._regionalCertificateArn = value;
    }
    resetRegionalCertificateArn() {
        this._regionalCertificateArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get regionalCertificateArnInput() {
        return this._regionalCertificateArn;
    }
    // regional_certificate_name - computed: false, optional: true, required: false
    _regionalCertificateName;
    get regionalCertificateName() {
        return this.getStringAttribute('regional_certificate_name');
    }
    set regionalCertificateName(value) {
        this._regionalCertificateName = value;
    }
    resetRegionalCertificateName() {
        this._regionalCertificateName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get regionalCertificateNameInput() {
        return this._regionalCertificateName;
    }
    // regional_domain_name - computed: true, optional: false, required: false
    get regionalDomainName() {
        return this.getStringAttribute('regional_domain_name');
    }
    // regional_zone_id - computed: true, optional: false, required: false
    get regionalZoneId() {
        return this.getStringAttribute('regional_zone_id');
    }
    // security_policy - computed: true, optional: true, required: false
    _securityPolicy;
    get securityPolicy() {
        return this.getStringAttribute('security_policy');
    }
    set securityPolicy(value) {
        this._securityPolicy = value;
    }
    resetSecurityPolicy() {
        this._securityPolicy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get securityPolicyInput() {
        return this._securityPolicy;
    }
    // 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;
    }
    // endpoint_configuration - computed: false, optional: true, required: false
    _endpointConfiguration = new ApiGatewayDomainNameEndpointConfigurationOutputReference(this, "endpoint_configuration", true);
    get endpointConfiguration() {
        return this._endpointConfiguration;
    }
    putEndpointConfiguration(value) {
        this._endpointConfiguration.internalValue = value;
    }
    resetEndpointConfiguration() {
        this._endpointConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get endpointConfigurationInput() {
        return this._endpointConfiguration.internalValue;
    }
    // mutual_tls_authentication - computed: false, optional: true, required: false
    _mutualTlsAuthentication = new ApiGatewayDomainNameMutualTlsAuthenticationOutputReference(this, "mutual_tls_authentication", true);
    get mutualTlsAuthentication() {
        return this._mutualTlsAuthentication;
    }
    putMutualTlsAuthentication(value) {
        this._mutualTlsAuthentication.internalValue = value;
    }
    resetMutualTlsAuthentication() {
        this._mutualTlsAuthentication.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get mutualTlsAuthenticationInput() {
        return this._mutualTlsAuthentication.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            certificate_arn: cdktf.stringToTerraform(this._certificateArn),
            certificate_body: cdktf.stringToTerraform(this._certificateBody),
            certificate_chain: cdktf.stringToTerraform(this._certificateChain),
            certificate_name: cdktf.stringToTerraform(this._certificateName),
            certificate_private_key: cdktf.stringToTerraform(this._certificatePrivateKey),
            domain_name: cdktf.stringToTerraform(this._domainName),
            ownership_verification_certificate_arn: cdktf.stringToTerraform(this._ownershipVerificationCertificateArn),
            regional_certificate_arn: cdktf.stringToTerraform(this._regionalCertificateArn),
            regional_certificate_name: cdktf.stringToTerraform(this._regionalCertificateName),
            security_policy: cdktf.stringToTerraform(this._securityPolicy),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            endpoint_configuration: apiGatewayDomainNameEndpointConfigurationToTerraform(this._endpointConfiguration.internalValue),
            mutual_tls_authentication: apiGatewayDomainNameMutualTlsAuthenticationToTerraform(this._mutualTlsAuthentication.internalValue),
        };
    }
}
//# sourceMappingURL=api-gateway-domain-name.js.map