commonMain.com.atproto.label.LabelValueDefinition.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 com.atproto.label
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlinx.serialization.Serializable
/**
* Declares a label value and its expected interpretations and behaviors.
*
* @param identifier The value of the label being defined. Must only include lowercase ascii and the
* '-' character ([a-z-]+).
* @param severity How should a client visually convey this label? 'inform' means neutral and
* informational; 'alert' means negative and warning; 'none' means show nothing.
* @param blurs What should this label hide in the UI, if applied? 'content' hides all of the
* target; 'media' hides the images/video/audio; 'none' hides nothing.
* @param defaultSetting The default setting for this label.
* @param adultOnly Does the user need to have adult content enabled in order to configure this
* label?
*/
@Serializable
public data class LabelValueDefinition(
/**
* The value of the label being defined. Must only include lowercase ascii and the '-' character
* ([a-z-]+).
*/
public val identifier: String,
/**
* How should a client visually convey this label? 'inform' means neutral and informational;
* 'alert' means negative and warning; 'none' means show nothing.
*/
public val severity: Severity,
/**
* What should this label hide in the UI, if applied? 'content' hides all of the target; 'media'
* hides the images/video/audio; 'none' hides nothing.
*/
public val blurs: Blurs,
/**
* The default setting for this label.
*/
public val defaultSetting: DefaultSetting? = DefaultSetting.Warn,
/**
* Does the user need to have adult content enabled in order to configure this label?
*/
public val adultOnly: Boolean? = null,
public val locales: List,
) {
init {
require(identifier.count() <= 100) {
"identifier.count() must be <= 100, but was ${identifier.count()}"
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy