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

com.pulumi.gcp.databasemigrationservice.kotlin.inputs.ConnectionProfileAlloydbSettingsArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.databasemigrationservice.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.databasemigrationservice.inputs.ConnectionProfileAlloydbSettingsArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property initialUser Required. Input only. Initial user to setup during cluster creation.
 * Structure is documented below.
 * @property labels Labels for the AlloyDB cluster created by DMS.
 * @property primaryInstanceSettings Settings for the cluster's primary instance
 * Structure is documented below.
 * @property vpcNetwork Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster.
 * It is specified in the form: 'projects/{project_number}/global/networks/{network_id}'. This is required to create a cluster.
 */
public data class ConnectionProfileAlloydbSettingsArgs(
    public val initialUser: Output,
    public val labels: Output>? = null,
    public val primaryInstanceSettings: Output? = null,
    public val vpcNetwork: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.databasemigrationservice.inputs.ConnectionProfileAlloydbSettingsArgs =
        com.pulumi.gcp.databasemigrationservice.inputs.ConnectionProfileAlloydbSettingsArgs.builder()
            .initialUser(initialUser.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .primaryInstanceSettings(
                primaryInstanceSettings?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .vpcNetwork(vpcNetwork.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConnectionProfileAlloydbSettingsArgs].
 */
@PulumiTagMarker
public class ConnectionProfileAlloydbSettingsArgsBuilder internal constructor() {
    private var initialUser: Output? = null

    private var labels: Output>? = null

    private var primaryInstanceSettings:
        Output? = null

    private var vpcNetwork: Output? = null

    /**
     * @param value Required. Input only. Initial user to setup during cluster creation.
     * Structure is documented below.
     */
    @JvmName("cdyhuynxtsjpuave")
    public suspend fun initialUser(`value`: Output) {
        this.initialUser = value
    }

    /**
     * @param value Labels for the AlloyDB cluster created by DMS.
     */
    @JvmName("jsdxupkqnysyqrpj")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Settings for the cluster's primary instance
     * Structure is documented below.
     */
    @JvmName("aesmmmtfkvkgpgrs")
    public suspend fun primaryInstanceSettings(`value`: Output) {
        this.primaryInstanceSettings = value
    }

    /**
     * @param value Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster.
     * It is specified in the form: 'projects/{project_number}/global/networks/{network_id}'. This is required to create a cluster.
     */
    @JvmName("jwpxanipxctpjkpe")
    public suspend fun vpcNetwork(`value`: Output) {
        this.vpcNetwork = value
    }

    /**
     * @param value Required. Input only. Initial user to setup during cluster creation.
     * Structure is documented below.
     */
    @JvmName("fcljtaralhfvwyis")
    public suspend fun initialUser(`value`: ConnectionProfileAlloydbSettingsInitialUserArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.initialUser = mapped
    }

    /**
     * @param argument Required. Input only. Initial user to setup during cluster creation.
     * Structure is documented below.
     */
    @JvmName("oyepabjpyyewyoro")
    public suspend fun initialUser(argument: suspend ConnectionProfileAlloydbSettingsInitialUserArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectionProfileAlloydbSettingsInitialUserArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.initialUser = mapped
    }

    /**
     * @param value Labels for the AlloyDB cluster created by DMS.
     */
    @JvmName("vyvrbbeqpwlhhghl")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Labels for the AlloyDB cluster created by DMS.
     */
    @JvmName("jxddanhusfvulqab")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Settings for the cluster's primary instance
     * Structure is documented below.
     */
    @JvmName("iloqoqfeymfkawgk")
    public suspend fun primaryInstanceSettings(`value`: ConnectionProfileAlloydbSettingsPrimaryInstanceSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primaryInstanceSettings = mapped
    }

    /**
     * @param argument Settings for the cluster's primary instance
     * Structure is documented below.
     */
    @JvmName("coosjvumkvfjmklp")
    public suspend fun primaryInstanceSettings(argument: suspend ConnectionProfileAlloydbSettingsPrimaryInstanceSettingsArgsBuilder.() -> Unit) {
        val toBeMapped =
            ConnectionProfileAlloydbSettingsPrimaryInstanceSettingsArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.primaryInstanceSettings = mapped
    }

    /**
     * @param value Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster.
     * It is specified in the form: 'projects/{project_number}/global/networks/{network_id}'. This is required to create a cluster.
     */
    @JvmName("wkvgwsjfuxtkqwrv")
    public suspend fun vpcNetwork(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.vpcNetwork = mapped
    }

    internal fun build(): ConnectionProfileAlloydbSettingsArgs = ConnectionProfileAlloydbSettingsArgs(
        initialUser = initialUser ?: throw PulumiNullFieldException("initialUser"),
        labels = labels,
        primaryInstanceSettings = primaryInstanceSettings,
        vpcNetwork = vpcNetwork ?: throw PulumiNullFieldException("vpcNetwork"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy