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

com.pulumi.kubernetes.rbac.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.

There is a newer version: 4.18.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.rbac.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.kubernetes.rbac.v1beta1.inputs.SubjectArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Subject contains a reference to the object or user identities a role binding applies to.  This can either hold a direct API object reference, or a value for non-objects such as user and group names.
 * @property apiGroup APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
 * @property kind Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
 * @property name Name of the object being referenced.
 * @property namespace Namespace of the referenced object.  If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.
 */
public data class SubjectArgs(
    public val apiGroup: Output? = null,
    public val kind: Output,
    public val name: Output,
    public val namespace: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.rbac.v1beta1.inputs.SubjectArgs =
        com.pulumi.kubernetes.rbac.v1beta1.inputs.SubjectArgs.builder()
            .apiGroup(apiGroup?.applyValue({ args0 -> args0 }))
            .kind(kind.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SubjectArgs].
 */
@PulumiTagMarker
public class SubjectArgsBuilder internal constructor() {
    private var apiGroup: Output? = null

    private var kind: Output? = null

    private var name: Output? = null

    private var namespace: Output? = null

    /**
     * @param value APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
     */
    @JvmName("cvweeaagyttlcwjl")
    public suspend fun apiGroup(`value`: Output) {
        this.apiGroup = value
    }

    /**
     * @param value Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
     */
    @JvmName("bmdkemauamddkjxb")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value Name of the object being referenced.
     */
    @JvmName("ihgwdekomibktvsw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Namespace of the referenced object.  If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.
     */
    @JvmName("gqpidusprkiimftw")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
     */
    @JvmName("emulbjrgltxqanap")
    public suspend fun apiGroup(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiGroup = mapped
    }

    /**
     * @param value Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
     */
    @JvmName("hponpnuuywpudotw")
    public suspend fun kind(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value Name of the object being referenced.
     */
    @JvmName("wmgnlwgcxyqcyvbk")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Namespace of the referenced object.  If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.
     */
    @JvmName("jnsjrvxrlgfsopvl")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    internal fun build(): SubjectArgs = SubjectArgs(
        apiGroup = apiGroup,
        kind = kind ?: throw PulumiNullFieldException("kind"),
        name = name ?: throw PulumiNullFieldException("name"),
        namespace = namespace,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy