// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function sagemakerEndpointDeploymentConfigAutoRollbackConfigurationAlarmsToTerraform(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 {
        alarm_name: cdktf.stringToTerraform(struct.alarmName),
    };
}
export function sagemakerEndpointDeploymentConfigAutoRollbackConfigurationToTerraform(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 {
        alarms: cdktf.listMapper(sagemakerEndpointDeploymentConfigAutoRollbackConfigurationAlarmsToTerraform)(struct.alarms),
    };
}
export class SagemakerEndpointDeploymentConfigAutoRollbackConfigurationOutputReference 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._alarms !== undefined) {
            hasAnyValues = true;
            internalValueResult.alarms = this._alarms;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._alarms = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._alarms = value.alarms;
        }
    }
    // alarms - computed: false, optional: true, required: false
    _alarms;
    get alarms() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('alarms')));
    }
    set alarms(value) {
        this._alarms = value;
    }
    resetAlarms() {
        this._alarms = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get alarmsInput() {
        return this._alarms;
    }
}
export function sagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationCanarySizeToTerraform(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.numberToTerraform(struct.value),
    };
}
export class SagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationCanarySizeOutputReference 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.getNumberAttribute('value');
    }
    set value(value) {
        this._value = value;
    }
    // Temporarily expose input value. Use with caution.
    get valueInput() {
        return this._value;
    }
}
export function sagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationLinearStepSizeToTerraform(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.numberToTerraform(struct.value),
    };
}
export class SagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationLinearStepSizeOutputReference 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.getNumberAttribute('value');
    }
    set value(value) {
        this._value = value;
    }
    // Temporarily expose input value. Use with caution.
    get valueInput() {
        return this._value;
    }
}
export function sagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationToTerraform(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),
        wait_interval_in_seconds: cdktf.numberToTerraform(struct.waitIntervalInSeconds),
        canary_size: sagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationCanarySizeToTerraform(struct.canarySize),
        linear_step_size: sagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationLinearStepSizeToTerraform(struct.linearStepSize),
    };
}
export class SagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationOutputReference 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._waitIntervalInSeconds !== undefined) {
            hasAnyValues = true;
            internalValueResult.waitIntervalInSeconds = this._waitIntervalInSeconds;
        }
        if (this._canarySize?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.canarySize = this._canarySize?.internalValue;
        }
        if (this._linearStepSize?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.linearStepSize = this._linearStepSize?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._type = undefined;
            this._waitIntervalInSeconds = undefined;
            this._canarySize.internalValue = undefined;
            this._linearStepSize.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._type = value.type;
            this._waitIntervalInSeconds = value.waitIntervalInSeconds;
            this._canarySize.internalValue = value.canarySize;
            this._linearStepSize.internalValue = value.linearStepSize;
        }
    }
    // 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;
    }
    // wait_interval_in_seconds - computed: false, optional: false, required: true
    _waitIntervalInSeconds;
    get waitIntervalInSeconds() {
        return this.getNumberAttribute('wait_interval_in_seconds');
    }
    set waitIntervalInSeconds(value) {
        this._waitIntervalInSeconds = value;
    }
    // Temporarily expose input value. Use with caution.
    get waitIntervalInSecondsInput() {
        return this._waitIntervalInSeconds;
    }
    // canary_size - computed: false, optional: true, required: false
    _canarySize = new SagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationCanarySizeOutputReference(this, "canary_size", true);
    get canarySize() {
        return this._canarySize;
    }
    putCanarySize(value) {
        this._canarySize.internalValue = value;
    }
    resetCanarySize() {
        this._canarySize.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get canarySizeInput() {
        return this._canarySize.internalValue;
    }
    // linear_step_size - computed: false, optional: true, required: false
    _linearStepSize = new SagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationLinearStepSizeOutputReference(this, "linear_step_size", true);
    get linearStepSize() {
        return this._linearStepSize;
    }
    putLinearStepSize(value) {
        this._linearStepSize.internalValue = value;
    }
    resetLinearStepSize() {
        this._linearStepSize.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get linearStepSizeInput() {
        return this._linearStepSize.internalValue;
    }
}
export function sagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyToTerraform(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 {
        maximum_execution_timeout_in_seconds: cdktf.numberToTerraform(struct.maximumExecutionTimeoutInSeconds),
        termination_wait_in_seconds: cdktf.numberToTerraform(struct.terminationWaitInSeconds),
        traffic_routing_configuration: sagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationToTerraform(struct.trafficRoutingConfiguration),
    };
}
export class SagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyOutputReference 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._maximumExecutionTimeoutInSeconds !== undefined) {
            hasAnyValues = true;
            internalValueResult.maximumExecutionTimeoutInSeconds = this._maximumExecutionTimeoutInSeconds;
        }
        if (this._terminationWaitInSeconds !== undefined) {
            hasAnyValues = true;
            internalValueResult.terminationWaitInSeconds = this._terminationWaitInSeconds;
        }
        if (this._trafficRoutingConfiguration?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.trafficRoutingConfiguration = this._trafficRoutingConfiguration?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._maximumExecutionTimeoutInSeconds = undefined;
            this._terminationWaitInSeconds = undefined;
            this._trafficRoutingConfiguration.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._maximumExecutionTimeoutInSeconds = value.maximumExecutionTimeoutInSeconds;
            this._terminationWaitInSeconds = value.terminationWaitInSeconds;
            this._trafficRoutingConfiguration.internalValue = value.trafficRoutingConfiguration;
        }
    }
    // maximum_execution_timeout_in_seconds - computed: false, optional: true, required: false
    _maximumExecutionTimeoutInSeconds;
    get maximumExecutionTimeoutInSeconds() {
        return this.getNumberAttribute('maximum_execution_timeout_in_seconds');
    }
    set maximumExecutionTimeoutInSeconds(value) {
        this._maximumExecutionTimeoutInSeconds = value;
    }
    resetMaximumExecutionTimeoutInSeconds() {
        this._maximumExecutionTimeoutInSeconds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maximumExecutionTimeoutInSecondsInput() {
        return this._maximumExecutionTimeoutInSeconds;
    }
    // termination_wait_in_seconds - computed: false, optional: true, required: false
    _terminationWaitInSeconds;
    get terminationWaitInSeconds() {
        return this.getNumberAttribute('termination_wait_in_seconds');
    }
    set terminationWaitInSeconds(value) {
        this._terminationWaitInSeconds = value;
    }
    resetTerminationWaitInSeconds() {
        this._terminationWaitInSeconds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get terminationWaitInSecondsInput() {
        return this._terminationWaitInSeconds;
    }
    // traffic_routing_configuration - computed: false, optional: false, required: true
    _trafficRoutingConfiguration = new SagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyTrafficRoutingConfigurationOutputReference(this, "traffic_routing_configuration", true);
    get trafficRoutingConfiguration() {
        return this._trafficRoutingConfiguration;
    }
    putTrafficRoutingConfiguration(value) {
        this._trafficRoutingConfiguration.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get trafficRoutingConfigurationInput() {
        return this._trafficRoutingConfiguration.internalValue;
    }
}
export function sagemakerEndpointDeploymentConfigToTerraform(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_rollback_configuration: sagemakerEndpointDeploymentConfigAutoRollbackConfigurationToTerraform(struct.autoRollbackConfiguration),
        blue_green_update_policy: sagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyToTerraform(struct.blueGreenUpdatePolicy),
    };
}
export class SagemakerEndpointDeploymentConfigOutputReference 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._autoRollbackConfiguration?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.autoRollbackConfiguration = this._autoRollbackConfiguration?.internalValue;
        }
        if (this._blueGreenUpdatePolicy?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.blueGreenUpdatePolicy = this._blueGreenUpdatePolicy?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._autoRollbackConfiguration.internalValue = undefined;
            this._blueGreenUpdatePolicy.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._autoRollbackConfiguration.internalValue = value.autoRollbackConfiguration;
            this._blueGreenUpdatePolicy.internalValue = value.blueGreenUpdatePolicy;
        }
    }
    // auto_rollback_configuration - computed: false, optional: true, required: false
    _autoRollbackConfiguration = new SagemakerEndpointDeploymentConfigAutoRollbackConfigurationOutputReference(this, "auto_rollback_configuration", true);
    get autoRollbackConfiguration() {
        return this._autoRollbackConfiguration;
    }
    putAutoRollbackConfiguration(value) {
        this._autoRollbackConfiguration.internalValue = value;
    }
    resetAutoRollbackConfiguration() {
        this._autoRollbackConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoRollbackConfigurationInput() {
        return this._autoRollbackConfiguration.internalValue;
    }
    // blue_green_update_policy - computed: false, optional: false, required: true
    _blueGreenUpdatePolicy = new SagemakerEndpointDeploymentConfigBlueGreenUpdatePolicyOutputReference(this, "blue_green_update_policy", true);
    get blueGreenUpdatePolicy() {
        return this._blueGreenUpdatePolicy;
    }
    putBlueGreenUpdatePolicy(value) {
        this._blueGreenUpdatePolicy.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get blueGreenUpdatePolicyInput() {
        return this._blueGreenUpdatePolicy.internalValue;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/sagemaker_endpoint aws_sagemaker_endpoint}
*/
export class SagemakerEndpoint extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_sagemaker_endpoint";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/sagemaker_endpoint aws_sagemaker_endpoint} 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 SagemakerEndpointConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_sagemaker_endpoint',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._endpointConfigName = config.endpointConfigName;
        this._name = config.name;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._deploymentConfig.internalValue = config.deploymentConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // endpoint_config_name - computed: false, optional: false, required: true
    _endpointConfigName;
    get endpointConfigName() {
        return this.getStringAttribute('endpoint_config_name');
    }
    set endpointConfigName(value) {
        this._endpointConfigName = value;
    }
    // Temporarily expose input value. Use with caution.
    get endpointConfigNameInput() {
        return this._endpointConfigName;
    }
    // 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;
    }
    // deployment_config - computed: false, optional: true, required: false
    _deploymentConfig = new SagemakerEndpointDeploymentConfigOutputReference(this, "deployment_config", true);
    get deploymentConfig() {
        return this._deploymentConfig;
    }
    putDeploymentConfig(value) {
        this._deploymentConfig.internalValue = value;
    }
    resetDeploymentConfig() {
        this._deploymentConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deploymentConfigInput() {
        return this._deploymentConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            endpoint_config_name: cdktf.stringToTerraform(this._endpointConfigName),
            name: cdktf.stringToTerraform(this._name),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            deployment_config: sagemakerEndpointDeploymentConfigToTerraform(this._deploymentConfig.internalValue),
        };
    }
}
//# sourceMappingURL=sagemaker-endpoint.js.map