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

commonMain.aws.sdk.kotlin.services.ivs.model.PutMetadataRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ivs.model

import aws.smithy.kotlin.runtime.SdkDsl

public class PutMetadataRequest private constructor(builder: Builder) {
    /**
     * ARN of the channel into which metadata is inserted. This channel must have an active stream.
     */
    public val channelArn: kotlin.String = requireNotNull(builder.channelArn) { "A non-null value must be provided for channelArn" }
    /**
     * Metadata to insert into the stream. Maximum: 1 KB per request.
     */
    public val metadata: kotlin.String = requireNotNull(builder.metadata) { "A non-null value must be provided for metadata" }

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

    override fun toString(): kotlin.String = buildString {
        append("PutMetadataRequest(")
        append("channelArn=$channelArn,")
        append("metadata=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = channelArn.hashCode()
        result = 31 * result + (metadata.hashCode())
        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 PutMetadataRequest

        if (channelArn != other.channelArn) return false
        if (metadata != other.metadata) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * ARN of the channel into which metadata is inserted. This channel must have an active stream.
         */
        public var channelArn: kotlin.String? = null
        /**
         * Metadata to insert into the stream. Maximum: 1 KB per request.
         */
        public var metadata: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ivs.model.PutMetadataRequest) : this() {
            this.channelArn = x.channelArn
            this.metadata = x.metadata
        }

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

        internal fun correctErrors(): Builder {
            if (channelArn == null) channelArn = ""
            if (metadata == null) metadata = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy