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

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

package com.pulumi.awsnative.ivs.kotlin

import com.pulumi.awsnative.ivs.kotlin.enums.ChannelLatencyMode
import com.pulumi.awsnative.ivs.kotlin.enums.ChannelPreset
import com.pulumi.awsnative.ivs.kotlin.enums.ChannelType
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.ivs.kotlin.enums.ChannelLatencyMode.Companion.toKotlin as channelLatencyModeToKotlin
import com.pulumi.awsnative.ivs.kotlin.enums.ChannelPreset.Companion.toKotlin as channelPresetToKotlin
import com.pulumi.awsnative.ivs.kotlin.enums.ChannelType.Companion.toKotlin as channelTypeToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: ChannelArgs = ChannelArgs()

    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 ChannelArgsBuilder.() -> Unit) {
        val builder = ChannelArgsBuilder()
        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(): Channel {
        val builtJavaResource = com.pulumi.awsnative.ivs.Channel(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Channel(builtJavaResource)
    }
}

/**
 * Resource Type definition for AWS::IVS::Channel
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 */
public class Channel internal constructor(
    override val javaResource: com.pulumi.awsnative.ivs.Channel,
) : KotlinCustomResource(javaResource, ChannelMapper) {
    /**
     * Channel ARN is automatically generated on creation and assigned as the unique identifier.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Whether the channel is authorized.
     */
    public val authorized: Output?
        get() = javaResource.authorized().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.
     */
    public val ingestEndpoint: Output
        get() = javaResource.ingestEndpoint().applyValue({ args0 -> args0 })

    /**
     * Whether the channel allows insecure ingest.
     */
    public val insecureIngest: Output?
        get() = javaResource.insecureIngest().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Channel latency mode.
     */
    public val latencyMode: Output?
        get() = javaResource.latencyMode().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    channelLatencyModeToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Channel
     */
    public val name: Output?
        get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Channel Playback URL.
     */
    public val playbackUrl: Output
        get() = javaResource.playbackUrl().applyValue({ args0 -> args0 })

    /**
     * Optional transcode preset for the channel. This is selectable only for ADVANCED_HD and ADVANCED_SD channel types. For those channel types, the default preset is HIGHER_BANDWIDTH_DELIVERY. For other channel types (BASIC and STANDARD), preset is the empty string ("").
     */
    public val preset: Output?
        get() = javaResource.preset().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    channelPresetToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Recording Configuration ARN. A value other than an empty string indicates that recording is enabled. Default: "" (recording is disabled).
     */
    public val recordingConfigurationArn: Output?
        get() = javaResource.recordingConfigurationArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * A list of key-value pairs that contain metadata for the asset model.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately.
     */
    public val type: Output?
        get() = javaResource.type().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    channelTypeToKotlin(args0)
                })
            }).orElse(null)
        })
}

public object ChannelMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.ivs.Channel::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy