// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function glueJobCommandToTerraform(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),
        python_version: cdktf.stringToTerraform(struct.pythonVersion),
        script_location: cdktf.stringToTerraform(struct.scriptLocation),
    };
}
export class GlueJobCommandOutputReference 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._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        if (this._pythonVersion !== undefined) {
            hasAnyValues = true;
            internalValueResult.pythonVersion = this._pythonVersion;
        }
        if (this._scriptLocation !== undefined) {
            hasAnyValues = true;
            internalValueResult.scriptLocation = this._scriptLocation;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._name = undefined;
            this._pythonVersion = undefined;
            this._scriptLocation = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._name = value.name;
            this._pythonVersion = value.pythonVersion;
            this._scriptLocation = value.scriptLocation;
        }
    }
    // name - computed: false, optional: true, required: false
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    resetName() {
        this._name = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // python_version - computed: true, optional: true, required: false
    _pythonVersion;
    get pythonVersion() {
        return this.getStringAttribute('python_version');
    }
    set pythonVersion(value) {
        this._pythonVersion = value;
    }
    resetPythonVersion() {
        this._pythonVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get pythonVersionInput() {
        return this._pythonVersion;
    }
    // script_location - computed: false, optional: false, required: true
    _scriptLocation;
    get scriptLocation() {
        return this.getStringAttribute('script_location');
    }
    set scriptLocation(value) {
        this._scriptLocation = value;
    }
    // Temporarily expose input value. Use with caution.
    get scriptLocationInput() {
        return this._scriptLocation;
    }
}
export function glueJobExecutionPropertyToTerraform(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_concurrent_runs: cdktf.numberToTerraform(struct.maxConcurrentRuns),
    };
}
export class GlueJobExecutionPropertyOutputReference 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._maxConcurrentRuns !== undefined) {
            hasAnyValues = true;
            internalValueResult.maxConcurrentRuns = this._maxConcurrentRuns;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._maxConcurrentRuns = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._maxConcurrentRuns = value.maxConcurrentRuns;
        }
    }
    // max_concurrent_runs - computed: false, optional: true, required: false
    _maxConcurrentRuns;
    get maxConcurrentRuns() {
        return this.getNumberAttribute('max_concurrent_runs');
    }
    set maxConcurrentRuns(value) {
        this._maxConcurrentRuns = value;
    }
    resetMaxConcurrentRuns() {
        this._maxConcurrentRuns = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maxConcurrentRunsInput() {
        return this._maxConcurrentRuns;
    }
}
export function glueJobNotificationPropertyToTerraform(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 {
        notify_delay_after: cdktf.numberToTerraform(struct.notifyDelayAfter),
    };
}
export class GlueJobNotificationPropertyOutputReference 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._notifyDelayAfter !== undefined) {
            hasAnyValues = true;
            internalValueResult.notifyDelayAfter = this._notifyDelayAfter;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._notifyDelayAfter = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._notifyDelayAfter = value.notifyDelayAfter;
        }
    }
    // notify_delay_after - computed: false, optional: true, required: false
    _notifyDelayAfter;
    get notifyDelayAfter() {
        return this.getNumberAttribute('notify_delay_after');
    }
    set notifyDelayAfter(value) {
        this._notifyDelayAfter = value;
    }
    resetNotifyDelayAfter() {
        this._notifyDelayAfter = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get notifyDelayAfterInput() {
        return this._notifyDelayAfter;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/glue_job aws_glue_job}
*/
export class GlueJob extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_glue_job";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/glue_job aws_glue_job} 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 GlueJobConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_glue_job',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._connections = config.connections;
        this._defaultArguments = config.defaultArguments;
        this._description = config.description;
        this._glueVersion = config.glueVersion;
        this._maxCapacity = config.maxCapacity;
        this._maxRetries = config.maxRetries;
        this._name = config.name;
        this._nonOverridableArguments = config.nonOverridableArguments;
        this._numberOfWorkers = config.numberOfWorkers;
        this._roleArn = config.roleArn;
        this._securityConfiguration = config.securityConfiguration;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._timeout = config.timeout;
        this._workerType = config.workerType;
        this._command.internalValue = config.command;
        this._executionProperty.internalValue = config.executionProperty;
        this._notificationProperty.internalValue = config.notificationProperty;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // connections - computed: false, optional: true, required: false
    _connections;
    get connections() {
        return this.getListAttribute('connections');
    }
    set connections(value) {
        this._connections = value;
    }
    resetConnections() {
        this._connections = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get connectionsInput() {
        return this._connections;
    }
    // default_arguments - computed: false, optional: true, required: false
    _defaultArguments;
    get defaultArguments() {
        return this.getStringMapAttribute('default_arguments');
    }
    set defaultArguments(value) {
        this._defaultArguments = value;
    }
    resetDefaultArguments() {
        this._defaultArguments = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get defaultArgumentsInput() {
        return this._defaultArguments;
    }
    // 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');
    }
    // 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;
    }
    // non_overridable_arguments - computed: false, optional: true, required: false
    _nonOverridableArguments;
    get nonOverridableArguments() {
        return this.getStringMapAttribute('non_overridable_arguments');
    }
    set nonOverridableArguments(value) {
        this._nonOverridableArguments = value;
    }
    resetNonOverridableArguments() {
        this._nonOverridableArguments = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nonOverridableArgumentsInput() {
        return this._nonOverridableArguments;
    }
    // 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;
    }
    // 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;
    }
    // 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;
    }
    // command - computed: false, optional: false, required: true
    _command = new GlueJobCommandOutputReference(this, "command", true);
    get command() {
        return this._command;
    }
    putCommand(value) {
        this._command.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get commandInput() {
        return this._command.internalValue;
    }
    // execution_property - computed: false, optional: true, required: false
    _executionProperty = new GlueJobExecutionPropertyOutputReference(this, "execution_property", true);
    get executionProperty() {
        return this._executionProperty;
    }
    putExecutionProperty(value) {
        this._executionProperty.internalValue = value;
    }
    resetExecutionProperty() {
        this._executionProperty.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get executionPropertyInput() {
        return this._executionProperty.internalValue;
    }
    // notification_property - computed: false, optional: true, required: false
    _notificationProperty = new GlueJobNotificationPropertyOutputReference(this, "notification_property", true);
    get notificationProperty() {
        return this._notificationProperty;
    }
    putNotificationProperty(value) {
        this._notificationProperty.internalValue = value;
    }
    resetNotificationProperty() {
        this._notificationProperty.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get notificationPropertyInput() {
        return this._notificationProperty.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            connections: cdktf.listMapper(cdktf.stringToTerraform)(this._connections),
            default_arguments: cdktf.hashMapper(cdktf.stringToTerraform)(this._defaultArguments),
            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),
            non_overridable_arguments: cdktf.hashMapper(cdktf.stringToTerraform)(this._nonOverridableArguments),
            number_of_workers: cdktf.numberToTerraform(this._numberOfWorkers),
            role_arn: cdktf.stringToTerraform(this._roleArn),
            security_configuration: cdktf.stringToTerraform(this._securityConfiguration),
            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),
            command: glueJobCommandToTerraform(this._command.internalValue),
            execution_property: glueJobExecutionPropertyToTerraform(this._executionProperty.internalValue),
            notification_property: glueJobNotificationPropertyToTerraform(this._notificationProperty.internalValue),
        };
    }
}
//# sourceMappingURL=glue-job.js.map