// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function directoryServiceDirectoryConnectSettingsToTerraform(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 {
        customer_dns_ips: cdktf.listMapper(cdktf.stringToTerraform)(struct.customerDnsIps),
        customer_username: cdktf.stringToTerraform(struct.customerUsername),
        subnet_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.subnetIds),
        vpc_id: cdktf.stringToTerraform(struct.vpcId),
    };
}
export class DirectoryServiceDirectoryConnectSettingsOutputReference 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._customerDnsIps !== undefined) {
            hasAnyValues = true;
            internalValueResult.customerDnsIps = this._customerDnsIps;
        }
        if (this._customerUsername !== undefined) {
            hasAnyValues = true;
            internalValueResult.customerUsername = this._customerUsername;
        }
        if (this._subnetIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.subnetIds = this._subnetIds;
        }
        if (this._vpcId !== undefined) {
            hasAnyValues = true;
            internalValueResult.vpcId = this._vpcId;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._customerDnsIps = undefined;
            this._customerUsername = undefined;
            this._subnetIds = undefined;
            this._vpcId = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._customerDnsIps = value.customerDnsIps;
            this._customerUsername = value.customerUsername;
            this._subnetIds = value.subnetIds;
            this._vpcId = value.vpcId;
        }
    }
    // availability_zones - computed: true, optional: false, required: false
    get availabilityZones() {
        return cdktf.Fn.tolist(this.getListAttribute('availability_zones'));
    }
    // connect_ips - computed: true, optional: false, required: false
    get connectIps() {
        return cdktf.Fn.tolist(this.getListAttribute('connect_ips'));
    }
    // customer_dns_ips - computed: false, optional: false, required: true
    _customerDnsIps;
    get customerDnsIps() {
        return cdktf.Fn.tolist(this.getListAttribute('customer_dns_ips'));
    }
    set customerDnsIps(value) {
        this._customerDnsIps = value;
    }
    // Temporarily expose input value. Use with caution.
    get customerDnsIpsInput() {
        return this._customerDnsIps;
    }
    // customer_username - computed: false, optional: false, required: true
    _customerUsername;
    get customerUsername() {
        return this.getStringAttribute('customer_username');
    }
    set customerUsername(value) {
        this._customerUsername = value;
    }
    // Temporarily expose input value. Use with caution.
    get customerUsernameInput() {
        return this._customerUsername;
    }
    // subnet_ids - computed: false, optional: false, required: true
    _subnetIds;
    get subnetIds() {
        return cdktf.Fn.tolist(this.getListAttribute('subnet_ids'));
    }
    set subnetIds(value) {
        this._subnetIds = value;
    }
    // Temporarily expose input value. Use with caution.
    get subnetIdsInput() {
        return this._subnetIds;
    }
    // vpc_id - computed: false, optional: false, required: true
    _vpcId;
    get vpcId() {
        return this.getStringAttribute('vpc_id');
    }
    set vpcId(value) {
        this._vpcId = value;
    }
    // Temporarily expose input value. Use with caution.
    get vpcIdInput() {
        return this._vpcId;
    }
}
export function directoryServiceDirectoryVpcSettingsToTerraform(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 {
        subnet_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.subnetIds),
        vpc_id: cdktf.stringToTerraform(struct.vpcId),
    };
}
export class DirectoryServiceDirectoryVpcSettingsOutputReference 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._subnetIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.subnetIds = this._subnetIds;
        }
        if (this._vpcId !== undefined) {
            hasAnyValues = true;
            internalValueResult.vpcId = this._vpcId;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._subnetIds = undefined;
            this._vpcId = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._subnetIds = value.subnetIds;
            this._vpcId = value.vpcId;
        }
    }
    // availability_zones - computed: true, optional: false, required: false
    get availabilityZones() {
        return cdktf.Fn.tolist(this.getListAttribute('availability_zones'));
    }
    // subnet_ids - computed: false, optional: false, required: true
    _subnetIds;
    get subnetIds() {
        return cdktf.Fn.tolist(this.getListAttribute('subnet_ids'));
    }
    set subnetIds(value) {
        this._subnetIds = value;
    }
    // Temporarily expose input value. Use with caution.
    get subnetIdsInput() {
        return this._subnetIds;
    }
    // vpc_id - computed: false, optional: false, required: true
    _vpcId;
    get vpcId() {
        return this.getStringAttribute('vpc_id');
    }
    set vpcId(value) {
        this._vpcId = value;
    }
    // Temporarily expose input value. Use with caution.
    get vpcIdInput() {
        return this._vpcId;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/directory_service_directory aws_directory_service_directory}
*/
export class DirectoryServiceDirectory extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_directory_service_directory";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/directory_service_directory aws_directory_service_directory} 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 DirectoryServiceDirectoryConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_directory_service_directory',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._alias = config.alias;
        this._description = config.description;
        this._edition = config.edition;
        this._enableSso = config.enableSso;
        this._name = config.name;
        this._password = config.password;
        this._shortName = config.shortName;
        this._size = config.size;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._type = config.type;
        this._connectSettings.internalValue = config.connectSettings;
        this._vpcSettings.internalValue = config.vpcSettings;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // access_url - computed: true, optional: false, required: false
    get accessUrl() {
        return this.getStringAttribute('access_url');
    }
    // alias - computed: true, optional: true, required: false
    _alias;
    get alias() {
        return this.getStringAttribute('alias');
    }
    set alias(value) {
        this._alias = value;
    }
    resetAlias() {
        this._alias = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get aliasInput() {
        return this._alias;
    }
    // description - computed: false, optional: true, required: false
    _description;
    get description() {
        return this.getStringAttribute('description');
    }
    set description(value) {
        this._description = value;
    }
    resetDescription() {
        this._description = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get descriptionInput() {
        return this._description;
    }
    // dns_ip_addresses - computed: true, optional: false, required: false
    get dnsIpAddresses() {
        return cdktf.Fn.tolist(this.getListAttribute('dns_ip_addresses'));
    }
    // edition - computed: true, optional: true, required: false
    _edition;
    get edition() {
        return this.getStringAttribute('edition');
    }
    set edition(value) {
        this._edition = value;
    }
    resetEdition() {
        this._edition = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get editionInput() {
        return this._edition;
    }
    // enable_sso - computed: false, optional: true, required: false
    _enableSso;
    get enableSso() {
        return this.getBooleanAttribute('enable_sso');
    }
    set enableSso(value) {
        this._enableSso = value;
    }
    resetEnableSso() {
        this._enableSso = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableSsoInput() {
        return this._enableSso;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // 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;
    }
    // password - computed: false, optional: false, required: true
    _password;
    get password() {
        return this.getStringAttribute('password');
    }
    set password(value) {
        this._password = value;
    }
    // Temporarily expose input value. Use with caution.
    get passwordInput() {
        return this._password;
    }
    // security_group_id - computed: true, optional: false, required: false
    get securityGroupId() {
        return this.getStringAttribute('security_group_id');
    }
    // short_name - computed: true, optional: true, required: false
    _shortName;
    get shortName() {
        return this.getStringAttribute('short_name');
    }
    set shortName(value) {
        this._shortName = value;
    }
    resetShortName() {
        this._shortName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get shortNameInput() {
        return this._shortName;
    }
    // size - computed: true, optional: true, required: false
    _size;
    get size() {
        return this.getStringAttribute('size');
    }
    set size(value) {
        this._size = value;
    }
    resetSize() {
        this._size = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sizeInput() {
        return this._size;
    }
    // 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;
    }
    // type - computed: false, optional: true, required: false
    _type;
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    resetType() {
        this._type = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
    // connect_settings - computed: false, optional: true, required: false
    _connectSettings = new DirectoryServiceDirectoryConnectSettingsOutputReference(this, "connect_settings", true);
    get connectSettings() {
        return this._connectSettings;
    }
    putConnectSettings(value) {
        this._connectSettings.internalValue = value;
    }
    resetConnectSettings() {
        this._connectSettings.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get connectSettingsInput() {
        return this._connectSettings.internalValue;
    }
    // vpc_settings - computed: false, optional: true, required: false
    _vpcSettings = new DirectoryServiceDirectoryVpcSettingsOutputReference(this, "vpc_settings", true);
    get vpcSettings() {
        return this._vpcSettings;
    }
    putVpcSettings(value) {
        this._vpcSettings.internalValue = value;
    }
    resetVpcSettings() {
        this._vpcSettings.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get vpcSettingsInput() {
        return this._vpcSettings.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            alias: cdktf.stringToTerraform(this._alias),
            description: cdktf.stringToTerraform(this._description),
            edition: cdktf.stringToTerraform(this._edition),
            enable_sso: cdktf.booleanToTerraform(this._enableSso),
            name: cdktf.stringToTerraform(this._name),
            password: cdktf.stringToTerraform(this._password),
            short_name: cdktf.stringToTerraform(this._shortName),
            size: cdktf.stringToTerraform(this._size),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            type: cdktf.stringToTerraform(this._type),
            connect_settings: directoryServiceDirectoryConnectSettingsToTerraform(this._connectSettings.internalValue),
            vpc_settings: directoryServiceDirectoryVpcSettingsToTerraform(this._vpcSettings.internalValue),
        };
    }
}
//# sourceMappingURL=directory-service-directory.js.map