// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function sagemakerAppImageConfigKernelGatewayImageConfigFileSystemConfigToTerraform(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 {
        default_gid: cdktf.numberToTerraform(struct.defaultGid),
        default_uid: cdktf.numberToTerraform(struct.defaultUid),
        mount_path: cdktf.stringToTerraform(struct.mountPath),
    };
}
export class SagemakerAppImageConfigKernelGatewayImageConfigFileSystemConfigOutputReference 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._defaultGid !== undefined) {
            hasAnyValues = true;
            internalValueResult.defaultGid = this._defaultGid;
        }
        if (this._defaultUid !== undefined) {
            hasAnyValues = true;
            internalValueResult.defaultUid = this._defaultUid;
        }
        if (this._mountPath !== undefined) {
            hasAnyValues = true;
            internalValueResult.mountPath = this._mountPath;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._defaultGid = undefined;
            this._defaultUid = undefined;
            this._mountPath = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._defaultGid = value.defaultGid;
            this._defaultUid = value.defaultUid;
            this._mountPath = value.mountPath;
        }
    }
    // default_gid - computed: false, optional: true, required: false
    _defaultGid;
    get defaultGid() {
        return this.getNumberAttribute('default_gid');
    }
    set defaultGid(value) {
        this._defaultGid = value;
    }
    resetDefaultGid() {
        this._defaultGid = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get defaultGidInput() {
        return this._defaultGid;
    }
    // default_uid - computed: false, optional: true, required: false
    _defaultUid;
    get defaultUid() {
        return this.getNumberAttribute('default_uid');
    }
    set defaultUid(value) {
        this._defaultUid = value;
    }
    resetDefaultUid() {
        this._defaultUid = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get defaultUidInput() {
        return this._defaultUid;
    }
    // mount_path - computed: false, optional: true, required: false
    _mountPath;
    get mountPath() {
        return this.getStringAttribute('mount_path');
    }
    set mountPath(value) {
        this._mountPath = value;
    }
    resetMountPath() {
        this._mountPath = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get mountPathInput() {
        return this._mountPath;
    }
}
export function sagemakerAppImageConfigKernelGatewayImageConfigKernelSpecToTerraform(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 {
        display_name: cdktf.stringToTerraform(struct.displayName),
        name: cdktf.stringToTerraform(struct.name),
    };
}
export class SagemakerAppImageConfigKernelGatewayImageConfigKernelSpecOutputReference 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._displayName !== undefined) {
            hasAnyValues = true;
            internalValueResult.displayName = this._displayName;
        }
        if (this._name !== undefined) {
            hasAnyValues = true;
            internalValueResult.name = this._name;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._displayName = undefined;
            this._name = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._displayName = value.displayName;
            this._name = value.name;
        }
    }
    // display_name - computed: false, optional: true, required: false
    _displayName;
    get displayName() {
        return this.getStringAttribute('display_name');
    }
    set displayName(value) {
        this._displayName = value;
    }
    resetDisplayName() {
        this._displayName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get displayNameInput() {
        return this._displayName;
    }
    // name - computed: false, optional: false, required: true
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
}
export function sagemakerAppImageConfigKernelGatewayImageConfigToTerraform(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 {
        file_system_config: sagemakerAppImageConfigKernelGatewayImageConfigFileSystemConfigToTerraform(struct.fileSystemConfig),
        kernel_spec: sagemakerAppImageConfigKernelGatewayImageConfigKernelSpecToTerraform(struct.kernelSpec),
    };
}
export class SagemakerAppImageConfigKernelGatewayImageConfigOutputReference 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._fileSystemConfig?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.fileSystemConfig = this._fileSystemConfig?.internalValue;
        }
        if (this._kernelSpec?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.kernelSpec = this._kernelSpec?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._fileSystemConfig.internalValue = undefined;
            this._kernelSpec.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._fileSystemConfig.internalValue = value.fileSystemConfig;
            this._kernelSpec.internalValue = value.kernelSpec;
        }
    }
    // file_system_config - computed: false, optional: true, required: false
    _fileSystemConfig = new SagemakerAppImageConfigKernelGatewayImageConfigFileSystemConfigOutputReference(this, "file_system_config", true);
    get fileSystemConfig() {
        return this._fileSystemConfig;
    }
    putFileSystemConfig(value) {
        this._fileSystemConfig.internalValue = value;
    }
    resetFileSystemConfig() {
        this._fileSystemConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get fileSystemConfigInput() {
        return this._fileSystemConfig.internalValue;
    }
    // kernel_spec - computed: false, optional: false, required: true
    _kernelSpec = new SagemakerAppImageConfigKernelGatewayImageConfigKernelSpecOutputReference(this, "kernel_spec", true);
    get kernelSpec() {
        return this._kernelSpec;
    }
    putKernelSpec(value) {
        this._kernelSpec.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get kernelSpecInput() {
        return this._kernelSpec.internalValue;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/sagemaker_app_image_config aws_sagemaker_app_image_config}
*/
export class SagemakerAppImageConfig extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_sagemaker_app_image_config";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/sagemaker_app_image_config aws_sagemaker_app_image_config} 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 SagemakerAppImageConfigConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_sagemaker_app_image_config',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._appImageConfigName = config.appImageConfigName;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._kernelGatewayImageConfig.internalValue = config.kernelGatewayImageConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // app_image_config_name - computed: false, optional: false, required: true
    _appImageConfigName;
    get appImageConfigName() {
        return this.getStringAttribute('app_image_config_name');
    }
    set appImageConfigName(value) {
        this._appImageConfigName = value;
    }
    // Temporarily expose input value. Use with caution.
    get appImageConfigNameInput() {
        return this._appImageConfigName;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // 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;
    }
    // kernel_gateway_image_config - computed: false, optional: true, required: false
    _kernelGatewayImageConfig = new SagemakerAppImageConfigKernelGatewayImageConfigOutputReference(this, "kernel_gateway_image_config", true);
    get kernelGatewayImageConfig() {
        return this._kernelGatewayImageConfig;
    }
    putKernelGatewayImageConfig(value) {
        this._kernelGatewayImageConfig.internalValue = value;
    }
    resetKernelGatewayImageConfig() {
        this._kernelGatewayImageConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kernelGatewayImageConfigInput() {
        return this._kernelGatewayImageConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            app_image_config_name: cdktf.stringToTerraform(this._appImageConfigName),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            kernel_gateway_image_config: sagemakerAppImageConfigKernelGatewayImageConfigToTerraform(this._kernelGatewayImageConfig.internalValue),
        };
    }
}
//# sourceMappingURL=sagemaker-app-image-config.js.map