// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function fsxOpenzfsVolumeNfsExportsClientConfigurationsToTerraform(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 {
        clients: cdktf.stringToTerraform(struct.clients),
        options: cdktf.listMapper(cdktf.stringToTerraform)(struct.options),
    };
}
export function fsxOpenzfsVolumeNfsExportsToTerraform(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 {
        client_configurations: cdktf.listMapper(fsxOpenzfsVolumeNfsExportsClientConfigurationsToTerraform)(struct.clientConfigurations),
    };
}
export class FsxOpenzfsVolumeNfsExportsOutputReference 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._clientConfigurations !== undefined) {
            hasAnyValues = true;
            internalValueResult.clientConfigurations = this._clientConfigurations;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._clientConfigurations = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._clientConfigurations = value.clientConfigurations;
        }
    }
    // client_configurations - computed: false, optional: false, required: true
    _clientConfigurations;
    get clientConfigurations() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('client_configurations')));
    }
    set clientConfigurations(value) {
        this._clientConfigurations = value;
    }
    // Temporarily expose input value. Use with caution.
    get clientConfigurationsInput() {
        return this._clientConfigurations;
    }
}
export function fsxOpenzfsVolumeOriginSnapshotToTerraform(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 {
        copy_strategy: cdktf.stringToTerraform(struct.copyStrategy),
        snapshot_arn: cdktf.stringToTerraform(struct.snapshotArn),
    };
}
export class FsxOpenzfsVolumeOriginSnapshotOutputReference 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._copyStrategy !== undefined) {
            hasAnyValues = true;
            internalValueResult.copyStrategy = this._copyStrategy;
        }
        if (this._snapshotArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.snapshotArn = this._snapshotArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._copyStrategy = undefined;
            this._snapshotArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._copyStrategy = value.copyStrategy;
            this._snapshotArn = value.snapshotArn;
        }
    }
    // copy_strategy - computed: false, optional: false, required: true
    _copyStrategy;
    get copyStrategy() {
        return this.getStringAttribute('copy_strategy');
    }
    set copyStrategy(value) {
        this._copyStrategy = value;
    }
    // Temporarily expose input value. Use with caution.
    get copyStrategyInput() {
        return this._copyStrategy;
    }
    // snapshot_arn - computed: false, optional: false, required: true
    _snapshotArn;
    get snapshotArn() {
        return this.getStringAttribute('snapshot_arn');
    }
    set snapshotArn(value) {
        this._snapshotArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get snapshotArnInput() {
        return this._snapshotArn;
    }
}
export function fsxOpenzfsVolumeTimeoutsToTerraform(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 FsxOpenzfsVolumeTimeoutsOutputReference 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;
    }
}
export function fsxOpenzfsVolumeUserAndGroupQuotasToTerraform(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 {
        id: cdktf.numberToTerraform(struct.id),
        storage_capacity_quota_gib: cdktf.numberToTerraform(struct.storageCapacityQuotaGib),
        type: cdktf.stringToTerraform(struct.type),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/fsx_openzfs_volume aws_fsx_openzfs_volume}
*/
export class FsxOpenzfsVolume extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_fsx_openzfs_volume";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/fsx_openzfs_volume aws_fsx_openzfs_volume} 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 FsxOpenzfsVolumeConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_fsx_openzfs_volume',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._copyTagsToSnapshots = config.copyTagsToSnapshots;
        this._dataCompressionType = config.dataCompressionType;
        this._name = config.name;
        this._parentVolumeId = config.parentVolumeId;
        this._readOnly = config.readOnly;
        this._storageCapacityQuotaGib = config.storageCapacityQuotaGib;
        this._storageCapacityReservationGib = config.storageCapacityReservationGib;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._volumeType = config.volumeType;
        this._nfsExports.internalValue = config.nfsExports;
        this._originSnapshot.internalValue = config.originSnapshot;
        this._timeouts.internalValue = config.timeouts;
        this._userAndGroupQuotas = config.userAndGroupQuotas;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // copy_tags_to_snapshots - computed: false, optional: true, required: false
    _copyTagsToSnapshots;
    get copyTagsToSnapshots() {
        return this.getBooleanAttribute('copy_tags_to_snapshots');
    }
    set copyTagsToSnapshots(value) {
        this._copyTagsToSnapshots = value;
    }
    resetCopyTagsToSnapshots() {
        this._copyTagsToSnapshots = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get copyTagsToSnapshotsInput() {
        return this._copyTagsToSnapshots;
    }
    // data_compression_type - computed: false, optional: true, required: false
    _dataCompressionType;
    get dataCompressionType() {
        return this.getStringAttribute('data_compression_type');
    }
    set dataCompressionType(value) {
        this._dataCompressionType = value;
    }
    resetDataCompressionType() {
        this._dataCompressionType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dataCompressionTypeInput() {
        return this._dataCompressionType;
    }
    // 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;
    }
    // parent_volume_id - computed: false, optional: false, required: true
    _parentVolumeId;
    get parentVolumeId() {
        return this.getStringAttribute('parent_volume_id');
    }
    set parentVolumeId(value) {
        this._parentVolumeId = value;
    }
    // Temporarily expose input value. Use with caution.
    get parentVolumeIdInput() {
        return this._parentVolumeId;
    }
    // read_only - computed: true, optional: true, required: false
    _readOnly;
    get readOnly() {
        return this.getBooleanAttribute('read_only');
    }
    set readOnly(value) {
        this._readOnly = value;
    }
    resetReadOnly() {
        this._readOnly = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get readOnlyInput() {
        return this._readOnly;
    }
    // storage_capacity_quota_gib - computed: true, optional: true, required: false
    _storageCapacityQuotaGib;
    get storageCapacityQuotaGib() {
        return this.getNumberAttribute('storage_capacity_quota_gib');
    }
    set storageCapacityQuotaGib(value) {
        this._storageCapacityQuotaGib = value;
    }
    resetStorageCapacityQuotaGib() {
        this._storageCapacityQuotaGib = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get storageCapacityQuotaGibInput() {
        return this._storageCapacityQuotaGib;
    }
    // storage_capacity_reservation_gib - computed: true, optional: true, required: false
    _storageCapacityReservationGib;
    get storageCapacityReservationGib() {
        return this.getNumberAttribute('storage_capacity_reservation_gib');
    }
    set storageCapacityReservationGib(value) {
        this._storageCapacityReservationGib = value;
    }
    resetStorageCapacityReservationGib() {
        this._storageCapacityReservationGib = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get storageCapacityReservationGibInput() {
        return this._storageCapacityReservationGib;
    }
    // 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;
    }
    // volume_type - computed: false, optional: true, required: false
    _volumeType;
    get volumeType() {
        return this.getStringAttribute('volume_type');
    }
    set volumeType(value) {
        this._volumeType = value;
    }
    resetVolumeType() {
        this._volumeType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get volumeTypeInput() {
        return this._volumeType;
    }
    // nfs_exports - computed: false, optional: true, required: false
    _nfsExports = new FsxOpenzfsVolumeNfsExportsOutputReference(this, "nfs_exports", true);
    get nfsExports() {
        return this._nfsExports;
    }
    putNfsExports(value) {
        this._nfsExports.internalValue = value;
    }
    resetNfsExports() {
        this._nfsExports.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nfsExportsInput() {
        return this._nfsExports.internalValue;
    }
    // origin_snapshot - computed: false, optional: true, required: false
    _originSnapshot = new FsxOpenzfsVolumeOriginSnapshotOutputReference(this, "origin_snapshot", true);
    get originSnapshot() {
        return this._originSnapshot;
    }
    putOriginSnapshot(value) {
        this._originSnapshot.internalValue = value;
    }
    resetOriginSnapshot() {
        this._originSnapshot.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get originSnapshotInput() {
        return this._originSnapshot.internalValue;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new FsxOpenzfsVolumeTimeoutsOutputReference(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;
    }
    // user_and_group_quotas - computed: false, optional: true, required: false
    _userAndGroupQuotas;
    get userAndGroupQuotas() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('user_and_group_quotas')));
    }
    set userAndGroupQuotas(value) {
        this._userAndGroupQuotas = value;
    }
    resetUserAndGroupQuotas() {
        this._userAndGroupQuotas = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get userAndGroupQuotasInput() {
        return this._userAndGroupQuotas;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            copy_tags_to_snapshots: cdktf.booleanToTerraform(this._copyTagsToSnapshots),
            data_compression_type: cdktf.stringToTerraform(this._dataCompressionType),
            name: cdktf.stringToTerraform(this._name),
            parent_volume_id: cdktf.stringToTerraform(this._parentVolumeId),
            read_only: cdktf.booleanToTerraform(this._readOnly),
            storage_capacity_quota_gib: cdktf.numberToTerraform(this._storageCapacityQuotaGib),
            storage_capacity_reservation_gib: cdktf.numberToTerraform(this._storageCapacityReservationGib),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            volume_type: cdktf.stringToTerraform(this._volumeType),
            nfs_exports: fsxOpenzfsVolumeNfsExportsToTerraform(this._nfsExports.internalValue),
            origin_snapshot: fsxOpenzfsVolumeOriginSnapshotToTerraform(this._originSnapshot.internalValue),
            timeouts: fsxOpenzfsVolumeTimeoutsToTerraform(this._timeouts.internalValue),
            user_and_group_quotas: cdktf.listMapper(fsxOpenzfsVolumeUserAndGroupQuotasToTerraform)(this._userAndGroupQuotas),
        };
    }
}
//# sourceMappingURL=fsx-openzfs-volume.js.map