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

commonMain.tools.ozone.set.SetView.kt Maven / Gradle / Ivy

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

package tools.ozone.`set`

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

@Serializable
public data class SetView(
  public val name: String,
  public val description: String? = null,
  public val setSize: Long,
  public val createdAt: Timestamp,
  public val updatedAt: Timestamp,
) {
  init {
    require(name.count() >= 3) {
      "name.count() must be >= 3, but was ${name.count()}"
    }
    require(name.count() <= 128) {
      "name.count() must be <= 128, but was ${name.count()}"
    }
    require(description == null || description.count() <= 10_240) {
      "description.count() must be <= 10_240, but was ${description?.count()}"
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy