// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function sagemakerAppResourceSpecToTerraform(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 {
        instance_type: cdktf.stringToTerraform(struct.instanceType),
        lifecycle_config_arn: cdktf.stringToTerraform(struct.lifecycleConfigArn),
        sagemaker_image_arn: cdktf.stringToTerraform(struct.sagemakerImageArn),
        sagemaker_image_version_arn: cdktf.stringToTerraform(struct.sagemakerImageVersionArn),
    };
}
export class SagemakerAppResourceSpecOutputReference 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._instanceType !== undefined) {
            hasAnyValues = true;
            internalValueResult.instanceType = this._instanceType;
        }
        if (this._lifecycleConfigArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.lifecycleConfigArn = this._lifecycleConfigArn;
        }
        if (this._sagemakerImageArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.sagemakerImageArn = this._sagemakerImageArn;
        }
        if (this._sagemakerImageVersionArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.sagemakerImageVersionArn = this._sagemakerImageVersionArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._instanceType = undefined;
            this._lifecycleConfigArn = undefined;
            this._sagemakerImageArn = undefined;
            this._sagemakerImageVersionArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._instanceType = value.instanceType;
            this._lifecycleConfigArn = value.lifecycleConfigArn;
            this._sagemakerImageArn = value.sagemakerImageArn;
            this._sagemakerImageVersionArn = value.sagemakerImageVersionArn;
        }
    }
    // instance_type - computed: false, optional: true, required: false
    _instanceType;
    get instanceType() {
        return this.getStringAttribute('instance_type');
    }
    set instanceType(value) {
        this._instanceType = value;
    }
    resetInstanceType() {
        this._instanceType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get instanceTypeInput() {
        return this._instanceType;
    }
    // lifecycle_config_arn - computed: false, optional: true, required: false
    _lifecycleConfigArn;
    get lifecycleConfigArn() {
        return this.getStringAttribute('lifecycle_config_arn');
    }
    set lifecycleConfigArn(value) {
        this._lifecycleConfigArn = value;
    }
    resetLifecycleConfigArn() {
        this._lifecycleConfigArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get lifecycleConfigArnInput() {
        return this._lifecycleConfigArn;
    }
    // sagemaker_image_arn - computed: true, optional: true, required: false
    _sagemakerImageArn;
    get sagemakerImageArn() {
        return this.getStringAttribute('sagemaker_image_arn');
    }
    set sagemakerImageArn(value) {
        this._sagemakerImageArn = value;
    }
    resetSagemakerImageArn() {
        this._sagemakerImageArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sagemakerImageArnInput() {
        return this._sagemakerImageArn;
    }
    // sagemaker_image_version_arn - computed: false, optional: true, required: false
    _sagemakerImageVersionArn;
    get sagemakerImageVersionArn() {
        return this.getStringAttribute('sagemaker_image_version_arn');
    }
    set sagemakerImageVersionArn(value) {
        this._sagemakerImageVersionArn = value;
    }
    resetSagemakerImageVersionArn() {
        this._sagemakerImageVersionArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sagemakerImageVersionArnInput() {
        return this._sagemakerImageVersionArn;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/sagemaker_app aws_sagemaker_app}
*/
export class SagemakerApp extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_sagemaker_app";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/sagemaker_app aws_sagemaker_app} 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 SagemakerAppConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_sagemaker_app',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._appName = config.appName;
        this._appType = config.appType;
        this._domainId = config.domainId;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._userProfileName = config.userProfileName;
        this._resourceSpec.internalValue = config.resourceSpec;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // app_name - computed: false, optional: false, required: true
    _appName;
    get appName() {
        return this.getStringAttribute('app_name');
    }
    set appName(value) {
        this._appName = value;
    }
    // Temporarily expose input value. Use with caution.
    get appNameInput() {
        return this._appName;
    }
    // app_type - computed: false, optional: false, required: true
    _appType;
    get appType() {
        return this.getStringAttribute('app_type');
    }
    set appType(value) {
        this._appType = value;
    }
    // Temporarily expose input value. Use with caution.
    get appTypeInput() {
        return this._appType;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // domain_id - computed: false, optional: false, required: true
    _domainId;
    get domainId() {
        return this.getStringAttribute('domain_id');
    }
    set domainId(value) {
        this._domainId = value;
    }
    // Temporarily expose input value. Use with caution.
    get domainIdInput() {
        return this._domainId;
    }
    // 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;
    }
    // user_profile_name - computed: false, optional: false, required: true
    _userProfileName;
    get userProfileName() {
        return this.getStringAttribute('user_profile_name');
    }
    set userProfileName(value) {
        this._userProfileName = value;
    }
    // Temporarily expose input value. Use with caution.
    get userProfileNameInput() {
        return this._userProfileName;
    }
    // resource_spec - computed: false, optional: true, required: false
    _resourceSpec = new SagemakerAppResourceSpecOutputReference(this, "resource_spec", true);
    get resourceSpec() {
        return this._resourceSpec;
    }
    putResourceSpec(value) {
        this._resourceSpec.internalValue = value;
    }
    resetResourceSpec() {
        this._resourceSpec.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resourceSpecInput() {
        return this._resourceSpec.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            app_name: cdktf.stringToTerraform(this._appName),
            app_type: cdktf.stringToTerraform(this._appType),
            domain_id: cdktf.stringToTerraform(this._domainId),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            user_profile_name: cdktf.stringToTerraform(this._userProfileName),
            resource_spec: sagemakerAppResourceSpecToTerraform(this._resourceSpec.internalValue),
        };
    }
}
//# sourceMappingURL=sagemaker-app.js.map