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

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

import kotlin.Suppress
import kotlin.collections.List

/**
 * PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.
 * @property nonResourceRules `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.
 * @property resourceRules `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.
 * @property subjects subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.
 */
public data class PolicyRulesWithSubjectsPatch(
    public val nonResourceRules: List? = null,
    public val resourceRules: List? = null,
    public val subjects: List? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.flowcontrol.v1beta1.outputs.PolicyRulesWithSubjectsPatch): PolicyRulesWithSubjectsPatch = PolicyRulesWithSubjectsPatch(
            nonResourceRules = javaType.nonResourceRules().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.flowcontrol.v1beta1.kotlin.outputs.NonResourcePolicyRulePatch.Companion.toKotlin(args0)
                })
            }),
            resourceRules = javaType.resourceRules().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.flowcontrol.v1beta1.kotlin.outputs.ResourcePolicyRulePatch.Companion.toKotlin(args0)
                })
            }),
            subjects = javaType.subjects().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.flowcontrol.v1beta1.kotlin.outputs.SubjectPatch.Companion.toKotlin(args0)
                })
            }),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy