commonMain.com.atproto.label.LabelValueDefinitionStrings.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 com.atproto.label
import kotlin.String
import kotlin.Suppress
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.Language
/**
* Strings which describe the label in the UI, localized into a specific language.
*
* @param lang The code of the language these strings are written in.
* @param name A short human-readable name for the label.
* @param description A longer description of what the label means and why it might be applied.
*/
@Serializable
public data class LabelValueDefinitionStrings(
/**
* The code of the language these strings are written in.
*/
public val lang: Language,
/**
* A short human-readable name for the label.
*/
public val name: String,
/**
* A longer description of what the label means and why it might be applied.
*/
public val description: String,
) {
init {
require(name.count() <= 640) {
"name.count() must be <= 640, but was ${name.count()}"
}
require(description.count() <= 100_000) {
"description.count() must be <= 100_000, but was ${description.count()}"
}
}
}