// generated from terraform resource schema
import * as cdktf from 'cdktf';
export class EksClusterCertificateAuthority extends cdktf.ComplexComputedList {
    // data - computed: true, optional: false, required: false
    get data() {
        return this.getStringAttribute('data');
    }
}
export class EksClusterIdentityOidc extends cdktf.ComplexComputedList {
    // issuer - computed: true, optional: false, required: false
    get issuer() {
        return this.getStringAttribute('issuer');
    }
}
export class EksClusterIdentity extends cdktf.ComplexComputedList {
    // oidc - computed: true, optional: false, required: false
    get oidc() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('oidc');
    }
}
export function eksClusterEncryptionConfigProviderToTerraform(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 {
        key_arn: cdktf.stringToTerraform(struct.keyArn),
    };
}
export class EksClusterEncryptionConfigProviderOutputReference 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._keyArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.keyArn = this._keyArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._keyArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._keyArn = value.keyArn;
        }
    }
    // key_arn - computed: false, optional: false, required: true
    _keyArn;
    get keyArn() {
        return this.getStringAttribute('key_arn');
    }
    set keyArn(value) {
        this._keyArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get keyArnInput() {
        return this._keyArn;
    }
}
export function eksClusterEncryptionConfigToTerraform(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 {
        resources: cdktf.listMapper(cdktf.stringToTerraform)(struct.resources),
        provider: eksClusterEncryptionConfigProviderToTerraform(struct.provider),
    };
}
export class EksClusterEncryptionConfigOutputReference 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._resources !== undefined) {
            hasAnyValues = true;
            internalValueResult.resources = this._resources;
        }
        if (this._provider?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.provider = this._provider?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._resources = undefined;
            this._provider.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._resources = value.resources;
            this._provider.internalValue = value.provider;
        }
    }
    // resources - computed: false, optional: false, required: true
    _resources;
    get resources() {
        return cdktf.Fn.tolist(this.getListAttribute('resources'));
    }
    set resources(value) {
        this._resources = value;
    }
    // Temporarily expose input value. Use with caution.
    get resourcesInput() {
        return this._resources;
    }
    // provider - computed: false, optional: false, required: true
    _provider = new EksClusterEncryptionConfigProviderOutputReference(this, "provider", true);
    get provider() {
        return this._provider;
    }
    putProvider(value) {
        this._provider.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get providerInput() {
        return this._provider.internalValue;
    }
}
export function eksClusterKubernetesNetworkConfigToTerraform(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 {
        ip_family: cdktf.stringToTerraform(struct.ipFamily),
        service_ipv4_cidr: cdktf.stringToTerraform(struct.serviceIpv4Cidr),
    };
}
export class EksClusterKubernetesNetworkConfigOutputReference 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._ipFamily !== undefined) {
            hasAnyValues = true;
            internalValueResult.ipFamily = this._ipFamily;
        }
        if (this._serviceIpv4Cidr !== undefined) {
            hasAnyValues = true;
            internalValueResult.serviceIpv4Cidr = this._serviceIpv4Cidr;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._ipFamily = undefined;
            this._serviceIpv4Cidr = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._ipFamily = value.ipFamily;
            this._serviceIpv4Cidr = value.serviceIpv4Cidr;
        }
    }
    // ip_family - computed: true, optional: true, required: false
    _ipFamily;
    get ipFamily() {
        return this.getStringAttribute('ip_family');
    }
    set ipFamily(value) {
        this._ipFamily = value;
    }
    resetIpFamily() {
        this._ipFamily = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get ipFamilyInput() {
        return this._ipFamily;
    }
    // service_ipv4_cidr - computed: true, optional: true, required: false
    _serviceIpv4Cidr;
    get serviceIpv4Cidr() {
        return this.getStringAttribute('service_ipv4_cidr');
    }
    set serviceIpv4Cidr(value) {
        this._serviceIpv4Cidr = value;
    }
    resetServiceIpv4Cidr() {
        this._serviceIpv4Cidr = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get serviceIpv4CidrInput() {
        return this._serviceIpv4Cidr;
    }
}
export function eksClusterTimeoutsToTerraform(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 {
        create: cdktf.stringToTerraform(struct.create),
        delete: cdktf.stringToTerraform(struct.delete),
        update: cdktf.stringToTerraform(struct.update),
    };
}
export class EksClusterTimeoutsOutputReference 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._create !== undefined) {
            hasAnyValues = true;
            internalValueResult.create = this._create;
        }
        if (this._delete !== undefined) {
            hasAnyValues = true;
            internalValueResult.delete = this._delete;
        }
        if (this._update !== undefined) {
            hasAnyValues = true;
            internalValueResult.update = this._update;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._create = undefined;
            this._delete = undefined;
            this._update = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._create = value.create;
            this._delete = value.delete;
            this._update = value.update;
        }
    }
    // create - computed: false, optional: true, required: false
    _create;
    get create() {
        return this.getStringAttribute('create');
    }
    set create(value) {
        this._create = value;
    }
    resetCreate() {
        this._create = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get createInput() {
        return this._create;
    }
    // delete - computed: false, optional: true, required: false
    _delete;
    get delete() {
        return this.getStringAttribute('delete');
    }
    set delete(value) {
        this._delete = value;
    }
    resetDelete() {
        this._delete = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteInput() {
        return this._delete;
    }
    // update - computed: false, optional: true, required: false
    _update;
    get update() {
        return this.getStringAttribute('update');
    }
    set update(value) {
        this._update = value;
    }
    resetUpdate() {
        this._update = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get updateInput() {
        return this._update;
    }
}
export function eksClusterVpcConfigToTerraform(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 {
        endpoint_private_access: cdktf.booleanToTerraform(struct.endpointPrivateAccess),
        endpoint_public_access: cdktf.booleanToTerraform(struct.endpointPublicAccess),
        public_access_cidrs: cdktf.listMapper(cdktf.stringToTerraform)(struct.publicAccessCidrs),
        security_group_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.securityGroupIds),
        subnet_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.subnetIds),
    };
}
export class EksClusterVpcConfigOutputReference 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._endpointPrivateAccess !== undefined) {
            hasAnyValues = true;
            internalValueResult.endpointPrivateAccess = this._endpointPrivateAccess;
        }
        if (this._endpointPublicAccess !== undefined) {
            hasAnyValues = true;
            internalValueResult.endpointPublicAccess = this._endpointPublicAccess;
        }
        if (this._publicAccessCidrs !== undefined) {
            hasAnyValues = true;
            internalValueResult.publicAccessCidrs = this._publicAccessCidrs;
        }
        if (this._securityGroupIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.securityGroupIds = this._securityGroupIds;
        }
        if (this._subnetIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.subnetIds = this._subnetIds;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._endpointPrivateAccess = undefined;
            this._endpointPublicAccess = undefined;
            this._publicAccessCidrs = undefined;
            this._securityGroupIds = undefined;
            this._subnetIds = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._endpointPrivateAccess = value.endpointPrivateAccess;
            this._endpointPublicAccess = value.endpointPublicAccess;
            this._publicAccessCidrs = value.publicAccessCidrs;
            this._securityGroupIds = value.securityGroupIds;
            this._subnetIds = value.subnetIds;
        }
    }
    // cluster_security_group_id - computed: true, optional: false, required: false
    get clusterSecurityGroupId() {
        return this.getStringAttribute('cluster_security_group_id');
    }
    // endpoint_private_access - computed: false, optional: true, required: false
    _endpointPrivateAccess;
    get endpointPrivateAccess() {
        return this.getBooleanAttribute('endpoint_private_access');
    }
    set endpointPrivateAccess(value) {
        this._endpointPrivateAccess = value;
    }
    resetEndpointPrivateAccess() {
        this._endpointPrivateAccess = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get endpointPrivateAccessInput() {
        return this._endpointPrivateAccess;
    }
    // endpoint_public_access - computed: false, optional: true, required: false
    _endpointPublicAccess;
    get endpointPublicAccess() {
        return this.getBooleanAttribute('endpoint_public_access');
    }
    set endpointPublicAccess(value) {
        this._endpointPublicAccess = value;
    }
    resetEndpointPublicAccess() {
        this._endpointPublicAccess = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get endpointPublicAccessInput() {
        return this._endpointPublicAccess;
    }
    // public_access_cidrs - computed: true, optional: true, required: false
    _publicAccessCidrs;
    get publicAccessCidrs() {
        return cdktf.Fn.tolist(this.getListAttribute('public_access_cidrs'));
    }
    set publicAccessCidrs(value) {
        this._publicAccessCidrs = value;
    }
    resetPublicAccessCidrs() {
        this._publicAccessCidrs = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get publicAccessCidrsInput() {
        return this._publicAccessCidrs;
    }
    // security_group_ids - computed: false, 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;
    }
    // subnet_ids - computed: false, optional: false, required: true
    _subnetIds;
    get subnetIds() {
        return cdktf.Fn.tolist(this.getListAttribute('subnet_ids'));
    }
    set subnetIds(value) {
        this._subnetIds = value;
    }
    // Temporarily expose input value. Use with caution.
    get subnetIdsInput() {
        return this._subnetIds;
    }
    // vpc_id - computed: true, optional: false, required: false
    get vpcId() {
        return this.getStringAttribute('vpc_id');
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/eks_cluster aws_eks_cluster}
*/
export class EksCluster extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_eks_cluster";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/eks_cluster aws_eks_cluster} 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 EksClusterConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_eks_cluster',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._enabledClusterLogTypes = config.enabledClusterLogTypes;
        this._name = config.name;
        this._roleArn = config.roleArn;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._version = config.version;
        this._encryptionConfig.internalValue = config.encryptionConfig;
        this._kubernetesNetworkConfig.internalValue = config.kubernetesNetworkConfig;
        this._timeouts.internalValue = config.timeouts;
        this._vpcConfig.internalValue = config.vpcConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // certificate_authority - computed: true, optional: false, required: false
    certificateAuthority(index) {
        return new EksClusterCertificateAuthority(this, 'certificate_authority', index, false);
    }
    // created_at - computed: true, optional: false, required: false
    get createdAt() {
        return this.getStringAttribute('created_at');
    }
    // enabled_cluster_log_types - computed: false, optional: true, required: false
    _enabledClusterLogTypes;
    get enabledClusterLogTypes() {
        return cdktf.Fn.tolist(this.getListAttribute('enabled_cluster_log_types'));
    }
    set enabledClusterLogTypes(value) {
        this._enabledClusterLogTypes = value;
    }
    resetEnabledClusterLogTypes() {
        this._enabledClusterLogTypes = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enabledClusterLogTypesInput() {
        return this._enabledClusterLogTypes;
    }
    // endpoint - computed: true, optional: false, required: false
    get endpoint() {
        return this.getStringAttribute('endpoint');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // identity - computed: true, optional: false, required: false
    identity(index) {
        return new EksClusterIdentity(this, 'identity', index, false);
    }
    // name - computed: false, optional: false, required: true
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // platform_version - computed: true, optional: false, required: false
    get platformVersion() {
        return this.getStringAttribute('platform_version');
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // 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;
    }
    // version - computed: true, optional: true, required: false
    _version;
    get version() {
        return this.getStringAttribute('version');
    }
    set version(value) {
        this._version = value;
    }
    resetVersion() {
        this._version = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get versionInput() {
        return this._version;
    }
    // encryption_config - computed: false, optional: true, required: false
    _encryptionConfig = new EksClusterEncryptionConfigOutputReference(this, "encryption_config", true);
    get encryptionConfig() {
        return this._encryptionConfig;
    }
    putEncryptionConfig(value) {
        this._encryptionConfig.internalValue = value;
    }
    resetEncryptionConfig() {
        this._encryptionConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get encryptionConfigInput() {
        return this._encryptionConfig.internalValue;
    }
    // kubernetes_network_config - computed: false, optional: true, required: false
    _kubernetesNetworkConfig = new EksClusterKubernetesNetworkConfigOutputReference(this, "kubernetes_network_config", true);
    get kubernetesNetworkConfig() {
        return this._kubernetesNetworkConfig;
    }
    putKubernetesNetworkConfig(value) {
        this._kubernetesNetworkConfig.internalValue = value;
    }
    resetKubernetesNetworkConfig() {
        this._kubernetesNetworkConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kubernetesNetworkConfigInput() {
        return this._kubernetesNetworkConfig.internalValue;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new EksClusterTimeoutsOutputReference(this, "timeouts", true);
    get timeouts() {
        return this._timeouts;
    }
    putTimeouts(value) {
        this._timeouts.internalValue = value;
    }
    resetTimeouts() {
        this._timeouts.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get timeoutsInput() {
        return this._timeouts.internalValue;
    }
    // vpc_config - computed: false, optional: false, required: true
    _vpcConfig = new EksClusterVpcConfigOutputReference(this, "vpc_config", true);
    get vpcConfig() {
        return this._vpcConfig;
    }
    putVpcConfig(value) {
        this._vpcConfig.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get vpcConfigInput() {
        return this._vpcConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            enabled_cluster_log_types: cdktf.listMapper(cdktf.stringToTerraform)(this._enabledClusterLogTypes),
            name: cdktf.stringToTerraform(this._name),
            role_arn: cdktf.stringToTerraform(this._roleArn),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            version: cdktf.stringToTerraform(this._version),
            encryption_config: eksClusterEncryptionConfigToTerraform(this._encryptionConfig.internalValue),
            kubernetes_network_config: eksClusterKubernetesNetworkConfigToTerraform(this._kubernetesNetworkConfig.internalValue),
            timeouts: eksClusterTimeoutsToTerraform(this._timeouts.internalValue),
            vpc_config: eksClusterVpcConfigToTerraform(this._vpcConfig.internalValue),
        };
    }
}
//# sourceMappingURL=eks-cluster.js.map