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

com.pulumi.azurenative.webpubsub.kotlin.inputs.EventHandlerArgs.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.webpubsub.kotlin.inputs

import com.pulumi.azurenative.webpubsub.inputs.EventHandlerArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Properties of event handler.
 * @property auth Upstream auth settings. If not set, no auth is used for upstream messages.
 * @property systemEvents Gets or sets the list of system events.
 * @property urlTemplate Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in.
 * For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't contains parameters.
 * @property userEventPattern Gets or sets the matching pattern for event names.
 * There are 3 kinds of patterns supported:
 *     1. "*", it matches any event name
 *     2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
 *     3. A single event name, for example, "event1", it matches "event1"
 */
public data class EventHandlerArgs(
    public val auth: Output? = null,
    public val systemEvents: Output>? = null,
    public val urlTemplate: Output,
    public val userEventPattern: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.webpubsub.inputs.EventHandlerArgs =
        com.pulumi.azurenative.webpubsub.inputs.EventHandlerArgs.builder()
            .auth(auth?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .systemEvents(systemEvents?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .urlTemplate(urlTemplate.applyValue({ args0 -> args0 }))
            .userEventPattern(userEventPattern?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EventHandlerArgs].
 */
@PulumiTagMarker
public class EventHandlerArgsBuilder internal constructor() {
    private var auth: Output? = null

    private var systemEvents: Output>? = null

    private var urlTemplate: Output? = null

    private var userEventPattern: Output? = null

    /**
     * @param value Upstream auth settings. If not set, no auth is used for upstream messages.
     */
    @JvmName("phwhtafmfeqgturi")
    public suspend fun auth(`value`: Output) {
        this.auth = value
    }

    /**
     * @param value Gets or sets the list of system events.
     */
    @JvmName("ilotvpbsfhmeuojy")
    public suspend fun systemEvents(`value`: Output>) {
        this.systemEvents = value
    }

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

    /**
     * @param values Gets or sets the list of system events.
     */
    @JvmName("houfuuexdslxptco")
    public suspend fun systemEvents(values: List>) {
        this.systemEvents = Output.all(values)
    }

    /**
     * @param value Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in.
     * For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't contains parameters.
     */
    @JvmName("muvsbdfydftdqbmw")
    public suspend fun urlTemplate(`value`: Output) {
        this.urlTemplate = value
    }

    /**
     * @param value Gets or sets the matching pattern for event names.
     * There are 3 kinds of patterns supported:
     *     1. "*", it matches any event name
     *     2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
     *     3. A single event name, for example, "event1", it matches "event1"
     */
    @JvmName("mrvppafhrmhxrrhi")
    public suspend fun userEventPattern(`value`: Output) {
        this.userEventPattern = value
    }

    /**
     * @param value Upstream auth settings. If not set, no auth is used for upstream messages.
     */
    @JvmName("bfcrtbwgqwhgosri")
    public suspend fun auth(`value`: UpstreamAuthSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.auth = mapped
    }

    /**
     * @param argument Upstream auth settings. If not set, no auth is used for upstream messages.
     */
    @JvmName("ptroxlbldcwfhkfw")
    public suspend fun auth(argument: suspend UpstreamAuthSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = UpstreamAuthSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.auth = mapped
    }

    /**
     * @param value Gets or sets the list of system events.
     */
    @JvmName("vargyecgxsvteeup")
    public suspend fun systemEvents(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.systemEvents = mapped
    }

    /**
     * @param values Gets or sets the list of system events.
     */
    @JvmName("wqtjvhjotlvfatsg")
    public suspend fun systemEvents(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.systemEvents = mapped
    }

    /**
     * @param value Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in.
     * For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't contains parameters.
     */
    @JvmName("ummsylmcytllqvbs")
    public suspend fun urlTemplate(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.urlTemplate = mapped
    }

    /**
     * @param value Gets or sets the matching pattern for event names.
     * There are 3 kinds of patterns supported:
     *     1. "*", it matches any event name
     *     2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
     *     3. A single event name, for example, "event1", it matches "event1"
     */
    @JvmName("xmslelfrrlhbgbch")
    public suspend fun userEventPattern(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userEventPattern = mapped
    }

    internal fun build(): EventHandlerArgs = EventHandlerArgs(
        auth = auth,
        systemEvents = systemEvents,
        urlTemplate = urlTemplate ?: throw PulumiNullFieldException("urlTemplate"),
        userEventPattern = userEventPattern,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy