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

com.pulumi.azurenative.securityinsights.kotlin.inputs.EntityMappingArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.securityinsights.kotlin.inputs

import com.pulumi.azurenative.securityinsights.inputs.EntityMappingArgs.builder
import com.pulumi.azurenative.securityinsights.kotlin.enums.EntityMappingType
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
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

/**
 * Single entity mapping for the alert rule
 * @property entityType The V3 type of the mapped entity
 * @property fieldMappings array of field mappings for the given entity mapping
 */
public data class EntityMappingArgs(
    public val entityType: Output>? = null,
    public val fieldMappings: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.securityinsights.inputs.EntityMappingArgs =
        com.pulumi.azurenative.securityinsights.inputs.EntityMappingArgs.builder()
            .entityType(
                entityType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .fieldMappings(
                fieldMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [EntityMappingArgs].
 */
@PulumiTagMarker
public class EntityMappingArgsBuilder internal constructor() {
    private var entityType: Output>? = null

    private var fieldMappings: Output>? = null

    /**
     * @param value The V3 type of the mapped entity
     */
    @JvmName("rggxviqgbfpxyxuy")
    public suspend fun entityType(`value`: Output>) {
        this.entityType = value
    }

    /**
     * @param value array of field mappings for the given entity mapping
     */
    @JvmName("isnjkbrcnhaywolg")
    public suspend fun fieldMappings(`value`: Output>) {
        this.fieldMappings = value
    }

    @JvmName("uhawltjwantmpfkx")
    public suspend fun fieldMappings(vararg values: Output) {
        this.fieldMappings = Output.all(values.asList())
    }

    /**
     * @param values array of field mappings for the given entity mapping
     */
    @JvmName("pegmwxjawpasyqoy")
    public suspend fun fieldMappings(values: List>) {
        this.fieldMappings = Output.all(values)
    }

    /**
     * @param value The V3 type of the mapped entity
     */
    @JvmName("bqccxhlkdemrlrtf")
    public suspend fun entityType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.entityType = mapped
    }

    /**
     * @param value The V3 type of the mapped entity
     */
    @JvmName("gculsotvmdmdqxiq")
    public fun entityType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.entityType = mapped
    }

    /**
     * @param value The V3 type of the mapped entity
     */
    @JvmName("enehvcqddjvkvbgf")
    public fun entityType(`value`: EntityMappingType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.entityType = mapped
    }

    /**
     * @param value array of field mappings for the given entity mapping
     */
    @JvmName("ypnfuyrbdkdrbarp")
    public suspend fun fieldMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fieldMappings = mapped
    }

    /**
     * @param argument array of field mappings for the given entity mapping
     */
    @JvmName("wkyyymthhskaajii")
    public suspend fun fieldMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FieldMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.fieldMappings = mapped
    }

    /**
     * @param argument array of field mappings for the given entity mapping
     */
    @JvmName("emcujlxarjbwekym")
    public suspend fun fieldMappings(vararg argument: suspend FieldMappingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FieldMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.fieldMappings = mapped
    }

    /**
     * @param argument array of field mappings for the given entity mapping
     */
    @JvmName("grguffqrowlxcogk")
    public suspend fun fieldMappings(argument: suspend FieldMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(FieldMappingArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.fieldMappings = mapped
    }

    /**
     * @param values array of field mappings for the given entity mapping
     */
    @JvmName("vcjecjrhdhgemowl")
    public suspend fun fieldMappings(vararg values: FieldMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fieldMappings = mapped
    }

    internal fun build(): EntityMappingArgs = EntityMappingArgs(
        entityType = entityType,
        fieldMappings = fieldMappings,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy