All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.googlenative.redis.v1beta1.kotlin.InstanceArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.redis.v1beta1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.redis.v1beta1.InstanceArgs.builder
import com.pulumi.googlenative.redis.v1beta1.kotlin.enums.InstanceConnectMode
import com.pulumi.googlenative.redis.v1beta1.kotlin.enums.InstanceReadReplicasMode
import com.pulumi.googlenative.redis.v1beta1.kotlin.enums.InstanceSuspensionReasonsItem
import com.pulumi.googlenative.redis.v1beta1.kotlin.enums.InstanceTier
import com.pulumi.googlenative.redis.v1beta1.kotlin.enums.InstanceTransitEncryptionMode
import com.pulumi.googlenative.redis.v1beta1.kotlin.inputs.MaintenancePolicyArgs
import com.pulumi.googlenative.redis.v1beta1.kotlin.inputs.MaintenancePolicyArgsBuilder
import com.pulumi.googlenative.redis.v1beta1.kotlin.inputs.PersistenceConfigArgs
import com.pulumi.googlenative.redis.v1beta1.kotlin.inputs.PersistenceConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates a Redis instance based on the specified tier and memory size. By default, the instance is accessible from the project's [default network](https://cloud.google.com/vpc/docs/vpc). The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. The completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.
 * @property alternativeLocationId Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service.
 * @property authEnabled Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled.
 * @property authorizedNetwork Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used.
 * @property availableMaintenanceVersions Optional. The available maintenance versions that an instance could update to.
 * @property connectMode Optional. The network connect mode of the Redis instance. If not provided, the connect mode defaults to DIRECT_PEERING.
 * @property customerManagedKey Optional. The KMS key reference that the customer provides when trying to create the instance.
 * @property displayName An arbitrary and optional user-provided name for the instance.
 * @property instanceId Required. The logical name of the Redis instance in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project / location
 * @property labels Resource labels to represent user provided metadata
 * @property location Optional. The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. For standard tier, additional nodes will be added across multiple zones for protection against zonal failures. If specified, at least one node will be provisioned in this zone.
 * @property maintenancePolicy Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time.
 * @property maintenanceVersion Optional. The self service update maintenance version. The version is date based such as "20210712_00_00".
 * @property memorySizeGb Redis memory size in GiB.
 * @property name Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.
 * @property persistenceConfig Optional. Persistence configuration parameters
 * @property project
 * @property readReplicasMode Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
 * @property redisConfigs Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries
 * @property redisVersion Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility
 * @property replicaCount Optional. The number of replica nodes. The valid range for the Standard Tier with read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled for a Standard Tier instance, the only valid value is 1 and the default is 1. The valid value for basic tier is 0 and the default is also 0.
 * @property reservedIpRange Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28.
 * @property secondaryIpRange Optional. Additional IP range for node placement. Required when enabling read replicas on an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address range associated with the private service access connection, or "auto".
 * @property suspensionReasons Optional. reasons that causes instance in "SUSPENDED" state.
 * @property tier The service tier of the instance.
 * @property transitEncryptionMode Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance.
 */
