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

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

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()}"
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy