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

com.pulumi.azure.webpubsub.kotlin.inputs.HubEventHandlerArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.webpubsub.kotlin.inputs

import com.pulumi.azure.webpubsub.inputs.HubEventHandlerArgs.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

/**
 *
 * @property auth An `auth` block as defined below.
 * @property systemEvents Specifies the list of system events. Supported values are `connect`, `connected` and `disconnected`.
 * @property urlTemplate The Event Handler URL Template. Two predefined parameters `{hub}` and `{event}` are available to use in the template. The value of the EventHandler URL is dynamically calculated when the client request comes in. Example: `http://example.com/api/{hub}/{event}`.
 * @property userEventPattern Specifies the matching event names. There are 3 kind of patterns supported: * `*` matches any event name * `,` Combine multiple events with `,` for example `event1,event2`, it matches event `event1` and `event2` * The single event name, for example `event1`, it matches `event1`.
 */
public data class HubEventHandlerArgs(
    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.azure.webpubsub.inputs.HubEventHandlerArgs =
        com.pulumi.azure.webpubsub.inputs.HubEventHandlerArgs.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 [HubEventHandlerArgs].
 */
@PulumiTagMarker
public class HubEventHandlerArgsBuilder internal constructor() {
    private var auth: Output? = null

    private var systemEvents: Output>? = null

    private var urlTemplate: Output? = null

    private var userEventPattern: Output? = null

    /**
     * @param value An `auth` block as defined below.
     */
    @JvmName("oipnqpixylwddeyw")
    public suspend fun auth(`value`: Output) {
        this.auth = value
    }

    /**
     * @param value Specifies the list of system events. Supported values are `connect`, `connected` and `disconnected`.
     */
    @JvmName("yrxoepempuajebjk")
    public suspend fun systemEvents(`value`: Output>) {
        this.systemEvents = value
    }

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

    /**
     * @param values Specifies the list of system events. Supported values are `connect`, `connected` and `disconnected`.
     */
    @JvmName("gygbpxspkobxrmff")
    public suspend fun systemEvents(values: List>) {
        this.systemEvents = Output.all(values)
    }

    /**
     * @param value The Event Handler URL Template. Two predefined parameters `{hub}` and `{event}` are available to use in the template. The value of the EventHandler URL is dynamically calculated when the client request comes in. Example: `http://example.com/api/{hub}/{event}`.
     */
    @JvmName("gddfpxdknredcdhj")
    public suspend fun urlTemplate(`value`: Output) {
        this.urlTemplate = value
    }

    /**
     * @param value Specifies the matching event names. There are 3 kind of patterns supported: * `*` matches any event name * `,` Combine multiple events with `,` for example `event1,event2`, it matches event `event1` and `event2` * The single event name, for example `event1`, it matches `event1`.
     */
    @JvmName("rmkrvtcehpqwxioi")
    public suspend fun userEventPattern(`value`: Output) {
        this.userEventPattern = value
    }

    /**
     * @param value An `auth` block as defined below.
     */
    @JvmName("ccguioygukaukdgh")
    public suspend fun auth(`value`: HubEventHandlerAuthArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.auth = mapped
    }

    /**
     * @param argument An `auth` block as defined below.
     */
    @JvmName("cyjupmjqvmswfyxj")
    public suspend fun auth(argument: suspend HubEventHandlerAuthArgsBuilder.() -> Unit) {
        val toBeMapped = HubEventHandlerAuthArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.auth = mapped
    }

    /**
     * @param value Specifies the list of system events. Supported values are `connect`, `connected` and `disconnected`.
     */
    @JvmName("nykckuacfasmkijy")
    public suspend fun systemEvents(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.systemEvents = mapped
    }

    /**
     * @param values Specifies the list of system events. Supported values are `connect`, `connected` and `disconnected`.
     */
    @JvmName("ioeqgmilwfngusoa")
    public suspend fun systemEvents(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.systemEvents = mapped
    }

    /**
     * @param value The Event Handler URL Template. Two predefined parameters `{hub}` and `{event}` are available to use in the template. The value of the EventHandler URL is dynamically calculated when the client request comes in. Example: `http://example.com/api/{hub}/{event}`.
     */
    @JvmName("abmdbavcgxesyoua")
    public suspend fun urlTemplate(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.urlTemplate = mapped
    }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy