// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function emrInstanceGroupEbsConfigToTerraform(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 {
        iops: cdktf.numberToTerraform(struct.iops),
        size: cdktf.numberToTerraform(struct.size),
        type: cdktf.stringToTerraform(struct.type),
        volumes_per_instance: cdktf.numberToTerraform(struct.volumesPerInstance),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/emr_instance_group aws_emr_instance_group}
*/
export class EmrInstanceGroup extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_emr_instance_group";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/emr_instance_group aws_emr_instance_group} 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 EmrInstanceGroupConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_emr_instance_group',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._autoscalingPolicy = config.autoscalingPolicy;
        this._bidPrice = config.bidPrice;
        this._clusterId = config.clusterId;
        this._configurationsJson = config.configurationsJson;
        this._ebsOptimized = config.ebsOptimized;
        this._instanceCount = config.instanceCount;
        this._instanceType = config.instanceType;
        this._name = config.name;
        this._ebsConfig = config.ebsConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // autoscaling_policy - computed: false, optional: true, required: false
    _autoscalingPolicy;
    get autoscalingPolicy() {
        return this.getStringAttribute('autoscaling_policy');
    }
    set autoscalingPolicy(value) {
        this._autoscalingPolicy = value;
    }
    resetAutoscalingPolicy() {
        this._autoscalingPolicy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoscalingPolicyInput() {
        return this._autoscalingPolicy;
    }
    // bid_price - computed: false, optional: true, required: false
    _bidPrice;
    get bidPrice() {
        return this.getStringAttribute('bid_price');
    }
    set bidPrice(value) {
        this._bidPrice = value;
    }
    resetBidPrice() {
        this._bidPrice = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get bidPriceInput() {
        return this._bidPrice;
    }
    // cluster_id - computed: false, optional: false, required: true
    _clusterId;
    get clusterId() {
        return this.getStringAttribute('cluster_id');
    }
    set clusterId(value) {
        this._clusterId = value;
    }
    // Temporarily expose input value. Use with caution.
    get clusterIdInput() {
        return this._clusterId;
    }
    // configurations_json - computed: false, optional: true, required: false
    _configurationsJson;
    get configurationsJson() {
        return this.getStringAttribute('configurations_json');
    }
    set configurationsJson(value) {
        this._configurationsJson = value;
    }
    resetConfigurationsJson() {
        this._configurationsJson = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get configurationsJsonInput() {
        return this._configurationsJson;
    }
    // ebs_optimized - computed: false, optional: true, required: false
    _ebsOptimized;
    get ebsOptimized() {
        return this.getBooleanAttribute('ebs_optimized');
    }
    set ebsOptimized(value) {
        this._ebsOptimized = value;
    }
    resetEbsOptimized() {
        this._ebsOptimized = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get ebsOptimizedInput() {
        return this._ebsOptimized;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // instance_count - computed: false, optional: true, required: false
    _instanceCount;
    get instanceCount() {
        return this.getNumberAttribute('instance_count');
    }
    set instanceCount(value) {
        this._instanceCount = value;
    }
    resetInstanceCount() {
        this._instanceCount = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get instanceCountInput() {
        return this._instanceCount;
    }
    // instance_type - computed: false, optional: false, required: true
    _instanceType;
    get instanceType() {
        return this.getStringAttribute('instance_type');
    }
    set instanceType(value) {
        this._instanceType = value;
    }
    // Temporarily expose input value. Use with caution.
    get instanceTypeInput() {
        return this._instanceType;
    }
    // name - computed: false, optional: true, required: false
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    resetName() {
        this._name = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // running_instance_count - computed: true, optional: false, required: false
    get runningInstanceCount() {
        return this.getNumberAttribute('running_instance_count');
    }
    // status - computed: true, optional: false, required: false
    get status() {
        return this.getStringAttribute('status');
    }
    // ebs_config - computed: false, optional: true, required: false
    _ebsConfig;
    get ebsConfig() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('ebs_config')));
    }
    set ebsConfig(value) {
        this._ebsConfig = value;
    }
    resetEbsConfig() {
        this._ebsConfig = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get ebsConfigInput() {
        return this._ebsConfig;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            autoscaling_policy: cdktf.stringToTerraform(this._autoscalingPolicy),
            bid_price: cdktf.stringToTerraform(this._bidPrice),
            cluster_id: cdktf.stringToTerraform(this._clusterId),
            configurations_json: cdktf.stringToTerraform(this._configurationsJson),
            ebs_optimized: cdktf.booleanToTerraform(this._ebsOptimized),
            instance_count: cdktf.numberToTerraform(this._instanceCount),
            instance_type: cdktf.stringToTerraform(this._instanceType),
            name: cdktf.stringToTerraform(this._name),
            ebs_config: cdktf.listMapper(emrInstanceGroupEbsConfigToTerraform)(this._ebsConfig),
        };
    }
}
//# sourceMappingURL=emr-instance-group.js.map