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

com.pulumi.azurenative.webpubsub.kotlin.inputs.WebPubSubHubPropertiesArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.webpubsub.kotlin.inputs

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

/**
 * Properties of a hub.
 * @property anonymousConnectPolicy The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny".
 * @property eventHandlers Event handler of a hub.
 * @property eventListeners Event listener settings for forwarding your client events to listeners.
 * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients.
 * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter.
 * Maximum count of event listeners among all hubs is 10.
 */
public data class WebPubSubHubPropertiesArgs(
    public val anonymousConnectPolicy: Output? = null,
    public val eventHandlers: Output>? = null,
    public val eventListeners: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.webpubsub.inputs.WebPubSubHubPropertiesArgs =
        com.pulumi.azurenative.webpubsub.inputs.WebPubSubHubPropertiesArgs.builder()
            .anonymousConnectPolicy(anonymousConnectPolicy?.applyValue({ args0 -> args0 }))
            .eventHandlers(
                eventHandlers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .eventListeners(
                eventListeners?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [WebPubSubHubPropertiesArgs].
 */
@PulumiTagMarker
public class WebPubSubHubPropertiesArgsBuilder internal constructor() {
    private var anonymousConnectPolicy: Output? = null

    private var eventHandlers: Output>? = null

    private var eventListeners: Output>? = null

    /**
     * @param value The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny".
     */
    @JvmName("pdbeqvqlbihooymk")
    public suspend fun anonymousConnectPolicy(`value`: Output) {
        this.anonymousConnectPolicy = value
    }

    /**
     * @param value Event handler of a hub.
     */
    @JvmName("btlmxnpauhawmkxh")
    public suspend fun eventHandlers(`value`: Output>) {
        this.eventHandlers = value
    }

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

    /**
     * @param values Event handler of a hub.
     */
    @JvmName("wggadnnnchgdkbvq")
    public suspend fun eventHandlers(values: List>) {
        this.eventHandlers = Output.all(values)
    }

    /**
     * @param value Event listener settings for forwarding your client events to listeners.
     * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients.
     * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter.
     * Maximum count of event listeners among all hubs is 10.
     */
    @JvmName("wkrvitovwqrbjdaw")
    public suspend fun eventListeners(`value`: Output>) {
        this.eventListeners = value
    }

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

    /**
     * @param values Event listener settings for forwarding your client events to listeners.
     * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients.
     * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter.
     * Maximum count of event listeners among all hubs is 10.
     */
    @JvmName("mhdausatofbctmqc")
    public suspend fun eventListeners(values: List>) {
        this.eventListeners = Output.all(values)
    }

    /**
     * @param value The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny".
     */
    @JvmName("mxutiwlffqmehtbc")
    public suspend fun anonymousConnectPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.anonymousConnectPolicy = mapped
    }

    /**
     * @param value Event handler of a hub.
     */
    @JvmName("ihlrgeqvaktecshf")
    public suspend fun eventHandlers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventHandlers = mapped
    }

    /**
     * @param argument Event handler of a hub.
     */
    @JvmName("daeuinmbobhynsjl")
    public suspend fun eventHandlers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EventHandlerArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.eventHandlers = mapped
    }

    /**
     * @param argument Event handler of a hub.
     */
    @JvmName("tsipmitssitjkywq")
    public suspend fun eventHandlers(vararg argument: suspend EventHandlerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EventHandlerArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.eventHandlers = mapped
    }

    /**
     * @param argument Event handler of a hub.
     */
    @JvmName("jpcweknwwoxadvbb")
    public suspend fun eventHandlers(argument: suspend EventHandlerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EventHandlerArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.eventHandlers = mapped
    }

    /**
     * @param values Event handler of a hub.
     */
    @JvmName("ebulkvndarqscufq")
    public suspend fun eventHandlers(vararg values: EventHandlerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.eventHandlers = mapped
    }

    /**
     * @param value Event listener settings for forwarding your client events to listeners.
     * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients.
     * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter.
     * Maximum count of event listeners among all hubs is 10.
     */
    @JvmName("satkewlbhhbtjpcx")
    public suspend fun eventListeners(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventListeners = mapped
    }

    /**
     * @param argument Event listener settings for forwarding your client events to listeners.
     * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients.
     * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter.
     * Maximum count of event listeners among all hubs is 10.
     */
    @JvmName("trxdabdcyfrlnigt")
    public suspend fun eventListeners(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EventListenerArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.eventListeners = mapped
    }

    /**
     * @param argument Event listener settings for forwarding your client events to listeners.
     * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients.
     * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter.
     * Maximum count of event listeners among all hubs is 10.
     */
    @JvmName("theouywxqguwbthr")
    public suspend fun eventListeners(vararg argument: suspend EventListenerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EventListenerArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.eventListeners = mapped
    }

    /**
     * @param argument Event listener settings for forwarding your client events to listeners.
     * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients.
     * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter.
     * Maximum count of event listeners among all hubs is 10.
     */
    @JvmName("mmoibvogpioyaodt")
    public suspend fun eventListeners(argument: suspend EventListenerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EventListenerArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.eventListeners = mapped
    }

    /**
     * @param values Event listener settings for forwarding your client events to listeners.
     * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients.
     * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter.
     * Maximum count of event listeners among all hubs is 10.
     */
    @JvmName("nhlsjacomfmwxmer")
    public suspend fun eventListeners(vararg values: EventListenerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.eventListeners = mapped
    }

    internal fun build(): WebPubSubHubPropertiesArgs = WebPubSubHubPropertiesArgs(
        anonymousConnectPolicy = anonymousConnectPolicy,
        eventHandlers = eventHandlers,
        eventListeners = eventListeners,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy