commonMain.app.bsky.actor.Nux.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky-jvm Show documentation
Show all versions of bluesky-jvm Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
@file:Suppress("DEPRECATION")
package app.bsky.actor
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.model.Timestamp
/**
* A new user experiences (NUX) storage object
*
* @param data Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to
* 300 characters.
* @param expiresAt The date and time at which the NUX will expire and should be considered
* completed.
*/
@Serializable
public data class Nux(
public val id: String,
public val completed: Boolean,
/**
* Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300
* characters.
*/
public val `data`: String? = null,
/**
* The date and time at which the NUX will expire and should be considered completed.
*/
public val expiresAt: Timestamp? = null,
) {
init {
require(id.count() <= 100) {
"id.count() must be <= 100, but was ${id.count()}"
}
require(`data` == null || `data`.count() <= 3_000) {
"data.count() must be <= 3_000, but was ${`data`?.count()}"
}
}
}