com.pulumi.kubernetes.auditregistration.v1alpha1.kotlin.inputs.AuditSinkSpecArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.auditregistration.v1alpha1.kotlin.inputs
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 com.pulumi.kubernetes.auditregistration.v1alpha1.inputs.AuditSinkSpecArgs.builder
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* AuditSinkSpec holds the spec for the audit sink
* @property policy Policy defines the policy for selecting which events should be sent to the webhook required
* @property webhook Webhook to send events required
*/
public data class AuditSinkSpecArgs(
public val policy: Output,
public val webhook: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.auditregistration.v1alpha1.inputs.AuditSinkSpecArgs =
com.pulumi.kubernetes.auditregistration.v1alpha1.inputs.AuditSinkSpecArgs.builder()
.policy(policy.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.webhook(webhook.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [AuditSinkSpecArgs].
*/
@PulumiTagMarker
public class AuditSinkSpecArgsBuilder internal constructor() {
private var policy: Output? = null
private var webhook: Output? = null
/**
* @param value Policy defines the policy for selecting which events should be sent to the webhook required
*/
@JvmName("xollwcrvptawalwj")
public suspend fun policy(`value`: Output) {
this.policy = value
}
/**
* @param value Webhook to send events required
*/
@JvmName("kiasxlicsbnfbrgq")
public suspend fun webhook(`value`: Output) {
this.webhook = value
}
/**
* @param value Policy defines the policy for selecting which events should be sent to the webhook required
*/
@JvmName("qbxdkyhhjhmdmdhb")
public suspend fun policy(`value`: PolicyArgs) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.policy = mapped
}
/**
* @param argument Policy defines the policy for selecting which events should be sent to the webhook required
*/
@JvmName("yehyxswqkoivsbrx")
public suspend fun policy(argument: suspend PolicyArgsBuilder.() -> Unit) {
val toBeMapped = PolicyArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.policy = mapped
}
/**
* @param value Webhook to send events required
*/
@JvmName("jcocamaxkiduavbo")
public suspend fun webhook(`value`: WebhookArgs) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.webhook = mapped
}
/**
* @param argument Webhook to send events required
*/
@JvmName("gocqsyyalvfhisgh")
public suspend fun webhook(argument: suspend WebhookArgsBuilder.() -> Unit) {
val toBeMapped = WebhookArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.webhook = mapped
}
internal fun build(): AuditSinkSpecArgs = AuditSinkSpecArgs(
policy = policy ?: throw PulumiNullFieldException("policy"),
webhook = webhook ?: throw PulumiNullFieldException("webhook"),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy