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

com.pulumi.googlenative.datastream.v1alpha1.kotlin.inputs.MysqlProfileArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.datastream.v1alpha1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.datastream.v1alpha1.inputs.MysqlProfileArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * MySQL database profile.
 * @property hostname Hostname for the MySQL connection.
 * @property password Input only. Password for the MySQL connection.
 * @property port Port for the MySQL connection, default value is 3306.
 * @property sslConfig SSL configuration for the MySQL connection.
 * @property username Username for the MySQL connection.
 */
public data class MysqlProfileArgs(
    public val hostname: Output,
    public val password: Output,
    public val port: Output? = null,
    public val sslConfig: Output? = null,
    public val username: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.datastream.v1alpha1.inputs.MysqlProfileArgs =
        com.pulumi.googlenative.datastream.v1alpha1.inputs.MysqlProfileArgs.builder()
            .hostname(hostname.applyValue({ args0 -> args0 }))
            .password(password.applyValue({ args0 -> args0 }))
            .port(port?.applyValue({ args0 -> args0 }))
            .sslConfig(sslConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .username(username.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [MysqlProfileArgs].
 */
@PulumiTagMarker
public class MysqlProfileArgsBuilder internal constructor() {
    private var hostname: Output? = null

    private var password: Output? = null

    private var port: Output? = null

    private var sslConfig: Output? = null

    private var username: Output? = null

    /**
     * @param value Hostname for the MySQL connection.
     */
    @JvmName("ooxueaoymudmmdwl")
    public suspend fun hostname(`value`: Output) {
        this.hostname = value
    }

    /**
     * @param value Input only. Password for the MySQL connection.
     */
    @JvmName("kbxvglhiraqwbmqp")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value Port for the MySQL connection, default value is 3306.
     */
    @JvmName("npafkigebejuyeax")
    public suspend fun port(`value`: Output) {
        this.port = value
    }

    /**
     * @param value SSL configuration for the MySQL connection.
     */
    @JvmName("rxaasvwaldkghsrd")
    public suspend fun sslConfig(`value`: Output) {
        this.sslConfig = value
    }

    /**
     * @param value Username for the MySQL connection.
     */
    @JvmName("qjpocqkvwomtvmvc")
    public suspend fun username(`value`: Output) {
        this.username = value
    }

    /**
     * @param value Hostname for the MySQL connection.
     */
    @JvmName("ifjcouhmgxbjftrr")
    public suspend fun hostname(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hostname = mapped
    }

    /**
     * @param value Input only. Password for the MySQL connection.
     */
    @JvmName("ehueuaatqrfpjfjp")
    public suspend fun password(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.password = mapped
    }

    /**
     * @param value Port for the MySQL connection, default value is 3306.
     */
    @JvmName("ksxhsmaefcjjsvec")
    public suspend fun port(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.port = mapped
    }

    /**
     * @param value SSL configuration for the MySQL connection.
     */
    @JvmName("bjnxylmxveajkcbe")
    public suspend fun sslConfig(`value`: MysqlSslConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sslConfig = mapped
    }

    /**
     * @param argument SSL configuration for the MySQL connection.
     */
    @JvmName("kibrxwmliaeeayxp")
    public suspend fun sslConfig(argument: suspend MysqlSslConfigArgsBuilder.() -> Unit) {
        val toBeMapped = MysqlSslConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sslConfig = mapped
    }

    /**
     * @param value Username for the MySQL connection.
     */
    @JvmName("ktbmihhrmbeftxdd")
    public suspend fun username(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.username = mapped
    }

    internal fun build(): MysqlProfileArgs = MysqlProfileArgs(
        hostname = hostname ?: throw PulumiNullFieldException("hostname"),
        password = password ?: throw PulumiNullFieldException("password"),
        port = port,
        sslConfig = sslConfig,
        username = username ?: throw PulumiNullFieldException("username"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy