// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function ecsClusterCapacityProvidersDefaultCapacityProviderStrategyToTerraform(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 {
        base: cdktf.numberToTerraform(struct.base),
        capacity_provider: cdktf.stringToTerraform(struct.capacityProvider),
        weight: cdktf.numberToTerraform(struct.weight),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/ecs_cluster_capacity_providers aws_ecs_cluster_capacity_providers}
*/
export class EcsClusterCapacityProviders extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_ecs_cluster_capacity_providers";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/ecs_cluster_capacity_providers aws_ecs_cluster_capacity_providers} 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 EcsClusterCapacityProvidersConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_ecs_cluster_capacity_providers',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._capacityProviders = config.capacityProviders;
        this._clusterName = config.clusterName;
        this._defaultCapacityProviderStrategy = config.defaultCapacityProviderStrategy;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // capacity_providers - computed: false, optional: true, required: false
    _capacityProviders;
    get capacityProviders() {
        return cdktf.Fn.tolist(this.getListAttribute('capacity_providers'));
    }
    set capacityProviders(value) {
        this._capacityProviders = value;
    }
    resetCapacityProviders() {
        this._capacityProviders = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get capacityProvidersInput() {
        return this._capacityProviders;
    }
    // cluster_name - computed: false, optional: false, required: true
    _clusterName;
    get clusterName() {
        return this.getStringAttribute('cluster_name');
    }
    set clusterName(value) {
        this._clusterName = value;
    }
    // Temporarily expose input value. Use with caution.
    get clusterNameInput() {
        return this._clusterName;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // default_capacity_provider_strategy - computed: false, optional: true, required: false
    _defaultCapacityProviderStrategy;
    get defaultCapacityProviderStrategy() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('default_capacity_provider_strategy')));
    }
    set defaultCapacityProviderStrategy(value) {
        this._defaultCapacityProviderStrategy = value;
    }
    resetDefaultCapacityProviderStrategy() {
        this._defaultCapacityProviderStrategy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get defaultCapacityProviderStrategyInput() {
        return this._defaultCapacityProviderStrategy;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            capacity_providers: cdktf.listMapper(cdktf.stringToTerraform)(this._capacityProviders),
            cluster_name: cdktf.stringToTerraform(this._clusterName),
            default_capacity_provider_strategy: cdktf.listMapper(ecsClusterCapacityProvidersDefaultCapacityProviderStrategyToTerraform)(this._defaultCapacityProviderStrategy),
        };
    }
}
//# sourceMappingURL=ecs-cluster-capacity-providers.js.map