commonMain.app.bsky.graph.starterpack.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky Show documentation
Show all versions of bluesky Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
@file:Suppress("DEPRECATION")
package app.bsky.graph
import app.bsky.richtext.Facet
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.AtUri
import sh.christian.ozone.api.model.Timestamp
/**
* @param name Display name for starter pack; can not be empty.
* @param list Reference (AT-URI) to the list record.
*/
@Serializable
public data class Starterpack(
/**
* Display name for starter pack; can not be empty.
*/
public val name: String,
public val description: String? = null,
public val descriptionFacets: List = emptyList(),
/**
* Reference (AT-URI) to the list record.
*/
public val list: AtUri,
public val feeds: List = emptyList(),
public val createdAt: Timestamp,
) {
init {
require(name.count() >= 1) {
"name.count() must be >= 1, but was ${name.count()}"
}
require(name.count() <= 500) {
"name.count() must be <= 500, but was ${name.count()}"
}
require(description == null || description.count() <= 3_000) {
"description.count() must be <= 3_000, but was ${description?.count()}"
}
require(feeds.count() <= 3) {
"feeds.count() must be <= 3, but was ${feeds.count()}"
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy