// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function sagemakerDeviceFleetOutputConfigToTerraform(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 {
        kms_key_id: cdktf.stringToTerraform(struct.kmsKeyId),
        s3_output_location: cdktf.stringToTerraform(struct.s3OutputLocation),
    };
}
export class SagemakerDeviceFleetOutputConfigOutputReference 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._kmsKeyId !== undefined) {
            hasAnyValues = true;
            internalValueResult.kmsKeyId = this._kmsKeyId;
        }
        if (this._s3OutputLocation !== undefined) {
            hasAnyValues = true;
            internalValueResult.s3OutputLocation = this._s3OutputLocation;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._kmsKeyId = undefined;
            this._s3OutputLocation = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._kmsKeyId = value.kmsKeyId;
            this._s3OutputLocation = value.s3OutputLocation;
        }
    }
    // 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;
    }
    // s3_output_location - computed: false, optional: false, required: true
    _s3OutputLocation;
    get s3OutputLocation() {
        return this.getStringAttribute('s3_output_location');
    }
    set s3OutputLocation(value) {
        this._s3OutputLocation = value;
    }
    // Temporarily expose input value. Use with caution.
    get s3OutputLocationInput() {
        return this._s3OutputLocation;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/sagemaker_device_fleet aws_sagemaker_device_fleet}
*/
export class SagemakerDeviceFleet extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_sagemaker_device_fleet";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/sagemaker_device_fleet aws_sagemaker_device_fleet} 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 SagemakerDeviceFleetConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_sagemaker_device_fleet',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._deviceFleetName = config.deviceFleetName;
        this._enableIotRoleAlias = config.enableIotRoleAlias;
        this._roleArn = config.roleArn;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._outputConfig.internalValue = config.outputConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // 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;
    }
    // device_fleet_name - computed: false, optional: false, required: true
    _deviceFleetName;
    get deviceFleetName() {
        return this.getStringAttribute('device_fleet_name');
    }
    set deviceFleetName(value) {
        this._deviceFleetName = value;
    }
    // Temporarily expose input value. Use with caution.
    get deviceFleetNameInput() {
        return this._deviceFleetName;
    }
    // enable_iot_role_alias - computed: false, optional: true, required: false
    _enableIotRoleAlias;
    get enableIotRoleAlias() {
        return this.getBooleanAttribute('enable_iot_role_alias');
    }
    set enableIotRoleAlias(value) {
        this._enableIotRoleAlias = value;
    }
    resetEnableIotRoleAlias() {
        this._enableIotRoleAlias = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableIotRoleAliasInput() {
        return this._enableIotRoleAlias;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // iot_role_alias - computed: true, optional: false, required: false
    get iotRoleAlias() {
        return this.getStringAttribute('iot_role_alias');
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // 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;
    }
    // output_config - computed: false, optional: false, required: true
    _outputConfig = new SagemakerDeviceFleetOutputConfigOutputReference(this, "output_config", true);
    get outputConfig() {
        return this._outputConfig;
    }
    putOutputConfig(value) {
        this._outputConfig.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get outputConfigInput() {
        return this._outputConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            description: cdktf.stringToTerraform(this._description),
            device_fleet_name: cdktf.stringToTerraform(this._deviceFleetName),
            enable_iot_role_alias: cdktf.booleanToTerraform(this._enableIotRoleAlias),
            role_arn: cdktf.stringToTerraform(this._roleArn),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            output_config: sagemakerDeviceFleetOutputConfigToTerraform(this._outputConfig.internalValue),
        };
    }
}
//# sourceMappingURL=sagemaker-device-fleet.js.map