commonMain.aws.sdk.kotlin.services.kinesisvideo.model.UpdateDataRetentionRequest.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
public class UpdateDataRetentionRequest private constructor(builder: Builder) {
/**
* The version of the stream whose retention period you want to change. To get the version, call either the `DescribeStream` or the `ListStreams` API.
*/
public val currentVersion: kotlin.String? = builder.currentVersion
/**
* The number of hours to adjust the current retention by. The value you specify is added to or subtracted from the current value, depending on the `operation`.
*
* The minimum value for data retention is 0 and the maximum value is 87600 (ten years).
*/
public val dataRetentionChangeInHours: kotlin.Int? = builder.dataRetentionChangeInHours
/**
* Indicates whether you want to increase or decrease the retention period.
*/
public val operation: aws.sdk.kotlin.services.kinesisvideo.model.UpdateDataRetentionOperation? = builder.operation
/**
* The Amazon Resource Name (ARN) of the stream whose retention period you want to change.
*/
public val streamArn: kotlin.String? = builder.streamArn
/**
* The name of the stream whose retention period you want to change.
*/
public val streamName: kotlin.String? = builder.streamName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesisvideo.model.UpdateDataRetentionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateDataRetentionRequest(")
append("currentVersion=$currentVersion,")
append("dataRetentionChangeInHours=$dataRetentionChangeInHours,")
append("operation=$operation,")
append("streamArn=$streamArn,")
append("streamName=$streamName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = currentVersion?.hashCode() ?: 0
result = 31 * result + (dataRetentionChangeInHours ?: 0)
result = 31 * result + (operation?.hashCode() ?: 0)
result = 31 * result + (streamArn?.hashCode() ?: 0)
result = 31 * result + (streamName?.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 UpdateDataRetentionRequest
if (currentVersion != other.currentVersion) return false
if (dataRetentionChangeInHours != other.dataRetentionChangeInHours) return false
if (operation != other.operation) return false
if (streamArn != other.streamArn) return false
if (streamName != other.streamName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesisvideo.model.UpdateDataRetentionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The version of the stream whose retention period you want to change. To get the version, call either the `DescribeStream` or the `ListStreams` API.
*/
public var currentVersion: kotlin.String? = null
/**
* The number of hours to adjust the current retention by. The value you specify is added to or subtracted from the current value, depending on the `operation`.
*
* The minimum value for data retention is 0 and the maximum value is 87600 (ten years).
*/
public var dataRetentionChangeInHours: kotlin.Int? = null
/**
* Indicates whether you want to increase or decrease the retention period.
*/
public var operation: aws.sdk.kotlin.services.kinesisvideo.model.UpdateDataRetentionOperation? = null
/**
* The Amazon Resource Name (ARN) of the stream whose retention period you want to change.
*/
public var streamArn: kotlin.String? = null
/**
* The name of the stream whose retention period you want to change.
*/
public var streamName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesisvideo.model.UpdateDataRetentionRequest) : this() {
this.currentVersion = x.currentVersion
this.dataRetentionChangeInHours = x.dataRetentionChangeInHours
this.operation = x.operation
this.streamArn = x.streamArn
this.streamName = x.streamName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesisvideo.model.UpdateDataRetentionRequest = UpdateDataRetentionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}