pl.touk.nussknacker.engine.api.process.VersionId.scala Maven / Gradle / Ivy
package pl.touk.nussknacker.engine.api.process
import io.circe.{Decoder, Encoder}
final case class VersionId(value: Long) {
def increase: VersionId = VersionId(value + 1)
override def toString: String = value.toString
}
object VersionId {
val initialVersionId: VersionId = VersionId(1)
implicit val encoder: Encoder[VersionId] = Encoder.encodeLong.contramap(_.value)
implicit val decoder: Decoder[VersionId] = Decoder.decodeLong.map(VersionId(_))
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy