// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function route53RecordAliasToTerraform(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 {
        evaluate_target_health: cdktf.booleanToTerraform(struct.evaluateTargetHealth),
        name: cdktf.stringToTerraform(struct.name),
        zone_id: cdktf.stringToTerraform(struct.zoneId),
    };
}
export function route53RecordFailoverRoutingPolicyToTerraform(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 {
        type: cdktf.stringToTerraform(struct.type),
    };
}
export function route53RecordGeolocationRoutingPolicyToTerraform(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 {
        continent: cdktf.stringToTerraform(struct.continent),
        country: cdktf.stringToTerraform(struct.country),
        subdivision: cdktf.stringToTerraform(struct.subdivision),
    };
}
export function route53RecordLatencyRoutingPolicyToTerraform(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 {
        region: cdktf.stringToTerraform(struct.region),
    };
}
export function route53RecordWeightedRoutingPolicyToTerraform(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 {
        weight: cdktf.numberToTerraform(struct.weight),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/route53_record aws_route53_record}
*/
export class Route53Record extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_route53_record";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/route53_record aws_route53_record} 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 Route53RecordConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_route53_record',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._allowOverwrite = config.allowOverwrite;
        this._healthCheckId = config.healthCheckId;
        this._multivalueAnswerRoutingPolicy = config.multivalueAnswerRoutingPolicy;
        this._name = config.name;
        this._records = config.records;
        this._setIdentifier = config.setIdentifier;
        this._ttl = config.ttl;
        this._type = config.type;
        this._zoneId = config.zoneId;
        this._alias = config.alias;
        this._failoverRoutingPolicy = config.failoverRoutingPolicy;
        this._geolocationRoutingPolicy = config.geolocationRoutingPolicy;
        this._latencyRoutingPolicy = config.latencyRoutingPolicy;
        this._weightedRoutingPolicy = config.weightedRoutingPolicy;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // allow_overwrite - computed: true, optional: true, required: false
    _allowOverwrite;
    get allowOverwrite() {
        return this.getBooleanAttribute('allow_overwrite');
    }
    set allowOverwrite(value) {
        this._allowOverwrite = value;
    }
    resetAllowOverwrite() {
        this._allowOverwrite = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get allowOverwriteInput() {
        return this._allowOverwrite;
    }
    // fqdn - computed: true, optional: false, required: false
    get fqdn() {
        return this.getStringAttribute('fqdn');
    }
    // health_check_id - computed: false, optional: true, required: false
    _healthCheckId;
    get healthCheckId() {
        return this.getStringAttribute('health_check_id');
    }
    set healthCheckId(value) {
        this._healthCheckId = value;
    }
    resetHealthCheckId() {
        this._healthCheckId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get healthCheckIdInput() {
        return this._healthCheckId;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // multivalue_answer_routing_policy - computed: false, optional: true, required: false
    _multivalueAnswerRoutingPolicy;
    get multivalueAnswerRoutingPolicy() {
        return this.getBooleanAttribute('multivalue_answer_routing_policy');
    }
    set multivalueAnswerRoutingPolicy(value) {
        this._multivalueAnswerRoutingPolicy = value;
    }
    resetMultivalueAnswerRoutingPolicy() {
        this._multivalueAnswerRoutingPolicy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get multivalueAnswerRoutingPolicyInput() {
        return this._multivalueAnswerRoutingPolicy;
    }
    // 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;
    }
    // records - computed: false, optional: true, required: false
    _records;
    get records() {
        return cdktf.Fn.tolist(this.getListAttribute('records'));
    }
    set records(value) {
        this._records = value;
    }
    resetRecords() {
        this._records = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get recordsInput() {
        return this._records;
    }
    // set_identifier - computed: false, optional: true, required: false
    _setIdentifier;
    get setIdentifier() {
        return this.getStringAttribute('set_identifier');
    }
    set setIdentifier(value) {
        this._setIdentifier = value;
    }
    resetSetIdentifier() {
        this._setIdentifier = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get setIdentifierInput() {
        return this._setIdentifier;
    }
    // ttl - computed: false, optional: true, required: false
    _ttl;
    get ttl() {
        return this.getNumberAttribute('ttl');
    }
    set ttl(value) {
        this._ttl = value;
    }
    resetTtl() {
        this._ttl = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get ttlInput() {
        return this._ttl;
    }
    // type - computed: false, optional: false, required: true
    _type;
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
    // zone_id - computed: false, optional: false, required: true
    _zoneId;
    get zoneId() {
        return this.getStringAttribute('zone_id');
    }
    set zoneId(value) {
        this._zoneId = value;
    }
    // Temporarily expose input value. Use with caution.
    get zoneIdInput() {
        return this._zoneId;
    }
    // alias - computed: false, optional: true, required: false
    _alias;
    get alias() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('alias')));
    }
    set alias(value) {
        this._alias = value;
    }
    resetAlias() {
        this._alias = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get aliasInput() {
        return this._alias;
    }
    // failover_routing_policy - computed: false, optional: true, required: false
    _failoverRoutingPolicy;
    get failoverRoutingPolicy() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('failover_routing_policy');
    }
    set failoverRoutingPolicy(value) {
        this._failoverRoutingPolicy = value;
    }
    resetFailoverRoutingPolicy() {
        this._failoverRoutingPolicy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get failoverRoutingPolicyInput() {
        return this._failoverRoutingPolicy;
    }
    // geolocation_routing_policy - computed: false, optional: true, required: false
    _geolocationRoutingPolicy;
    get geolocationRoutingPolicy() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('geolocation_routing_policy');
    }
    set geolocationRoutingPolicy(value) {
        this._geolocationRoutingPolicy = value;
    }
    resetGeolocationRoutingPolicy() {
        this._geolocationRoutingPolicy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get geolocationRoutingPolicyInput() {
        return this._geolocationRoutingPolicy;
    }
    // latency_routing_policy - computed: false, optional: true, required: false
    _latencyRoutingPolicy;
    get latencyRoutingPolicy() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('latency_routing_policy');
    }
    set latencyRoutingPolicy(value) {
        this._latencyRoutingPolicy = value;
    }
    resetLatencyRoutingPolicy() {
        this._latencyRoutingPolicy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get latencyRoutingPolicyInput() {
        return this._latencyRoutingPolicy;
    }
    // weighted_routing_policy - computed: false, optional: true, required: false
    _weightedRoutingPolicy;
    get weightedRoutingPolicy() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('weighted_routing_policy');
    }
    set weightedRoutingPolicy(value) {
        this._weightedRoutingPolicy = value;
    }
    resetWeightedRoutingPolicy() {
        this._weightedRoutingPolicy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get weightedRoutingPolicyInput() {
        return this._weightedRoutingPolicy;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            allow_overwrite: cdktf.booleanToTerraform(this._allowOverwrite),
            health_check_id: cdktf.stringToTerraform(this._healthCheckId),
            multivalue_answer_routing_policy: cdktf.booleanToTerraform(this._multivalueAnswerRoutingPolicy),
            name: cdktf.stringToTerraform(this._name),
            records: cdktf.listMapper(cdktf.stringToTerraform)(this._records),
            set_identifier: cdktf.stringToTerraform(this._setIdentifier),
            ttl: cdktf.numberToTerraform(this._ttl),
            type: cdktf.stringToTerraform(this._type),
            zone_id: cdktf.stringToTerraform(this._zoneId),
            alias: cdktf.listMapper(route53RecordAliasToTerraform)(this._alias),
            failover_routing_policy: cdktf.listMapper(route53RecordFailoverRoutingPolicyToTerraform)(this._failoverRoutingPolicy),
            geolocation_routing_policy: cdktf.listMapper(route53RecordGeolocationRoutingPolicyToTerraform)(this._geolocationRoutingPolicy),
            latency_routing_policy: cdktf.listMapper(route53RecordLatencyRoutingPolicyToTerraform)(this._latencyRoutingPolicy),
            weighted_routing_policy: cdktf.listMapper(route53RecordWeightedRoutingPolicyToTerraform)(this._weightedRoutingPolicy),
        };
    }
}
//# sourceMappingURL=route53-record.js.map