/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1-swagger-public * User agent: apibuilder app.apibuilder.io/danitest/competition-api-from-swagger/0.0.1-swagger-public/http4s_0_23 */ package DaniTest.competition.api.from.swagger.v0.models { /** * A competition is a race game for the competitors to collect more vote points. * * @param guid Internal unique identifier for this competition. */ final case class Competition( guid: _root_.java.util.UUID, name: _root_.scala.Option[String] = None, status: DaniTest.competition.api.from.swagger.v0.models.CompetitionStatus, startAt: _root_.java.time.Instant, endAt: _root_.java.time.Instant, createdAt: _root_.java.time.Instant, updatedAt: _root_.java.time.Instant ) /** * The competition participant is a competitor who is playing in a specific * competition and he/she be able to win that. * * @param guid Internal unique identifier for this competition_participant. */ final case class CompetitionParticipant( guid: _root_.java.util.UUID, competitionId: _root_.java.util.UUID, competitorId: _root_.java.util.UUID ) /** * The competitor can who can participate in a competition. * * @param guid Internal unique identifier for this competitor. */ final case class Competitor( guid: _root_.java.util.UUID, name: String ) /** * The vote is created by voter and it concern for a competition_participant * * @param guid Internal unique identifier for this voter. */ final case class Vote( guid: _root_.java.util.UUID, competitionParticipantId: _root_.java.util.UUID, voterId: _root_.java.util.UUID, `type`: String, points: Int ) /** * The voter can vote for competition_participant. * * @param guid Internal unique identifier for this voter. */ final case class Voter( guid: _root_.java.util.UUID, name: String ) sealed trait CompetitionStatus extends _root_.scala.Product with _root_.scala.Serializable object CompetitionStatus { case object Pending extends CompetitionStatus { override def toString = "pending" } case object Active extends CompetitionStatus { override def toString = "active" } case object Closed extends CompetitionStatus { override def toString = "closed" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends CompetitionStatus /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[CompetitionStatus] = scala.List(Pending, Active, Closed) private val byName: Map[String, CompetitionStatus] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): CompetitionStatus = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[CompetitionStatus] = byName.get(value.toLowerCase) } }