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

com.pulumi.digitalocean.kotlin.inputs.AppSpecWorkerImageArgs.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: 4.35.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.digitalocean.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.inputs.AppSpecWorkerImageArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property deployOnPushes Configures automatically deploying images pushed to DOCR.
 * @property registry The registry name. Must be left empty for the `DOCR` registry type. Required for the `DOCKER_HUB` registry type.
 * @property registryCredentials The credentials required to access a private Docker Hub or GitHub registry, in the following syntax `:`.
 * @property registryType The registry type. One of `DOCR` (DigitalOcean container registry) or `DOCKER_HUB`.
 * @property repository The repository name.
 * @property tag The repository tag. Defaults to `latest` if not provided.
 */
public data class AppSpecWorkerImageArgs(
    public val deployOnPushes: Output>? = null,
    public val registry: Output? = null,
    public val registryCredentials: Output? = null,
    public val registryType: Output,
    public val repository: Output,
    public val tag: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.inputs.AppSpecWorkerImageArgs =
        com.pulumi.digitalocean.inputs.AppSpecWorkerImageArgs.builder()
            .deployOnPushes(
                deployOnPushes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .registry(registry?.applyValue({ args0 -> args0 }))
            .registryCredentials(registryCredentials?.applyValue({ args0 -> args0 }))
            .registryType(registryType.applyValue({ args0 -> args0 }))
            .repository(repository.applyValue({ args0 -> args0 }))
            .tag(tag?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AppSpecWorkerImageArgs].
 */
@PulumiTagMarker
public class AppSpecWorkerImageArgsBuilder internal constructor() {
    private var deployOnPushes: Output>? = null

    private var registry: Output? = null

    private var registryCredentials: Output? = null

    private var registryType: Output? = null

    private var repository: Output? = null

    private var tag: Output? = null

    /**
     * @param value Configures automatically deploying images pushed to DOCR.
     */
    @JvmName("fcaxcaweecyyuear")
    public suspend fun deployOnPushes(`value`: Output>) {
        this.deployOnPushes = value
    }

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

    /**
     * @param values Configures automatically deploying images pushed to DOCR.
     */
    @JvmName("alstbbcfrcjkqcmo")
    public suspend fun deployOnPushes(values: List>) {
        this.deployOnPushes = Output.all(values)
    }

    /**
     * @param value The registry name. Must be left empty for the `DOCR` registry type. Required for the `DOCKER_HUB` registry type.
     */
    @JvmName("gkbhilkfhpgijqfr")
    public suspend fun registry(`value`: Output) {
        this.registry = value
    }

    /**
     * @param value The credentials required to access a private Docker Hub or GitHub registry, in the following syntax `:`.
     */
    @JvmName("kdkjbnyuptretata")
    public suspend fun registryCredentials(`value`: Output) {
        this.registryCredentials = value
    }

    /**
     * @param value The registry type. One of `DOCR` (DigitalOcean container registry) or `DOCKER_HUB`.
     */
    @JvmName("tjiumcdoouwicuyq")
    public suspend fun registryType(`value`: Output) {
        this.registryType = value
    }

    /**
     * @param value The repository name.
     */
    @JvmName("jlqwkydigkxpsair")
    public suspend fun repository(`value`: Output) {
        this.repository = value
    }

    /**
     * @param value The repository tag. Defaults to `latest` if not provided.
     */
    @JvmName("ujhedcyeobxxlgin")
    public suspend fun tag(`value`: Output) {
        this.tag = value
    }

    /**
     * @param value Configures automatically deploying images pushed to DOCR.
     */
    @JvmName("mmdscisnluxxneim")
    public suspend fun deployOnPushes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deployOnPushes = mapped
    }

    /**
     * @param argument Configures automatically deploying images pushed to DOCR.
     */
    @JvmName("fdbapdcwjsuymqcx")
    public suspend fun deployOnPushes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppSpecWorkerImageDeployOnPushArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.deployOnPushes = mapped
    }

    /**
     * @param argument Configures automatically deploying images pushed to DOCR.
     */
    @JvmName("musadnvrhucfmxhw")
    public suspend fun deployOnPushes(vararg argument: suspend AppSpecWorkerImageDeployOnPushArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AppSpecWorkerImageDeployOnPushArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.deployOnPushes = mapped
    }

    /**
     * @param argument Configures automatically deploying images pushed to DOCR.
     */
    @JvmName("egvommipylytotot")
    public suspend fun deployOnPushes(argument: suspend AppSpecWorkerImageDeployOnPushArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AppSpecWorkerImageDeployOnPushArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.deployOnPushes = mapped
    }

    /**
     * @param values Configures automatically deploying images pushed to DOCR.
     */
    @JvmName("cppktypxcupajpdm")
    public suspend fun deployOnPushes(vararg values: AppSpecWorkerImageDeployOnPushArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deployOnPushes = mapped
    }

    /**
     * @param value The registry name. Must be left empty for the `DOCR` registry type. Required for the `DOCKER_HUB` registry type.
     */
    @JvmName("tggbfrorbaeptgim")
    public suspend fun registry(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registry = mapped
    }

    /**
     * @param value The credentials required to access a private Docker Hub or GitHub registry, in the following syntax `:`.
     */
    @JvmName("vxscvridgsbmbrkr")
    public suspend fun registryCredentials(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registryCredentials = mapped
    }

    /**
     * @param value The registry type. One of `DOCR` (DigitalOcean container registry) or `DOCKER_HUB`.
     */
    @JvmName("apnuyefrcaufpgaw")
    public suspend fun registryType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.registryType = mapped
    }

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

    /**
     * @param value The repository tag. Defaults to `latest` if not provided.
     */
    @JvmName("xffsldkrllgqcrfk")
    public suspend fun tag(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tag = mapped
    }

    internal fun build(): AppSpecWorkerImageArgs = AppSpecWorkerImageArgs(
        deployOnPushes = deployOnPushes,
        registry = registry,
        registryCredentials = registryCredentials,
        registryType = registryType ?: throw PulumiNullFieldException("registryType"),
        repository = repository ?: throw PulumiNullFieldException("repository"),
        tag = tag,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy