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

com.pulumi.awsnative.gamelift.kotlin.MatchmakingRuleSet.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.gamelift.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

/**
 * Builder for [MatchmakingRuleSet].
 */
@PulumiTagMarker
public class MatchmakingRuleSetResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: MatchmakingRuleSetArgs = MatchmakingRuleSetArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend MatchmakingRuleSetArgsBuilder.() -> Unit) {
        val builder = MatchmakingRuleSetArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): MatchmakingRuleSet {
        val builtJavaResource =
            com.pulumi.awsnative.gamelift.MatchmakingRuleSet(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return MatchmakingRuleSet(builtJavaResource)
    }
}

/**
 * The AWS::GameLift::MatchmakingRuleSet resource creates an Amazon GameLift (GameLift) matchmaking rule set.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 */
public class MatchmakingRuleSet internal constructor(
    override val javaResource: com.pulumi.awsnative.gamelift.MatchmakingRuleSet,
) : KotlinCustomResource(javaResource, MatchmakingRuleSetMapper) {
    /**
     * The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift matchmaking rule set resource and uniquely identifies it.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds.
     */
    public val creationTime: Output
        get() = javaResource.creationTime().applyValue({ args0 -> args0 })

    /**
     * A unique identifier for the matchmaking rule set.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * A collection of matchmaking rules, formatted as a JSON string.
     */
    public val ruleSetBody: Output
        get() = javaResource.ruleSetBody().applyValue({ args0 -> args0 })

    /**
     * An array of key-value pairs to apply to this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object MatchmakingRuleSetMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.gamelift.MatchmakingRuleSet::class == javaResource::class

    override fun map(javaResource: Resource): MatchmakingRuleSet = MatchmakingRuleSet(
        javaResource as
            com.pulumi.awsnative.gamelift.MatchmakingRuleSet,
    )
}

/**
 * @see [MatchmakingRuleSet].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [MatchmakingRuleSet].
 */
public suspend fun matchmakingRuleSet(
    name: String,
    block: suspend MatchmakingRuleSetResourceBuilder.() -> Unit,
): MatchmakingRuleSet {
    val builder = MatchmakingRuleSetResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [MatchmakingRuleSet].
 * @param name The _unique_ name of the resulting resource.
 */
public fun matchmakingRuleSet(name: String): MatchmakingRuleSet {
    val builder = MatchmakingRuleSetResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy