// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function glueCrawlerCatalogTargetToTerraform(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 {
        database_name: cdktf.stringToTerraform(struct.databaseName),
        tables: cdktf.listMapper(cdktf.stringToTerraform)(struct.tables),
    };
}
export function glueCrawlerDeltaTargetToTerraform(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 {
        connection_name: cdktf.stringToTerraform(struct.connectionName),
        delta_tables: cdktf.listMapper(cdktf.stringToTerraform)(struct.deltaTables),
        write_manifest: cdktf.booleanToTerraform(struct.writeManifest),
    };
}
export function glueCrawlerDynamodbTargetToTerraform(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 {
        path: cdktf.stringToTerraform(struct.path),
        scan_all: cdktf.booleanToTerraform(struct.scanAll),
        scan_rate: cdktf.numberToTerraform(struct.scanRate),
    };
}
export function glueCrawlerJdbcTargetToTerraform(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 {
        connection_name: cdktf.stringToTerraform(struct.connectionName),
        exclusions: cdktf.listMapper(cdktf.stringToTerraform)(struct.exclusions),
        path: cdktf.stringToTerraform(struct.path),
    };
}
export function glueCrawlerLineageConfigurationToTerraform(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 {
        crawler_lineage_settings: cdktf.stringToTerraform(struct.crawlerLineageSettings),
    };
}
export class GlueCrawlerLineageConfigurationOutputReference 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._crawlerLineageSettings !== undefined) {
            hasAnyValues = true;
            internalValueResult.crawlerLineageSettings = this._crawlerLineageSettings;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._crawlerLineageSettings = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._crawlerLineageSettings = value.crawlerLineageSettings;
        }
    }
    // crawler_lineage_settings - computed: false, optional: true, required: false
    _crawlerLineageSettings;
    get crawlerLineageSettings() {
        return this.getStringAttribute('crawler_lineage_settings');
    }
    set crawlerLineageSettings(value) {
        this._crawlerLineageSettings = value;
    }
    resetCrawlerLineageSettings() {
        this._crawlerLineageSettings = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get crawlerLineageSettingsInput() {
        return this._crawlerLineageSettings;
    }
}
export function glueCrawlerMongodbTargetToTerraform(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 {
        connection_name: cdktf.stringToTerraform(struct.connectionName),
        path: cdktf.stringToTerraform(struct.path),
        scan_all: cdktf.booleanToTerraform(struct.scanAll),
    };
}
export function glueCrawlerRecrawlPolicyToTerraform(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 {
        recrawl_behavior: cdktf.stringToTerraform(struct.recrawlBehavior),
    };
}
export class GlueCrawlerRecrawlPolicyOutputReference 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._recrawlBehavior !== undefined) {
            hasAnyValues = true;
            internalValueResult.recrawlBehavior = this._recrawlBehavior;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._recrawlBehavior = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._recrawlBehavior = value.recrawlBehavior;
        }
    }
    // recrawl_behavior - computed: false, optional: true, required: false
    _recrawlBehavior;
    get recrawlBehavior() {
        return this.getStringAttribute('recrawl_behavior');
    }
    set recrawlBehavior(value) {
        this._recrawlBehavior = value;
    }
    resetRecrawlBehavior() {
        this._recrawlBehavior = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get recrawlBehaviorInput() {
        return this._recrawlBehavior;
    }
}
export function glueCrawlerS3TargetToTerraform(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 {
        connection_name: cdktf.stringToTerraform(struct.connectionName),
        dlq_event_queue_arn: cdktf.stringToTerraform(struct.dlqEventQueueArn),
        event_queue_arn: cdktf.stringToTerraform(struct.eventQueueArn),
        exclusions: cdktf.listMapper(cdktf.stringToTerraform)(struct.exclusions),
        path: cdktf.stringToTerraform(struct.path),
        sample_size: cdktf.numberToTerraform(struct.sampleSize),
    };
}
export function glueCrawlerSchemaChangePolicyToTerraform(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 {
        delete_behavior: cdktf.stringToTerraform(struct.deleteBehavior),
        update_behavior: cdktf.stringToTerraform(struct.updateBehavior),
    };
}
export class GlueCrawlerSchemaChangePolicyOutputReference 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._deleteBehavior !== undefined) {
            hasAnyValues = true;
            internalValueResult.deleteBehavior = this._deleteBehavior;
        }
        if (this._updateBehavior !== undefined) {
            hasAnyValues = true;
            internalValueResult.updateBehavior = this._updateBehavior;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._deleteBehavior = undefined;
            this._updateBehavior = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._deleteBehavior = value.deleteBehavior;
            this._updateBehavior = value.updateBehavior;
        }
    }
    // delete_behavior - computed: false, optional: true, required: false
    _deleteBehavior;
    get deleteBehavior() {
        return this.getStringAttribute('delete_behavior');
    }
    set deleteBehavior(value) {
        this._deleteBehavior = value;
    }
    resetDeleteBehavior() {
        this._deleteBehavior = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteBehaviorInput() {
        return this._deleteBehavior;
    }
    // update_behavior - computed: false, optional: true, required: false
    _updateBehavior;
    get updateBehavior() {
        return this.getStringAttribute('update_behavior');
    }
    set updateBehavior(value) {
        this._updateBehavior = value;
    }
    resetUpdateBehavior() {
        this._updateBehavior = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get updateBehaviorInput() {
        return this._updateBehavior;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/glue_crawler aws_glue_crawler}
*/
export class GlueCrawler extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_glue_crawler";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/glue_crawler aws_glue_crawler} 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 GlueCrawlerConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_glue_crawler',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._classifiers = config.classifiers;
        this._configuration = config.configuration;
        this._databaseName = config.databaseName;
        this._description = config.description;
        this._name = config.name;
        this._role = config.role;
        this._schedule = config.schedule;
        this._securityConfiguration = config.securityConfiguration;
        this._tablePrefix = config.tablePrefix;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._catalogTarget = config.catalogTarget;
        this._deltaTarget = config.deltaTarget;
        this._dynamodbTarget = config.dynamodbTarget;
        this._jdbcTarget = config.jdbcTarget;
        this._lineageConfiguration.internalValue = config.lineageConfiguration;
        this._mongodbTarget = config.mongodbTarget;
        this._recrawlPolicy.internalValue = config.recrawlPolicy;
        this._s3Target = config.s3Target;
        this._schemaChangePolicy.internalValue = config.schemaChangePolicy;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // classifiers - computed: false, optional: true, required: false
    _classifiers;
    get classifiers() {
        return this.getListAttribute('classifiers');
    }
    set classifiers(value) {
        this._classifiers = value;
    }
    resetClassifiers() {
        this._classifiers = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get classifiersInput() {
        return this._classifiers;
    }
    // configuration - computed: false, optional: true, required: false
    _configuration;
    get configuration() {
        return this.getStringAttribute('configuration');
    }
    set configuration(value) {
        this._configuration = value;
    }
    resetConfiguration() {
        this._configuration = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get configurationInput() {
        return this._configuration;
    }
    // database_name - computed: false, optional: false, required: true
    _databaseName;
    get databaseName() {
        return this.getStringAttribute('database_name');
    }
    set databaseName(value) {
        this._databaseName = value;
    }
    // Temporarily expose input value. Use with caution.
    get databaseNameInput() {
        return this._databaseName;
    }
    // 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;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // 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;
    }
    // role - computed: false, optional: false, required: true
    _role;
    get role() {
        return this.getStringAttribute('role');
    }
    set role(value) {
        this._role = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleInput() {
        return this._role;
    }
    // schedule - computed: false, optional: true, required: false
    _schedule;
    get schedule() {
        return this.getStringAttribute('schedule');
    }
    set schedule(value) {
        this._schedule = value;
    }
    resetSchedule() {
        this._schedule = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get scheduleInput() {
        return this._schedule;
    }
    // security_configuration - computed: false, optional: true, required: false
    _securityConfiguration;
    get securityConfiguration() {
        return this.getStringAttribute('security_configuration');
    }
    set securityConfiguration(value) {
        this._securityConfiguration = value;
    }
    resetSecurityConfiguration() {
        this._securityConfiguration = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get securityConfigurationInput() {
        return this._securityConfiguration;
    }
    // table_prefix - computed: false, optional: true, required: false
    _tablePrefix;
    get tablePrefix() {
        return this.getStringAttribute('table_prefix');
    }
    set tablePrefix(value) {
        this._tablePrefix = value;
    }
    resetTablePrefix() {
        this._tablePrefix = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tablePrefixInput() {
        return this._tablePrefix;
    }
    // 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;
    }
    // catalog_target - computed: false, optional: true, required: false
    _catalogTarget;
    get catalogTarget() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('catalog_target');
    }
    set catalogTarget(value) {
        this._catalogTarget = value;
    }
    resetCatalogTarget() {
        this._catalogTarget = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get catalogTargetInput() {
        return this._catalogTarget;
    }
    // delta_target - computed: false, optional: true, required: false
    _deltaTarget;
    get deltaTarget() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('delta_target');
    }
    set deltaTarget(value) {
        this._deltaTarget = value;
    }
    resetDeltaTarget() {
        this._deltaTarget = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deltaTargetInput() {
        return this._deltaTarget;
    }
    // dynamodb_target - computed: false, optional: true, required: false
    _dynamodbTarget;
    get dynamodbTarget() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('dynamodb_target');
    }
    set dynamodbTarget(value) {
        this._dynamodbTarget = value;
    }
    resetDynamodbTarget() {
        this._dynamodbTarget = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dynamodbTargetInput() {
        return this._dynamodbTarget;
    }
    // jdbc_target - computed: false, optional: true, required: false
    _jdbcTarget;
    get jdbcTarget() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('jdbc_target');
    }
    set jdbcTarget(value) {
        this._jdbcTarget = value;
    }
    resetJdbcTarget() {
        this._jdbcTarget = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get jdbcTargetInput() {
        return this._jdbcTarget;
    }
    // lineage_configuration - computed: false, optional: true, required: false
    _lineageConfiguration = new GlueCrawlerLineageConfigurationOutputReference(this, "lineage_configuration", true);
    get lineageConfiguration() {
        return this._lineageConfiguration;
    }
    putLineageConfiguration(value) {
        this._lineageConfiguration.internalValue = value;
    }
    resetLineageConfiguration() {
        this._lineageConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get lineageConfigurationInput() {
        return this._lineageConfiguration.internalValue;
    }
    // mongodb_target - computed: false, optional: true, required: false
    _mongodbTarget;
    get mongodbTarget() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('mongodb_target');
    }
    set mongodbTarget(value) {
        this._mongodbTarget = value;
    }
    resetMongodbTarget() {
        this._mongodbTarget = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get mongodbTargetInput() {
        return this._mongodbTarget;
    }
    // recrawl_policy - computed: false, optional: true, required: false
    _recrawlPolicy = new GlueCrawlerRecrawlPolicyOutputReference(this, "recrawl_policy", true);
    get recrawlPolicy() {
        return this._recrawlPolicy;
    }
    putRecrawlPolicy(value) {
        this._recrawlPolicy.internalValue = value;
    }
    resetRecrawlPolicy() {
        this._recrawlPolicy.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get recrawlPolicyInput() {
        return this._recrawlPolicy.internalValue;
    }
    // s3_target - computed: false, optional: true, required: false
    _s3Target;
    get s3Target() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('s3_target');
    }
    set s3Target(value) {
        this._s3Target = value;
    }
    resetS3Target() {
        this._s3Target = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get s3TargetInput() {
        return this._s3Target;
    }
    // schema_change_policy - computed: false, optional: true, required: false
    _schemaChangePolicy = new GlueCrawlerSchemaChangePolicyOutputReference(this, "schema_change_policy", true);
    get schemaChangePolicy() {
        return this._schemaChangePolicy;
    }
    putSchemaChangePolicy(value) {
        this._schemaChangePolicy.internalValue = value;
    }
    resetSchemaChangePolicy() {
        this._schemaChangePolicy.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get schemaChangePolicyInput() {
        return this._schemaChangePolicy.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            classifiers: cdktf.listMapper(cdktf.stringToTerraform)(this._classifiers),
            configuration: cdktf.stringToTerraform(this._configuration),
            database_name: cdktf.stringToTerraform(this._databaseName),
            description: cdktf.stringToTerraform(this._description),
            name: cdktf.stringToTerraform(this._name),
            role: cdktf.stringToTerraform(this._role),
            schedule: cdktf.stringToTerraform(this._schedule),
            security_configuration: cdktf.stringToTerraform(this._securityConfiguration),
            table_prefix: cdktf.stringToTerraform(this._tablePrefix),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            catalog_target: cdktf.listMapper(glueCrawlerCatalogTargetToTerraform)(this._catalogTarget),
            delta_target: cdktf.listMapper(glueCrawlerDeltaTargetToTerraform)(this._deltaTarget),
            dynamodb_target: cdktf.listMapper(glueCrawlerDynamodbTargetToTerraform)(this._dynamodbTarget),
            jdbc_target: cdktf.listMapper(glueCrawlerJdbcTargetToTerraform)(this._jdbcTarget),
            lineage_configuration: glueCrawlerLineageConfigurationToTerraform(this._lineageConfiguration.internalValue),
            mongodb_target: cdktf.listMapper(glueCrawlerMongodbTargetToTerraform)(this._mongodbTarget),
            recrawl_policy: glueCrawlerRecrawlPolicyToTerraform(this._recrawlPolicy.internalValue),
            s3_target: cdktf.listMapper(glueCrawlerS3TargetToTerraform)(this._s3Target),
            schema_change_policy: glueCrawlerSchemaChangePolicyToTerraform(this._schemaChangePolicy.internalValue),
        };
    }
}
//# sourceMappingURL=glue-crawler.js.map