// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function apprunnerServiceEncryptionConfigurationToTerraform(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: cdktf.stringToTerraform(struct.kmsKey),
    };
}
export class ApprunnerServiceEncryptionConfigurationOutputReference 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._kmsKey !== undefined) {
            hasAnyValues = true;
            internalValueResult.kmsKey = this._kmsKey;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._kmsKey = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._kmsKey = value.kmsKey;
        }
    }
    // kms_key - computed: false, optional: false, required: true
    _kmsKey;
    get kmsKey() {
        return this.getStringAttribute('kms_key');
    }
    set kmsKey(value) {
        this._kmsKey = value;
    }
    // Temporarily expose input value. Use with caution.
    get kmsKeyInput() {
        return this._kmsKey;
    }
}
export function apprunnerServiceHealthCheckConfigurationToTerraform(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 {
        healthy_threshold: cdktf.numberToTerraform(struct.healthyThreshold),
        interval: cdktf.numberToTerraform(struct.interval),
        path: cdktf.stringToTerraform(struct.path),
        protocol: cdktf.stringToTerraform(struct.protocol),
        timeout: cdktf.numberToTerraform(struct.timeout),
        unhealthy_threshold: cdktf.numberToTerraform(struct.unhealthyThreshold),
    };
}
export class ApprunnerServiceHealthCheckConfigurationOutputReference 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._healthyThreshold !== undefined) {
            hasAnyValues = true;
            internalValueResult.healthyThreshold = this._healthyThreshold;
        }
        if (this._interval !== undefined) {
            hasAnyValues = true;
            internalValueResult.interval = this._interval;
        }
        if (this._path !== undefined) {
            hasAnyValues = true;
            internalValueResult.path = this._path;
        }
        if (this._protocol !== undefined) {
            hasAnyValues = true;
            internalValueResult.protocol = this._protocol;
        }
        if (this._timeout !== undefined) {
            hasAnyValues = true;
            internalValueResult.timeout = this._timeout;
        }
        if (this._unhealthyThreshold !== undefined) {
            hasAnyValues = true;
            internalValueResult.unhealthyThreshold = this._unhealthyThreshold;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._healthyThreshold = undefined;
            this._interval = undefined;
            this._path = undefined;
            this._protocol = undefined;
            this._timeout = undefined;
            this._unhealthyThreshold = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._healthyThreshold = value.healthyThreshold;
            this._interval = value.interval;
            this._path = value.path;
            this._protocol = value.protocol;
            this._timeout = value.timeout;
            this._unhealthyThreshold = value.unhealthyThreshold;
        }
    }
    // healthy_threshold - computed: false, optional: true, required: false
    _healthyThreshold;
    get healthyThreshold() {
        return this.getNumberAttribute('healthy_threshold');
    }
    set healthyThreshold(value) {
        this._healthyThreshold = value;
    }
    resetHealthyThreshold() {
        this._healthyThreshold = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get healthyThresholdInput() {
        return this._healthyThreshold;
    }
    // interval - computed: false, optional: true, required: false
    _interval;
    get interval() {
        return this.getNumberAttribute('interval');
    }
    set interval(value) {
        this._interval = value;
    }
    resetInterval() {
        this._interval = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get intervalInput() {
        return this._interval;
    }
    // path - computed: false, optional: true, required: false
    _path;
    get path() {
        return this.getStringAttribute('path');
    }
    set path(value) {
        this._path = value;
    }
    resetPath() {
        this._path = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get pathInput() {
        return this._path;
    }
    // protocol - computed: false, optional: true, required: false
    _protocol;
    get protocol() {
        return this.getStringAttribute('protocol');
    }
    set protocol(value) {
        this._protocol = value;
    }
    resetProtocol() {
        this._protocol = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get protocolInput() {
        return this._protocol;
    }
    // timeout - computed: false, optional: true, required: false
    _timeout;
    get timeout() {
        return this.getNumberAttribute('timeout');
    }
    set timeout(value) {
        this._timeout = value;
    }
    resetTimeout() {
        this._timeout = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get timeoutInput() {
        return this._timeout;
    }
    // unhealthy_threshold - computed: false, optional: true, required: false
    _unhealthyThreshold;
    get unhealthyThreshold() {
        return this.getNumberAttribute('unhealthy_threshold');
    }
    set unhealthyThreshold(value) {
        this._unhealthyThreshold = value;
    }
    resetUnhealthyThreshold() {
        this._unhealthyThreshold = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get unhealthyThresholdInput() {
        return this._unhealthyThreshold;
    }
}
export function apprunnerServiceInstanceConfigurationToTerraform(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 {
        cpu: cdktf.stringToTerraform(struct.cpu),
        instance_role_arn: cdktf.stringToTerraform(struct.instanceRoleArn),
        memory: cdktf.stringToTerraform(struct.memory),
    };
}
export class ApprunnerServiceInstanceConfigurationOutputReference 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._cpu !== undefined) {
            hasAnyValues = true;
            internalValueResult.cpu = this._cpu;
        }
        if (this._instanceRoleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.instanceRoleArn = this._instanceRoleArn;
        }
        if (this._memory !== undefined) {
            hasAnyValues = true;
            internalValueResult.memory = this._memory;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._cpu = undefined;
            this._instanceRoleArn = undefined;
            this._memory = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._cpu = value.cpu;
            this._instanceRoleArn = value.instanceRoleArn;
            this._memory = value.memory;
        }
    }
    // cpu - computed: false, optional: true, required: false
    _cpu;
    get cpu() {
        return this.getStringAttribute('cpu');
    }
    set cpu(value) {
        this._cpu = value;
    }
    resetCpu() {
        this._cpu = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cpuInput() {
        return this._cpu;
    }
    // instance_role_arn - computed: false, optional: true, required: false
    _instanceRoleArn;
    get instanceRoleArn() {
        return this.getStringAttribute('instance_role_arn');
    }
    set instanceRoleArn(value) {
        this._instanceRoleArn = value;
    }
    resetInstanceRoleArn() {
        this._instanceRoleArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get instanceRoleArnInput() {
        return this._instanceRoleArn;
    }
    // memory - computed: false, optional: true, required: false
    _memory;
    get memory() {
        return this.getStringAttribute('memory');
    }
    set memory(value) {
        this._memory = value;
    }
    resetMemory() {
        this._memory = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get memoryInput() {
        return this._memory;
    }
}
export function apprunnerServiceSourceConfigurationAuthenticationConfigurationToTerraform(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 {
        access_role_arn: cdktf.stringToTerraform(struct.accessRoleArn),
        connection_arn: cdktf.stringToTerraform(struct.connectionArn),
    };
}
export class ApprunnerServiceSourceConfigurationAuthenticationConfigurationOutputReference 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._accessRoleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.accessRoleArn = this._accessRoleArn;
        }
        if (this._connectionArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.connectionArn = this._connectionArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._accessRoleArn = undefined;
            this._connectionArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._accessRoleArn = value.accessRoleArn;
            this._connectionArn = value.connectionArn;
        }
    }
    // access_role_arn - computed: false, optional: true, required: false
    _accessRoleArn;
    get accessRoleArn() {
        return this.getStringAttribute('access_role_arn');
    }
    set accessRoleArn(value) {
        this._accessRoleArn = value;
    }
    resetAccessRoleArn() {
        this._accessRoleArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accessRoleArnInput() {
        return this._accessRoleArn;
    }
    // connection_arn - computed: false, optional: true, required: false
    _connectionArn;
    get connectionArn() {
        return this.getStringAttribute('connection_arn');
    }
    set connectionArn(value) {
        this._connectionArn = value;
    }
    resetConnectionArn() {
        this._connectionArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get connectionArnInput() {
        return this._connectionArn;
    }
}
export function apprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValuesToTerraform(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 {
        build_command: cdktf.stringToTerraform(struct.buildCommand),
        port: cdktf.stringToTerraform(struct.port),
        runtime: cdktf.stringToTerraform(struct.runtime),
        runtime_environment_variables: cdktf.hashMapper(cdktf.stringToTerraform)(struct.runtimeEnvironmentVariables),
        start_command: cdktf.stringToTerraform(struct.startCommand),
    };
}
export class ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValuesOutputReference 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._buildCommand !== undefined) {
            hasAnyValues = true;
            internalValueResult.buildCommand = this._buildCommand;
        }
        if (this._port !== undefined) {
            hasAnyValues = true;
            internalValueResult.port = this._port;
        }
        if (this._runtime !== undefined) {
            hasAnyValues = true;
            internalValueResult.runtime = this._runtime;
        }
        if (this._runtimeEnvironmentVariables !== undefined) {
            hasAnyValues = true;
            internalValueResult.runtimeEnvironmentVariables = this._runtimeEnvironmentVariables;
        }
        if (this._startCommand !== undefined) {
            hasAnyValues = true;
            internalValueResult.startCommand = this._startCommand;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._buildCommand = undefined;
            this._port = undefined;
            this._runtime = undefined;
            this._runtimeEnvironmentVariables = undefined;
            this._startCommand = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._buildCommand = value.buildCommand;
            this._port = value.port;
            this._runtime = value.runtime;
            this._runtimeEnvironmentVariables = value.runtimeEnvironmentVariables;
            this._startCommand = value.startCommand;
        }
    }
    // build_command - computed: false, optional: true, required: false
    _buildCommand;
    get buildCommand() {
        return this.getStringAttribute('build_command');
    }
    set buildCommand(value) {
        this._buildCommand = value;
    }
    resetBuildCommand() {
        this._buildCommand = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get buildCommandInput() {
        return this._buildCommand;
    }
    // port - computed: false, optional: true, required: false
    _port;
    get port() {
        return this.getStringAttribute('port');
    }
    set port(value) {
        this._port = value;
    }
    resetPort() {
        this._port = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get portInput() {
        return this._port;
    }
    // runtime - computed: false, optional: false, required: true
    _runtime;
    get runtime() {
        return this.getStringAttribute('runtime');
    }
    set runtime(value) {
        this._runtime = value;
    }
    // Temporarily expose input value. Use with caution.
    get runtimeInput() {
        return this._runtime;
    }
    // runtime_environment_variables - computed: false, optional: true, required: false
    _runtimeEnvironmentVariables;
    get runtimeEnvironmentVariables() {
        return this.getStringMapAttribute('runtime_environment_variables');
    }
    set runtimeEnvironmentVariables(value) {
        this._runtimeEnvironmentVariables = value;
    }
    resetRuntimeEnvironmentVariables() {
        this._runtimeEnvironmentVariables = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get runtimeEnvironmentVariablesInput() {
        return this._runtimeEnvironmentVariables;
    }
    // start_command - computed: false, optional: true, required: false
    _startCommand;
    get startCommand() {
        return this.getStringAttribute('start_command');
    }
    set startCommand(value) {
        this._startCommand = value;
    }
    resetStartCommand() {
        this._startCommand = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get startCommandInput() {
        return this._startCommand;
    }
}
export function apprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationToTerraform(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 {
        configuration_source: cdktf.stringToTerraform(struct.configurationSource),
        code_configuration_values: apprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValuesToTerraform(struct.codeConfigurationValues),
    };
}
export class ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationOutputReference 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._configurationSource !== undefined) {
            hasAnyValues = true;
            internalValueResult.configurationSource = this._configurationSource;
        }
        if (this._codeConfigurationValues?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.codeConfigurationValues = this._codeConfigurationValues?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._configurationSource = undefined;
            this._codeConfigurationValues.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._configurationSource = value.configurationSource;
            this._codeConfigurationValues.internalValue = value.codeConfigurationValues;
        }
    }
    // configuration_source - computed: false, optional: false, required: true
    _configurationSource;
    get configurationSource() {
        return this.getStringAttribute('configuration_source');
    }
    set configurationSource(value) {
        this._configurationSource = value;
    }
    // Temporarily expose input value. Use with caution.
    get configurationSourceInput() {
        return this._configurationSource;
    }
    // code_configuration_values - computed: false, optional: true, required: false
    _codeConfigurationValues = new ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValuesOutputReference(this, "code_configuration_values", true);
    get codeConfigurationValues() {
        return this._codeConfigurationValues;
    }
    putCodeConfigurationValues(value) {
        this._codeConfigurationValues.internalValue = value;
    }
    resetCodeConfigurationValues() {
        this._codeConfigurationValues.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get codeConfigurationValuesInput() {
        return this._codeConfigurationValues.internalValue;
    }
}
export function apprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersionToTerraform(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 {
        type: cdktf.stringToTerraform(struct.type),
        value: cdktf.stringToTerraform(struct.value),
    };
}
export class ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersionOutputReference 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._type !== undefined) {
            hasAnyValues = true;
            internalValueResult.type = this._type;
        }
        if (this._value !== undefined) {
            hasAnyValues = true;
            internalValueResult.value = this._value;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._type = undefined;
            this._value = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._type = value.type;
            this._value = value.value;
        }
    }
    // type - computed: false, optional: false, required: true
    _type;
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
    // value - computed: false, optional: false, required: true
    _value;
    get value() {
        return this.getStringAttribute('value');
    }
    set value(value) {
        this._value = value;
    }
    // Temporarily expose input value. Use with caution.
    get valueInput() {
        return this._value;
    }
}
export function apprunnerServiceSourceConfigurationCodeRepositoryToTerraform(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_url: cdktf.stringToTerraform(struct.repositoryUrl),
        code_configuration: apprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationToTerraform(struct.codeConfiguration),
        source_code_version: apprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersionToTerraform(struct.sourceCodeVersion),
    };
}
export class ApprunnerServiceSourceConfigurationCodeRepositoryOutputReference 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._repositoryUrl !== undefined) {
            hasAnyValues = true;
            internalValueResult.repositoryUrl = this._repositoryUrl;
        }
        if (this._codeConfiguration?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.codeConfiguration = this._codeConfiguration?.internalValue;
        }
        if (this._sourceCodeVersion?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.sourceCodeVersion = this._sourceCodeVersion?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._repositoryUrl = undefined;
            this._codeConfiguration.internalValue = undefined;
            this._sourceCodeVersion.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._repositoryUrl = value.repositoryUrl;
            this._codeConfiguration.internalValue = value.codeConfiguration;
            this._sourceCodeVersion.internalValue = value.sourceCodeVersion;
        }
    }
    // repository_url - computed: false, optional: false, required: true
    _repositoryUrl;
    get repositoryUrl() {
        return this.getStringAttribute('repository_url');
    }
    set repositoryUrl(value) {
        this._repositoryUrl = value;
    }
    // Temporarily expose input value. Use with caution.
    get repositoryUrlInput() {
        return this._repositoryUrl;
    }
    // code_configuration - computed: false, optional: true, required: false
    _codeConfiguration = new ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationOutputReference(this, "code_configuration", true);
    get codeConfiguration() {
        return this._codeConfiguration;
    }
    putCodeConfiguration(value) {
        this._codeConfiguration.internalValue = value;
    }
    resetCodeConfiguration() {
        this._codeConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get codeConfigurationInput() {
        return this._codeConfiguration.internalValue;
    }
    // source_code_version - computed: false, optional: false, required: true
    _sourceCodeVersion = new ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersionOutputReference(this, "source_code_version", true);
    get sourceCodeVersion() {
        return this._sourceCodeVersion;
    }
    putSourceCodeVersion(value) {
        this._sourceCodeVersion.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get sourceCodeVersionInput() {
        return this._sourceCodeVersion.internalValue;
    }
}
export function apprunnerServiceSourceConfigurationImageRepositoryImageConfigurationToTerraform(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 {
        port: cdktf.stringToTerraform(struct.port),
        runtime_environment_variables: cdktf.hashMapper(cdktf.stringToTerraform)(struct.runtimeEnvironmentVariables),
        start_command: cdktf.stringToTerraform(struct.startCommand),
    };
}
export class ApprunnerServiceSourceConfigurationImageRepositoryImageConfigurationOutputReference 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._port !== undefined) {
            hasAnyValues = true;
            internalValueResult.port = this._port;
        }
        if (this._runtimeEnvironmentVariables !== undefined) {
            hasAnyValues = true;
            internalValueResult.runtimeEnvironmentVariables = this._runtimeEnvironmentVariables;
        }
        if (this._startCommand !== undefined) {
            hasAnyValues = true;
            internalValueResult.startCommand = this._startCommand;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._port = undefined;
            this._runtimeEnvironmentVariables = undefined;
            this._startCommand = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._port = value.port;
            this._runtimeEnvironmentVariables = value.runtimeEnvironmentVariables;
            this._startCommand = value.startCommand;
        }
    }
    // port - computed: false, optional: true, required: false
    _port;
    get port() {
        return this.getStringAttribute('port');
    }
    set port(value) {
        this._port = value;
    }
    resetPort() {
        this._port = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get portInput() {
        return this._port;
    }
    // runtime_environment_variables - computed: false, optional: true, required: false
    _runtimeEnvironmentVariables;
    get runtimeEnvironmentVariables() {
        return this.getStringMapAttribute('runtime_environment_variables');
    }
    set runtimeEnvironmentVariables(value) {
        this._runtimeEnvironmentVariables = value;
    }
    resetRuntimeEnvironmentVariables() {
        this._runtimeEnvironmentVariables = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get runtimeEnvironmentVariablesInput() {
        return this._runtimeEnvironmentVariables;
    }
    // start_command - computed: false, optional: true, required: false
    _startCommand;
    get startCommand() {
        return this.getStringAttribute('start_command');
    }
    set startCommand(value) {
        this._startCommand = value;
    }
    resetStartCommand() {
        this._startCommand = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get startCommandInput() {
        return this._startCommand;
    }
}
export function apprunnerServiceSourceConfigurationImageRepositoryToTerraform(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 {
        image_identifier: cdktf.stringToTerraform(struct.imageIdentifier),
        image_repository_type: cdktf.stringToTerraform(struct.imageRepositoryType),
        image_configuration: apprunnerServiceSourceConfigurationImageRepositoryImageConfigurationToTerraform(struct.imageConfiguration),
    };
}
export class ApprunnerServiceSourceConfigurationImageRepositoryOutputReference 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._imageIdentifier !== undefined) {
            hasAnyValues = true;
            internalValueResult.imageIdentifier = this._imageIdentifier;
        }
        if (this._imageRepositoryType !== undefined) {
            hasAnyValues = true;
            internalValueResult.imageRepositoryType = this._imageRepositoryType;
        }
        if (this._imageConfiguration?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.imageConfiguration = this._imageConfiguration?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._imageIdentifier = undefined;
            this._imageRepositoryType = undefined;
            this._imageConfiguration.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._imageIdentifier = value.imageIdentifier;
            this._imageRepositoryType = value.imageRepositoryType;
            this._imageConfiguration.internalValue = value.imageConfiguration;
        }
    }
    // image_identifier - computed: false, optional: false, required: true
    _imageIdentifier;
    get imageIdentifier() {
        return this.getStringAttribute('image_identifier');
    }
    set imageIdentifier(value) {
        this._imageIdentifier = value;
    }
    // Temporarily expose input value. Use with caution.
    get imageIdentifierInput() {
        return this._imageIdentifier;
    }
    // image_repository_type - computed: false, optional: false, required: true
    _imageRepositoryType;
    get imageRepositoryType() {
        return this.getStringAttribute('image_repository_type');
    }
    set imageRepositoryType(value) {
        this._imageRepositoryType = value;
    }
    // Temporarily expose input value. Use with caution.
    get imageRepositoryTypeInput() {
        return this._imageRepositoryType;
    }
    // image_configuration - computed: false, optional: true, required: false
    _imageConfiguration = new ApprunnerServiceSourceConfigurationImageRepositoryImageConfigurationOutputReference(this, "image_configuration", true);
    get imageConfiguration() {
        return this._imageConfiguration;
    }
    putImageConfiguration(value) {
        this._imageConfiguration.internalValue = value;
    }
    resetImageConfiguration() {
        this._imageConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get imageConfigurationInput() {
        return this._imageConfiguration.internalValue;
    }
}
export function apprunnerServiceSourceConfigurationToTerraform(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 {
        auto_deployments_enabled: cdktf.booleanToTerraform(struct.autoDeploymentsEnabled),
        authentication_configuration: apprunnerServiceSourceConfigurationAuthenticationConfigurationToTerraform(struct.authenticationConfiguration),
        code_repository: apprunnerServiceSourceConfigurationCodeRepositoryToTerraform(struct.codeRepository),
        image_repository: apprunnerServiceSourceConfigurationImageRepositoryToTerraform(struct.imageRepository),
    };
}
export class ApprunnerServiceSourceConfigurationOutputReference 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._autoDeploymentsEnabled !== undefined) {
            hasAnyValues = true;
            internalValueResult.autoDeploymentsEnabled = this._autoDeploymentsEnabled;
        }
        if (this._authenticationConfiguration?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.authenticationConfiguration = this._authenticationConfiguration?.internalValue;
        }
        if (this._codeRepository?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.codeRepository = this._codeRepository?.internalValue;
        }
        if (this._imageRepository?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.imageRepository = this._imageRepository?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._autoDeploymentsEnabled = undefined;
            this._authenticationConfiguration.internalValue = undefined;
            this._codeRepository.internalValue = undefined;
            this._imageRepository.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._autoDeploymentsEnabled = value.autoDeploymentsEnabled;
            this._authenticationConfiguration.internalValue = value.authenticationConfiguration;
            this._codeRepository.internalValue = value.codeRepository;
            this._imageRepository.internalValue = value.imageRepository;
        }
    }
    // auto_deployments_enabled - computed: false, optional: true, required: false
    _autoDeploymentsEnabled;
    get autoDeploymentsEnabled() {
        return this.getBooleanAttribute('auto_deployments_enabled');
    }
    set autoDeploymentsEnabled(value) {
        this._autoDeploymentsEnabled = value;
    }
    resetAutoDeploymentsEnabled() {
        this._autoDeploymentsEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoDeploymentsEnabledInput() {
        return this._autoDeploymentsEnabled;
    }
    // authentication_configuration - computed: false, optional: true, required: false
    _authenticationConfiguration = new ApprunnerServiceSourceConfigurationAuthenticationConfigurationOutputReference(this, "authentication_configuration", true);
    get authenticationConfiguration() {
        return this._authenticationConfiguration;
    }
    putAuthenticationConfiguration(value) {
        this._authenticationConfiguration.internalValue = value;
    }
    resetAuthenticationConfiguration() {
        this._authenticationConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get authenticationConfigurationInput() {
        return this._authenticationConfiguration.internalValue;
    }
    // code_repository - computed: false, optional: true, required: false
    _codeRepository = new ApprunnerServiceSourceConfigurationCodeRepositoryOutputReference(this, "code_repository", true);
    get codeRepository() {
        return this._codeRepository;
    }
    putCodeRepository(value) {
        this._codeRepository.internalValue = value;
    }
    resetCodeRepository() {
        this._codeRepository.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get codeRepositoryInput() {
        return this._codeRepository.internalValue;
    }
    // image_repository - computed: false, optional: true, required: false
    _imageRepository = new ApprunnerServiceSourceConfigurationImageRepositoryOutputReference(this, "image_repository", true);
    get imageRepository() {
        return this._imageRepository;
    }
    putImageRepository(value) {
        this._imageRepository.internalValue = value;
    }
    resetImageRepository() {
        this._imageRepository.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get imageRepositoryInput() {
        return this._imageRepository.internalValue;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service aws_apprunner_service}
*/
export class ApprunnerService extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_apprunner_service";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service aws_apprunner_service} 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 ApprunnerServiceConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_apprunner_service',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._autoScalingConfigurationArn = config.autoScalingConfigurationArn;
        this._serviceName = config.serviceName;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._encryptionConfiguration.internalValue = config.encryptionConfiguration;
        this._healthCheckConfiguration.internalValue = config.healthCheckConfiguration;
        this._instanceConfiguration.internalValue = config.instanceConfiguration;
        this._sourceConfiguration.internalValue = config.sourceConfiguration;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // auto_scaling_configuration_arn - computed: true, optional: true, required: false
    _autoScalingConfigurationArn;
    get autoScalingConfigurationArn() {
        return this.getStringAttribute('auto_scaling_configuration_arn');
    }
    set autoScalingConfigurationArn(value) {
        this._autoScalingConfigurationArn = value;
    }
    resetAutoScalingConfigurationArn() {
        this._autoScalingConfigurationArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoScalingConfigurationArnInput() {
        return this._autoScalingConfigurationArn;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // service_id - computed: true, optional: false, required: false
    get serviceId() {
        return this.getStringAttribute('service_id');
    }
    // service_name - computed: false, optional: false, required: true
    _serviceName;
    get serviceName() {
        return this.getStringAttribute('service_name');
    }
    set serviceName(value) {
        this._serviceName = value;
    }
    // Temporarily expose input value. Use with caution.
    get serviceNameInput() {
        return this._serviceName;
    }
    // service_url - computed: true, optional: false, required: false
    get serviceUrl() {
        return this.getStringAttribute('service_url');
    }
    // status - computed: true, optional: false, required: false
    get status() {
        return this.getStringAttribute('status');
    }
    // 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;
    }
    // encryption_configuration - computed: false, optional: true, required: false
    _encryptionConfiguration = new ApprunnerServiceEncryptionConfigurationOutputReference(this, "encryption_configuration", true);
    get encryptionConfiguration() {
        return this._encryptionConfiguration;
    }
    putEncryptionConfiguration(value) {
        this._encryptionConfiguration.internalValue = value;
    }
    resetEncryptionConfiguration() {
        this._encryptionConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get encryptionConfigurationInput() {
        return this._encryptionConfiguration.internalValue;
    }
    // health_check_configuration - computed: false, optional: true, required: false
    _healthCheckConfiguration = new ApprunnerServiceHealthCheckConfigurationOutputReference(this, "health_check_configuration", true);
    get healthCheckConfiguration() {
        return this._healthCheckConfiguration;
    }
    putHealthCheckConfiguration(value) {
        this._healthCheckConfiguration.internalValue = value;
    }
    resetHealthCheckConfiguration() {
        this._healthCheckConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get healthCheckConfigurationInput() {
        return this._healthCheckConfiguration.internalValue;
    }
    // instance_configuration - computed: false, optional: true, required: false
    _instanceConfiguration = new ApprunnerServiceInstanceConfigurationOutputReference(this, "instance_configuration", true);
    get instanceConfiguration() {
        return this._instanceConfiguration;
    }
    putInstanceConfiguration(value) {
        this._instanceConfiguration.internalValue = value;
    }
    resetInstanceConfiguration() {
        this._instanceConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get instanceConfigurationInput() {
        return this._instanceConfiguration.internalValue;
    }
    // source_configuration - computed: false, optional: false, required: true
    _sourceConfiguration = new ApprunnerServiceSourceConfigurationOutputReference(this, "source_configuration", true);
    get sourceConfiguration() {
        return this._sourceConfiguration;
    }
    putSourceConfiguration(value) {
        this._sourceConfiguration.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get sourceConfigurationInput() {
        return this._sourceConfiguration.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            auto_scaling_configuration_arn: cdktf.stringToTerraform(this._autoScalingConfigurationArn),
            service_name: cdktf.stringToTerraform(this._serviceName),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            encryption_configuration: apprunnerServiceEncryptionConfigurationToTerraform(this._encryptionConfiguration.internalValue),
            health_check_configuration: apprunnerServiceHealthCheckConfigurationToTerraform(this._healthCheckConfiguration.internalValue),
            instance_configuration: apprunnerServiceInstanceConfigurationToTerraform(this._instanceConfiguration.internalValue),
            source_configuration: apprunnerServiceSourceConfigurationToTerraform(this._sourceConfiguration.internalValue),
        };
    }
}
//# sourceMappingURL=apprunner-service.js.map