public data class InstanceArgs(
    public val alternativeLocationId: Output? = null,
    public val authEnabled: Output? = null,
    public val authorizedNetwork: Output? = null,
    public val availableMaintenanceVersions: Output>? = null,
    public val connectMode: Output? = null,
    public val customerManagedKey: Output? = null,
    public val displayName: Output? = null,
    public val instanceId: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val maintenancePolicy: Output? = null,
    public val maintenanceVersion: Output? = null,
    public val memorySizeGb: Output? = null,
    public val name: Output? = null,
    public val persistenceConfig: Output? = null,
    public val project: Output? = null,
    public val readReplicasMode: Output? = null,
    public val redisConfigs: Output>? = null,
    public val redisVersion: Output? = null,
    public val replicaCount: Output? = null,
    public val reservedIpRange: Output? = null,
    public val secondaryIpRange: Output? = null,
    public val suspensionReasons: Output>? = null,
    public val tier: Output? = null,
    public val transitEncryptionMode: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.redis.v1beta1.InstanceArgs =
        com.pulumi.googlenative.redis.v1beta1.InstanceArgs.builder()
            .alternativeLocationId(alternativeLocationId?.applyValue({ args0 -> args0 }))
            .authEnabled(authEnabled?.applyValue({ args0 -> args0 }))
            .authorizedNetwork(authorizedNetwork?.applyValue({ args0 -> args0 }))
            .availableMaintenanceVersions(
                availableMaintenanceVersions?.applyValue({ args0 ->
                    args0.map({ args0 -> args0 })
                }),
            )
            .connectMode(connectMode?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .customerManagedKey(customerManagedKey?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .instanceId(instanceId?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .maintenancePolicy(maintenancePolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .maintenanceVersion(maintenanceVersion?.applyValue({ args0 -> args0 }))
            .memorySizeGb(memorySizeGb?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .persistenceConfig(persistenceConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .project(project?.applyValue({ args0 -> args0 }))
            .readReplicasMode(readReplicasMode?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .redisConfigs(
                redisConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .redisVersion(redisVersion?.applyValue({ args0 -> args0 }))
            .replicaCount(replicaCount?.applyValue({ args0 -> args0 }))
            .reservedIpRange(reservedIpRange?.applyValue({ args0 -> args0 }))
            .secondaryIpRange(secondaryIpRange?.applyValue({ args0 -> args0 }))
            .suspensionReasons(
                suspensionReasons?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tier(tier?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .transitEncryptionMode(
                transitEncryptionMode?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [InstanceArgs].
 */
@PulumiTagMarker
public class InstanceArgsBuilder internal constructor() {
    private var alternativeLocationId: Output? = null

    private var authEnabled: Output? = null

    private var authorizedNetwork: Output? = null

    private var availableMaintenanceVersions: Output>? = null

    private var connectMode: Output? = null

    private var customerManagedKey: Output? = null

    private var displayName: Output? = null

    private var instanceId: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var maintenancePolicy: Output? = null

    private var maintenanceVersion: Output? = null

    private var memorySizeGb: Output? = null

    private var name: Output? = null

    private var persistenceConfig: Output? = null

    private var project: Output? = null

    private var readReplicasMode: Output? = null

    private var redisConfigs: Output>? = null

    private var redisVersion: Output? = null

    private var replicaCount: Output? = null

    private var reservedIpRange: Output? = null

    private var secondaryIpRange: Output? = null

    private var suspensionReasons: Output>? = null

    private var tier: Output? = null

    private var transitEncryptionMode: Output? = null

    /**
     * @param value Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service.
     */
    @JvmName("texefeybfltnanpp")
    public suspend fun alternativeLocationId(`value`: Output) {
        this.alternativeLocationId = value
    }

    /**
     * @param value Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled.
     */
    @JvmName("ojbnkvwyodmuadaj")
    public suspend fun authEnabled(`value`: Output) {
        this.authEnabled = value
    }

    /**
     * @param value Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used.
     */
    @JvmName("wpjsddyppcxaushq")
    public suspend fun authorizedNetwork(`value`: Output) {
        this.authorizedNetwork = value
    }

    /**
     * @param value Optional. The available maintenance versions that an instance could update to.
     */
    @JvmName("todgkjhrgindthti")
    public suspend fun availableMaintenanceVersions(`value`: Output>) {
        this.availableMaintenanceVersions = value
    }

    @JvmName("lhbugjfkdniiabuv")
    public suspend fun availableMaintenanceVersions(vararg values: Output) {
        this.availableMaintenanceVersions = Output.all(values.asList())
    }

    /**
     * @param values Optional. The available maintenance versions that an instance could update to.
     */
    @JvmName("gepkbkejxwchgxoq")
    public suspend fun availableMaintenanceVersions(values: List>) {
        this.availableMaintenanceVersions = Output.all(values)
    }

    /**
     * @param value Optional. The network connect mode of the Redis instance. If not provided, the connect mode defaults to DIRECT_PEERING.
     */
    @JvmName("cjhdnrmsflcdyist")
    public suspend fun connectMode(`value`: Output) {
        this.connectMode = value
    }

    /**
     * @param value Optional. The KMS key reference that the customer provides when trying to create the instance.
     */
    @JvmName("oovlvdsdaqivtaoo")
    public suspend fun customerManagedKey(`value`: Output) {
        this.customerManagedKey = value
    }

    /**
     * @param value An arbitrary and optional user-provided name for the instance.
     */
    @JvmName("enagothlmcqyadci")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Required. The logical name of the Redis instance in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project / location
     */
    @JvmName("njwudcsltiplsdsk")
    public suspend fun instanceId(`value`: Output) {
        this.instanceId = value
    }

    /**
     * @param value Resource labels to represent user provided metadata
     */
    @JvmName("uwnlyvgicwqqtxfr")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Optional. The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. For standard tier, additional nodes will be added across multiple zones for protection against zonal failures. If specified, at least one node will be provisioned in this zone.
     */
    @JvmName("oqmnthghorygcatu")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time.
     */
    @JvmName("ofrreulgyoqtskus")
    public suspend fun maintenancePolicy(`value`: Output) {
        this.maintenancePolicy = value
    }

    /**
     * @param value Optional. The self service update maintenance version. The version is date based such as "20210712_00_00".
     */
    @JvmName("wqgdhmvgtceflmup")
    public suspend fun maintenanceVersion(`value`: Output) {
        this.maintenanceVersion = value
    }

    /**
     * @param value Redis memory size in GiB.
     */
    @JvmName("cidivllkkakinnaq")
    public suspend fun memorySizeGb(`value`: Output) {
        this.memorySizeGb = value
    }

    /**
     * @param value Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.
     */
    @JvmName("cnqbrljnmohitito")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Optional. Persistence configuration parameters
     */
    @JvmName("bebymgyuulafkxqg")
    public suspend fun persistenceConfig(`value`: Output) {
        this.persistenceConfig = value
    }

    /**
     * @param value
     */
    @JvmName("astpgfvjowleauee")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
     */
    @JvmName("pliffpuavcoapero")
    public suspend fun readReplicasMode(`value`: Output) {
        this.readReplicasMode = value
    }

    /**
     * @param value Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries
     */
    @JvmName("woimrxlvhthpgkvt")
    public suspend fun redisConfigs(`value`: Output>) {
        this.redisConfigs = value
    }

    /**
     * @param value Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility
     */
    @JvmName("creftlodnffaisix")
    public suspend fun redisVersion(`value`: Output) {
        this.redisVersion = value
    }

    /**
     * @param value Optional. The number of replica nodes. The valid range for the Standard Tier with read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled for a Standard Tier instance, the only valid value is 1 and the default is 1. The valid value for basic tier is 0 and the default is also 0.
     */
    @JvmName("qhgkkhqdxblnbkyg")
    public suspend fun replicaCount(`value`: Output) {
        this.replicaCount = value
    }

    /**
     * @param value Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28.
     */
    @JvmName("mqpflilasiwisdkf")
    public suspend fun reservedIpRange(`value`: Output) {
        this.reservedIpRange = value
    }

    /**
     * @param value Optional. Additional IP range for node placement. Required when enabling read replicas on an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address range associated with the private service access connection, or "auto".
     */
    @JvmName("jfoeijncblebkeaq")
    public suspend fun secondaryIpRange(`value`: Output) {
        this.secondaryIpRange = value
    }

    /**
     * @param value Optional. reasons that causes instance in "SUSPENDED" state.
     */
    @JvmName("egnxkhiilaasioat")
    public suspend fun suspensionReasons(`value`: Output>) {
        this.suspensionReasons = value
    }

    @JvmName("uwliosvdlnsuskny")
    public suspend fun suspensionReasons(vararg values: Output) {
        this.suspensionReasons = Output.all(values.asList())
    }

    /**
     * @param values Optional. reasons that causes instance in "SUSPENDED" state.
     */
    @JvmName("tsvuibopmigmwhck")
    public suspend fun suspensionReasons(values: List>) {
        this.suspensionReasons = Output.all(values)
    }

    /**
     * @param value The service tier of the instance.
     */
    @JvmName("owmpnmjjgkrsello")
    public suspend fun tier(`value`: Output) {
        this.tier = value
    }

    /**
     * @param value Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance.
     */
    @JvmName("smfhbcfedqebkduy")
    public suspend fun transitEncryptionMode(`value`: Output) {
        this.transitEncryptionMode = value
    }

    /**
     * @param value Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service.
     */
    @JvmName("vpoubsrqtaomyvik")
    public suspend fun alternativeLocationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alternativeLocationId = mapped
    }

    /**
     * @param value Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled.
     */
    @JvmName("irwwoarujhnxbtof")
    public suspend fun authEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authEnabled = mapped
    }

    /**
     * @param value Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used.
     */
    @JvmName("epyvuvhaebcwiqre")
    public suspend fun authorizedNetwork(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizedNetwork = mapped
    }

    /**
     * @param value Optional. The available maintenance versions that an instance could update to.
     */
    @JvmName("dotgednwtubvlfem")
    public suspend fun availableMaintenanceVersions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.availableMaintenanceVersions = mapped
    }

    /**
     * @param values Optional. The available maintenance versions that an instance could update to.
     */
    @JvmName("jkrgrxpdkjxnkocq")
    public suspend fun availableMaintenanceVersions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.availableMaintenanceVersions = mapped
    }

    /**
     * @param value Optional. The network connect mode of the Redis instance. If not provided, the connect mode defaults to DIRECT_PEERING.
     */
    @JvmName("pnvwoyxudmsgjbgc")
    public suspend fun connectMode(`value`: InstanceConnectMode?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectMode = mapped
    }

    /**
     * @param value Optional. The KMS key reference that the customer provides when trying to create the instance.
     */
    @JvmName("lpgmbssxgvxvtbkb")
    public suspend fun customerManagedKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerManagedKey = mapped
    }

    /**
     * @param value An arbitrary and optional user-provided name for the instance.
     */
    @JvmName("udqvkdqmhxrffqus")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Required. The logical name of the Redis instance in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project / location
     */
    @JvmName("uqufpepjncpqdgld")
    public suspend fun instanceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceId = mapped
    }

    /**
     * @param value Resource labels to represent user provided metadata
     */
    @JvmName("vrvjapesouiswrkm")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Resource labels to represent user provided metadata
     */
    @JvmName("gmjgeumsacvwaadk")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Optional. The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. For standard tier, additional nodes will be added across multiple zones for protection against zonal failures. If specified, at least one node will be provisioned in this zone.
     */
    @JvmName("okciobydhavgvssr")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time.
     */
    @JvmName("jrlpiutqcrlhdduc")
    public suspend fun maintenancePolicy(`value`: MaintenancePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maintenancePolicy = mapped
    }

    /**
     * @param argument Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time.
     */
    @JvmName("pgntluqteyuhosmj")
    public suspend fun maintenancePolicy(argument: suspend MaintenancePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = MaintenancePolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.maintenancePolicy = mapped
    }

    /**
     * @param value Optional. The self service update maintenance version. The version is date based such as "20210712_00_00".
     */
    @JvmName("bkrlfvmbdwkxmebr")
    public suspend fun maintenanceVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maintenanceVersion = mapped
    }

    /**
     * @param value Redis memory size in GiB.
     */
    @JvmName("gqrvpcnwoayayqvr")
    public suspend fun memorySizeGb(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.memorySizeGb = mapped
    }

    /**
     * @param value Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.
     */
    @JvmName("ybnkojejyxgltrat")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Optional. Persistence configuration parameters
     */
    @JvmName("eqxhrgbpllckpdix")
    public suspend fun persistenceConfig(`value`: PersistenceConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.persistenceConfig = mapped
    }

    /**
     * @param argument Optional. Persistence configuration parameters
     */
    @JvmName("tpqseqsmbgmdsupg")
    public suspend fun persistenceConfig(argument: suspend PersistenceConfigArgsBuilder.() -> Unit) {
        val toBeMapped = PersistenceConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.persistenceConfig = mapped
    }

    /**
     * @param value
     */
    @JvmName("ahwbjkbftghbakjc")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
     */
    @JvmName("jmykyyvacuqpgttw")
    public suspend fun readReplicasMode(`value`: InstanceReadReplicasMode?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.readReplicasMode = mapped
    }

    /**
     * @param value Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries
     */
    @JvmName("alakucryhbmagaka")
    public suspend fun redisConfigs(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.redisConfigs = mapped
    }

    /**
     * @param values Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries
     */
    @JvmName("bvyxviweipqmgwoc")
    public fun redisConfigs(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.redisConfigs = mapped
    }

    /**
     * @param value Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility
     */
    @JvmName("hnpcryvkgglxqkvr")
    public suspend fun redisVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.redisVersion = mapped
    }

    /**
     * @param value Optional. The number of replica nodes. The valid range for the Standard Tier with read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled for a Standard Tier instance, the only valid value is 1 and the default is 1. The valid value for basic tier is 0 and the default is also 0.
     */
    @JvmName("qlfliystxwioiugt")
    public suspend fun replicaCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicaCount = mapped
    }

    /**
     * @param value Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28.
     */
    @JvmName("jfcesyodjrbsqjgu")
    public suspend fun reservedIpRange(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reservedIpRange = mapped
    }

    /**
     * @param value Optional. Additional IP range for node placement. Required when enabling read replicas on an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address range associated with the private service access connection, or "auto".
     */
    @JvmName("supsdlirienmfagb")
    public suspend fun secondaryIpRange(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secondaryIpRange = mapped
    }

    /**
     * @param value Optional. reasons that causes instance in "SUSPENDED" state.
     */
    @JvmName("edgnwngpjylayyad")
    public suspend fun suspensionReasons(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.suspensionReasons = mapped
    }

    /**
     * @param values Optional. reasons that causes instance in "SUSPENDED" state.
     */
    @JvmName("svblrgmnevmfxiwl")
    public suspend fun suspensionReasons(vararg values: InstanceSuspensionReasonsItem) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.suspensionReasons = mapped
    }

    /**
     * @param value The service tier of the instance.
     */
    @JvmName("pjkwkcitnbrtrhjn")
    public suspend fun tier(`value`: InstanceTier?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tier = mapped
    }

    /**
     * @param value Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance.
     */
    @JvmName("ruaoukisvrehieit")
    public suspend fun transitEncryptionMode(`value`: InstanceTransitEncryptionMode?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transitEncryptionMode = mapped
    }

    internal fun build(): InstanceArgs = InstanceArgs(
        alternativeLocationId = alternativeLocationId,
        authEnabled = authEnabled,
        authorizedNetwork = authorizedNetwork,
        availableMaintenanceVersions = availableMaintenanceVersions,
        connectMode = connectMode,
        customerManagedKey = customerManagedKey,
        displayName = displayName,
        instanceId = instanceId,
        labels = labels,
        location = location,
        maintenancePolicy = maintenancePolicy,
        maintenanceVersion = maintenanceVersion,
        memorySizeGb = memorySizeGb,
        name = name,
        persistenceConfig = persistenceConfig,
        project = project,
        readReplicasMode = readReplicasMode,
        redisConfigs = redisConfigs,
        redisVersion = redisVersion,
        replicaCount = replicaCount,
        reservedIpRange = reservedIpRange,
        secondaryIpRange = secondaryIpRange,
        suspensionReasons = suspensionReasons,
        tier = tier,
        transitEncryptionMode = transitEncryptionMode,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy