// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function datasyncTaskExcludesToTerraform(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 {
        filter_type: cdktf.stringToTerraform(struct.filterType),
        value: cdktf.stringToTerraform(struct.value),
    };
}
export class DatasyncTaskExcludesOutputReference 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._filterType !== undefined) {
            hasAnyValues = true;
            internalValueResult.filterType = this._filterType;
        }
        if (this._value !== undefined) {
            hasAnyValues = true;
            internalValueResult.value = this._value;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._filterType = undefined;
            this._value = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._filterType = value.filterType;
            this._value = value.value;
        }
    }
    // filter_type - computed: false, optional: true, required: false
    _filterType;
    get filterType() {
        return this.getStringAttribute('filter_type');
    }
    set filterType(value) {
        this._filterType = value;
    }
    resetFilterType() {
        this._filterType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get filterTypeInput() {
        return this._filterType;
    }
    // value - computed: false, optional: true, required: false
    _value;
    get value() {
        return this.getStringAttribute('value');
    }
    set value(value) {
        this._value = value;
    }
    resetValue() {
        this._value = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get valueInput() {
        return this._value;
    }
}
export function datasyncTaskOptionsToTerraform(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 {
        atime: cdktf.stringToTerraform(struct.atime),
        bytes_per_second: cdktf.numberToTerraform(struct.bytesPerSecond),
        gid: cdktf.stringToTerraform(struct.gid),
        log_level: cdktf.stringToTerraform(struct.logLevel),
        mtime: cdktf.stringToTerraform(struct.mtime),
        overwrite_mode: cdktf.stringToTerraform(struct.overwriteMode),
        posix_permissions: cdktf.stringToTerraform(struct.posixPermissions),
        preserve_deleted_files: cdktf.stringToTerraform(struct.preserveDeletedFiles),
        preserve_devices: cdktf.stringToTerraform(struct.preserveDevices),
        task_queueing: cdktf.stringToTerraform(struct.taskQueueing),
        transfer_mode: cdktf.stringToTerraform(struct.transferMode),
        uid: cdktf.stringToTerraform(struct.uid),
        verify_mode: cdktf.stringToTerraform(struct.verifyMode),
    };
}
export class DatasyncTaskOptionsOutputReference 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._atime !== undefined) {
            hasAnyValues = true;
            internalValueResult.atime = this._atime;
        }
        if (this._bytesPerSecond !== undefined) {
            hasAnyValues = true;
            internalValueResult.bytesPerSecond = this._bytesPerSecond;
        }
        if (this._gid !== undefined) {
            hasAnyValues = true;
            internalValueResult.gid = this._gid;
        }
        if (this._logLevel !== undefined) {
            hasAnyValues = true;
            internalValueResult.logLevel = this._logLevel;
        }
        if (this._mtime !== undefined) {
            hasAnyValues = true;
            internalValueResult.mtime = this._mtime;
        }
        if (this._overwriteMode !== undefined) {
            hasAnyValues = true;
            internalValueResult.overwriteMode = this._overwriteMode;
        }
        if (this._posixPermissions !== undefined) {
            hasAnyValues = true;
            internalValueResult.posixPermissions = this._posixPermissions;
        }
        if (this._preserveDeletedFiles !== undefined) {
            hasAnyValues = true;
            internalValueResult.preserveDeletedFiles = this._preserveDeletedFiles;
        }
        if (this._preserveDevices !== undefined) {
            hasAnyValues = true;
            internalValueResult.preserveDevices = this._preserveDevices;
        }
        if (this._taskQueueing !== undefined) {
            hasAnyValues = true;
            internalValueResult.taskQueueing = this._taskQueueing;
        }
        if (this._transferMode !== undefined) {
            hasAnyValues = true;
            internalValueResult.transferMode = this._transferMode;
        }
        if (this._uid !== undefined) {
            hasAnyValues = true;
            internalValueResult.uid = this._uid;
        }
        if (this._verifyMode !== undefined) {
            hasAnyValues = true;
            internalValueResult.verifyMode = this._verifyMode;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._atime = undefined;
            this._bytesPerSecond = undefined;
            this._gid = undefined;
            this._logLevel = undefined;
            this._mtime = undefined;
            this._overwriteMode = undefined;
            this._posixPermissions = undefined;
            this._preserveDeletedFiles = undefined;
            this._preserveDevices = undefined;
            this._taskQueueing = undefined;
            this._transferMode = undefined;
            this._uid = undefined;
            this._verifyMode = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._atime = value.atime;
            this._bytesPerSecond = value.bytesPerSecond;
            this._gid = value.gid;
            this._logLevel = value.logLevel;
            this._mtime = value.mtime;
            this._overwriteMode = value.overwriteMode;
            this._posixPermissions = value.posixPermissions;
            this._preserveDeletedFiles = value.preserveDeletedFiles;
            this._preserveDevices = value.preserveDevices;
            this._taskQueueing = value.taskQueueing;
            this._transferMode = value.transferMode;
            this._uid = value.uid;
            this._verifyMode = value.verifyMode;
        }
    }
    // atime - computed: false, optional: true, required: false
    _atime;
    get atime() {
        return this.getStringAttribute('atime');
    }
    set atime(value) {
        this._atime = value;
    }
    resetAtime() {
        this._atime = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get atimeInput() {
        return this._atime;
    }
    // bytes_per_second - computed: false, optional: true, required: false
    _bytesPerSecond;
    get bytesPerSecond() {
        return this.getNumberAttribute('bytes_per_second');
    }
    set bytesPerSecond(value) {
        this._bytesPerSecond = value;
    }
    resetBytesPerSecond() {
        this._bytesPerSecond = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get bytesPerSecondInput() {
        return this._bytesPerSecond;
    }
    // gid - computed: false, optional: true, required: false
    _gid;
    get gid() {
        return this.getStringAttribute('gid');
    }
    set gid(value) {
        this._gid = value;
    }
    resetGid() {
        this._gid = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get gidInput() {
        return this._gid;
    }
    // log_level - computed: false, optional: true, required: false
    _logLevel;
    get logLevel() {
        return this.getStringAttribute('log_level');
    }
    set logLevel(value) {
        this._logLevel = value;
    }
    resetLogLevel() {
        this._logLevel = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get logLevelInput() {
        return this._logLevel;
    }
    // mtime - computed: false, optional: true, required: false
    _mtime;
    get mtime() {
        return this.getStringAttribute('mtime');
    }
    set mtime(value) {
        this._mtime = value;
    }
    resetMtime() {
        this._mtime = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get mtimeInput() {
        return this._mtime;
    }
    // overwrite_mode - computed: false, optional: true, required: false
    _overwriteMode;
    get overwriteMode() {
        return this.getStringAttribute('overwrite_mode');
    }
    set overwriteMode(value) {
        this._overwriteMode = value;
    }
    resetOverwriteMode() {
        this._overwriteMode = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get overwriteModeInput() {
        return this._overwriteMode;
    }
    // posix_permissions - computed: false, optional: true, required: false
    _posixPermissions;
    get posixPermissions() {
        return this.getStringAttribute('posix_permissions');
    }
    set posixPermissions(value) {
        this._posixPermissions = value;
    }
    resetPosixPermissions() {
        this._posixPermissions = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get posixPermissionsInput() {
        return this._posixPermissions;
    }
    // preserve_deleted_files - computed: false, optional: true, required: false
    _preserveDeletedFiles;
    get preserveDeletedFiles() {
        return this.getStringAttribute('preserve_deleted_files');
    }
    set preserveDeletedFiles(value) {
        this._preserveDeletedFiles = value;
    }
    resetPreserveDeletedFiles() {
        this._preserveDeletedFiles = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get preserveDeletedFilesInput() {
        return this._preserveDeletedFiles;
    }
    // preserve_devices - computed: false, optional: true, required: false
    _preserveDevices;
    get preserveDevices() {
        return this.getStringAttribute('preserve_devices');
    }
    set preserveDevices(value) {
        this._preserveDevices = value;
    }
    resetPreserveDevices() {
        this._preserveDevices = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get preserveDevicesInput() {
        return this._preserveDevices;
    }
    // task_queueing - computed: false, optional: true, required: false
    _taskQueueing;
    get taskQueueing() {
        return this.getStringAttribute('task_queueing');
    }
    set taskQueueing(value) {
        this._taskQueueing = value;
    }
    resetTaskQueueing() {
        this._taskQueueing = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get taskQueueingInput() {
        return this._taskQueueing;
    }
    // transfer_mode - computed: false, optional: true, required: false
    _transferMode;
    get transferMode() {
        return this.getStringAttribute('transfer_mode');
    }
    set transferMode(value) {
        this._transferMode = value;
    }
    resetTransferMode() {
        this._transferMode = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get transferModeInput() {
        return this._transferMode;
    }
    // uid - computed: false, optional: true, required: false
    _uid;
    get uid() {
        return this.getStringAttribute('uid');
    }
    set uid(value) {
        this._uid = value;
    }
    resetUid() {
        this._uid = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get uidInput() {
        return this._uid;
    }
    // verify_mode - computed: false, optional: true, required: false
    _verifyMode;
    get verifyMode() {
        return this.getStringAttribute('verify_mode');
    }
    set verifyMode(value) {
        this._verifyMode = value;
    }
    resetVerifyMode() {
        this._verifyMode = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get verifyModeInput() {
        return this._verifyMode;
    }
}
export function datasyncTaskScheduleToTerraform(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 {
        schedule_expression: cdktf.stringToTerraform(struct.scheduleExpression),
    };
}
export class DatasyncTaskScheduleOutputReference 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._scheduleExpression !== undefined) {
            hasAnyValues = true;
            internalValueResult.scheduleExpression = this._scheduleExpression;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._scheduleExpression = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._scheduleExpression = value.scheduleExpression;
        }
    }
    // schedule_expression - computed: false, optional: false, required: true
    _scheduleExpression;
    get scheduleExpression() {
        return this.getStringAttribute('schedule_expression');
    }
    set scheduleExpression(value) {
        this._scheduleExpression = value;
    }
    // Temporarily expose input value. Use with caution.
    get scheduleExpressionInput() {
        return this._scheduleExpression;
    }
}
export function datasyncTaskTimeoutsToTerraform(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 {
        create: cdktf.stringToTerraform(struct.create),
    };
}
export class DatasyncTaskTimeoutsOutputReference 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._create !== undefined) {
            hasAnyValues = true;
            internalValueResult.create = this._create;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._create = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._create = value.create;
        }
    }
    // create - computed: false, optional: true, required: false
    _create;
    get create() {
        return this.getStringAttribute('create');
    }
    set create(value) {
        this._create = value;
    }
    resetCreate() {
        this._create = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get createInput() {
        return this._create;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/datasync_task aws_datasync_task}
*/
export class DatasyncTask extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_datasync_task";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/datasync_task aws_datasync_task} 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 DatasyncTaskConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_datasync_task',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._cloudwatchLogGroupArn = config.cloudwatchLogGroupArn;
        this._destinationLocationArn = config.destinationLocationArn;
        this._name = config.name;
        this._sourceLocationArn = config.sourceLocationArn;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._excludes.internalValue = config.excludes;
        this._options.internalValue = config.options;
        this._schedule.internalValue = config.schedule;
        this._timeouts.internalValue = config.timeouts;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // cloudwatch_log_group_arn - computed: false, optional: true, required: false
    _cloudwatchLogGroupArn;
    get cloudwatchLogGroupArn() {
        return this.getStringAttribute('cloudwatch_log_group_arn');
    }
    set cloudwatchLogGroupArn(value) {
        this._cloudwatchLogGroupArn = value;
    }
    resetCloudwatchLogGroupArn() {
        this._cloudwatchLogGroupArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cloudwatchLogGroupArnInput() {
        return this._cloudwatchLogGroupArn;
    }
    // destination_location_arn - computed: false, optional: false, required: true
    _destinationLocationArn;
    get destinationLocationArn() {
        return this.getStringAttribute('destination_location_arn');
    }
    set destinationLocationArn(value) {
        this._destinationLocationArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get destinationLocationArnInput() {
        return this._destinationLocationArn;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // 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;
    }
    // source_location_arn - computed: false, optional: false, required: true
    _sourceLocationArn;
    get sourceLocationArn() {
        return this.getStringAttribute('source_location_arn');
    }
    set sourceLocationArn(value) {
        this._sourceLocationArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get sourceLocationArnInput() {
        return this._sourceLocationArn;
    }
    // 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;
    }
    // excludes - computed: false, optional: true, required: false
    _excludes = new DatasyncTaskExcludesOutputReference(this, "excludes", true);
    get excludes() {
        return this._excludes;
    }
    putExcludes(value) {
        this._excludes.internalValue = value;
    }
    resetExcludes() {
        this._excludes.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get excludesInput() {
        return this._excludes.internalValue;
    }
    // options - computed: false, optional: true, required: false
    _options = new DatasyncTaskOptionsOutputReference(this, "options", true);
    get options() {
        return this._options;
    }
    putOptions(value) {
        this._options.internalValue = value;
    }
    resetOptions() {
        this._options.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get optionsInput() {
        return this._options.internalValue;
    }
    // schedule - computed: false, optional: true, required: false
    _schedule = new DatasyncTaskScheduleOutputReference(this, "schedule", true);
    get schedule() {
        return this._schedule;
    }
    putSchedule(value) {
        this._schedule.internalValue = value;
    }
    resetSchedule() {
        this._schedule.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get scheduleInput() {
        return this._schedule.internalValue;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new DatasyncTaskTimeoutsOutputReference(this, "timeouts", true);
    get timeouts() {
        return this._timeouts;
    }
    putTimeouts(value) {
        this._timeouts.internalValue = value;
    }
    resetTimeouts() {
        this._timeouts.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get timeoutsInput() {
        return this._timeouts.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            cloudwatch_log_group_arn: cdktf.stringToTerraform(this._cloudwatchLogGroupArn),
            destination_location_arn: cdktf.stringToTerraform(this._destinationLocationArn),
            name: cdktf.stringToTerraform(this._name),
            source_location_arn: cdktf.stringToTerraform(this._sourceLocationArn),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            excludes: datasyncTaskExcludesToTerraform(this._excludes.internalValue),
            options: datasyncTaskOptionsToTerraform(this._options.internalValue),
            schedule: datasyncTaskScheduleToTerraform(this._schedule.internalValue),
            timeouts: datasyncTaskTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
}
//# sourceMappingURL=datasync-task.js.map