// generated from terraform resource schema
import * as cdktf from 'cdktf';
export class DataAwsAmiBlockDeviceMappings extends cdktf.ComplexComputedList {
    // device_name - computed: true, optional: false, required: false
    get deviceName() {
        return this.getStringAttribute('device_name');
    }
    // ebs - computed: true, optional: false, required: false
    get ebs() {
        return this.getStringMapAttribute('ebs');
    }
    // no_device - computed: true, optional: false, required: false
    get noDevice() {
        return this.getStringAttribute('no_device');
    }
    // virtual_name - computed: true, optional: false, required: false
    get virtualName() {
        return this.getStringAttribute('virtual_name');
    }
}
export class DataAwsAmiProductCodes extends cdktf.ComplexComputedList {
    // product_code_id - computed: true, optional: false, required: false
    get productCodeId() {
        return this.getStringAttribute('product_code_id');
    }
    // product_code_type - computed: true, optional: false, required: false
    get productCodeType() {
        return this.getStringAttribute('product_code_type');
    }
}
export function dataAwsAmiFilterToTerraform(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),
        values: cdktf.listMapper(cdktf.stringToTerraform)(struct.values),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/d/ami aws_ami}
*/
export class DataAwsAmi extends cdktf.TerraformDataSource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_ami";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/d/ami aws_ami} Data Source
    *
    * @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 DataAwsAmiConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_ami',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._executableUsers = config.executableUsers;
        this._mostRecent = config.mostRecent;
        this._nameRegex = config.nameRegex;
        this._owners = config.owners;
        this._tags = config.tags;
        this._filter = config.filter;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // architecture - computed: true, optional: false, required: false
    get architecture() {
        return this.getStringAttribute('architecture');
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // block_device_mappings - computed: true, optional: false, required: false
    blockDeviceMappings(index) {
        return new DataAwsAmiBlockDeviceMappings(this, 'block_device_mappings', index, true);
    }
    // boot_mode - computed: true, optional: false, required: false
    get bootMode() {
        return this.getStringAttribute('boot_mode');
    }
    // creation_date - computed: true, optional: false, required: false
    get creationDate() {
        return this.getStringAttribute('creation_date');
    }
    // description - computed: true, optional: false, required: false
    get description() {
        return this.getStringAttribute('description');
    }
    // ena_support - computed: true, optional: false, required: false
    get enaSupport() {
        return this.getBooleanAttribute('ena_support');
    }
    // executable_users - computed: false, optional: true, required: false
    _executableUsers;
    get executableUsers() {
        return this.getListAttribute('executable_users');
    }
    set executableUsers(value) {
        this._executableUsers = value;
    }
    resetExecutableUsers() {
        this._executableUsers = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get executableUsersInput() {
        return this._executableUsers;
    }
    // hypervisor - computed: true, optional: false, required: false
    get hypervisor() {
        return this.getStringAttribute('hypervisor');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // image_id - computed: true, optional: false, required: false
    get imageId() {
        return this.getStringAttribute('image_id');
    }
    // image_location - computed: true, optional: false, required: false
    get imageLocation() {
        return this.getStringAttribute('image_location');
    }
    // image_owner_alias - computed: true, optional: false, required: false
    get imageOwnerAlias() {
        return this.getStringAttribute('image_owner_alias');
    }
    // image_type - computed: true, optional: false, required: false
    get imageType() {
        return this.getStringAttribute('image_type');
    }
    // kernel_id - computed: true, optional: false, required: false
    get kernelId() {
        return this.getStringAttribute('kernel_id');
    }
    // most_recent - computed: false, optional: true, required: false
    _mostRecent;
    get mostRecent() {
        return this.getBooleanAttribute('most_recent');
    }
    set mostRecent(value) {
        this._mostRecent = value;
    }
    resetMostRecent() {
        this._mostRecent = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get mostRecentInput() {
        return this._mostRecent;
    }
    // name - computed: true, optional: false, required: false
    get name() {
        return this.getStringAttribute('name');
    }
    // name_regex - computed: false, optional: true, required: false
    _nameRegex;
    get nameRegex() {
        return this.getStringAttribute('name_regex');
    }
    set nameRegex(value) {
        this._nameRegex = value;
    }
    resetNameRegex() {
        this._nameRegex = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nameRegexInput() {
        return this._nameRegex;
    }
    // owner_id - computed: true, optional: false, required: false
    get ownerId() {
        return this.getStringAttribute('owner_id');
    }
    // owners - computed: false, optional: false, required: true
    _owners;
    get owners() {
        return this.getListAttribute('owners');
    }
    set owners(value) {
        this._owners = value;
    }
    // Temporarily expose input value. Use with caution.
    get ownersInput() {
        return this._owners;
    }
    // platform - computed: true, optional: false, required: false
    get platform() {
        return this.getStringAttribute('platform');
    }
    // platform_details - computed: true, optional: false, required: false
    get platformDetails() {
        return this.getStringAttribute('platform_details');
    }
    // product_codes - computed: true, optional: false, required: false
    productCodes(index) {
        return new DataAwsAmiProductCodes(this, 'product_codes', index, true);
    }
    // public - computed: true, optional: false, required: false
    get public() {
        return this.getBooleanAttribute('public');
    }
    // ramdisk_id - computed: true, optional: false, required: false
    get ramdiskId() {
        return this.getStringAttribute('ramdisk_id');
    }
    // root_device_name - computed: true, optional: false, required: false
    get rootDeviceName() {
        return this.getStringAttribute('root_device_name');
    }
    // root_device_type - computed: true, optional: false, required: false
    get rootDeviceType() {
        return this.getStringAttribute('root_device_type');
    }
    // root_snapshot_id - computed: true, optional: false, required: false
    get rootSnapshotId() {
        return this.getStringAttribute('root_snapshot_id');
    }
    // sriov_net_support - computed: true, optional: false, required: false
    get sriovNetSupport() {
        return this.getStringAttribute('sriov_net_support');
    }
    // state - computed: true, optional: false, required: false
    get state() {
        return this.getStringAttribute('state');
    }
    // state_reason - computed: true, optional: false, required: false
    stateReason(key) {
        return new cdktf.StringMap(this, 'state_reason').lookup(key);
    }
    // tags - computed: true, 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;
    }
    // usage_operation - computed: true, optional: false, required: false
    get usageOperation() {
        return this.getStringAttribute('usage_operation');
    }
    // virtualization_type - computed: true, optional: false, required: false
    get virtualizationType() {
        return this.getStringAttribute('virtualization_type');
    }
    // filter - computed: false, optional: true, required: false
    _filter;
    get filter() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('filter')));
    }
    set filter(value) {
        this._filter = value;
    }
    resetFilter() {
        this._filter = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get filterInput() {
        return this._filter;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            executable_users: cdktf.listMapper(cdktf.stringToTerraform)(this._executableUsers),
            most_recent: cdktf.booleanToTerraform(this._mostRecent),
            name_regex: cdktf.stringToTerraform(this._nameRegex),
            owners: cdktf.listMapper(cdktf.stringToTerraform)(this._owners),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            filter: cdktf.listMapper(dataAwsAmiFilterToTerraform)(this._filter),
        };
    }
}
//# sourceMappingURL=data-aws-ami.js.map