commonMain.aws.sdk.kotlin.services.kinesisvideo.model.EdgeConfig.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
/**
* A description of the stream's edge configuration that will be used to sync with the Edge Agent IoT Greengrass component. The Edge Agent component will run on an IoT Hub Device setup at your premise.
*/
public class EdgeConfig private constructor(builder: Builder) {
/**
* The deletion configuration is made up of the retention time (`EdgeRetentionInHours`) and local size configuration (`LocalSizeConfig`) details that are used to make the deletion.
*/
public val deletionConfig: aws.sdk.kotlin.services.kinesisvideo.model.DeletionConfig? = builder.deletionConfig
/**
* The "**Internet of Things (IoT) Thing**" Arn of the stream.
*/
public val hubDeviceArn: kotlin.String = requireNotNull(builder.hubDeviceArn) { "A non-null value must be provided for hubDeviceArn" }
/**
* The recorder configuration consists of the local `MediaSourceConfig` details, that are used as credentials to access the local media files streamed on the camera.
*/
public val recorderConfig: aws.sdk.kotlin.services.kinesisvideo.model.RecorderConfig? = builder.recorderConfig
/**
* The uploader configuration contains the `ScheduleExpression` details that are used to schedule upload jobs for the recorded media files from the Edge Agent to a Kinesis Video Stream.
*/
public val uploaderConfig: aws.sdk.kotlin.services.kinesisvideo.model.UploaderConfig? = builder.uploaderConfig
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesisvideo.model.EdgeConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EdgeConfig(")
append("deletionConfig=$deletionConfig,")
append("hubDeviceArn=$hubDeviceArn,")
append("recorderConfig=$recorderConfig,")
append("uploaderConfig=$uploaderConfig")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deletionConfig?.hashCode() ?: 0
result = 31 * result + (hubDeviceArn.hashCode())
result = 31 * result + (recorderConfig?.hashCode() ?: 0)
result = 31 * result + (uploaderConfig?.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 EdgeConfig
if (deletionConfig != other.deletionConfig) return false
if (hubDeviceArn != other.hubDeviceArn) return false
if (recorderConfig != other.recorderConfig) return false
if (uploaderConfig != other.uploaderConfig) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesisvideo.model.EdgeConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The deletion configuration is made up of the retention time (`EdgeRetentionInHours`) and local size configuration (`LocalSizeConfig`) details that are used to make the deletion.
*/
public var deletionConfig: aws.sdk.kotlin.services.kinesisvideo.model.DeletionConfig? = null
/**
* The "**Internet of Things (IoT) Thing**" Arn of the stream.
*/
public var hubDeviceArn: kotlin.String? = null
/**
* The recorder configuration consists of the local `MediaSourceConfig` details, that are used as credentials to access the local media files streamed on the camera.
*/
public var recorderConfig: aws.sdk.kotlin.services.kinesisvideo.model.RecorderConfig? = null
/**
* The uploader configuration contains the `ScheduleExpression` details that are used to schedule upload jobs for the recorded media files from the Edge Agent to a Kinesis Video Stream.
*/
public var uploaderConfig: aws.sdk.kotlin.services.kinesisvideo.model.UploaderConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesisvideo.model.EdgeConfig) : this() {
this.deletionConfig = x.deletionConfig
this.hubDeviceArn = x.hubDeviceArn
this.recorderConfig = x.recorderConfig
this.uploaderConfig = x.uploaderConfig
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesisvideo.model.EdgeConfig = EdgeConfig(this)
/**
* construct an [aws.sdk.kotlin.services.kinesisvideo.model.DeletionConfig] inside the given [block]
*/
public fun deletionConfig(block: aws.sdk.kotlin.services.kinesisvideo.model.DeletionConfig.Builder.() -> kotlin.Unit) {
this.deletionConfig = aws.sdk.kotlin.services.kinesisvideo.model.DeletionConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.kinesisvideo.model.RecorderConfig] inside the given [block]
*/
public fun recorderConfig(block: aws.sdk.kotlin.services.kinesisvideo.model.RecorderConfig.Builder.() -> kotlin.Unit) {
this.recorderConfig = aws.sdk.kotlin.services.kinesisvideo.model.RecorderConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.kinesisvideo.model.UploaderConfig] inside the given [block]
*/
public fun uploaderConfig(block: aws.sdk.kotlin.services.kinesisvideo.model.UploaderConfig.Builder.() -> kotlin.Unit) {
this.uploaderConfig = aws.sdk.kotlin.services.kinesisvideo.model.UploaderConfig.invoke(block)
}
internal fun correctErrors(): Builder {
if (hubDeviceArn == null) hubDeviceArn = ""
return this
}
}
}