// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function ebsSnapshotImportClientDataToTerraform(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 {
        comment: cdktf.stringToTerraform(struct.comment),
        upload_end: cdktf.stringToTerraform(struct.uploadEnd),
        upload_size: cdktf.numberToTerraform(struct.uploadSize),
        upload_start: cdktf.stringToTerraform(struct.uploadStart),
    };
}
export class EbsSnapshotImportClientDataOutputReference 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._comment !== undefined) {
            hasAnyValues = true;
            internalValueResult.comment = this._comment;
        }
        if (this._uploadEnd !== undefined) {
            hasAnyValues = true;
            internalValueResult.uploadEnd = this._uploadEnd;
        }
        if (this._uploadSize !== undefined) {
            hasAnyValues = true;
            internalValueResult.uploadSize = this._uploadSize;
        }
        if (this._uploadStart !== undefined) {
            hasAnyValues = true;
            internalValueResult.uploadStart = this._uploadStart;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._comment = undefined;
            this._uploadEnd = undefined;
            this._uploadSize = undefined;
            this._uploadStart = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._comment = value.comment;
            this._uploadEnd = value.uploadEnd;
            this._uploadSize = value.uploadSize;
            this._uploadStart = value.uploadStart;
        }
    }
    // comment - computed: false, optional: true, required: false
    _comment;
    get comment() {
        return this.getStringAttribute('comment');
    }
    set comment(value) {
        this._comment = value;
    }
    resetComment() {
        this._comment = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get commentInput() {
        return this._comment;
    }
    // upload_end - computed: true, optional: true, required: false
    _uploadEnd;
    get uploadEnd() {
        return this.getStringAttribute('upload_end');
    }
    set uploadEnd(value) {
        this._uploadEnd = value;
    }
    resetUploadEnd() {
        this._uploadEnd = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get uploadEndInput() {
        return this._uploadEnd;
    }
    // upload_size - computed: true, optional: true, required: false
    _uploadSize;
    get uploadSize() {
        return this.getNumberAttribute('upload_size');
    }
    set uploadSize(value) {
        this._uploadSize = value;
    }
    resetUploadSize() {
        this._uploadSize = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get uploadSizeInput() {
        return this._uploadSize;
    }
    // upload_start - computed: true, optional: true, required: false
    _uploadStart;
    get uploadStart() {
        return this.getStringAttribute('upload_start');
    }
    set uploadStart(value) {
        this._uploadStart = value;
    }
    resetUploadStart() {
        this._uploadStart = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get uploadStartInput() {
        return this._uploadStart;
    }
}
export function ebsSnapshotImportDiskContainerUserBucketToTerraform(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 {
        s3_bucket: cdktf.stringToTerraform(struct.s3Bucket),
        s3_key: cdktf.stringToTerraform(struct.s3Key),
    };
}
export class EbsSnapshotImportDiskContainerUserBucketOutputReference 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._s3Bucket !== undefined) {
            hasAnyValues = true;
            internalValueResult.s3Bucket = this._s3Bucket;
        }
        if (this._s3Key !== undefined) {
            hasAnyValues = true;
            internalValueResult.s3Key = this._s3Key;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._s3Bucket = undefined;
            this._s3Key = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._s3Bucket = value.s3Bucket;
            this._s3Key = value.s3Key;
        }
    }
    // s3_bucket - computed: false, optional: false, required: true
    _s3Bucket;
    get s3Bucket() {
        return this.getStringAttribute('s3_bucket');
    }
    set s3Bucket(value) {
        this._s3Bucket = value;
    }
    // Temporarily expose input value. Use with caution.
    get s3BucketInput() {
        return this._s3Bucket;
    }
    // s3_key - computed: false, optional: false, required: true
    _s3Key;
    get s3Key() {
        return this.getStringAttribute('s3_key');
    }
    set s3Key(value) {
        this._s3Key = value;
    }
    // Temporarily expose input value. Use with caution.
    get s3KeyInput() {
        return this._s3Key;
    }
}
export function ebsSnapshotImportDiskContainerToTerraform(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 {
        description: cdktf.stringToTerraform(struct.description),
        format: cdktf.stringToTerraform(struct.format),
        url: cdktf.stringToTerraform(struct.url),
        user_bucket: ebsSnapshotImportDiskContainerUserBucketToTerraform(struct.userBucket),
    };
}
export class EbsSnapshotImportDiskContainerOutputReference 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._description !== undefined) {
            hasAnyValues = true;
            internalValueResult.description = this._description;
        }
        if (this._format !== undefined) {
            hasAnyValues = true;
            internalValueResult.format = this._format;
        }
        if (this._url !== undefined) {
            hasAnyValues = true;
            internalValueResult.url = this._url;
        }
        if (this._userBucket?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.userBucket = this._userBucket?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._description = undefined;
            this._format = undefined;
            this._url = undefined;
            this._userBucket.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._description = value.description;
            this._format = value.format;
            this._url = value.url;
            this._userBucket.internalValue = value.userBucket;
        }
    }
    // 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;
    }
    // format - computed: false, optional: false, required: true
    _format;
    get format() {
        return this.getStringAttribute('format');
    }
    set format(value) {
        this._format = value;
    }
    // Temporarily expose input value. Use with caution.
    get formatInput() {
        return this._format;
    }
    // url - computed: false, optional: true, required: false
    _url;
    get url() {
        return this.getStringAttribute('url');
    }
    set url(value) {
        this._url = value;
    }
    resetUrl() {
        this._url = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get urlInput() {
        return this._url;
    }
    // user_bucket - computed: false, optional: true, required: false
    _userBucket = new EbsSnapshotImportDiskContainerUserBucketOutputReference(this, "user_bucket", true);
    get userBucket() {
        return this._userBucket;
    }
    putUserBucket(value) {
        this._userBucket.internalValue = value;
    }
    resetUserBucket() {
        this._userBucket.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get userBucketInput() {
        return this._userBucket.internalValue;
    }
}
export function ebsSnapshotImportTimeoutsToTerraform(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),
    };
}
export class EbsSnapshotImportTimeoutsOutputReference 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;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._create = undefined;
            this._delete = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._create = value.create;
            this._delete = value.delete;
        }
    }
    // 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;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/ebs_snapshot_import aws_ebs_snapshot_import}
