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

pl.touk.nussknacker.engine.newdeployment.DeploymentId.scala Maven / Gradle / Ivy

The newest version!
package pl.touk.nussknacker.engine.newdeployment

import java.util.UUID
import scala.util.Try

final case class DeploymentId(value: UUID) {
  override def toString: String = value.toString
}

object DeploymentId {

  def fromString(str: String): Option[DeploymentId] = Try(UUID.fromString(str)).toOption.map(DeploymentId(_))

  def generate: DeploymentId = DeploymentId(UUID.randomUUID())

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy