commonMain.aws.sdk.kotlin.services.kinesisvideo.model.MediaSourceConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesisvideo-jvm Show documentation
Show all versions of kinesisvideo-jvm Show documentation
The AWS SDK for Kotlin client for Kinesis Video
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kinesisvideo.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The configuration details that consist of the credentials required (`MediaUriSecretArn` and `MediaUriType`) to access the media files that are streamed to the camera.
*/
public class MediaSourceConfig private constructor(builder: Builder) {
/**
* The Amazon Web Services Secrets Manager ARN for the username and password of the camera, or a local media file location.
*/
public val mediaUriSecretArn: kotlin.String = requireNotNull(builder.mediaUriSecretArn) { "A non-null value must be provided for mediaUriSecretArn" }
/**
* The Uniform Resource Identifier (URI) type. The `FILE_URI` value can be used to stream local media files.
*
* Preview only supports the `RTSP_URI` media source URI format .
*/
public val mediaUriType: aws.sdk.kotlin.services.kinesisvideo.model.MediaUriType = requireNotNull(builder.mediaUriType) { "A non-null value must be provided for mediaUriType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesisvideo.model.MediaSourceConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MediaSourceConfig(")
append("mediaUriSecretArn=*** Sensitive Data Redacted ***,")
append("mediaUriType=$mediaUriType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = mediaUriSecretArn.hashCode()
result = 31 * result + (mediaUriType.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 MediaSourceConfig
if (mediaUriSecretArn != other.mediaUriSecretArn) return false
if (mediaUriType != other.mediaUriType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesisvideo.model.MediaSourceConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Web Services Secrets Manager ARN for the username and password of the camera, or a local media file location.
*/
public var mediaUriSecretArn: kotlin.String? = null
/**
* The Uniform Resource Identifier (URI) type. The `FILE_URI` value can be used to stream local media files.
*
* Preview only supports the `RTSP_URI` media source URI format .
*/
public var mediaUriType: aws.sdk.kotlin.services.kinesisvideo.model.MediaUriType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesisvideo.model.MediaSourceConfig) : this() {
this.mediaUriSecretArn = x.mediaUriSecretArn
this.mediaUriType = x.mediaUriType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesisvideo.model.MediaSourceConfig = MediaSourceConfig(this)
internal fun correctErrors(): Builder {
if (mediaUriSecretArn == null) mediaUriSecretArn = ""
if (mediaUriType == null) mediaUriType = MediaUriType.SdkUnknown("no value provided")
return this
}
}
}