com.pulumi.kubernetes.flowcontrol.v1beta2.kotlin.inputs.SubjectArgs.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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.flowcontrol.v1beta2.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.flowcontrol.v1beta2.inputs.SubjectArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.
* @property group `group` matches based on user group name.
* @property kind `kind` indicates which one of the other fields is non-empty. Required
* @property serviceAccount `serviceAccount` matches ServiceAccounts.
* @property user `user` matches based on username.
*/
public data class SubjectArgs(
public val group: Output? = null,
public val kind: Output,
public val serviceAccount: Output? = null,
public val user: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.flowcontrol.v1beta2.inputs.SubjectArgs =
com.pulumi.kubernetes.flowcontrol.v1beta2.inputs.SubjectArgs.builder()
.group(group?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.kind(kind.applyValue({ args0 -> args0 }))
.serviceAccount(serviceAccount?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.user(user?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [SubjectArgs].
*/
@PulumiTagMarker
public class SubjectArgsBuilder internal constructor() {
private var group: Output? = null
private var kind: Output? = null
private var serviceAccount: Output? = null
private var user: Output? = null
/**
* @param value `group` matches based on user group name.
*/
@JvmName("fgebcgfwadsdaung")
public suspend fun group(`value`: Output) {
this.group = value
}
/**
* @param value `kind` indicates which one of the other fields is non-empty. Required
*/
@JvmName("epucrawewpbkyudd")
public suspend fun kind(`value`: Output) {
this.kind = value
}
/**
* @param value `serviceAccount` matches ServiceAccounts.
*/
@JvmName("sdspjbrqvgcfuyxy")
public suspend fun serviceAccount(`value`: Output) {
this.serviceAccount = value
}
/**
* @param value `user` matches based on username.
*/
@JvmName("fadksxkefokwxvtr")
public suspend fun user(`value`: Output) {
this.user = value
}
/**
* @param value `group` matches based on user group name.
*/
@JvmName("tvyekivaxjcunlgl")
public suspend fun group(`value`: GroupSubjectArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.group = mapped
}
/**
* @param argument `group` matches based on user group name.
*/
@JvmName("ayjwigekafrbvsxf")
public suspend fun group(argument: suspend GroupSubjectArgsBuilder.() -> Unit) {
val toBeMapped = GroupSubjectArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.group = mapped
}
/**
* @param value `kind` indicates which one of the other fields is non-empty. Required
*/
@JvmName("koqfamumimtrptak")
public suspend fun kind(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value `serviceAccount` matches ServiceAccounts.
*/
@JvmName("xwcjytnidbdcrprx")
public suspend fun serviceAccount(`value`: ServiceAccountSubjectArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceAccount = mapped
}
/**
* @param argument `serviceAccount` matches ServiceAccounts.
*/
@JvmName("onisqoppdhjrcxhe")
public suspend fun serviceAccount(argument: suspend ServiceAccountSubjectArgsBuilder.() -> Unit) {
val toBeMapped = ServiceAccountSubjectArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.serviceAccount = mapped
}
/**
* @param value `user` matches based on username.
*/
@JvmName("xmktdaxcqrnnuasw")
public suspend fun user(`value`: UserSubjectArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.user = mapped
}
/**
* @param argument `user` matches based on username.
*/
@JvmName("mabpqwrupaclovoe")
public suspend fun user(argument: suspend UserSubjectArgsBuilder.() -> Unit) {
val toBeMapped = UserSubjectArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.user = mapped
}
internal fun build(): SubjectArgs = SubjectArgs(
group = group,
kind = kind ?: throw PulumiNullFieldException("kind"),
serviceAccount = serviceAccount,
user = user,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy