// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function connectQuickConnectQuickConnectConfigPhoneConfigToTerraform(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 {
        phone_number: cdktf.stringToTerraform(struct.phoneNumber),
    };
}
export function connectQuickConnectQuickConnectConfigQueueConfigToTerraform(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 {
        contact_flow_id: cdktf.stringToTerraform(struct.contactFlowId),
        queue_id: cdktf.stringToTerraform(struct.queueId),
    };
}
export function connectQuickConnectQuickConnectConfigUserConfigToTerraform(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 {
        contact_flow_id: cdktf.stringToTerraform(struct.contactFlowId),
        user_id: cdktf.stringToTerraform(struct.userId),
    };
}
export function connectQuickConnectQuickConnectConfigToTerraform(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 {
        quick_connect_type: cdktf.stringToTerraform(struct.quickConnectType),
        phone_config: cdktf.listMapper(connectQuickConnectQuickConnectConfigPhoneConfigToTerraform)(struct.phoneConfig),
        queue_config: cdktf.listMapper(connectQuickConnectQuickConnectConfigQueueConfigToTerraform)(struct.queueConfig),
        user_config: cdktf.listMapper(connectQuickConnectQuickConnectConfigUserConfigToTerraform)(struct.userConfig),
    };
}
export class ConnectQuickConnectQuickConnectConfigOutputReference 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._quickConnectType !== undefined) {
            hasAnyValues = true;
            internalValueResult.quickConnectType = this._quickConnectType;
        }
        if (this._phoneConfig !== undefined) {
            hasAnyValues = true;
            internalValueResult.phoneConfig = this._phoneConfig;
        }
        if (this._queueConfig !== undefined) {
            hasAnyValues = true;
            internalValueResult.queueConfig = this._queueConfig;
        }
        if (this._userConfig !== undefined) {
            hasAnyValues = true;
            internalValueResult.userConfig = this._userConfig;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._quickConnectType = undefined;
            this._phoneConfig = undefined;
            this._queueConfig = undefined;
            this._userConfig = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._quickConnectType = value.quickConnectType;
            this._phoneConfig = value.phoneConfig;
            this._queueConfig = value.queueConfig;
            this._userConfig = value.userConfig;
        }
    }
    // quick_connect_type - computed: false, optional: false, required: true
    _quickConnectType;
    get quickConnectType() {
        return this.getStringAttribute('quick_connect_type');
    }
    set quickConnectType(value) {
        this._quickConnectType = value;
    }
    // Temporarily expose input value. Use with caution.
    get quickConnectTypeInput() {
        return this._quickConnectType;
    }
    // phone_config - computed: false, optional: true, required: false
    _phoneConfig;
    get phoneConfig() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('phone_config');
    }
    set phoneConfig(value) {
        this._phoneConfig = value;
    }
    resetPhoneConfig() {
        this._phoneConfig = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get phoneConfigInput() {
        return this._phoneConfig;
    }
    // queue_config - computed: false, optional: true, required: false
    _queueConfig;
    get queueConfig() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('queue_config');
    }
    set queueConfig(value) {
        this._queueConfig = value;
    }
    resetQueueConfig() {
        this._queueConfig = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get queueConfigInput() {
        return this._queueConfig;
    }
    // user_config - computed: false, optional: true, required: false
    _userConfig;
    get userConfig() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('user_config');
    }
    set userConfig(value) {
        this._userConfig = value;
    }
    resetUserConfig() {
        this._userConfig = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get userConfigInput() {
        return this._userConfig;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/connect_quick_connect aws_connect_quick_connect}
*/
export class ConnectQuickConnect extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_connect_quick_connect";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/connect_quick_connect aws_connect_quick_connect} 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 ConnectQuickConnectConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_connect_quick_connect',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._instanceId = config.instanceId;
        this._name = config.name;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._quickConnectConfig.internalValue = config.quickConnectConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // 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;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // instance_id - computed: false, optional: false, required: true
    _instanceId;
    get instanceId() {
        return this.getStringAttribute('instance_id');
    }
    set instanceId(value) {
        this._instanceId = value;
    }
    // Temporarily expose input value. Use with caution.
    get instanceIdInput() {
        return this._instanceId;
    }
    // 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;
    }
    // quick_connect_id - computed: true, optional: false, required: false
    get quickConnectId() {
        return this.getStringAttribute('quick_connect_id');
    }
    // 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;
    }
    // quick_connect_config - computed: false, optional: false, required: true
    _quickConnectConfig = new ConnectQuickConnectQuickConnectConfigOutputReference(this, "quick_connect_config", true);
    get quickConnectConfig() {
        return this._quickConnectConfig;
    }
    putQuickConnectConfig(value) {
        this._quickConnectConfig.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get quickConnectConfigInput() {
        return this._quickConnectConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            description: cdktf.stringToTerraform(this._description),
            instance_id: cdktf.stringToTerraform(this._instanceId),
            name: cdktf.stringToTerraform(this._name),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            quick_connect_config: connectQuickConnectQuickConnectConfigToTerraform(this._quickConnectConfig.internalValue),
        };
    }
}
//# sourceMappingURL=connect-quick-connect.js.map