// generated from terraform resource schema
import * as cdktf from 'cdktf';
export class GlueMlTransformSchema extends cdktf.ComplexComputedList {
    // data_type - computed: true, optional: false, required: false
    get dataType() {
        return this.getStringAttribute('data_type');
    }
    // name - computed: true, optional: false, required: false
    get name() {
        return this.getStringAttribute('name');
    }
}
export function glueMlTransformInputRecordTablesToTerraform(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 {
        catalog_id: cdktf.stringToTerraform(struct.catalogId),
        connection_name: cdktf.stringToTerraform(struct.connectionName),
        database_name: cdktf.stringToTerraform(struct.databaseName),
        table_name: cdktf.stringToTerraform(struct.tableName),
    };
}
export function glueMlTransformParametersFindMatchesParametersToTerraform(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 {
        accuracy_cost_trade_off: cdktf.numberToTerraform(struct.accuracyCostTradeOff),
        enforce_provided_labels: cdktf.booleanToTerraform(struct.enforceProvidedLabels),
        precision_recall_trade_off: cdktf.numberToTerraform(struct.precisionRecallTradeOff),
        primary_key_column_name: cdktf.stringToTerraform(struct.primaryKeyColumnName),
    };
}
export class GlueMlTransformParametersFindMatchesParametersOutputReference 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._accuracyCostTradeOff !== undefined) {
            hasAnyValues = true;
            internalValueResult.accuracyCostTradeOff = this._accuracyCostTradeOff;
        }
        if (this._enforceProvidedLabels !== undefined) {
            hasAnyValues = true;
            internalValueResult.enforceProvidedLabels = this._enforceProvidedLabels;
        }
        if (this._precisionRecallTradeOff !== undefined) {
            hasAnyValues = true;
            internalValueResult.precisionRecallTradeOff = this._precisionRecallTradeOff;
        }
        if (this._primaryKeyColumnName !== undefined) {
            hasAnyValues = true;
            internalValueResult.primaryKeyColumnName = this._primaryKeyColumnName;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._accuracyCostTradeOff = undefined;
            this._enforceProvidedLabels = undefined;
            this._precisionRecallTradeOff = undefined;
            this._primaryKeyColumnName = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._accuracyCostTradeOff = value.accuracyCostTradeOff;
            this._enforceProvidedLabels = value.enforceProvidedLabels;
            this._precisionRecallTradeOff = value.precisionRecallTradeOff;
            this._primaryKeyColumnName = value.primaryKeyColumnName;
        }
    }
    // accuracy_cost_trade_off - computed: false, optional: true, required: false
    _accuracyCostTradeOff;
    get accuracyCostTradeOff() {
        return this.getNumberAttribute('accuracy_cost_trade_off');
    }
    set accuracyCostTradeOff(value) {
        this._accuracyCostTradeOff = value;
    }
    resetAccuracyCostTradeOff() {
        this._accuracyCostTradeOff = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accuracyCostTradeOffInput() {
        return this._accuracyCostTradeOff;
    }
    // enforce_provided_labels - computed: false, optional: true, required: false
    _enforceProvidedLabels;
    get enforceProvidedLabels() {
        return this.getBooleanAttribute('enforce_provided_labels');
    }
    set enforceProvidedLabels(value) {
        this._enforceProvidedLabels = value;
    }
    resetEnforceProvidedLabels() {
        this._enforceProvidedLabels = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enforceProvidedLabelsInput() {
        return this._enforceProvidedLabels;
    }
    // precision_recall_trade_off - computed: false, optional: true, required: false
    _precisionRecallTradeOff;
    get precisionRecallTradeOff() {
        return this.getNumberAttribute('precision_recall_trade_off');
    }
    set precisionRecallTradeOff(value) {
        this._precisionRecallTradeOff = value;
    }
    resetPrecisionRecallTradeOff() {
        this._precisionRecallTradeOff = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get precisionRecallTradeOffInput() {
        return this._precisionRecallTradeOff;
    }
    // primary_key_column_name - computed: false, optional: true, required: false
    _primaryKeyColumnName;
    get primaryKeyColumnName() {
        return this.getStringAttribute('primary_key_column_name');
    }
    set primaryKeyColumnName(value) {
        this._primaryKeyColumnName = value;
    }
    resetPrimaryKeyColumnName() {
        this._primaryKeyColumnName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get primaryKeyColumnNameInput() {
        return this._primaryKeyColumnName;
    }
}
export function glueMlTransformParametersToTerraform(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 {
        transform_type: cdktf.stringToTerraform(struct.transformType),
        find_matches_parameters: glueMlTransformParametersFindMatchesParametersToTerraform(struct.findMatchesParameters),
    };
}
export class GlueMlTransformParametersOutputReference 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._transformType !== undefined) {
            hasAnyValues = true;
            internalValueResult.transformType = this._transformType;
        }
        if (this._findMatchesParameters?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.findMatchesParameters = this._findMatchesParameters?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._transformType = undefined;
            this._findMatchesParameters.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._transformType = value.transformType;
            this._findMatchesParameters.internalValue = value.findMatchesParameters;
        }
    }
    // transform_type - computed: false, optional: false, required: true
    _transformType;
    get transformType() {
        return this.getStringAttribute('transform_type');
    }
    set transformType(value) {
        this._transformType = value;
    }
    // Temporarily expose input value. Use with caution.
    get transformTypeInput() {
        return this._transformType;
    }
    // find_matches_parameters - computed: false, optional: false, required: true
    _findMatchesParameters = new GlueMlTransformParametersFindMatchesParametersOutputReference(this, "find_matches_parameters", true);
    get findMatchesParameters() {
        return this._findMatchesParameters;
    }
    putFindMatchesParameters(value) {
        this._findMatchesParameters.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get findMatchesParametersInput() {
        return this._findMatchesParameters.internalValue;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/glue_ml_transform aws_glue_ml_transform}
*/
export class GlueMlTransform extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_glue_ml_transform";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/glue_ml_transform aws_glue_ml_transform} 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 GlueMlTransformConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_glue_ml_transform',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._glueVersion = config.glueVersion;
        this._maxCapacity = config.maxCapacity;
        this._maxRetries = config.maxRetries;
        this._name = config.name;
        this._numberOfWorkers = config.numberOfWorkers;
        this._roleArn = config.roleArn;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._timeout = config.timeout;
        this._workerType = config.workerType;
        this._inputRecordTables = config.inputRecordTables;
        this._parameters.internalValue = config.parameters;
    }
    // ==========
    // 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;
    }
    // glue_version - computed: true, optional: true, required: false
    _glueVersion;
    get glueVersion() {
        return this.getStringAttribute('glue_version');
    }
    set glueVersion(value) {
        this._glueVersion = value;
    }
    resetGlueVersion() {
        this._glueVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get glueVersionInput() {
        return this._glueVersion;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // label_count - computed: true, optional: false, required: false
    get labelCount() {
        return this.getNumberAttribute('label_count');
    }
    // max_capacity - computed: true, optional: true, required: false
    _maxCapacity;
    get maxCapacity() {
        return this.getNumberAttribute('max_capacity');
    }
    set maxCapacity(value) {
        this._maxCapacity = value;
    }
    resetMaxCapacity() {
        this._maxCapacity = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maxCapacityInput() {
        return this._maxCapacity;
    }
    // max_retries - computed: false, optional: true, required: false
    _maxRetries;
    get maxRetries() {
        return this.getNumberAttribute('max_retries');
    }
    set maxRetries(value) {
        this._maxRetries = value;
    }
    resetMaxRetries() {
        this._maxRetries = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maxRetriesInput() {
        return this._maxRetries;
    }
    // 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;
    }
    // number_of_workers - computed: false, optional: true, required: false
    _numberOfWorkers;
    get numberOfWorkers() {
        return this.getNumberAttribute('number_of_workers');
    }
    set numberOfWorkers(value) {
        this._numberOfWorkers = value;
    }
    resetNumberOfWorkers() {
        this._numberOfWorkers = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get numberOfWorkersInput() {
        return this._numberOfWorkers;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // schema - computed: true, optional: false, required: false
    schema(index) {
        return new GlueMlTransformSchema(this, 'schema', index, false);
    }
    // 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;
    }
    // timeout - computed: false, optional: true, required: false
    _timeout;
    get timeout() {
        return this.getNumberAttribute('timeout');
    }
    set timeout(value) {
        this._timeout = value;
    }
    resetTimeout() {
        this._timeout = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get timeoutInput() {
        return this._timeout;
    }
    // worker_type - computed: false, optional: true, required: false
    _workerType;
    get workerType() {
        return this.getStringAttribute('worker_type');
    }
    set workerType(value) {
        this._workerType = value;
    }
    resetWorkerType() {
        this._workerType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get workerTypeInput() {
        return this._workerType;
    }
    // input_record_tables - computed: false, optional: false, required: true
    _inputRecordTables;
    get inputRecordTables() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('input_record_tables');
    }
    set inputRecordTables(value) {
        this._inputRecordTables = value;
    }
    // Temporarily expose input value. Use with caution.
    get inputRecordTablesInput() {
        return this._inputRecordTables;
    }
    // parameters - computed: false, optional: false, required: true
    _parameters = new GlueMlTransformParametersOutputReference(this, "parameters", true);
    get parameters() {
        return this._parameters;
    }
    putParameters(value) {
        this._parameters.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get parametersInput() {
        return this._parameters.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            description: cdktf.stringToTerraform(this._description),
            glue_version: cdktf.stringToTerraform(this._glueVersion),
            max_capacity: cdktf.numberToTerraform(this._maxCapacity),
            max_retries: cdktf.numberToTerraform(this._maxRetries),
            name: cdktf.stringToTerraform(this._name),
            number_of_workers: cdktf.numberToTerraform(this._numberOfWorkers),
            role_arn: cdktf.stringToTerraform(this._roleArn),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            timeout: cdktf.numberToTerraform(this._timeout),
            worker_type: cdktf.stringToTerraform(this._workerType),
            input_record_tables: cdktf.listMapper(glueMlTransformInputRecordTablesToTerraform)(this._inputRecordTables),
            parameters: glueMlTransformParametersToTerraform(this._parameters.internalValue),
        };
    }
}
//# sourceMappingURL=glue-ml-transform.js.map