// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function ec2ClientVpnEndpointAuthenticationOptionsToTerraform(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 {
        active_directory_id: cdktf.stringToTerraform(struct.activeDirectoryId),
        root_certificate_chain_arn: cdktf.stringToTerraform(struct.rootCertificateChainArn),
        saml_provider_arn: cdktf.stringToTerraform(struct.samlProviderArn),
        self_service_saml_provider_arn: cdktf.stringToTerraform(struct.selfServiceSamlProviderArn),
        type: cdktf.stringToTerraform(struct.type),
    };
}
export function ec2ClientVpnEndpointClientConnectOptionsToTerraform(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 {
        enabled: cdktf.booleanToTerraform(struct.enabled),
        lambda_function_arn: cdktf.stringToTerraform(struct.lambdaFunctionArn),
    };
}
export class Ec2ClientVpnEndpointClientConnectOptionsOutputReference 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._enabled !== undefined) {
            hasAnyValues = true;
            internalValueResult.enabled = this._enabled;
        }
        if (this._lambdaFunctionArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.lambdaFunctionArn = this._lambdaFunctionArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._enabled = undefined;
            this._lambdaFunctionArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._enabled = value.enabled;
            this._lambdaFunctionArn = value.lambdaFunctionArn;
        }
    }
    // enabled - computed: true, optional: true, required: false
    _enabled;
    get enabled() {
        return this.getBooleanAttribute('enabled');
    }
    set enabled(value) {
        this._enabled = value;
    }
    resetEnabled() {
        this._enabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enabledInput() {
        return this._enabled;
    }
    // lambda_function_arn - computed: true, optional: true, required: false
    _lambdaFunctionArn;
    get lambdaFunctionArn() {
        return this.getStringAttribute('lambda_function_arn');
    }
    set lambdaFunctionArn(value) {
        this._lambdaFunctionArn = value;
    }
    resetLambdaFunctionArn() {
        this._lambdaFunctionArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get lambdaFunctionArnInput() {
        return this._lambdaFunctionArn;
    }
}
export function ec2ClientVpnEndpointClientLoginBannerOptionsToTerraform(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 {
        banner_text: cdktf.stringToTerraform(struct.bannerText),
        enabled: cdktf.booleanToTerraform(struct.enabled),
    };
}
export class Ec2ClientVpnEndpointClientLoginBannerOptionsOutputReference 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._bannerText !== undefined) {
            hasAnyValues = true;
            internalValueResult.bannerText = this._bannerText;
        }
        if (this._enabled !== undefined) {
            hasAnyValues = true;
            internalValueResult.enabled = this._enabled;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._bannerText = undefined;
            this._enabled = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._bannerText = value.bannerText;
            this._enabled = value.enabled;
        }
    }
    // banner_text - computed: true, optional: true, required: false
    _bannerText;
    get bannerText() {
        return this.getStringAttribute('banner_text');
    }
    set bannerText(value) {
        this._bannerText = value;
    }
    resetBannerText() {
        this._bannerText = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get bannerTextInput() {
        return this._bannerText;
    }
    // enabled - computed: true, optional: true, required: false
    _enabled;
    get enabled() {
        return this.getBooleanAttribute('enabled');
    }
    set enabled(value) {
        this._enabled = value;
    }
    resetEnabled() {
        this._enabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enabledInput() {
        return this._enabled;
    }
}
export function ec2ClientVpnEndpointConnectionLogOptionsToTerraform(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 {
        cloudwatch_log_group: cdktf.stringToTerraform(struct.cloudwatchLogGroup),
        cloudwatch_log_stream: cdktf.stringToTerraform(struct.cloudwatchLogStream),
        enabled: cdktf.booleanToTerraform(struct.enabled),
    };
}
export class Ec2ClientVpnEndpointConnectionLogOptionsOutputReference 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._cloudwatchLogGroup !== undefined) {
            hasAnyValues = true;
            internalValueResult.cloudwatchLogGroup = this._cloudwatchLogGroup;
        }
        if (this._cloudwatchLogStream !== undefined) {
            hasAnyValues = true;
            internalValueResult.cloudwatchLogStream = this._cloudwatchLogStream;
        }
        if (this._enabled !== undefined) {
            hasAnyValues = true;
            internalValueResult.enabled = this._enabled;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._cloudwatchLogGroup = undefined;
            this._cloudwatchLogStream = undefined;
            this._enabled = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._cloudwatchLogGroup = value.cloudwatchLogGroup;
            this._cloudwatchLogStream = value.cloudwatchLogStream;
            this._enabled = value.enabled;
        }
    }
    // cloudwatch_log_group - computed: false, optional: true, required: false
    _cloudwatchLogGroup;
    get cloudwatchLogGroup() {
        return this.getStringAttribute('cloudwatch_log_group');
    }
    set cloudwatchLogGroup(value) {
        this._cloudwatchLogGroup = value;
    }
    resetCloudwatchLogGroup() {
        this._cloudwatchLogGroup = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cloudwatchLogGroupInput() {
        return this._cloudwatchLogGroup;
    }
    // cloudwatch_log_stream - computed: true, optional: true, required: false
    _cloudwatchLogStream;
    get cloudwatchLogStream() {
        return this.getStringAttribute('cloudwatch_log_stream');
    }
    set cloudwatchLogStream(value) {
        this._cloudwatchLogStream = value;
    }
    resetCloudwatchLogStream() {
        this._cloudwatchLogStream = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cloudwatchLogStreamInput() {
        return this._cloudwatchLogStream;
    }
    // enabled - computed: false, optional: false, required: true
    _enabled;
    get enabled() {
        return this.getBooleanAttribute('enabled');
    }
    set enabled(value) {
        this._enabled = value;
    }
    // Temporarily expose input value. Use with caution.
    get enabledInput() {
        return this._enabled;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/ec2_client_vpn_endpoint aws_ec2_client_vpn_endpoint}
*/
export class Ec2ClientVpnEndpoint extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_ec2_client_vpn_endpoint";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/ec2_client_vpn_endpoint aws_ec2_client_vpn_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 Ec2ClientVpnEndpointConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_ec2_client_vpn_endpoint',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._clientCidrBlock = config.clientCidrBlock;
        this._description = config.description;
        this._dnsServers = config.dnsServers;
        this._securityGroupIds = config.securityGroupIds;
        this._selfServicePortal = config.selfServicePortal;
        this._serverCertificateArn = config.serverCertificateArn;
        this._sessionTimeoutHours = config.sessionTimeoutHours;
        this._splitTunnel = config.splitTunnel;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._transportProtocol = config.transportProtocol;
        this._vpcId = config.vpcId;
        this._vpnPort = config.vpnPort;
        this._authenticationOptions = config.authenticationOptions;
        this._clientConnectOptions.internalValue = config.clientConnectOptions;
        this._clientLoginBannerOptions.internalValue = config.clientLoginBannerOptions;
        this._connectionLogOptions.internalValue = config.connectionLogOptions;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // client_cidr_block - computed: false, optional: false, required: true
    _clientCidrBlock;
    get clientCidrBlock() {
        return this.getStringAttribute('client_cidr_block');
    }
    set clientCidrBlock(value) {
        this._clientCidrBlock = value;
    }
    // Temporarily expose input value. Use with caution.
    get clientCidrBlockInput() {
        return this._clientCidrBlock;
    }
    // description - computed: false, optional: true, required: false
    _description;
    get description() {
        return this.getStringAttribute('description');
    }
    set description(value) {
        this._description = value;
    }
    resetDescription() {
        this._description = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get descriptionInput() {
        return this._description;
    }
    // dns_name - computed: true, optional: false, required: false
    get dnsName() {
        return this.getStringAttribute('dns_name');
    }
    // dns_servers - computed: false, optional: true, required: false
    _dnsServers;
    get dnsServers() {
        return this.getListAttribute('dns_servers');
    }
    set dnsServers(value) {
        this._dnsServers = value;
    }
    resetDnsServers() {
        this._dnsServers = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dnsServersInput() {
        return this._dnsServers;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // security_group_ids - computed: true, optional: true, required: false
    _securityGroupIds;
    get securityGroupIds() {
        return cdktf.Fn.tolist(this.getListAttribute('security_group_ids'));
    }
    set securityGroupIds(value) {
        this._securityGroupIds = value;
    }
    resetSecurityGroupIds() {
        this._securityGroupIds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get securityGroupIdsInput() {
        return this._securityGroupIds;
    }
    // self_service_portal - computed: false, optional: true, required: false
    _selfServicePortal;
    get selfServicePortal() {
        return this.getStringAttribute('self_service_portal');
    }
    set selfServicePortal(value) {
        this._selfServicePortal = value;
    }
    resetSelfServicePortal() {
        this._selfServicePortal = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get selfServicePortalInput() {
        return this._selfServicePortal;
    }
    // server_certificate_arn - computed: false, optional: false, required: true
    _serverCertificateArn;
    get serverCertificateArn() {
        return this.getStringAttribute('server_certificate_arn');
    }
    set serverCertificateArn(value) {
        this._serverCertificateArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get serverCertificateArnInput() {
        return this._serverCertificateArn;
    }
    // session_timeout_hours - computed: false, optional: true, required: false
    _sessionTimeoutHours;
    get sessionTimeoutHours() {
        return this.getNumberAttribute('session_timeout_hours');
    }
    set sessionTimeoutHours(value) {
        this._sessionTimeoutHours = value;
    }
    resetSessionTimeoutHours() {
        this._sessionTimeoutHours = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sessionTimeoutHoursInput() {
        return this._sessionTimeoutHours;
    }
    // split_tunnel - computed: false, optional: true, required: false
    _splitTunnel;
    get splitTunnel() {
        return this.getBooleanAttribute('split_tunnel');
    }
    set splitTunnel(value) {
        this._splitTunnel = value;
    }
    resetSplitTunnel() {
        this._splitTunnel = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get splitTunnelInput() {
        return this._splitTunnel;
    }
    // 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;
    }
    // transport_protocol - computed: false, optional: true, required: false
    _transportProtocol;
    get transportProtocol() {
        return this.getStringAttribute('transport_protocol');
    }
    set transportProtocol(value) {
        this._transportProtocol = value;
    }
    resetTransportProtocol() {
        this._transportProtocol = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get transportProtocolInput() {
        return this._transportProtocol;
    }
    // vpc_id - computed: true, optional: true, required: false
    _vpcId;
    get vpcId() {
        return this.getStringAttribute('vpc_id');
    }
    set vpcId(value) {
        this._vpcId = value;
    }
    resetVpcId() {
        this._vpcId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get vpcIdInput() {
        return this._vpcId;
    }
    // vpn_port - computed: false, optional: true, required: false
    _vpnPort;
    get vpnPort() {
        return this.getNumberAttribute('vpn_port');
    }
    set vpnPort(value) {
        this._vpnPort = value;
    }
    resetVpnPort() {
        this._vpnPort = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get vpnPortInput() {
        return this._vpnPort;
    }
    // authentication_options - computed: false, optional: false, required: true
    _authenticationOptions;
    get authenticationOptions() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('authentication_options');
    }
    set authenticationOptions(value) {
        this._authenticationOptions = value;
    }
    // Temporarily expose input value. Use with caution.
    get authenticationOptionsInput() {
        return this._authenticationOptions;
    }
    // client_connect_options - computed: false, optional: true, required: false
    _clientConnectOptions = new Ec2ClientVpnEndpointClientConnectOptionsOutputReference(this, "client_connect_options", true);
    get clientConnectOptions() {
        return this._clientConnectOptions;
    }
    putClientConnectOptions(value) {
        this._clientConnectOptions.internalValue = value;
    }
    resetClientConnectOptions() {
        this._clientConnectOptions.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get clientConnectOptionsInput() {
        return this._clientConnectOptions.internalValue;
    }
    // client_login_banner_options - computed: false, optional: true, required: false
    _clientLoginBannerOptions = new Ec2ClientVpnEndpointClientLoginBannerOptionsOutputReference(this, "client_login_banner_options", true);
    get clientLoginBannerOptions() {
        return this._clientLoginBannerOptions;
    }
    putClientLoginBannerOptions(value) {
        this._clientLoginBannerOptions.internalValue = value;
    }
    resetClientLoginBannerOptions() {
        this._clientLoginBannerOptions.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get clientLoginBannerOptionsInput() {
        return this._clientLoginBannerOptions.internalValue;
    }
    // connection_log_options - computed: false, optional: false, required: true
    _connectionLogOptions = new Ec2ClientVpnEndpointConnectionLogOptionsOutputReference(this, "connection_log_options", true);
    get connectionLogOptions() {
        return this._connectionLogOptions;
    }
    putConnectionLogOptions(value) {
        this._connectionLogOptions.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get connectionLogOptionsInput() {
        return this._connectionLogOptions.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            client_cidr_block: cdktf.stringToTerraform(this._clientCidrBlock),
            description: cdktf.stringToTerraform(this._description),
            dns_servers: cdktf.listMapper(cdktf.stringToTerraform)(this._dnsServers),
            security_group_ids: cdktf.listMapper(cdktf.stringToTerraform)(this._securityGroupIds),
            self_service_portal: cdktf.stringToTerraform(this._selfServicePortal),
            server_certificate_arn: cdktf.stringToTerraform(this._serverCertificateArn),
            session_timeout_hours: cdktf.numberToTerraform(this._sessionTimeoutHours),
            split_tunnel: cdktf.booleanToTerraform(this._splitTunnel),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            transport_protocol: cdktf.stringToTerraform(this._transportProtocol),
            vpc_id: cdktf.stringToTerraform(this._vpcId),
            vpn_port: cdktf.numberToTerraform(this._vpnPort),
            authentication_options: cdktf.listMapper(ec2ClientVpnEndpointAuthenticationOptionsToTerraform)(this._authenticationOptions),
            client_connect_options: ec2ClientVpnEndpointClientConnectOptionsToTerraform(this._clientConnectOptions.internalValue),
            client_login_banner_options: ec2ClientVpnEndpointClientLoginBannerOptionsToTerraform(this._clientLoginBannerOptions.internalValue),
            connection_log_options: ec2ClientVpnEndpointConnectionLogOptionsToTerraform(this._connectionLogOptions.internalValue),
        };
    }
}
//# sourceMappingURL=ec2-client-vpn-endpoint.js.map