commonMain.aws.sdk.kotlin.services.kinesisvideo.model.DeletionConfig.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 required to delete the connection of the stream from the Edge Agent.
*/
public class DeletionConfig private constructor(builder: Builder) {
/**
* The `boolean` value used to indicate whether or not you want to mark the media for deletion, once it has been uploaded to the Kinesis Video Stream cloud. The media files can be deleted if any of the deletion configuration values are set to `true`, such as when the limit for the `EdgeRetentionInHours`, or the `MaxLocalMediaSizeInMB`, has been reached.
*
* Since the default value is set to `true`, configure the uploader schedule such that the media files are not being deleted before they are initially uploaded to the Amazon Web Services cloud.
*/
public val deleteAfterUpload: kotlin.Boolean? = builder.deleteAfterUpload
/**
* The number of hours that you want to retain the data in the stream on the Edge Agent. The default value of the retention time is 720 hours, which translates to 30 days.
*/
public val edgeRetentionInHours: kotlin.Int? = builder.edgeRetentionInHours
/**
* The value of the local size required in order to delete the edge configuration.
*/
public val localSizeConfig: aws.sdk.kotlin.services.kinesisvideo.model.LocalSizeConfig? = builder.localSizeConfig
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesisvideo.model.DeletionConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DeletionConfig(")
append("deleteAfterUpload=$deleteAfterUpload,")
append("edgeRetentionInHours=$edgeRetentionInHours,")
append("localSizeConfig=$localSizeConfig")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deleteAfterUpload?.hashCode() ?: 0
result = 31 * result + (edgeRetentionInHours ?: 0)
result = 31 * result + (localSizeConfig?.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 DeletionConfig
if (deleteAfterUpload != other.deleteAfterUpload) return false
if (edgeRetentionInHours != other.edgeRetentionInHours) return false
if (localSizeConfig != other.localSizeConfig) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesisvideo.model.DeletionConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The `boolean` value used to indicate whether or not you want to mark the media for deletion, once it has been uploaded to the Kinesis Video Stream cloud. The media files can be deleted if any of the deletion configuration values are set to `true`, such as when the limit for the `EdgeRetentionInHours`, or the `MaxLocalMediaSizeInMB`, has been reached.
*
* Since the default value is set to `true`, configure the uploader schedule such that the media files are not being deleted before they are initially uploaded to the Amazon Web Services cloud.
*/
public var deleteAfterUpload: kotlin.Boolean? = null
/**
* The number of hours that you want to retain the data in the stream on the Edge Agent. The default value of the retention time is 720 hours, which translates to 30 days.
*/
public var edgeRetentionInHours: kotlin.Int? = null
/**
* The value of the local size required in order to delete the edge configuration.
*/
public var localSizeConfig: aws.sdk.kotlin.services.kinesisvideo.model.LocalSizeConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesisvideo.model.DeletionConfig) : this() {
this.deleteAfterUpload = x.deleteAfterUpload
this.edgeRetentionInHours = x.edgeRetentionInHours
this.localSizeConfig = x.localSizeConfig
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesisvideo.model.DeletionConfig = DeletionConfig(this)
/**
* construct an [aws.sdk.kotlin.services.kinesisvideo.model.LocalSizeConfig] inside the given [block]
*/
public fun localSizeConfig(block: aws.sdk.kotlin.services.kinesisvideo.model.LocalSizeConfig.Builder.() -> kotlin.Unit) {
this.localSizeConfig = aws.sdk.kotlin.services.kinesisvideo.model.LocalSizeConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}