// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function lexBotAbortStatementMessageToTerraform(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 {
        content: cdktf.stringToTerraform(struct.content),
        content_type: cdktf.stringToTerraform(struct.contentType),
        group_number: cdktf.numberToTerraform(struct.groupNumber),
    };
}
export function lexBotAbortStatementToTerraform(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 {
        response_card: cdktf.stringToTerraform(struct.responseCard),
        message: cdktf.listMapper(lexBotAbortStatementMessageToTerraform)(struct.message),
    };
}
export class LexBotAbortStatementOutputReference 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._responseCard !== undefined) {
            hasAnyValues = true;
            internalValueResult.responseCard = this._responseCard;
        }
        if (this._message !== undefined) {
            hasAnyValues = true;
            internalValueResult.message = this._message;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._responseCard = undefined;
            this._message = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._responseCard = value.responseCard;
            this._message = value.message;
        }
    }
    // response_card - computed: false, optional: true, required: false
    _responseCard;
    get responseCard() {
        return this.getStringAttribute('response_card');
    }
    set responseCard(value) {
        this._responseCard = value;
    }
    resetResponseCard() {
        this._responseCard = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get responseCardInput() {
        return this._responseCard;
    }
    // message - computed: false, optional: false, required: true
    _message;
    get message() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('message')));
    }
    set message(value) {
        this._message = value;
    }
    // Temporarily expose input value. Use with caution.
    get messageInput() {
        return this._message;
    }
}
export function lexBotClarificationPromptMessageToTerraform(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 {
        content: cdktf.stringToTerraform(struct.content),
        content_type: cdktf.stringToTerraform(struct.contentType),
        group_number: cdktf.numberToTerraform(struct.groupNumber),
    };
}
export function lexBotClarificationPromptToTerraform(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 {
        max_attempts: cdktf.numberToTerraform(struct.maxAttempts),
        response_card: cdktf.stringToTerraform(struct.responseCard),
        message: cdktf.listMapper(lexBotClarificationPromptMessageToTerraform)(struct.message),
    };
}
export class LexBotClarificationPromptOutputReference 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._maxAttempts !== undefined) {
            hasAnyValues = true;
            internalValueResult.maxAttempts = this._maxAttempts;
        }
        if (this._responseCard !== undefined) {
            hasAnyValues = true;
            internalValueResult.responseCard = this._responseCard;
        }
        if (this._message !== undefined) {
            hasAnyValues = true;
            internalValueResult.message = this._message;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._maxAttempts = undefined;
            this._responseCard = undefined;
            this._message = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._maxAttempts = value.maxAttempts;
            this._responseCard = value.responseCard;
            this._message = value.message;
        }
    }
    // max_attempts - computed: false, optional: false, required: true
    _maxAttempts;
    get maxAttempts() {
        return this.getNumberAttribute('max_attempts');
    }
    set maxAttempts(value) {
        this._maxAttempts = value;
    }
    // Temporarily expose input value. Use with caution.
    get maxAttemptsInput() {
        return this._maxAttempts;
    }
    // response_card - computed: false, optional: true, required: false
    _responseCard;
    get responseCard() {
        return this.getStringAttribute('response_card');
    }
    set responseCard(value) {
        this._responseCard = value;
    }
    resetResponseCard() {
        this._responseCard = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get responseCardInput() {
        return this._responseCard;
    }
    // message - computed: false, optional: false, required: true
    _message;
    get message() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('message')));
    }
    set message(value) {
        this._message = value;
    }
    // Temporarily expose input value. Use with caution.
    get messageInput() {
        return this._message;
    }
}
export function lexBotIntentToTerraform(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 {
        intent_name: cdktf.stringToTerraform(struct.intentName),
        intent_version: cdktf.stringToTerraform(struct.intentVersion),
    };
}
export function lexBotTimeoutsToTerraform(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),
        update: cdktf.stringToTerraform(struct.update),
    };
}
export class LexBotTimeoutsOutputReference 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;
        }
        if (this._update !== undefined) {
            hasAnyValues = true;
            internalValueResult.update = this._update;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._create = undefined;
            this._delete = undefined;
            this._update = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._create = value.create;
            this._delete = value.delete;
            this._update = value.update;
        }
    }
    // 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;
    }
    // update - computed: false, optional: true, required: false
    _update;
    get update() {
        return this.getStringAttribute('update');
    }
    set update(value) {
        this._update = value;
    }
    resetUpdate() {
        this._update = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get updateInput() {
        return this._update;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/lex_bot aws_lex_bot}
*/
export class LexBot extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_lex_bot";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/lex_bot aws_lex_bot} 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 LexBotConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_lex_bot',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._childDirected = config.childDirected;
        this._createVersion = config.createVersion;
        this._description = config.description;
        this._detectSentiment = config.detectSentiment;
        this._enableModelImprovements = config.enableModelImprovements;
        this._idleSessionTtlInSeconds = config.idleSessionTtlInSeconds;
        this._locale = config.locale;
        this._name = config.name;
        this._nluIntentConfidenceThreshold = config.nluIntentConfidenceThreshold;
        this._processBehavior = config.processBehavior;
        this._voiceId = config.voiceId;
        this._abortStatement.internalValue = config.abortStatement;
        this._clarificationPrompt.internalValue = config.clarificationPrompt;
        this._intent = config.intent;
        this._timeouts.internalValue = config.timeouts;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // checksum - computed: true, optional: false, required: false
    get checksum() {
        return this.getStringAttribute('checksum');
    }
    // child_directed - computed: false, optional: false, required: true
    _childDirected;
    get childDirected() {
        return this.getBooleanAttribute('child_directed');
    }
    set childDirected(value) {
        this._childDirected = value;
    }
    // Temporarily expose input value. Use with caution.
    get childDirectedInput() {
        return this._childDirected;
    }
    // create_version - computed: false, optional: true, required: false
    _createVersion;
    get createVersion() {
        return this.getBooleanAttribute('create_version');
    }
    set createVersion(value) {
        this._createVersion = value;
    }
    resetCreateVersion() {
        this._createVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get createVersionInput() {
        return this._createVersion;
    }
    // created_date - computed: true, optional: false, required: false
    get createdDate() {
        return this.getStringAttribute('created_date');
    }
    // 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;
    }
    // detect_sentiment - computed: false, optional: true, required: false
    _detectSentiment;
    get detectSentiment() {
        return this.getBooleanAttribute('detect_sentiment');
    }
    set detectSentiment(value) {
        this._detectSentiment = value;
    }
    resetDetectSentiment() {
        this._detectSentiment = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get detectSentimentInput() {
        return this._detectSentiment;
    }
    // enable_model_improvements - computed: false, optional: true, required: false
    _enableModelImprovements;
    get enableModelImprovements() {
        return this.getBooleanAttribute('enable_model_improvements');
    }
    set enableModelImprovements(value) {
        this._enableModelImprovements = value;
    }
    resetEnableModelImprovements() {
        this._enableModelImprovements = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableModelImprovementsInput() {
        return this._enableModelImprovements;
    }
    // failure_reason - computed: true, optional: false, required: false
    get failureReason() {
        return this.getStringAttribute('failure_reason');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // idle_session_ttl_in_seconds - computed: false, optional: true, required: false
    _idleSessionTtlInSeconds;
    get idleSessionTtlInSeconds() {
        return this.getNumberAttribute('idle_session_ttl_in_seconds');
    }
    set idleSessionTtlInSeconds(value) {
        this._idleSessionTtlInSeconds = value;
    }
    resetIdleSessionTtlInSeconds() {
        this._idleSessionTtlInSeconds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get idleSessionTtlInSecondsInput() {
        return this._idleSessionTtlInSeconds;
    }
    // last_updated_date - computed: true, optional: false, required: false
    get lastUpdatedDate() {
        return this.getStringAttribute('last_updated_date');
    }
    // locale - computed: false, optional: true, required: false
    _locale;
    get locale() {
        return this.getStringAttribute('locale');
    }
    set locale(value) {
        this._locale = value;
    }
    resetLocale() {
        this._locale = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get localeInput() {
        return this._locale;
    }
    // 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;
    }
    // nlu_intent_confidence_threshold - computed: false, optional: true, required: false
    _nluIntentConfidenceThreshold;
    get nluIntentConfidenceThreshold() {
        return this.getNumberAttribute('nlu_intent_confidence_threshold');
    }
    set nluIntentConfidenceThreshold(value) {
        this._nluIntentConfidenceThreshold = value;
    }
    resetNluIntentConfidenceThreshold() {
        this._nluIntentConfidenceThreshold = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nluIntentConfidenceThresholdInput() {
        return this._nluIntentConfidenceThreshold;
    }
    // process_behavior - computed: false, optional: true, required: false
    _processBehavior;
    get processBehavior() {
        return this.getStringAttribute('process_behavior');
    }
    set processBehavior(value) {
        this._processBehavior = value;
    }
    resetProcessBehavior() {
        this._processBehavior = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get processBehaviorInput() {
        return this._processBehavior;
    }
    // status - computed: true, optional: false, required: false
    get status() {
        return this.getStringAttribute('status');
    }
    // version - computed: true, optional: false, required: false
    get version() {
        return this.getStringAttribute('version');
    }
    // voice_id - computed: true, optional: true, required: false
    _voiceId;
    get voiceId() {
        return this.getStringAttribute('voice_id');
    }
    set voiceId(value) {
        this._voiceId = value;
    }
    resetVoiceId() {
        this._voiceId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get voiceIdInput() {
        return this._voiceId;
    }
    // abort_statement - computed: false, optional: false, required: true
    _abortStatement = new LexBotAbortStatementOutputReference(this, "abort_statement", true);
    get abortStatement() {
        return this._abortStatement;
    }
    putAbortStatement(value) {
        this._abortStatement.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get abortStatementInput() {
        return this._abortStatement.internalValue;
    }
    // clarification_prompt - computed: false, optional: true, required: false
    _clarificationPrompt = new LexBotClarificationPromptOutputReference(this, "clarification_prompt", true);
    get clarificationPrompt() {
        return this._clarificationPrompt;
    }
    putClarificationPrompt(value) {
        this._clarificationPrompt.internalValue = value;
    }
    resetClarificationPrompt() {
        this._clarificationPrompt.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get clarificationPromptInput() {
        return this._clarificationPrompt.internalValue;
    }
    // intent - computed: false, optional: false, required: true
    _intent;
    get intent() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('intent')));
    }
    set intent(value) {
        this._intent = value;
    }
    // Temporarily expose input value. Use with caution.
    get intentInput() {
        return this._intent;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new LexBotTimeoutsOutputReference(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 {
            child_directed: cdktf.booleanToTerraform(this._childDirected),
            create_version: cdktf.booleanToTerraform(this._createVersion),
            description: cdktf.stringToTerraform(this._description),
            detect_sentiment: cdktf.booleanToTerraform(this._detectSentiment),
            enable_model_improvements: cdktf.booleanToTerraform(this._enableModelImprovements),
            idle_session_ttl_in_seconds: cdktf.numberToTerraform(this._idleSessionTtlInSeconds),
            locale: cdktf.stringToTerraform(this._locale),
            name: cdktf.stringToTerraform(this._name),
            nlu_intent_confidence_threshold: cdktf.numberToTerraform(this._nluIntentConfidenceThreshold),
            process_behavior: cdktf.stringToTerraform(this._processBehavior),
            voice_id: cdktf.stringToTerraform(this._voiceId),
            abort_statement: lexBotAbortStatementToTerraform(this._abortStatement.internalValue),
            clarification_prompt: lexBotClarificationPromptToTerraform(this._clarificationPrompt.internalValue),
            intent: cdktf.listMapper(lexBotIntentToTerraform)(this._intent),
            timeouts: lexBotTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
}
//# sourceMappingURL=lex-bot.js.map