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

commonMain.aws.sdk.kotlin.services.rekognition.model.AudioMetadata.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.rekognition.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Metadata information about an audio stream. An array of `AudioMetadata` objects for the audio streams found in a stored video is returned by GetSegmentDetection.
 */
public class AudioMetadata private constructor(builder: Builder) {
    /**
     * The audio codec used to encode or decode the audio stream.
     */
    public val codec: kotlin.String? = builder.codec
    /**
     * The duration of the audio stream in milliseconds.
     */
    public val durationMillis: kotlin.Long? = builder.durationMillis
    /**
     * The number of audio channels in the segment.
     */
    public val numberOfChannels: kotlin.Long? = builder.numberOfChannels
    /**
     * The sample rate for the audio stream.
     */
    public val sampleRate: kotlin.Long? = builder.sampleRate

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

    override fun toString(): kotlin.String = buildString {
        append("AudioMetadata(")
        append("codec=$codec,")
        append("durationMillis=$durationMillis,")
        append("numberOfChannels=$numberOfChannels,")
        append("sampleRate=$sampleRate")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = codec?.hashCode() ?: 0
        result = 31 * result + (durationMillis?.hashCode() ?: 0)
        result = 31 * result + (numberOfChannels?.hashCode() ?: 0)
        result = 31 * result + (sampleRate?.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 AudioMetadata

        if (codec != other.codec) return false
        if (durationMillis != other.durationMillis) return false
        if (numberOfChannels != other.numberOfChannels) return false
        if (sampleRate != other.sampleRate) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The audio codec used to encode or decode the audio stream.
         */
        public var codec: kotlin.String? = null
        /**
         * The duration of the audio stream in milliseconds.
         */
        public var durationMillis: kotlin.Long? = null
        /**
         * The number of audio channels in the segment.
         */
        public var numberOfChannels: kotlin.Long? = null
        /**
         * The sample rate for the audio stream.
         */
        public var sampleRate: kotlin.Long? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.AudioMetadata) : this() {
            this.codec = x.codec
            this.durationMillis = x.durationMillis
            this.numberOfChannels = x.numberOfChannels
            this.sampleRate = x.sampleRate
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy