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

com.pulumi.azurenative.machinelearningservices.kotlin.inputs.NotificationSettingArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.machinelearningservices.kotlin.inputs

import com.pulumi.azurenative.machinelearningservices.inputs.NotificationSettingArgs.builder
import com.pulumi.azurenative.machinelearningservices.kotlin.enums.EmailNotificationEnableType
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.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Configuration for notification.
 * @property emailOn Send email notification to user on specified notification type
 * @property emails This is the email recipient list which has a limitation of 499 characters in total concat with comma separator
 * @property webhooks Send webhook callback to a service. Key is a user-provided name for the webhook.
 */
public data class NotificationSettingArgs(
    public val emailOn: Output>>? = null,
    public val emails: Output>? = null,
    public val webhooks: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearningservices.inputs.NotificationSettingArgs =
        com.pulumi.azurenative.machinelearningservices.inputs.NotificationSettingArgs.builder()
            .emailOn(
                emailOn?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform(
                            { args0 -> args0 },
                            { args0 -> args0.let({ args0 -> args0.toJava() }) },
                        )
                    })
                }),
            )
            .emails(emails?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .webhooks(
                webhooks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            ).build()
}

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

    private var emails: Output>? = null

    private var webhooks: Output>? = null

    /**
     * @param value Send email notification to user on specified notification type
     */
    @JvmName("curhdlixdltcexrn")
    public suspend fun emailOn(`value`: Output>>) {
        this.emailOn = value
    }

    @JvmName("gdvcvqresdrakotj")
    public suspend fun emailOn(vararg values: Output>) {
        this.emailOn = Output.all(values.asList())
    }

    /**
     * @param values Send email notification to user on specified notification type
     */
    @JvmName("auejqjefgneskppp")
    public suspend fun emailOn(values: List>>) {
        this.emailOn = Output.all(values)
    }

    /**
     * @param value This is the email recipient list which has a limitation of 499 characters in total concat with comma separator
     */
    @JvmName("yevkjooyekundsnr")
    public suspend fun emails(`value`: Output>) {
        this.emails = value
    }

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

    /**
     * @param values This is the email recipient list which has a limitation of 499 characters in total concat with comma separator
     */
    @JvmName("bnpolgyrbckrcvlc")
    public suspend fun emails(values: List>) {
        this.emails = Output.all(values)
    }

    /**
     * @param value Send webhook callback to a service. Key is a user-provided name for the webhook.
     */
    @JvmName("umxkmfnndykxvgss")
    public suspend fun webhooks(`value`: Output>) {
        this.webhooks = value
    }

    /**
     * @param value Send email notification to user on specified notification type
     */
    @JvmName("pracufycsbudyejs")
    public suspend fun emailOn(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.emailOn = mapped
    }

    /**
     * @param values Send email notification to user on specified notification type
     */
    @JvmName("ftvytvoawnhwwoqn")
    public suspend fun emailOn(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.emailOn = mapped
    }

    /**
     * @param value This is the email recipient list which has a limitation of 499 characters in total concat with comma separator
     */
    @JvmName("yygxpvvejuldfmbo")
    public suspend fun emails(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.emails = mapped
    }

    /**
     * @param values This is the email recipient list which has a limitation of 499 characters in total concat with comma separator
     */
    @JvmName("fnmxtcsswduhlwqk")
    public suspend fun emails(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.emails = mapped
    }

    /**
     * @param value Send webhook callback to a service. Key is a user-provided name for the webhook.
     */
    @JvmName("gbnjmclytklewpwh")
    public suspend fun webhooks(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.webhooks = mapped
    }

    /**
     * @param argument Send webhook callback to a service. Key is a user-provided name for the webhook.
     */
    @JvmName("dmxvappyapoaajmc")
    public suspend fun webhooks(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                AzureDevOpsWebhookArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.webhooks = mapped
    }

    /**
     * @param values Send webhook callback to a service. Key is a user-provided name for the webhook.
     */
    @JvmName("mhpmpiinphldvdpw")
    public fun webhooks(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.webhooks = mapped
    }

    internal fun build(): NotificationSettingArgs = NotificationSettingArgs(
        emailOn = emailOn,
        emails = emails,
        webhooks = webhooks,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy