// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceNlbResourceToTerraform(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 {
        arn: cdktf.stringToTerraform(struct.arn),
    };
}
export class Route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceNlbResourceOutputReference 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._arn !== undefined) {
            hasAnyValues = true;
            internalValueResult.arn = this._arn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._arn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._arn = value.arn;
        }
    }
    // arn - computed: false, optional: true, required: false
    _arn;
    get arn() {
        return this.getStringAttribute('arn');
    }
    set arn(value) {
        this._arn = value;
    }
    resetArn() {
        this._arn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get arnInput() {
        return this._arn;
    }
}
export function route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceR53ResourceToTerraform(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 {
        domain_name: cdktf.stringToTerraform(struct.domainName),
        record_set_id: cdktf.stringToTerraform(struct.recordSetId),
    };
}
export class Route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceR53ResourceOutputReference 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._domainName !== undefined) {
            hasAnyValues = true;
            internalValueResult.domainName = this._domainName;
        }
        if (this._recordSetId !== undefined) {
            hasAnyValues = true;
            internalValueResult.recordSetId = this._recordSetId;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._domainName = undefined;
            this._recordSetId = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._domainName = value.domainName;
            this._recordSetId = value.recordSetId;
        }
    }
    // domain_name - computed: false, 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;
    }
    // record_set_id - computed: false, optional: true, required: false
    _recordSetId;
    get recordSetId() {
        return this.getStringAttribute('record_set_id');
    }
    set recordSetId(value) {
        this._recordSetId = value;
    }
    resetRecordSetId() {
        this._recordSetId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get recordSetIdInput() {
        return this._recordSetId;
    }
}
export function route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceToTerraform(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 {
        nlb_resource: route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceNlbResourceToTerraform(struct.nlbResource),
        r53_resource: route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceR53ResourceToTerraform(struct.r53Resource),
    };
}
export class Route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceOutputReference 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._nlbResource?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.nlbResource = this._nlbResource?.internalValue;
        }
        if (this._r53Resource?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.r53Resource = this._r53Resource?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._nlbResource.internalValue = undefined;
            this._r53Resource.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._nlbResource.internalValue = value.nlbResource;
            this._r53Resource.internalValue = value.r53Resource;
        }
    }
    // nlb_resource - computed: false, optional: true, required: false
    _nlbResource = new Route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceNlbResourceOutputReference(this, "nlb_resource", true);
    get nlbResource() {
        return this._nlbResource;
    }
    putNlbResource(value) {
        this._nlbResource.internalValue = value;
    }
    resetNlbResource() {
        this._nlbResource.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nlbResourceInput() {
        return this._nlbResource.internalValue;
    }
    // r53_resource - computed: false, optional: true, required: false
    _r53Resource = new Route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceR53ResourceOutputReference(this, "r53_resource", true);
    get r53Resource() {
        return this._r53Resource;
    }
    putR53Resource(value) {
        this._r53Resource.internalValue = value;
    }
    resetR53Resource() {
        this._r53Resource.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get r53ResourceInput() {
        return this._r53Resource.internalValue;
    }
}
export function route53RecoveryreadinessResourceSetResourcesDnsTargetResourceToTerraform(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 {
        domain_name: cdktf.stringToTerraform(struct.domainName),
        hosted_zone_arn: cdktf.stringToTerraform(struct.hostedZoneArn),
        record_set_id: cdktf.stringToTerraform(struct.recordSetId),
        record_type: cdktf.stringToTerraform(struct.recordType),
        target_resource: route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceToTerraform(struct.targetResource),
    };
}
export class Route53RecoveryreadinessResourceSetResourcesDnsTargetResourceOutputReference 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._domainName !== undefined) {
            hasAnyValues = true;
            internalValueResult.domainName = this._domainName;
        }
        if (this._hostedZoneArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.hostedZoneArn = this._hostedZoneArn;
        }
        if (this._recordSetId !== undefined) {
            hasAnyValues = true;
            internalValueResult.recordSetId = this._recordSetId;
        }
        if (this._recordType !== undefined) {
            hasAnyValues = true;
            internalValueResult.recordType = this._recordType;
        }
        if (this._targetResource?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.targetResource = this._targetResource?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._domainName = undefined;
            this._hostedZoneArn = undefined;
            this._recordSetId = undefined;
            this._recordType = undefined;
            this._targetResource.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._domainName = value.domainName;
            this._hostedZoneArn = value.hostedZoneArn;
            this._recordSetId = value.recordSetId;
            this._recordType = value.recordType;
            this._targetResource.internalValue = value.targetResource;
        }
    }
    // 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;
    }
    // hosted_zone_arn - computed: false, optional: true, required: false
    _hostedZoneArn;
    get hostedZoneArn() {
        return this.getStringAttribute('hosted_zone_arn');
    }
    set hostedZoneArn(value) {
        this._hostedZoneArn = value;
    }
    resetHostedZoneArn() {
        this._hostedZoneArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get hostedZoneArnInput() {
        return this._hostedZoneArn;
    }
    // record_set_id - computed: false, optional: true, required: false
    _recordSetId;
    get recordSetId() {
        return this.getStringAttribute('record_set_id');
    }
    set recordSetId(value) {
        this._recordSetId = value;
    }
    resetRecordSetId() {
        this._recordSetId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get recordSetIdInput() {
        return this._recordSetId;
    }
    // record_type - computed: false, optional: true, required: false
    _recordType;
    get recordType() {
        return this.getStringAttribute('record_type');
    }
    set recordType(value) {
        this._recordType = value;
    }
    resetRecordType() {
        this._recordType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get recordTypeInput() {
        return this._recordType;
    }
    // target_resource - computed: false, optional: true, required: false
    _targetResource = new Route53RecoveryreadinessResourceSetResourcesDnsTargetResourceTargetResourceOutputReference(this, "target_resource", true);
    get targetResource() {
        return this._targetResource;
    }
    putTargetResource(value) {
        this._targetResource.internalValue = value;
    }
    resetTargetResource() {
        this._targetResource.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get targetResourceInput() {
        return this._targetResource.internalValue;
    }
}
export function route53RecoveryreadinessResourceSetResourcesToTerraform(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 {
        readiness_scopes: cdktf.listMapper(cdktf.stringToTerraform)(struct.readinessScopes),
        resource_arn: cdktf.stringToTerraform(struct.resourceArn),
        dns_target_resource: route53RecoveryreadinessResourceSetResourcesDnsTargetResourceToTerraform(struct.dnsTargetResource),
    };
}
export function route53RecoveryreadinessResourceSetTimeoutsToTerraform(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 {
        delete: cdktf.stringToTerraform(struct.delete),
    };
}
export class Route53RecoveryreadinessResourceSetTimeoutsOutputReference 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._delete !== undefined) {
            hasAnyValues = true;
            internalValueResult.delete = this._delete;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._delete = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._delete = value.delete;
        }
    }
    // delete - computed: false, optional: true, required: false
    _delete;
    get delete() {
        return this.getStringAttribute('delete');
    }
    set delete(value) {
        this._delete = value;
    }
    resetDelete() {
        this._delete = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteInput() {
        return this._delete;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/route53recoveryreadiness_resource_set aws_route53recoveryreadiness_resource_set}
*/
export class Route53RecoveryreadinessResourceSet extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_route53recoveryreadiness_resource_set";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/route53recoveryreadiness_resource_set aws_route53recoveryreadiness_resource_set} 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 Route53RecoveryreadinessResourceSetConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_route53recoveryreadiness_resource_set',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._resourceSetName = config.resourceSetName;
        this._resourceSetType = config.resourceSetType;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._resources = config.resources;
        this._timeouts.internalValue = config.timeouts;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // resource_set_name - computed: false, optional: false, required: true
    _resourceSetName;
    get resourceSetName() {
        return this.getStringAttribute('resource_set_name');
    }
    set resourceSetName(value) {
        this._resourceSetName = value;
    }
    // Temporarily expose input value. Use with caution.
    get resourceSetNameInput() {
        return this._resourceSetName;
    }
    // resource_set_type - computed: false, optional: false, required: true
    _resourceSetType;
    get resourceSetType() {
        return this.getStringAttribute('resource_set_type');
    }
    set resourceSetType(value) {
        this._resourceSetType = value;
    }
    // Temporarily expose input value. Use with caution.
    get resourceSetTypeInput() {
        return this._resourceSetType;
    }
    // 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;
    }
    // resources - computed: false, optional: false, required: true
    _resources;
    get resources() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('resources');
    }
    set resources(value) {
        this._resources = value;
    }
    // Temporarily expose input value. Use with caution.
    get resourcesInput() {
        return this._resources;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new Route53RecoveryreadinessResourceSetTimeoutsOutputReference(this, "timeouts", true);
    get timeouts() {
        return this._timeouts;
    }
    putTimeouts(value) {
        this._timeouts.internalValue = value;
    }
    resetTimeouts() {
        this._timeouts.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get timeoutsInput() {
        return this._timeouts.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            resource_set_name: cdktf.stringToTerraform(this._resourceSetName),
            resource_set_type: cdktf.stringToTerraform(this._resourceSetType),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            resources: cdktf.listMapper(route53RecoveryreadinessResourceSetResourcesToTerraform)(this._resources),
            timeouts: route53RecoveryreadinessResourceSetTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
}
//# sourceMappingURL=route53recoveryreadiness-resource-set.js.map