*/
export class EbsSnapshotImport extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_ebs_snapshot_import";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/ebs_snapshot_import aws_ebs_snapshot_import} 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 EbsSnapshotImportConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_ebs_snapshot_import',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._encrypted = config.encrypted;
        this._kmsKeyId = config.kmsKeyId;
        this._permanentRestore = config.permanentRestore;
        this._roleName = config.roleName;
        this._storageTier = config.storageTier;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._temporaryRestoreDays = config.temporaryRestoreDays;
        this._clientData.internalValue = config.clientData;
        this._diskContainer.internalValue = config.diskContainer;
        this._timeouts.internalValue = config.timeouts;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // data_encryption_key_id - computed: true, optional: false, required: false
    get dataEncryptionKeyId() {
        return this.getStringAttribute('data_encryption_key_id');
    }
    // description - computed: true, 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;
    }
    // encrypted - computed: false, optional: true, required: false
    _encrypted;
    get encrypted() {
        return this.getBooleanAttribute('encrypted');
    }
    set encrypted(value) {
        this._encrypted = value;
    }
    resetEncrypted() {
        this._encrypted = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get encryptedInput() {
        return this._encrypted;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // kms_key_id - computed: false, optional: true, required: false
    _kmsKeyId;
    get kmsKeyId() {
        return this.getStringAttribute('kms_key_id');
    }
    set kmsKeyId(value) {
        this._kmsKeyId = value;
    }
    resetKmsKeyId() {
        this._kmsKeyId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kmsKeyIdInput() {
        return this._kmsKeyId;
    }
    // outpost_arn - computed: true, optional: false, required: false
    get outpostArn() {
        return this.getStringAttribute('outpost_arn');
    }
    // owner_alias - computed: true, optional: false, required: false
    get ownerAlias() {
        return this.getStringAttribute('owner_alias');
    }
    // owner_id - computed: true, optional: false, required: false
    get ownerId() {
        return this.getStringAttribute('owner_id');
    }
    // permanent_restore - computed: false, optional: true, required: false
    _permanentRestore;
    get permanentRestore() {
        return this.getBooleanAttribute('permanent_restore');
    }
    set permanentRestore(value) {
        this._permanentRestore = value;
    }
    resetPermanentRestore() {
        this._permanentRestore = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get permanentRestoreInput() {
        return this._permanentRestore;
    }
    // role_name - computed: false, optional: true, required: false
    _roleName;
    get roleName() {
        return this.getStringAttribute('role_name');
    }
    set roleName(value) {
        this._roleName = value;
    }
    resetRoleName() {
        this._roleName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get roleNameInput() {
        return this._roleName;
    }
    // storage_tier - computed: true, optional: true, required: false
    _storageTier;
    get storageTier() {
        return this.getStringAttribute('storage_tier');
    }
    set storageTier(value) {
        this._storageTier = value;
    }
    resetStorageTier() {
        this._storageTier = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get storageTierInput() {
        return this._storageTier;
    }
    // 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;
    }
    // temporary_restore_days - computed: false, optional: true, required: false
    _temporaryRestoreDays;
    get temporaryRestoreDays() {
        return this.getNumberAttribute('temporary_restore_days');
    }
    set temporaryRestoreDays(value) {
        this._temporaryRestoreDays = value;
    }
    resetTemporaryRestoreDays() {
        this._temporaryRestoreDays = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get temporaryRestoreDaysInput() {
        return this._temporaryRestoreDays;
    }
    // volume_id - computed: true, optional: false, required: false
    get volumeId() {
        return this.getStringAttribute('volume_id');
    }
    // volume_size - computed: true, optional: false, required: false
    get volumeSize() {
        return this.getNumberAttribute('volume_size');
    }
    // client_data - computed: false, optional: true, required: false
    _clientData = new EbsSnapshotImportClientDataOutputReference(this, "client_data", true);
    get clientData() {
        return this._clientData;
    }
    putClientData(value) {
        this._clientData.internalValue = value;
    }
    resetClientData() {
        this._clientData.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get clientDataInput() {
        return this._clientData.internalValue;
    }
    // disk_container - computed: false, optional: false, required: true
    _diskContainer = new EbsSnapshotImportDiskContainerOutputReference(this, "disk_container", true);
    get diskContainer() {
        return this._diskContainer;
    }
    putDiskContainer(value) {
        this._diskContainer.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get diskContainerInput() {
        return this._diskContainer.internalValue;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new EbsSnapshotImportTimeoutsOutputReference(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 {
            description: cdktf.stringToTerraform(this._description),
            encrypted: cdktf.booleanToTerraform(this._encrypted),
            kms_key_id: cdktf.stringToTerraform(this._kmsKeyId),
            permanent_restore: cdktf.booleanToTerraform(this._permanentRestore),
            role_name: cdktf.stringToTerraform(this._roleName),
            storage_tier: cdktf.stringToTerraform(this._storageTier),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            temporary_restore_days: cdktf.numberToTerraform(this._temporaryRestoreDays),
            client_data: ebsSnapshotImportClientDataToTerraform(this._clientData.internalValue),
            disk_container: ebsSnapshotImportDiskContainerToTerraform(this._diskContainer.internalValue),
            timeouts: ebsSnapshotImportTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
}
//# sourceMappingURL=ebs-snapshot-import.js.map