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

com.pulumi.digitalocean.kotlin.inputs.AppSpecServiceImageArgs.kt Maven / Gradle / Ivy

@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.AppSpecServiceImageArgs.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 AppSpecServiceImageArgs(
    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.AppSpecServiceImageArgs =
        com.pulumi.digitalocean.inputs.AppSpecServiceImageArgs.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 [AppSpecServiceImageArgs].
 */
@PulumiTagMarker
public class AppSpecServiceImageArgsBuilder 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("sxbotrgtpuvkcmec")
    public suspend fun deployOnPushes(`value`: Output>) {
        this.deployOnPushes = value
    }

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

    /**
     * @param values Configures automatically deploying images pushed to DOCR.
     */
    @JvmName("xipejsaiwargmhmb")
    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("tujjxwyolmopbacp")
    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("ipovjjolhmmnrmxk")
    public suspend fun registryCredentials(`value`: Output) {
        this.registryCredentials = value
    }

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

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

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

    /**
     * @param value Configures automatically deploying images pushed to DOCR.
     */
    @JvmName("wmkxyhblloqhveyb")
    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("ewdeefjivykgcyvh")
    public suspend fun deployOnPushes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppSpecServiceImageDeployOnPushArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.deployOnPushes = mapped
    }

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

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

    /**
     * @param values Configures automatically deploying images pushed to DOCR.
     */
    @JvmName("xrioltavbrhibnow")
    public suspend fun deployOnPushes(vararg values: AppSpecServiceImageDeployOnPushArgs) {
        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("gscovwxjnbqfyaqk")
    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("gmyxofnjreloqnvt")
    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("tyicbpdrsqlvhitl")
    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("lkrmaydayegqcnng")
    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("etmrssibfhyexugj")
    public suspend fun tag(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tag = mapped
    }

    internal fun build(): AppSpecServiceImageArgs = AppSpecServiceImageArgs(
        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