// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function connectInstanceTimeoutsToTerraform(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 {
        create: cdktf.stringToTerraform(struct.create),
        delete: cdktf.stringToTerraform(struct.delete),
    };
}
export class ConnectInstanceTimeoutsOutputReference 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._create !== undefined) {
            hasAnyValues = true;
            internalValueResult.create = this._create;
        }
        if (this._delete !== undefined) {
            hasAnyValues = true;
            internalValueResult.delete = this._delete;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._create = undefined;
            this._delete = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._create = value.create;
            this._delete = value.delete;
        }
    }
    // create - computed: false, optional: true, required: false
    _create;
    get create() {
        return this.getStringAttribute('create');
    }
    set create(value) {
        this._create = value;
    }
    resetCreate() {
        this._create = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get createInput() {
        return this._create;
    }
    // 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/connect_instance aws_connect_instance}
*/
export class ConnectInstance extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_connect_instance";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/connect_instance aws_connect_instance} 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 ConnectInstanceConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_connect_instance',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._autoResolveBestVoicesEnabled = config.autoResolveBestVoicesEnabled;
        this._contactFlowLogsEnabled = config.contactFlowLogsEnabled;
        this._contactLensEnabled = config.contactLensEnabled;
        this._directoryId = config.directoryId;
        this._earlyMediaEnabled = config.earlyMediaEnabled;
        this._identityManagementType = config.identityManagementType;
        this._inboundCallsEnabled = config.inboundCallsEnabled;
        this._instanceAlias = config.instanceAlias;
        this._outboundCallsEnabled = config.outboundCallsEnabled;
        this._timeouts.internalValue = config.timeouts;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // auto_resolve_best_voices_enabled - computed: false, optional: true, required: false
    _autoResolveBestVoicesEnabled;
    get autoResolveBestVoicesEnabled() {
        return this.getBooleanAttribute('auto_resolve_best_voices_enabled');
    }
    set autoResolveBestVoicesEnabled(value) {
        this._autoResolveBestVoicesEnabled = value;
    }
    resetAutoResolveBestVoicesEnabled() {
        this._autoResolveBestVoicesEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoResolveBestVoicesEnabledInput() {
        return this._autoResolveBestVoicesEnabled;
    }
    // contact_flow_logs_enabled - computed: false, optional: true, required: false
    _contactFlowLogsEnabled;
    get contactFlowLogsEnabled() {
        return this.getBooleanAttribute('contact_flow_logs_enabled');
    }
    set contactFlowLogsEnabled(value) {
        this._contactFlowLogsEnabled = value;
    }
    resetContactFlowLogsEnabled() {
        this._contactFlowLogsEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get contactFlowLogsEnabledInput() {
        return this._contactFlowLogsEnabled;
    }
    // contact_lens_enabled - computed: false, optional: true, required: false
    _contactLensEnabled;
    get contactLensEnabled() {
        return this.getBooleanAttribute('contact_lens_enabled');
    }
    set contactLensEnabled(value) {
        this._contactLensEnabled = value;
    }
    resetContactLensEnabled() {
        this._contactLensEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get contactLensEnabledInput() {
        return this._contactLensEnabled;
    }
    // created_time - computed: true, optional: false, required: false
    get createdTime() {
        return this.getStringAttribute('created_time');
    }
    // directory_id - computed: false, optional: true, required: false
    _directoryId;
    get directoryId() {
        return this.getStringAttribute('directory_id');
    }
    set directoryId(value) {
        this._directoryId = value;
    }
    resetDirectoryId() {
        this._directoryId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get directoryIdInput() {
        return this._directoryId;
    }
    // early_media_enabled - computed: false, optional: true, required: false
    _earlyMediaEnabled;
    get earlyMediaEnabled() {
        return this.getBooleanAttribute('early_media_enabled');
    }
    set earlyMediaEnabled(value) {
        this._earlyMediaEnabled = value;
    }
    resetEarlyMediaEnabled() {
        this._earlyMediaEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get earlyMediaEnabledInput() {
        return this._earlyMediaEnabled;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // identity_management_type - computed: false, optional: false, required: true
    _identityManagementType;
    get identityManagementType() {
        return this.getStringAttribute('identity_management_type');
    }
    set identityManagementType(value) {
        this._identityManagementType = value;
    }
    // Temporarily expose input value. Use with caution.
    get identityManagementTypeInput() {
        return this._identityManagementType;
    }
    // inbound_calls_enabled - computed: false, optional: false, required: true
    _inboundCallsEnabled;
    get inboundCallsEnabled() {
        return this.getBooleanAttribute('inbound_calls_enabled');
    }
    set inboundCallsEnabled(value) {
        this._inboundCallsEnabled = value;
    }
    // Temporarily expose input value. Use with caution.
    get inboundCallsEnabledInput() {
        return this._inboundCallsEnabled;
    }
    // instance_alias - computed: false, optional: true, required: false
    _instanceAlias;
    get instanceAlias() {
        return this.getStringAttribute('instance_alias');
    }
    set instanceAlias(value) {
        this._instanceAlias = value;
    }
    resetInstanceAlias() {
        this._instanceAlias = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get instanceAliasInput() {
        return this._instanceAlias;
    }
    // outbound_calls_enabled - computed: false, optional: false, required: true
    _outboundCallsEnabled;
    get outboundCallsEnabled() {
        return this.getBooleanAttribute('outbound_calls_enabled');
    }
    set outboundCallsEnabled(value) {
        this._outboundCallsEnabled = value;
    }
    // Temporarily expose input value. Use with caution.
    get outboundCallsEnabledInput() {
        return this._outboundCallsEnabled;
    }
    // service_role - computed: true, optional: false, required: false
    get serviceRole() {
        return this.getStringAttribute('service_role');
    }
    // status - computed: true, optional: false, required: false
    get status() {
        return this.getStringAttribute('status');
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new ConnectInstanceTimeoutsOutputReference(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 {
            auto_resolve_best_voices_enabled: cdktf.booleanToTerraform(this._autoResolveBestVoicesEnabled),
            contact_flow_logs_enabled: cdktf.booleanToTerraform(this._contactFlowLogsEnabled),
            contact_lens_enabled: cdktf.booleanToTerraform(this._contactLensEnabled),
            directory_id: cdktf.stringToTerraform(this._directoryId),
            early_media_enabled: cdktf.booleanToTerraform(this._earlyMediaEnabled),
            identity_management_type: cdktf.stringToTerraform(this._identityManagementType),
            inbound_calls_enabled: cdktf.booleanToTerraform(this._inboundCallsEnabled),
            instance_alias: cdktf.stringToTerraform(this._instanceAlias),
            outbound_calls_enabled: cdktf.booleanToTerraform(this._outboundCallsEnabled),
            timeouts: connectInstanceTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
}
//# sourceMappingURL=connect-instance.js.map