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

commonMain.aws.sdk.kotlin.services.ivsrealtime.model.Composition.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.ivsrealtime.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Object specifying a Composition resource.
 */
public class Composition private constructor(builder: Builder) {
    /**
     * ARN of the Composition resource.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * Array of Destination objects. A Composition can contain either one destination (`channel` or `s3`) or two (one `channel` and one `s3`).
     */
    public val destinations: List = requireNotNull(builder.destinations) { "A non-null value must be provided for destinations" }
    /**
     * UTC time of the Composition end. This is an ISO 8601 timestamp; *note that this is returned as a string*.
     */
    public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
    /**
     * Layout object to configure composition parameters.
     */
    public val layout: aws.sdk.kotlin.services.ivsrealtime.model.LayoutConfiguration? = builder.layout
    /**
     * ARN of the stage used as input
     */
    public val stageArn: kotlin.String = requireNotNull(builder.stageArn) { "A non-null value must be provided for stageArn" }
    /**
     * UTC time of the Composition start. This is an ISO 8601 timestamp; *note that this is returned as a string*.
     */
    public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime
    /**
     * State of the Composition.
     */
    public val state: aws.sdk.kotlin.services.ivsrealtime.model.CompositionState = requireNotNull(builder.state) { "A non-null value must be provided for state" }
    /**
     * Tags attached to the resource. Array of maps, each of the form `string:string (key:value)`. See [Best practices and strategies](https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html) in *Tagging AWS Resources and Tag Editor* for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.
     */
    public val tags: Map? = builder.tags

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ivsrealtime.model.Composition = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("Composition(")
        append("arn=$arn,")
        append("destinations=$destinations,")
        append("endTime=$endTime,")
        append("layout=$layout,")
        append("stageArn=$stageArn,")
        append("startTime=$startTime,")
        append("state=$state,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (destinations.hashCode())
        result = 31 * result + (endTime?.hashCode() ?: 0)
        result = 31 * result + (layout?.hashCode() ?: 0)
        result = 31 * result + (stageArn.hashCode())
        result = 31 * result + (startTime?.hashCode() ?: 0)
        result = 31 * result + (state.hashCode())
        result = 31 * result + (tags?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as Composition

        if (arn != other.arn) return false
        if (destinations != other.destinations) return false
        if (endTime != other.endTime) return false
        if (layout != other.layout) return false
        if (stageArn != other.stageArn) return false
        if (startTime != other.startTime) return false
        if (state != other.state) return false
        if (tags != other.tags) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ivsrealtime.model.Composition = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * ARN of the Composition resource.
         */
        public var arn: kotlin.String? = null
        /**
         * Array of Destination objects. A Composition can contain either one destination (`channel` or `s3`) or two (one `channel` and one `s3`).
         */
        public var destinations: List? = null
        /**
         * UTC time of the Composition end. This is an ISO 8601 timestamp; *note that this is returned as a string*.
         */
        public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Layout object to configure composition parameters.
         */
        public var layout: aws.sdk.kotlin.services.ivsrealtime.model.LayoutConfiguration? = null
        /**
         * ARN of the stage used as input
         */
        public var stageArn: kotlin.String? = null
        /**
         * UTC time of the Composition start. This is an ISO 8601 timestamp; *note that this is returned as a string*.
         */
        public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * State of the Composition.
         */
        public var state: aws.sdk.kotlin.services.ivsrealtime.model.CompositionState? = null
        /**
         * Tags attached to the resource. Array of maps, each of the form `string:string (key:value)`. See [Best practices and strategies](https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html) in *Tagging AWS Resources and Tag Editor* for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ivsrealtime.model.Composition) : this() {
            this.arn = x.arn
            this.destinations = x.destinations
            this.endTime = x.endTime
            this.layout = x.layout
            this.stageArn = x.stageArn
            this.startTime = x.startTime
            this.state = x.state
            this.tags = x.tags
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.ivsrealtime.model.Composition = Composition(this)

        /**
         * construct an [aws.sdk.kotlin.services.ivsrealtime.model.LayoutConfiguration] inside the given [block]
         */
        public fun layout(block: aws.sdk.kotlin.services.ivsrealtime.model.LayoutConfiguration.Builder.() -> kotlin.Unit) {
            this.layout = aws.sdk.kotlin.services.ivsrealtime.model.LayoutConfiguration.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (destinations == null) destinations = emptyList()
            if (stageArn == null) stageArn = ""
            if (state == null) state = CompositionState.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy