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

com.pulumi.azurenative.compute.kotlin.inputs.CopyCompletionErrorArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.compute.kotlin.inputs

import com.pulumi.azurenative.compute.inputs.CopyCompletionErrorArgs.builder
import com.pulumi.azurenative.compute.kotlin.enums.CopyCompletionErrorReason
import com.pulumi.core.Either
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 kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Indicates the error details if the background copy of a resource created via the CopyStart operation fails.
 * @property errorCode Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
 * @property errorMessage Indicates the error message if the background copy of a resource created via the CopyStart operation fails.
 */
public data class CopyCompletionErrorArgs(
    public val errorCode: Output>,
    public val errorMessage: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.compute.inputs.CopyCompletionErrorArgs =
        com.pulumi.azurenative.compute.inputs.CopyCompletionErrorArgs.builder()
            .errorCode(
                errorCode.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .errorMessage(errorMessage.applyValue({ args0 -> args0 })).build()
}

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

    private var errorMessage: Output? = null

    /**
     * @param value Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
     */
    @JvmName("bqnbefberqctsljp")
    public suspend fun errorCode(`value`: Output>) {
        this.errorCode = value
    }

    /**
     * @param value Indicates the error message if the background copy of a resource created via the CopyStart operation fails.
     */
    @JvmName("nvxtthfamlqaitai")
    public suspend fun errorMessage(`value`: Output) {
        this.errorMessage = value
    }

    /**
     * @param value Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
     */
    @JvmName("jykyahpcoccxfnin")
    public suspend fun errorCode(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.errorCode = mapped
    }

    /**
     * @param value Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
     */
    @JvmName("ipctplaaxdytvavd")
    public fun errorCode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.errorCode = mapped
    }

    /**
     * @param value Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
     */
    @JvmName("tqggaqxyhlfijxby")
    public fun errorCode(`value`: CopyCompletionErrorReason) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.errorCode = mapped
    }

    /**
     * @param value Indicates the error message if the background copy of a resource created via the CopyStart operation fails.
     */
    @JvmName("dkorgculifdytqnv")
    public suspend fun errorMessage(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.errorMessage = mapped
    }

    internal fun build(): CopyCompletionErrorArgs = CopyCompletionErrorArgs(
        errorCode = errorCode ?: throw PulumiNullFieldException("errorCode"),
        errorMessage = errorMessage ?: throw PulumiNullFieldException("errorMessage"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy