com.pulumi.awsnative.ivschat.kotlin.Room.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ivschat.kotlin
import com.pulumi.awsnative.ivschat.kotlin.outputs.RoomMessageReviewHandler
import com.pulumi.awsnative.kotlin.outputs.Tag
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.ivschat.kotlin.outputs.RoomMessageReviewHandler.Companion.toKotlin as roomMessageReviewHandlerToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Room].
*/
@PulumiTagMarker
public class RoomResourceBuilder internal constructor() {
public var name: String? = null
public var args: RoomArgs = RoomArgs()
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 RoomArgsBuilder.() -> Unit) {
val builder = RoomArgsBuilder()
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(): Room {
val builtJavaResource = com.pulumi.awsnative.ivschat.Room(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Room(builtJavaResource)
}
}
/**
* Resource type definition for AWS::IVSChat::Room.
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class Room internal constructor(
override val javaResource: com.pulumi.awsnative.ivschat.Room,
) : KotlinCustomResource(javaResource, RoomMapper) {
/**
* Room ARN is automatically generated on creation and assigned as the unique identifier.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The system-generated ID of the room.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* Array of logging configuration identifiers attached to the room.
*/
public val loggingConfigurationIdentifiers: Output>?
get() = javaResource.loggingConfigurationIdentifiers().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* The maximum number of characters in a single message.
*/
public val maximumMessageLength: Output?
get() = javaResource.maximumMessageLength().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The maximum number of messages per second that can be sent to the room.
*/
public val maximumMessageRatePerSecond: Output?
get() = javaResource.maximumMessageRatePerSecond().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Configuration information for optional review of messages.
*/
public val messageReviewHandler: Output?
get() = javaResource.messageReviewHandler().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> roomMessageReviewHandlerToKotlin(args0) })
}).orElse(null)
})
/**
* The name of the room. The value does not need to be unique.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object RoomMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ivschat.Room::class == javaResource::class
override fun map(javaResource: Resource): Room = Room(
javaResource as
com.pulumi.awsnative.ivschat.Room,
)
}
/**
* @see [Room].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Room].
*/
public suspend fun room(name: String, block: suspend RoomResourceBuilder.() -> Unit): Room {
val builder = RoomResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Room].
* @param name The _unique_ name of the resulting resource.
*/
public fun room(name: String): Room {
val builder = RoomResourceBuilder()
builder.name(name)
return builder.build()
}