commonMain.aws.sdk.kotlin.services.dataexchange.model.DeprecationRequestDetails.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataexchange-jvm Show documentation
Show all versions of dataexchange-jvm Show documentation
The AWS Kotlin client for DataExchange
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dataexchange.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Extra details specific to a deprecation type notification.
*/
public class DeprecationRequestDetails private constructor(builder: Builder) {
/**
* A datetime in the future when the data set will be deprecated.
*/
public val deprecationAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.deprecationAt) { "A non-null value must be provided for deprecationAt" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dataexchange.model.DeprecationRequestDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DeprecationRequestDetails(")
append("deprecationAt=$deprecationAt")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deprecationAt.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 DeprecationRequestDetails
if (deprecationAt != other.deprecationAt) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.DeprecationRequestDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A datetime in the future when the data set will be deprecated.
*/
public var deprecationAt: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.DeprecationRequestDetails) : this() {
this.deprecationAt = x.deprecationAt
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.DeprecationRequestDetails = DeprecationRequestDetails(this)
internal fun correctErrors(): Builder {
if (deprecationAt == null) deprecationAt = Instant.fromEpochSeconds(0)
return this
}
}
}