// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function sagemakerModelContainerImageConfigToTerraform(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 {
        repository_access_mode: cdktf.stringToTerraform(struct.repositoryAccessMode),
    };
}
export class SagemakerModelContainerImageConfigOutputReference 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._repositoryAccessMode !== undefined) {
            hasAnyValues = true;
            internalValueResult.repositoryAccessMode = this._repositoryAccessMode;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._repositoryAccessMode = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._repositoryAccessMode = value.repositoryAccessMode;
        }
    }
    // repository_access_mode - computed: false, optional: false, required: true
    _repositoryAccessMode;
    get repositoryAccessMode() {
        return this.getStringAttribute('repository_access_mode');
    }
    set repositoryAccessMode(value) {
        this._repositoryAccessMode = value;
    }
    // Temporarily expose input value. Use with caution.
    get repositoryAccessModeInput() {
        return this._repositoryAccessMode;
    }
}
export function sagemakerModelContainerToTerraform(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 {
        container_hostname: cdktf.stringToTerraform(struct.containerHostname),
        environment: cdktf.hashMapper(cdktf.stringToTerraform)(struct.environment),
        image: cdktf.stringToTerraform(struct.image),
        mode: cdktf.stringToTerraform(struct.mode),
        model_data_url: cdktf.stringToTerraform(struct.modelDataUrl),
        image_config: sagemakerModelContainerImageConfigToTerraform(struct.imageConfig),
    };
}
export function sagemakerModelInferenceExecutionConfigToTerraform(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 {
        mode: cdktf.stringToTerraform(struct.mode),
    };
}
export class SagemakerModelInferenceExecutionConfigOutputReference 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._mode !== undefined) {
            hasAnyValues = true;
            internalValueResult.mode = this._mode;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._mode = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._mode = value.mode;
        }
    }
    // mode - computed: false, optional: false, required: true
    _mode;
    get mode() {
        return this.getStringAttribute('mode');
    }
    set mode(value) {
        this._mode = value;
    }
    // Temporarily expose input value. Use with caution.
    get modeInput() {
        return this._mode;
    }
}
export function sagemakerModelPrimaryContainerImageConfigToTerraform(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 {
        repository_access_mode: cdktf.stringToTerraform(struct.repositoryAccessMode),
    };
}
export class SagemakerModelPrimaryContainerImageConfigOutputReference 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._repositoryAccessMode !== undefined) {
            hasAnyValues = true;
            internalValueResult.repositoryAccessMode = this._repositoryAccessMode;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._repositoryAccessMode = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._repositoryAccessMode = value.repositoryAccessMode;
        }
    }
    // repository_access_mode - computed: false, optional: false, required: true
    _repositoryAccessMode;
    get repositoryAccessMode() {
        return this.getStringAttribute('repository_access_mode');
    }
    set repositoryAccessMode(value) {
        this._repositoryAccessMode = value;
    }
    // Temporarily expose input value. Use with caution.
    get repositoryAccessModeInput() {
        return this._repositoryAccessMode;
    }
}
export function sagemakerModelPrimaryContainerToTerraform(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 {
        container_hostname: cdktf.stringToTerraform(struct.containerHostname),
        environment: cdktf.hashMapper(cdktf.stringToTerraform)(struct.environment),
        image: cdktf.stringToTerraform(struct.image),
        mode: cdktf.stringToTerraform(struct.mode),
        model_data_url: cdktf.stringToTerraform(struct.modelDataUrl),
        image_config: sagemakerModelPrimaryContainerImageConfigToTerraform(struct.imageConfig),
    };
}
export class SagemakerModelPrimaryContainerOutputReference 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._containerHostname !== undefined) {
            hasAnyValues = true;
            internalValueResult.containerHostname = this._containerHostname;
        }
        if (this._environment !== undefined) {
            hasAnyValues = true;
            internalValueResult.environment = this._environment;
        }
        if (this._image !== undefined) {
            hasAnyValues = true;
            internalValueResult.image = this._image;
        }
        if (this._mode !== undefined) {
            hasAnyValues = true;
            internalValueResult.mode = this._mode;
        }
        if (this._modelDataUrl !== undefined) {
            hasAnyValues = true;
            internalValueResult.modelDataUrl = this._modelDataUrl;
        }
        if (this._imageConfig?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.imageConfig = this._imageConfig?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._containerHostname = undefined;
            this._environment = undefined;
            this._image = undefined;
            this._mode = undefined;
            this._modelDataUrl = undefined;
            this._imageConfig.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._containerHostname = value.containerHostname;
            this._environment = value.environment;
            this._image = value.image;
            this._mode = value.mode;
            this._modelDataUrl = value.modelDataUrl;
            this._imageConfig.internalValue = value.imageConfig;
        }
    }
    // container_hostname - computed: false, optional: true, required: false
    _containerHostname;
    get containerHostname() {
        return this.getStringAttribute('container_hostname');
    }
    set containerHostname(value) {
        this._containerHostname = value;
    }
    resetContainerHostname() {
        this._containerHostname = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get containerHostnameInput() {
        return this._containerHostname;
    }
    // environment - computed: false, optional: true, required: false
    _environment;
    get environment() {
        return this.getStringMapAttribute('environment');
    }
    set environment(value) {
        this._environment = value;
    }
    resetEnvironment() {
        this._environment = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get environmentInput() {
        return this._environment;
    }
    // image - computed: false, optional: false, required: true
    _image;
    get image() {
        return this.getStringAttribute('image');
    }
    set image(value) {
        this._image = value;
    }
    // Temporarily expose input value. Use with caution.
    get imageInput() {
        return this._image;
    }
    // mode - computed: false, optional: true, required: false
    _mode;
    get mode() {
        return this.getStringAttribute('mode');
    }
    set mode(value) {
        this._mode = value;
    }
    resetMode() {
        this._mode = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get modeInput() {
        return this._mode;
    }
    // model_data_url - computed: false, optional: true, required: false
    _modelDataUrl;
    get modelDataUrl() {
        return this.getStringAttribute('model_data_url');
    }
    set modelDataUrl(value) {
        this._modelDataUrl = value;
    }
    resetModelDataUrl() {
        this._modelDataUrl = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get modelDataUrlInput() {
        return this._modelDataUrl;
    }
    // image_config - computed: false, optional: true, required: false
    _imageConfig = new SagemakerModelPrimaryContainerImageConfigOutputReference(this, "image_config", true);
    get imageConfig() {
        return this._imageConfig;
    }
    putImageConfig(value) {
        this._imageConfig.internalValue = value;
    }
    resetImageConfig() {
        this._imageConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get imageConfigInput() {
        return this._imageConfig.internalValue;
    }
}
export function sagemakerModelVpcConfigToTerraform(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 {
        security_group_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.securityGroupIds),
        subnets: cdktf.listMapper(cdktf.stringToTerraform)(struct.subnets),
    };
}
export class SagemakerModelVpcConfigOutputReference 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._securityGroupIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.securityGroupIds = this._securityGroupIds;
        }
        if (this._subnets !== undefined) {
            hasAnyValues = true;
            internalValueResult.subnets = this._subnets;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._securityGroupIds = undefined;
            this._subnets = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._securityGroupIds = value.securityGroupIds;
            this._subnets = value.subnets;
        }
    }
    // security_group_ids - computed: false, optional: false, required: true
    _securityGroupIds;
    get securityGroupIds() {
        return cdktf.Fn.tolist(this.getListAttribute('security_group_ids'));
    }
    set securityGroupIds(value) {
        this._securityGroupIds = value;
    }
    // Temporarily expose input value. Use with caution.
    get securityGroupIdsInput() {
        return this._securityGroupIds;
    }
    // subnets - computed: false, optional: false, required: true
    _subnets;
    get subnets() {
        return cdktf.Fn.tolist(this.getListAttribute('subnets'));
    }
    set subnets(value) {
        this._subnets = value;
    }
    // Temporarily expose input value. Use with caution.
    get subnetsInput() {
        return this._subnets;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/sagemaker_model aws_sagemaker_model}
*/
export class SagemakerModel extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_sagemaker_model";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/sagemaker_model aws_sagemaker_model} 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 SagemakerModelConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_sagemaker_model',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._enableNetworkIsolation = config.enableNetworkIsolation;
        this._executionRoleArn = config.executionRoleArn;
        this._name = config.name;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._container = config.container;
        this._inferenceExecutionConfig.internalValue = config.inferenceExecutionConfig;
        this._primaryContainer.internalValue = config.primaryContainer;
        this._vpcConfig.internalValue = config.vpcConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // enable_network_isolation - computed: false, optional: true, required: false
    _enableNetworkIsolation;
    get enableNetworkIsolation() {
        return this.getBooleanAttribute('enable_network_isolation');
    }
    set enableNetworkIsolation(value) {
        this._enableNetworkIsolation = value;
    }
    resetEnableNetworkIsolation() {
        this._enableNetworkIsolation = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableNetworkIsolationInput() {
        return this._enableNetworkIsolation;
    }
    // execution_role_arn - computed: false, optional: false, required: true
    _executionRoleArn;
    get executionRoleArn() {
        return this.getStringAttribute('execution_role_arn');
    }
    set executionRoleArn(value) {
        this._executionRoleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get executionRoleArnInput() {
        return this._executionRoleArn;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // name - computed: true, 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;
    }
    // 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;
    }
    // container - computed: false, optional: true, required: false
    _container;
    get container() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('container');
    }
    set container(value) {
        this._container = value;
    }
    resetContainer() {
        this._container = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get containerInput() {
        return this._container;
    }
    // inference_execution_config - computed: false, optional: true, required: false
    _inferenceExecutionConfig = new SagemakerModelInferenceExecutionConfigOutputReference(this, "inference_execution_config", true);
    get inferenceExecutionConfig() {
        return this._inferenceExecutionConfig;
    }
    putInferenceExecutionConfig(value) {
        this._inferenceExecutionConfig.internalValue = value;
    }
    resetInferenceExecutionConfig() {
        this._inferenceExecutionConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get inferenceExecutionConfigInput() {
        return this._inferenceExecutionConfig.internalValue;
    }
    // primary_container - computed: false, optional: true, required: false
    _primaryContainer = new SagemakerModelPrimaryContainerOutputReference(this, "primary_container", true);
    get primaryContainer() {
        return this._primaryContainer;
    }
    putPrimaryContainer(value) {
        this._primaryContainer.internalValue = value;
    }
    resetPrimaryContainer() {
        this._primaryContainer.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get primaryContainerInput() {
        return this._primaryContainer.internalValue;
    }
    // vpc_config - computed: false, optional: true, required: false
    _vpcConfig = new SagemakerModelVpcConfigOutputReference(this, "vpc_config", true);
    get vpcConfig() {
        return this._vpcConfig;
    }
    putVpcConfig(value) {
        this._vpcConfig.internalValue = value;
    }
    resetVpcConfig() {
        this._vpcConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get vpcConfigInput() {
        return this._vpcConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            enable_network_isolation: cdktf.booleanToTerraform(this._enableNetworkIsolation),
            execution_role_arn: cdktf.stringToTerraform(this._executionRoleArn),
            name: cdktf.stringToTerraform(this._name),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            container: cdktf.listMapper(sagemakerModelContainerToTerraform)(this._container),
            inference_execution_config: sagemakerModelInferenceExecutionConfigToTerraform(this._inferenceExecutionConfig.internalValue),
            primary_container: sagemakerModelPrimaryContainerToTerraform(this._primaryContainer.internalValue),
            vpc_config: sagemakerModelVpcConfigToTerraform(this._vpcConfig.internalValue),
        };
    }
}
//# sourceMappingURL=sagemaker-model.js.map