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

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

import kotlin.String
import kotlin.Suppress

/**
 * 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 Subject(
    public val group: GroupSubject? = null,
    public val kind: String,
    public val serviceAccount: ServiceAccountSubject? = null,
    public val user: UserSubject? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.flowcontrol.v1.outputs.Subject): Subject =
            Subject(
                group = javaType.group().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.kubernetes.flowcontrol.v1.kotlin.outputs.GroupSubject.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                kind = javaType.kind(),
                serviceAccount = javaType.serviceAccount().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.kubernetes.flowcontrol.v1.kotlin.outputs.ServiceAccountSubject.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                user = javaType.user().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.kubernetes.flowcontrol.v1.kotlin.outputs.UserSubject.Companion.toKotlin(args0)
                    })
                }).orElse(null),
            )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy