// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function dataAwsInstancesFilterToTerraform(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/instances aws_instances}
*/
export class DataAwsInstances extends cdktf.TerraformDataSource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_instances";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/d/instances aws_instances} 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 DataAwsInstancesConfig = {}
    */
    constructor(scope, id, config = {}) {
        super(scope, id, {
            terraformResourceType: 'aws_instances',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._instanceStateNames = config.instanceStateNames;
        this._instanceTags = config.instanceTags;
        this._filter = config.filter;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // ids - computed: true, optional: false, required: false
    get ids() {
        return this.getListAttribute('ids');
    }
    // instance_state_names - computed: false, optional: true, required: false
    _instanceStateNames;
    get instanceStateNames() {
        return cdktf.Fn.tolist(this.getListAttribute('instance_state_names'));
    }
    set instanceStateNames(value) {
        this._instanceStateNames = value;
    }
    resetInstanceStateNames() {
        this._instanceStateNames = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get instanceStateNamesInput() {
        return this._instanceStateNames;
    }
    // instance_tags - computed: true, optional: true, required: false
    _instanceTags;
    get instanceTags() {
        return this.getStringMapAttribute('instance_tags');
    }
    set instanceTags(value) {
        this._instanceTags = value;
    }
    resetInstanceTags() {
        this._instanceTags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get instanceTagsInput() {
        return this._instanceTags;
    }
    // private_ips - computed: true, optional: false, required: false
    get privateIps() {
        return this.getListAttribute('private_ips');
    }
    // public_ips - computed: true, optional: false, required: false
    get publicIps() {
        return this.getListAttribute('public_ips');
    }
    // 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 {
            instance_state_names: cdktf.listMapper(cdktf.stringToTerraform)(this._instanceStateNames),
            instance_tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._instanceTags),
            filter: cdktf.listMapper(dataAwsInstancesFilterToTerraform)(this._filter),
        };
    }
}
//# sourceMappingURL=data-aws-instances.js.map