// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function dataAwsGlueScriptDagEdgeToTerraform(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 {
        source: cdktf.stringToTerraform(struct.source),
        target: cdktf.stringToTerraform(struct.target),
        target_parameter: cdktf.stringToTerraform(struct.targetParameter),
    };
}
export function dataAwsGlueScriptDagNodeArgsToTerraform(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 {
        name: cdktf.stringToTerraform(struct.name),
        param: cdktf.booleanToTerraform(struct.param),
        value: cdktf.stringToTerraform(struct.value),
    };
}
export function dataAwsGlueScriptDagNodeToTerraform(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 {
        id: cdktf.stringToTerraform(struct.id),
        line_number: cdktf.numberToTerraform(struct.lineNumber),
        node_type: cdktf.stringToTerraform(struct.nodeType),
        args: cdktf.listMapper(dataAwsGlueScriptDagNodeArgsToTerraform)(struct.args),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/d/glue_script aws_glue_script}
*/
export class DataAwsGlueScript extends cdktf.TerraformDataSource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_glue_script";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/d/glue_script aws_glue_script} 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 DataAwsGlueScriptConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_glue_script',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._language = config.language;
        this._dagEdge = config.dagEdge;
        this._dagNode = config.dagNode;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // language - computed: false, optional: true, required: false
    _language;
    get language() {
        return this.getStringAttribute('language');
    }
    set language(value) {
        this._language = value;
    }
    resetLanguage() {
        this._language = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get languageInput() {
        return this._language;
    }
    // python_script - computed: true, optional: false, required: false
    get pythonScript() {
        return this.getStringAttribute('python_script');
    }
    // scala_code - computed: true, optional: false, required: false
    get scalaCode() {
        return this.getStringAttribute('scala_code');
    }
    // dag_edge - computed: false, optional: false, required: true
    _dagEdge;
    get dagEdge() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('dag_edge');
    }
    set dagEdge(value) {
        this._dagEdge = value;
    }
    // Temporarily expose input value. Use with caution.
    get dagEdgeInput() {
        return this._dagEdge;
    }
    // dag_node - computed: false, optional: false, required: true
    _dagNode;
    get dagNode() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('dag_node');
    }
    set dagNode(value) {
        this._dagNode = value;
    }
    // Temporarily expose input value. Use with caution.
    get dagNodeInput() {
        return this._dagNode;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            language: cdktf.stringToTerraform(this._language),
            dag_edge: cdktf.listMapper(dataAwsGlueScriptDagEdgeToTerraform)(this._dagEdge),
            dag_node: cdktf.listMapper(dataAwsGlueScriptDagNodeToTerraform)(this._dagNode),
        };
    }
}
//# sourceMappingURL=data-aws-glue-script.js.map