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

com.pulumi.gcp.organizations.kotlin.inputs.GetIAMPolicyAuditConfig.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: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.organizations.kotlin.inputs

import com.pulumi.gcp.organizations.inputs.GetIAMPolicyAuditConfig.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property auditLogConfigs A nested block that defines the operations you'd like to log.
 * @property service Defines a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
 */
public data class GetIAMPolicyAuditConfig(
    public val auditLogConfigs: List,
    public val service: String,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.organizations.inputs.GetIAMPolicyAuditConfig =
        com.pulumi.gcp.organizations.inputs.GetIAMPolicyAuditConfig.builder()
            .auditLogConfigs(
                auditLogConfigs.let({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .service(service.let({ args0 -> args0 })).build()
}

/**
 * Builder for [GetIAMPolicyAuditConfig].
 */
@PulumiTagMarker
public class GetIAMPolicyAuditConfigBuilder internal constructor() {
    private var auditLogConfigs: List? = null

    private var service: String? = null

    /**
     * @param value A nested block that defines the operations you'd like to log.
     */
    @JvmName("jlbrwqqxeekttxvp")
    public suspend fun auditLogConfigs(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.auditLogConfigs = mapped
    }

    /**
     * @param argument A nested block that defines the operations you'd like to log.
     */
    @JvmName("lhkhsdywddtqyjkt")
    public suspend fun auditLogConfigs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GetIAMPolicyAuditConfigAuditLogConfigBuilder().applySuspend { it() }.build()
        }
        val mapped = toBeMapped
        this.auditLogConfigs = mapped
    }

    /**
     * @param argument A nested block that defines the operations you'd like to log.
     */
    @JvmName("jvplbbrupbiwsobm")
    public suspend fun auditLogConfigs(vararg argument: suspend GetIAMPolicyAuditConfigAuditLogConfigBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GetIAMPolicyAuditConfigAuditLogConfigBuilder().applySuspend { it() }.build()
        }
        val mapped = toBeMapped
        this.auditLogConfigs = mapped
    }

    /**
     * @param argument A nested block that defines the operations you'd like to log.
     */
    @JvmName("dglgpspylmxrhval")
    public suspend fun auditLogConfigs(argument: suspend GetIAMPolicyAuditConfigAuditLogConfigBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GetIAMPolicyAuditConfigAuditLogConfigBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = toBeMapped
        this.auditLogConfigs = mapped
    }

    /**
     * @param values A nested block that defines the operations you'd like to log.
     */
    @JvmName("bnnhkgjafbdbepjk")
    public suspend fun auditLogConfigs(vararg values: GetIAMPolicyAuditConfigAuditLogConfig) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.auditLogConfigs = mapped
    }

    /**
     * @param value Defines a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
     */
    @JvmName("gxkhxnpwmojigclp")
    public suspend fun service(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.service = mapped
    }

    internal fun build(): GetIAMPolicyAuditConfig = GetIAMPolicyAuditConfig(
        auditLogConfigs = auditLogConfigs ?: throw PulumiNullFieldException("auditLogConfigs"),
        service = service ?: throw PulumiNullFieldException("service"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy