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

com.pulumi.gcp.monitoring.kotlin.outputs.AlertPolicyAlertStrategy.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.monitoring.kotlin.outputs

import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property autoClose If an alert policy that was active has no data for this long, any open incidents will close.
 * @property notificationChannelStrategies Control over how the notification channels in `notification_channels`
 * are notified when this alert fires, on a per-channel basis.
 * Structure is documented below.
 * @property notificationPrompts Control when notifications will be sent out.
 * Each value may be one of: `NOTIFICATION_PROMPT_UNSPECIFIED`, `OPENED`, `CLOSED`.
 * @property notificationRateLimit Required for alert policies with a LogMatch condition.
 * This limit is not implemented for alert policies that are not log-based.
 * Structure is documented below.
 */
public data class AlertPolicyAlertStrategy(
    public val autoClose: String? = null,
    public val notificationChannelStrategies: List? = null,
    public val notificationPrompts: List? = null,
    public val notificationRateLimit: AlertPolicyAlertStrategyNotificationRateLimit? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.monitoring.outputs.AlertPolicyAlertStrategy): AlertPolicyAlertStrategy = AlertPolicyAlertStrategy(
            autoClose = javaType.autoClose().map({ args0 -> args0 }).orElse(null),
            notificationChannelStrategies = javaType.notificationChannelStrategies().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.monitoring.kotlin.outputs.AlertPolicyAlertStrategyNotificationChannelStrategy.Companion.toKotlin(args0)
                })
            }),
            notificationPrompts = javaType.notificationPrompts().map({ args0 -> args0 }),
            notificationRateLimit = javaType.notificationRateLimit().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.monitoring.kotlin.outputs.AlertPolicyAlertStrategyNotificationRateLimit.Companion.toKotlin(args0)
                })
            }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy