All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.app.bsky.actor.MutedWord.kt Maven / Gradle / Ivy

The newest version!
@file:Suppress("DEPRECATION")

package app.bsky.actor

import kotlin.String
import kotlin.Suppress
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.model.ReadOnlyList
import sh.christian.ozone.api.model.Timestamp

/**
 * A word that the account owner has muted.
 *
 * @param value The muted word itself.
 * @param targets The intended targets of the muted word.
 * @param actorTarget Groups of users to apply the muted word to. If undefined, applies to all
 * users.
 * @param expiresAt The date and time at which the muted word will expire and no longer be applied.
 */
@Serializable
public data class MutedWord(
  public val id: String? = null,
  /**
   * The muted word itself.
   */
  public val `value`: String,
  /**
   * The intended targets of the muted word.
   */
  public val targets: ReadOnlyList,
  /**
   * Groups of users to apply the muted word to. If undefined, applies to all users.
   */
  public val actorTarget: ActorTarget? = ActorTarget.All,
  /**
   * The date and time at which the muted word will expire and no longer be applied.
   */
  public val expiresAt: Timestamp? = null,
) {
  init {
    require(`value`.count() <= 10_000) {
      "value.count() must be <= 10_000, but was ${`value`.count()}"
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy