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

com.pulumi.kubernetes.flowcontrol.v1beta2.kotlin.inputs.SubjectPatchArgs.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: 4.18.2.0
Show 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.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.flowcontrol.v1beta2.inputs.SubjectPatchArgs.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 SubjectPatchArgs(
    public val group: Output? = null,
    public val kind: Output? = null,
    public val serviceAccount: Output? = null,
    public val user: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.flowcontrol.v1beta2.inputs.SubjectPatchArgs =
        com.pulumi.kubernetes.flowcontrol.v1beta2.inputs.SubjectPatchArgs.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 [SubjectPatchArgs].
 */
@PulumiTagMarker
public class SubjectPatchArgsBuilder 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("frmjsiigweeiqslr")
    public suspend fun group(`value`: Output) {
        this.group = value
    }

    /**
     * @param value `kind` indicates which one of the other fields is non-empty. Required
     */
    @JvmName("qqfbcqbusadvwakg")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

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

    /**
     * @param value `user` matches based on username.
     */
    @JvmName("kbitbnpcujobtpjj")
    public suspend fun user(`value`: Output) {
        this.user = value
    }

    /**
     * @param value `group` matches based on user group name.
     */
    @JvmName("tihpbhoknvkumvqh")
    public suspend fun group(`value`: GroupSubjectPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.group = mapped
    }

    /**
     * @param argument `group` matches based on user group name.
     */
    @JvmName("sgmfglewbknwfijb")
    public suspend fun group(argument: suspend GroupSubjectPatchArgsBuilder.() -> Unit) {
        val toBeMapped = GroupSubjectPatchArgsBuilder().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("vgdgwbenmrecvstb")
    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("tbdvwmjyditjbbgm")
    public suspend fun serviceAccount(`value`: ServiceAccountSubjectPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccount = mapped
    }

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

    /**
     * @param value `user` matches based on username.
     */
    @JvmName("optbvaukgttsxhnt")
    public suspend fun user(`value`: UserSubjectPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.user = mapped
    }

    /**
     * @param argument `user` matches based on username.
     */
    @JvmName("rdkayyytjknpbggg")
    public suspend fun user(argument: suspend UserSubjectPatchArgsBuilder.() -> Unit) {
        val toBeMapped = UserSubjectPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.user = mapped
    }

    internal fun build(): SubjectPatchArgs = SubjectPatchArgs(
        group = group,
        kind = kind,
        serviceAccount = serviceAccount,
        user = user,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy