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

com.pulumi.azurenative.monitor.kotlin.inputs.ServiceArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.monitor.kotlin.inputs

import com.pulumi.azurenative.monitor.inputs.ServiceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Service Info.
 * @property persistence Persistence options to all pipelines in the instance.
 * @property pipelines Pipelines belonging to a given pipeline group.
 */
public data class ServiceArgs(
    public val persistence: Output? = null,
    public val pipelines: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.monitor.inputs.ServiceArgs =
        com.pulumi.azurenative.monitor.inputs.ServiceArgs.builder()
            .persistence(persistence?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .pipelines(
                pipelines.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ServiceArgs].
 */
@PulumiTagMarker
public class ServiceArgsBuilder internal constructor() {
    private var persistence: Output? = null

    private var pipelines: Output>? = null

    /**
     * @param value Persistence options to all pipelines in the instance.
     */
    @JvmName("potkfkworchkfkas")
    public suspend fun persistence(`value`: Output) {
        this.persistence = value
    }

    /**
     * @param value Pipelines belonging to a given pipeline group.
     */
    @JvmName("snnalsfdcsnxosur")
    public suspend fun pipelines(`value`: Output>) {
        this.pipelines = value
    }

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

    /**
     * @param values Pipelines belonging to a given pipeline group.
     */
    @JvmName("syjowneyaqcqtctu")
    public suspend fun pipelines(values: List>) {
        this.pipelines = Output.all(values)
    }

    /**
     * @param value Persistence options to all pipelines in the instance.
     */
    @JvmName("ymhnwlpsgerdejsk")
    public suspend fun persistence(`value`: PersistenceConfigurationsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.persistence = mapped
    }

    /**
     * @param argument Persistence options to all pipelines in the instance.
     */
    @JvmName("ffrweeapugdittmf")
    public suspend fun persistence(argument: suspend PersistenceConfigurationsArgsBuilder.() -> Unit) {
        val toBeMapped = PersistenceConfigurationsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.persistence = mapped
    }

    /**
     * @param value Pipelines belonging to a given pipeline group.
     */
    @JvmName("ftegntqkyrtsmibw")
    public suspend fun pipelines(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pipelines = mapped
    }

    /**
     * @param argument Pipelines belonging to a given pipeline group.
     */
    @JvmName("sodaoltwgwfmsptu")
    public suspend fun pipelines(argument: List Unit>) {
        val toBeMapped = argument.toList().map { PipelineArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.pipelines = mapped
    }

    /**
     * @param argument Pipelines belonging to a given pipeline group.
     */
    @JvmName("bjupwktggvggmmeu")
    public suspend fun pipelines(vararg argument: suspend PipelineArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { PipelineArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.pipelines = mapped
    }

    /**
     * @param argument Pipelines belonging to a given pipeline group.
     */
    @JvmName("ttitodepjlubiglu")
    public suspend fun pipelines(argument: suspend PipelineArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(PipelineArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.pipelines = mapped
    }

    /**
     * @param values Pipelines belonging to a given pipeline group.
     */
    @JvmName("lbgknpykmjsjqqce")
    public suspend fun pipelines(vararg values: PipelineArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pipelines = mapped
    }

    internal fun build(): ServiceArgs = ServiceArgs(
        persistence = persistence,
        pipelines = pipelines ?: throw PulumiNullFieldException("pipelines"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy