// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function dataAwsConnectBotAssociationLexBotToTerraform(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 {
        lex_region: cdktf.stringToTerraform(struct.lexRegion),
        name: cdktf.stringToTerraform(struct.name),
    };
}
export class DataAwsConnectBotAssociationLexBotOutputReference 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._lexRegion !== undefined) {
            hasAnyValues = true;
            internalValueResult.lexRegion = this._lexRegion;
        }
        if (this._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._lexRegion = undefined;
            this._name = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._lexRegion = value.lexRegion;
            this._name = value.name;
        }
    }
    // lex_region - computed: true, optional: true, required: false
    _lexRegion;
    get lexRegion() {
        return this.getStringAttribute('lex_region');
    }
    set lexRegion(value) {
        this._lexRegion = value;
    }
    resetLexRegion() {
        this._lexRegion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get lexRegionInput() {
        return this._lexRegion;
    }
    // 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;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/d/connect_bot_association aws_connect_bot_association}
*/
export class DataAwsConnectBotAssociation extends cdktf.TerraformDataSource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_connect_bot_association";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/d/connect_bot_association aws_connect_bot_association} Data Source
    *
    * @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 DataAwsConnectBotAssociationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_connect_bot_association',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._instanceId = config.instanceId;
        this._lexBot.internalValue = config.lexBot;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // 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;
    }
    // lex_bot - computed: false, optional: false, required: true
    _lexBot = new DataAwsConnectBotAssociationLexBotOutputReference(this, "lex_bot", true);
    get lexBot() {
        return this._lexBot;
    }
    putLexBot(value) {
        this._lexBot.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get lexBotInput() {
        return this._lexBot.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            instance_id: cdktf.stringToTerraform(this._instanceId),
            lex_bot: dataAwsConnectBotAssociationLexBotToTerraform(this._lexBot.internalValue),
        };
    }
}
//# sourceMappingURL=data-aws-connect-bot-association.js.map