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

com.pulumi.kubernetes.flowcontrol.v1beta1.kotlin.inputs.SubjectArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.flowcontrol.v1beta1.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.v1beta1.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
 * @property kind Required
 * @property serviceAccount
 * @property user
 */
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.v1beta1.inputs.SubjectArgs =
        com.pulumi.kubernetes.flowcontrol.v1beta1.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
     */
    @JvmName("vancrojmvjyddmji")
    public suspend fun group(`value`: Output) {
        this.group = value
    }

    /**
     * @param value Required
     */
    @JvmName("dhpwdhxqxwrvijpj")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value
     */
    @JvmName("dfoxixgjeidswvkv")
    public suspend fun serviceAccount(`value`: Output) {
        this.serviceAccount = value
    }

    /**
     * @param value
     */
    @JvmName("pxycwgpagfjkqsqk")
    public suspend fun user(`value`: Output) {
        this.user = value
    }

    /**
     * @param value
     */
    @JvmName("mharniledkenbsbh")
    public suspend fun group(`value`: GroupSubjectArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.group = mapped
    }

    /**
     * @param argument
     */
    @JvmName("ulvkuggtnmmoqiyh")
    public suspend fun group(argument: suspend GroupSubjectArgsBuilder.() -> Unit) {
        val toBeMapped = GroupSubjectArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.group = mapped
    }

    /**
     * @param value Required
     */
    @JvmName("usqyrjbvgnlwrwkv")
    public suspend fun kind(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value
     */
    @JvmName("drypioixgvsjbvcs")
    public suspend fun serviceAccount(`value`: ServiceAccountSubjectArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccount = mapped
    }

    /**
     * @param argument
     */
    @JvmName("kiinuweluswsmdoj")
    public suspend fun serviceAccount(argument: suspend ServiceAccountSubjectArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceAccountSubjectArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.serviceAccount = mapped
    }

    /**
     * @param value
     */
    @JvmName("sjbneffluntcrnik")
    public suspend fun user(`value`: UserSubjectArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.user = mapped
    }

    /**
     * @param argument
     */
    @JvmName("cxchggipjjrvlehc")
    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