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

com.pulumi.azurenative.containerregistry.kotlin.inputs.DockerBuildRequestArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.containerregistry.kotlin.inputs

import com.pulumi.azurenative.containerregistry.inputs.DockerBuildRequestArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The parameters for a docker quick build.
 * @property agentConfiguration The machine configuration of the run agent.
 * @property agentPoolName The dedicated agent pool for the run.
 * @property arguments The collection of override arguments to be used when executing the run.
 * @property credentials The properties that describes a set of credentials that will be used when this run is invoked.
 * @property dockerFilePath The Docker file path relative to the source location.
 * @property imageNames The fully qualified image names including the repository and tag.
 * @property isArchiveEnabled The value that indicates whether archiving is enabled for the run or not.
 * @property isPushEnabled The value of this property indicates whether the image built should be pushed to the registry or not.
 * @property logTemplate The template that describes the repository and tag information for run log artifact.
 * @property noCache The value of this property indicates whether the image cache is enabled or not.
 * @property platform The platform properties against which the run has to happen.
 * @property sourceLocation The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository.
 * If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API.
 * @property target The name of the target build stage for the docker build.
 * @property timeout Run timeout in seconds.
 * @property type The type of the run request.
 * Expected value is 'DockerBuildRequest'.
 */
public data class DockerBuildRequestArgs(
    public val agentConfiguration: Output? = null,
    public val agentPoolName: Output? = null,
    public val arguments: Output>? = null,
    public val credentials: Output? = null,
    public val dockerFilePath: Output,
    public val imageNames: Output>? = null,
    public val isArchiveEnabled: Output? = null,
    public val isPushEnabled: Output? = null,
    public val logTemplate: Output? = null,
    public val noCache: Output? = null,
    public val platform: Output,
    public val sourceLocation: Output? = null,
    public val target: Output? = null,
    public val timeout: Output? = null,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.containerregistry.inputs.DockerBuildRequestArgs =
        com.pulumi.azurenative.containerregistry.inputs.DockerBuildRequestArgs.builder()
            .agentConfiguration(
                agentConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .agentPoolName(agentPoolName?.applyValue({ args0 -> args0 }))
            .arguments(
                arguments?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .credentials(credentials?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dockerFilePath(dockerFilePath.applyValue({ args0 -> args0 }))
            .imageNames(imageNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .isArchiveEnabled(isArchiveEnabled?.applyValue({ args0 -> args0 }))
            .isPushEnabled(isPushEnabled?.applyValue({ args0 -> args0 }))
            .logTemplate(logTemplate?.applyValue({ args0 -> args0 }))
            .noCache(noCache?.applyValue({ args0 -> args0 }))
            .platform(platform.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .sourceLocation(sourceLocation?.applyValue({ args0 -> args0 }))
            .target(target?.applyValue({ args0 -> args0 }))
            .timeout(timeout?.applyValue({ args0 -> args0 }))
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DockerBuildRequestArgs].
 */
@PulumiTagMarker
public class DockerBuildRequestArgsBuilder internal constructor() {
    private var agentConfiguration: Output? = null

    private var agentPoolName: Output? = null

    private var arguments: Output>? = null

    private var credentials: Output? = null

    private var dockerFilePath: Output? = null

    private var imageNames: Output>? = null

    private var isArchiveEnabled: Output? = null

    private var isPushEnabled: Output? = null

    private var logTemplate: Output? = null

    private var noCache: Output? = null

    private var platform: Output? = null

    private var sourceLocation: Output? = null

    private var target: Output? = null

    private var timeout: Output? = null

    private var type: Output? = null

    /**
     * @param value The machine configuration of the run agent.
     */
    @JvmName("xeaekohtyvnjfljy")
    public suspend fun agentConfiguration(`value`: Output) {
        this.agentConfiguration = value
    }

    /**
     * @param value The dedicated agent pool for the run.
     */
    @JvmName("fkgefwnudqyiocmt")
    public suspend fun agentPoolName(`value`: Output) {
        this.agentPoolName = value
    }

    /**
     * @param value The collection of override arguments to be used when executing the run.
     */
    @JvmName("alrekhtqjfvcfhal")
    public suspend fun arguments(`value`: Output>) {
        this.arguments = value
    }

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

    /**
     * @param values The collection of override arguments to be used when executing the run.
     */
    @JvmName("xugmokowuxnwtiun")
    public suspend fun arguments(values: List>) {
        this.arguments = Output.all(values)
    }

    /**
     * @param value The properties that describes a set of credentials that will be used when this run is invoked.
     */
    @JvmName("dfthskcgkbbuxlrw")
    public suspend fun credentials(`value`: Output) {
        this.credentials = value
    }

    /**
     * @param value The Docker file path relative to the source location.
     */
    @JvmName("nqweghxqtylwaylw")
    public suspend fun dockerFilePath(`value`: Output) {
        this.dockerFilePath = value
    }

    /**
     * @param value The fully qualified image names including the repository and tag.
     */
    @JvmName("foxvcphfgohsssio")
    public suspend fun imageNames(`value`: Output>) {
        this.imageNames = value
    }

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

    /**
     * @param values The fully qualified image names including the repository and tag.
     */
    @JvmName("hddrqwlykfokdflw")
    public suspend fun imageNames(values: List>) {
        this.imageNames = Output.all(values)
    }

    /**
     * @param value The value that indicates whether archiving is enabled for the run or not.
     */
    @JvmName("fqurwwrrbnbjnsuv")
    public suspend fun isArchiveEnabled(`value`: Output) {
        this.isArchiveEnabled = value
    }

    /**
     * @param value The value of this property indicates whether the image built should be pushed to the registry or not.
     */
    @JvmName("dgdaxrdddlpxyiru")
    public suspend fun isPushEnabled(`value`: Output) {
        this.isPushEnabled = value
    }

    /**
     * @param value The template that describes the repository and tag information for run log artifact.
     */
    @JvmName("drjauliwhhhbfkmc")
    public suspend fun logTemplate(`value`: Output) {
        this.logTemplate = value
    }

    /**
     * @param value The value of this property indicates whether the image cache is enabled or not.
     */
    @JvmName("arxycnjhmtcjypsg")
    public suspend fun noCache(`value`: Output) {
        this.noCache = value
    }

    /**
     * @param value The platform properties against which the run has to happen.
     */
    @JvmName("favlisghmodhdper")
    public suspend fun platform(`value`: Output) {
        this.platform = value
    }

    /**
     * @param value The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository.
     * If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API.
     */
    @JvmName("qahqfpyopsgpdkun")
    public suspend fun sourceLocation(`value`: Output) {
        this.sourceLocation = value
    }

    /**
     * @param value The name of the target build stage for the docker build.
     */
    @JvmName("pxmqgvdpjbqtahkf")
    public suspend fun target(`value`: Output) {
        this.target = value
    }

    /**
     * @param value Run timeout in seconds.
     */
    @JvmName("yhdnlfcxuistjwoa")
    public suspend fun timeout(`value`: Output) {
        this.timeout = value
    }

    /**
     * @param value The type of the run request.
     * Expected value is 'DockerBuildRequest'.
     */
    @JvmName("vqdmkknrlnnibfpt")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The machine configuration of the run agent.
     */
    @JvmName("yvbkckuxuwdnsprq")
    public suspend fun agentConfiguration(`value`: AgentPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.agentConfiguration = mapped
    }

    /**
     * @param argument The machine configuration of the run agent.
     */
    @JvmName("qquiyvuostqhhckv")
    public suspend fun agentConfiguration(argument: suspend AgentPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = AgentPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.agentConfiguration = mapped
    }

    /**
     * @param value The dedicated agent pool for the run.
     */
    @JvmName("blhivlfyhbjawich")
    public suspend fun agentPoolName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.agentPoolName = mapped
    }

    /**
     * @param value The collection of override arguments to be used when executing the run.
     */
    @JvmName("hmijlwrjuursxqcw")
    public suspend fun arguments(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.arguments = mapped
    }

    /**
     * @param argument The collection of override arguments to be used when executing the run.
     */
    @JvmName("yckfejanspdanffh")
    public suspend fun arguments(argument: List Unit>) {
        val toBeMapped = argument.toList().map { ArgumentArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.arguments = mapped
    }

    /**
     * @param argument The collection of override arguments to be used when executing the run.
     */
    @JvmName("dmjcyliyckokukxb")
    public suspend fun arguments(vararg argument: suspend ArgumentArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { ArgumentArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.arguments = mapped
    }

    /**
     * @param argument The collection of override arguments to be used when executing the run.
     */
    @JvmName("jekjfqgxmgyinbcc")
    public suspend fun arguments(argument: suspend ArgumentArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ArgumentArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.arguments = mapped
    }

    /**
     * @param values The collection of override arguments to be used when executing the run.
     */
    @JvmName("mayxvydxboybrjpd")
    public suspend fun arguments(vararg values: ArgumentArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.arguments = mapped
    }

    /**
     * @param value The properties that describes a set of credentials that will be used when this run is invoked.
     */
    @JvmName("mhmykjaessoowgry")
    public suspend fun credentials(`value`: CredentialsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.credentials = mapped
    }

    /**
     * @param argument The properties that describes a set of credentials that will be used when this run is invoked.
     */
    @JvmName("xqyagtqrhyjusjgy")
    public suspend fun credentials(argument: suspend CredentialsArgsBuilder.() -> Unit) {
        val toBeMapped = CredentialsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.credentials = mapped
    }

    /**
     * @param value The Docker file path relative to the source location.
     */
    @JvmName("orgjshxberwjfgjx")
    public suspend fun dockerFilePath(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dockerFilePath = mapped
    }

    /**
     * @param value The fully qualified image names including the repository and tag.
     */
    @JvmName("bvgsuouxojcudevp")
    public suspend fun imageNames(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageNames = mapped
    }

    /**
     * @param values The fully qualified image names including the repository and tag.
     */
    @JvmName("bdcvueiiromkmauw")
    public suspend fun imageNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.imageNames = mapped
    }

    /**
     * @param value The value that indicates whether archiving is enabled for the run or not.
     */
    @JvmName("idoibcdywyvpsfxu")
    public suspend fun isArchiveEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isArchiveEnabled = mapped
    }

    /**
     * @param value The value of this property indicates whether the image built should be pushed to the registry or not.
     */
    @JvmName("ryvudkwmfhowpmfc")
    public suspend fun isPushEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isPushEnabled = mapped
    }

    /**
     * @param value The template that describes the repository and tag information for run log artifact.
     */
    @JvmName("uiisxaujvamfkfux")
    public suspend fun logTemplate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logTemplate = mapped
    }

    /**
     * @param value The value of this property indicates whether the image cache is enabled or not.
     */
    @JvmName("jnppxymtccneseql")
    public suspend fun noCache(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noCache = mapped
    }

    /**
     * @param value The platform properties against which the run has to happen.
     */
    @JvmName("awifirelnpkbdjwj")
    public suspend fun platform(`value`: PlatformPropertiesArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.platform = mapped
    }

    /**
     * @param argument The platform properties against which the run has to happen.
     */
    @JvmName("rjxyouiibfaadbeb")
    public suspend fun platform(argument: suspend PlatformPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = PlatformPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.platform = mapped
    }

    /**
     * @param value The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository.
     * If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API.
     */
    @JvmName("rsdiaafqrpbistlm")
    public suspend fun sourceLocation(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceLocation = mapped
    }

    /**
     * @param value The name of the target build stage for the docker build.
     */
    @JvmName("upfybyjbwqpaicup")
    public suspend fun target(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.target = mapped
    }

    /**
     * @param value Run timeout in seconds.
     */
    @JvmName("rqtvrkyinnhssebq")
    public suspend fun timeout(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeout = mapped
    }

    /**
     * @param value The type of the run request.
     * Expected value is 'DockerBuildRequest'.
     */
    @JvmName("rkmfvnxfpudpstge")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): DockerBuildRequestArgs = DockerBuildRequestArgs(
        agentConfiguration = agentConfiguration,
        agentPoolName = agentPoolName,
        arguments = arguments,
        credentials = credentials,
        dockerFilePath = dockerFilePath ?: throw PulumiNullFieldException("dockerFilePath"),
        imageNames = imageNames,
        isArchiveEnabled = isArchiveEnabled,
        isPushEnabled = isPushEnabled,
        logTemplate = logTemplate,
        noCache = noCache,
        platform = platform ?: throw PulumiNullFieldException("platform"),
        sourceLocation = sourceLocation,
        target = target,
        timeout = timeout,
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy