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

com.pulumi.kubernetes.rbac.v1.kotlin.outputs.Subject.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.rbac.v1.kotlin.outputs

import kotlin.String
import kotlin.Suppress

/**
 * 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 Subject(
    public val apiGroup: String? = null,
    public val kind: String,
    public val name: String,
    public val namespace: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.rbac.v1.outputs.Subject): Subject = Subject(
            apiGroup = javaType.apiGroup().map({ args0 -> args0 }).orElse(null),
            kind = javaType.kind(),
            name = javaType.name(),
            namespace = javaType.namespace().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy