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

com.pulumi.gcp.container.kotlin.inputs.ClusterNotificationConfigPubsubArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.container.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.container.inputs.ClusterNotificationConfigPubsubArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property enabled Whether or not the notification config is enabled
 * @property filter Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Structure is documented below.
 * @property topic The pubsub topic to push upgrade notifications to. Must be in the same project as the cluster. Must be in the format: `projects/{project}/topics/{topic}`.
 */
public data class ClusterNotificationConfigPubsubArgs(
    public val enabled: Output,
    public val filter: Output? = null,
    public val topic: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.container.inputs.ClusterNotificationConfigPubsubArgs =
        com.pulumi.gcp.container.inputs.ClusterNotificationConfigPubsubArgs.builder()
            .enabled(enabled.applyValue({ args0 -> args0 }))
            .filter(filter?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .topic(topic?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ClusterNotificationConfigPubsubArgs].
 */
@PulumiTagMarker
public class ClusterNotificationConfigPubsubArgsBuilder internal constructor() {
    private var enabled: Output? = null

    private var filter: Output? = null

    private var topic: Output? = null

    /**
     * @param value Whether or not the notification config is enabled
     */
    @JvmName("jammubrkuesqicyx")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Structure is documented below.
     */
    @JvmName("jwhqijgvchhquypr")
    public suspend fun filter(`value`: Output) {
        this.filter = value
    }

    /**
     * @param value The pubsub topic to push upgrade notifications to. Must be in the same project as the cluster. Must be in the format: `projects/{project}/topics/{topic}`.
     */
    @JvmName("otrnoaeinblwvuhv")
    public suspend fun topic(`value`: Output) {
        this.topic = value
    }

    /**
     * @param value Whether or not the notification config is enabled
     */
    @JvmName("iaxnhcjcinnpeqfe")
    public suspend fun enabled(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Structure is documented below.
     */
    @JvmName("khpihlepyutklynk")
    public suspend fun filter(`value`: ClusterNotificationConfigPubsubFilterArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filter = mapped
    }

    /**
     * @param argument Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Structure is documented below.
     */
    @JvmName("vsmufjejtcdsmsvo")
    public suspend fun filter(argument: suspend ClusterNotificationConfigPubsubFilterArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterNotificationConfigPubsubFilterArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.filter = mapped
    }

    /**
     * @param value The pubsub topic to push upgrade notifications to. Must be in the same project as the cluster. Must be in the format: `projects/{project}/topics/{topic}`.
     */
    @JvmName("sskbvnsepwvuynih")
    public suspend fun topic(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.topic = mapped
    }

    internal fun build(): ClusterNotificationConfigPubsubArgs = ClusterNotificationConfigPubsubArgs(
        enabled = enabled ?: throw PulumiNullFieldException("enabled"),
        filter = filter,
        topic = topic,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy