// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function fsxDataRepositoryAssociationS3AutoExportPolicyToTerraform(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 {
        events: cdktf.listMapper(cdktf.stringToTerraform)(struct.events),
    };
}
export class FsxDataRepositoryAssociationS3AutoExportPolicyOutputReference 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._events !== undefined) {
            hasAnyValues = true;
            internalValueResult.events = this._events;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._events = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._events = value.events;
        }
    }
    // events - computed: true, optional: true, required: false
    _events;
    get events() {
        return this.getListAttribute('events');
    }
    set events(value) {
        this._events = value;
    }
    resetEvents() {
        this._events = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get eventsInput() {
        return this._events;
    }
}
export function fsxDataRepositoryAssociationS3AutoImportPolicyToTerraform(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 {
        events: cdktf.listMapper(cdktf.stringToTerraform)(struct.events),
    };
}
export class FsxDataRepositoryAssociationS3AutoImportPolicyOutputReference 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._events !== undefined) {
            hasAnyValues = true;
            internalValueResult.events = this._events;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._events = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._events = value.events;
        }
    }
    // events - computed: true, optional: true, required: false
    _events;
    get events() {
        return this.getListAttribute('events');
    }
    set events(value) {
        this._events = value;
    }
    resetEvents() {
        this._events = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get eventsInput() {
        return this._events;
    }
}
export function fsxDataRepositoryAssociationS3ToTerraform(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 {
        auto_export_policy: fsxDataRepositoryAssociationS3AutoExportPolicyToTerraform(struct.autoExportPolicy),
        auto_import_policy: fsxDataRepositoryAssociationS3AutoImportPolicyToTerraform(struct.autoImportPolicy),
    };
}
export class FsxDataRepositoryAssociationS3OutputReference 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._autoExportPolicy?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.autoExportPolicy = this._autoExportPolicy?.internalValue;
        }
        if (this._autoImportPolicy?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.autoImportPolicy = this._autoImportPolicy?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._autoExportPolicy.internalValue = undefined;
            this._autoImportPolicy.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._autoExportPolicy.internalValue = value.autoExportPolicy;
            this._autoImportPolicy.internalValue = value.autoImportPolicy;
        }
    }
    // auto_export_policy - computed: false, optional: true, required: false
    _autoExportPolicy = new FsxDataRepositoryAssociationS3AutoExportPolicyOutputReference(this, "auto_export_policy", true);
    get autoExportPolicy() {
        return this._autoExportPolicy;
    }
    putAutoExportPolicy(value) {
        this._autoExportPolicy.internalValue = value;
    }
    resetAutoExportPolicy() {
        this._autoExportPolicy.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoExportPolicyInput() {
        return this._autoExportPolicy.internalValue;
    }
    // auto_import_policy - computed: false, optional: true, required: false
    _autoImportPolicy = new FsxDataRepositoryAssociationS3AutoImportPolicyOutputReference(this, "auto_import_policy", true);
    get autoImportPolicy() {
        return this._autoImportPolicy;
    }
    putAutoImportPolicy(value) {
        this._autoImportPolicy.internalValue = value;
    }
    resetAutoImportPolicy() {
        this._autoImportPolicy.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoImportPolicyInput() {
        return this._autoImportPolicy.internalValue;
    }
}
export function fsxDataRepositoryAssociationTimeoutsToTerraform(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),
        delete: cdktf.stringToTerraform(struct.delete),
        update: cdktf.stringToTerraform(struct.update),
    };
}
export class FsxDataRepositoryAssociationTimeoutsOutputReference 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;
        }
        if (this._delete !== undefined) {
            hasAnyValues = true;
            internalValueResult.delete = this._delete;
        }
        if (this._update !== undefined) {
            hasAnyValues = true;
            internalValueResult.update = this._update;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._create = undefined;
            this._delete = undefined;
            this._update = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._create = value.create;
            this._delete = value.delete;
            this._update = value.update;
        }
    }
    // 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;
    }
    // delete - computed: false, optional: true, required: false
    _delete;
    get delete() {
        return this.getStringAttribute('delete');
    }
    set delete(value) {
        this._delete = value;
    }
    resetDelete() {
        this._delete = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteInput() {
        return this._delete;
    }
    // update - computed: false, optional: true, required: false
    _update;
    get update() {
        return this.getStringAttribute('update');
    }
    set update(value) {
        this._update = value;
    }
    resetUpdate() {
        this._update = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get updateInput() {
        return this._update;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/fsx_data_repository_association aws_fsx_data_repository_association}
*/
export class FsxDataRepositoryAssociation extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_fsx_data_repository_association";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/fsx_data_repository_association aws_fsx_data_repository_association} 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 FsxDataRepositoryAssociationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_fsx_data_repository_association',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._batchImportMetaDataOnCreate = config.batchImportMetaDataOnCreate;
        this._dataRepositoryPath = config.dataRepositoryPath;
        this._deleteDataInFilesystem = config.deleteDataInFilesystem;
        this._fileSystemId = config.fileSystemId;
        this._fileSystemPath = config.fileSystemPath;
        this._importedFileChunkSize = config.importedFileChunkSize;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._s3.internalValue = config.s3;
        this._timeouts.internalValue = config.timeouts;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // association_id - computed: true, optional: false, required: false
    get associationId() {
        return this.getStringAttribute('association_id');
    }
    // batch_import_meta_data_on_create - computed: false, optional: true, required: false
    _batchImportMetaDataOnCreate;
    get batchImportMetaDataOnCreate() {
        return this.getBooleanAttribute('batch_import_meta_data_on_create');
    }
    set batchImportMetaDataOnCreate(value) {
        this._batchImportMetaDataOnCreate = value;
    }
    resetBatchImportMetaDataOnCreate() {
        this._batchImportMetaDataOnCreate = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get batchImportMetaDataOnCreateInput() {
        return this._batchImportMetaDataOnCreate;
    }
    // data_repository_path - computed: false, optional: false, required: true
    _dataRepositoryPath;
    get dataRepositoryPath() {
        return this.getStringAttribute('data_repository_path');
    }
    set dataRepositoryPath(value) {
        this._dataRepositoryPath = value;
    }
    // Temporarily expose input value. Use with caution.
    get dataRepositoryPathInput() {
        return this._dataRepositoryPath;
    }
    // delete_data_in_filesystem - computed: false, optional: true, required: false
    _deleteDataInFilesystem;
    get deleteDataInFilesystem() {
        return this.getBooleanAttribute('delete_data_in_filesystem');
    }
    set deleteDataInFilesystem(value) {
        this._deleteDataInFilesystem = value;
    }
    resetDeleteDataInFilesystem() {
        this._deleteDataInFilesystem = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteDataInFilesystemInput() {
        return this._deleteDataInFilesystem;
    }
    // file_system_id - computed: false, optional: false, required: true
    _fileSystemId;
    get fileSystemId() {
        return this.getStringAttribute('file_system_id');
    }
    set fileSystemId(value) {
        this._fileSystemId = value;
    }
    // Temporarily expose input value. Use with caution.
    get fileSystemIdInput() {
        return this._fileSystemId;
    }
    // file_system_path - computed: false, optional: false, required: true
    _fileSystemPath;
    get fileSystemPath() {
        return this.getStringAttribute('file_system_path');
    }
    set fileSystemPath(value) {
        this._fileSystemPath = value;
    }
    // Temporarily expose input value. Use with caution.
    get fileSystemPathInput() {
        return this._fileSystemPath;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // imported_file_chunk_size - computed: true, optional: true, required: false
    _importedFileChunkSize;
    get importedFileChunkSize() {
        return this.getNumberAttribute('imported_file_chunk_size');
    }
    set importedFileChunkSize(value) {
        this._importedFileChunkSize = value;
    }
    resetImportedFileChunkSize() {
        this._importedFileChunkSize = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get importedFileChunkSizeInput() {
        return this._importedFileChunkSize;
    }
    // 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;
    }
    // s3 - computed: false, optional: true, required: false
    _s3 = new FsxDataRepositoryAssociationS3OutputReference(this, "s3", true);
    get s3() {
        return this._s3;
    }
    putS3(value) {
        this._s3.internalValue = value;
    }
    resetS3() {
        this._s3.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get s3Input() {
        return this._s3.internalValue;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new FsxDataRepositoryAssociationTimeoutsOutputReference(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 {
            batch_import_meta_data_on_create: cdktf.booleanToTerraform(this._batchImportMetaDataOnCreate),
            data_repository_path: cdktf.stringToTerraform(this._dataRepositoryPath),
            delete_data_in_filesystem: cdktf.booleanToTerraform(this._deleteDataInFilesystem),
            file_system_id: cdktf.stringToTerraform(this._fileSystemId),
            file_system_path: cdktf.stringToTerraform(this._fileSystemPath),
            imported_file_chunk_size: cdktf.numberToTerraform(this._importedFileChunkSize),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            s3: fsxDataRepositoryAssociationS3ToTerraform(this._s3.internalValue),
            timeouts: fsxDataRepositoryAssociationTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
}
//# sourceMappingURL=fsx-data-repository-association.js.map