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

com.pulumi.awsnative.xray.kotlin.SamplingRuleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.xray.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.xray.SamplingRuleArgs.builder
import com.pulumi.awsnative.xray.kotlin.inputs.SamplingRuleRecordArgs
import com.pulumi.awsnative.xray.kotlin.inputs.SamplingRuleRecordArgsBuilder
import com.pulumi.awsnative.xray.kotlin.inputs.SamplingRuleUpdateArgs
import com.pulumi.awsnative.xray.kotlin.inputs.SamplingRuleUpdateArgsBuilder
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

/**
 * This schema provides construct and validation rules for AWS-XRay SamplingRule resource parameters.
 * @property ruleName
 * @property samplingRule The sampling rule to be created or updated.
 * @property samplingRuleRecord
 * @property samplingRuleUpdate
 * @property tags An array of key-value pairs to apply to this resource.
 */
public data class SamplingRuleArgs(
    public val ruleName: Output? = null,
    public val samplingRule: Output? = null,
    public val samplingRuleRecord: Output? = null,
    public val samplingRuleUpdate: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.xray.SamplingRuleArgs =
        com.pulumi.awsnative.xray.SamplingRuleArgs.builder()
            .ruleName(ruleName?.applyValue({ args0 -> args0 }))
            .samplingRule(samplingRule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .samplingRuleRecord(
                samplingRuleRecord?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .samplingRuleUpdate(
                samplingRuleUpdate?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [SamplingRuleArgs].
 */
@PulumiTagMarker
public class SamplingRuleArgsBuilder internal constructor() {
    private var ruleName: Output? = null

    private var samplingRule: Output? = null

    private var samplingRuleRecord: Output? = null

    private var samplingRuleUpdate: Output? = null

    private var tags: Output>? = null

    /**
     * @param value
     */
    @JvmName("jlfbaabbmejqvqpp")
    public suspend fun ruleName(`value`: Output) {
        this.ruleName = value
    }

    /**
     * @param value The sampling rule to be created or updated.
     */
    @JvmName("jmqigkuwbljpnswv")
    public suspend fun samplingRule(`value`: Output) {
        this.samplingRule = value
    }

    /**
     * @param value
     */
    @JvmName("ieygmrvxpuvcnaua")
    public suspend fun samplingRuleRecord(`value`: Output) {
        this.samplingRuleRecord = value
    }

    /**
     * @param value
     */
    @JvmName("uoimkubonarunlsc")
    public suspend fun samplingRuleUpdate(`value`: Output) {
        this.samplingRuleUpdate = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("mnpyuheaeurrqwvm")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("indopirjqrlignwo")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("lllrxtfjjecqlcqs")
    public suspend fun ruleName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ruleName = mapped
    }

    /**
     * @param value The sampling rule to be created or updated.
     */
    @JvmName("onpmibyqtnlqmhfg")
    public suspend fun samplingRule(`value`: com.pulumi.awsnative.xray.kotlin.inputs.SamplingRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.samplingRule = mapped
    }

    /**
     * @param argument The sampling rule to be created or updated.
     */
    @JvmName("uevkxcimvvukrptb")
    public suspend fun samplingRule(argument: suspend com.pulumi.awsnative.xray.kotlin.inputs.SamplingRuleArgsBuilder.() -> Unit) {
        val toBeMapped = com.pulumi.awsnative.xray.kotlin.inputs.SamplingRuleArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.samplingRule = mapped
    }

    /**
     * @param value
     */
    @JvmName("dfuuvwoupbehygis")
    public suspend fun samplingRuleRecord(`value`: SamplingRuleRecordArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.samplingRuleRecord = mapped
    }

    /**
     * @param argument
     */
    @JvmName("dngucgodretdbqxt")
    public suspend fun samplingRuleRecord(argument: suspend SamplingRuleRecordArgsBuilder.() -> Unit) {
        val toBeMapped = SamplingRuleRecordArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.samplingRuleRecord = mapped
    }

    /**
     * @param value
     */
    @JvmName("lanmtqmxqysvaeou")
    public suspend fun samplingRuleUpdate(`value`: SamplingRuleUpdateArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.samplingRuleUpdate = mapped
    }

    /**
     * @param argument
     */
    @JvmName("biyvfipqfoxxhbuf")
    public suspend fun samplingRuleUpdate(argument: suspend SamplingRuleUpdateArgsBuilder.() -> Unit) {
        val toBeMapped = SamplingRuleUpdateArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.samplingRuleUpdate = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("ekrpwdcrkkxewlsy")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("xifxtctdsprmffnf")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("irepxloqnwckbtnv")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("savpheinsdklfeod")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("cvnlfmgctdwyamhj")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): SamplingRuleArgs = SamplingRuleArgs(
        ruleName = ruleName,
        samplingRule = samplingRule,
        samplingRuleRecord = samplingRuleRecord,
        samplingRuleUpdate = samplingRuleUpdate,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy