/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.6-dev * User agent: apibuilder app.apibuilder.io/danitest/competition-api/0.0.6-dev/http4s_0_15 */ package namespace.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: String, status: namespace.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, asdf: String ) sealed trait AppSortBy extends _root_.scala.Product with _root_.scala.Serializable object AppSortBy { case object Name extends AppSortBy { override def toString = "name" } case object CreatedAt extends AppSortBy { override def toString = "created_at" } case object UpdatedAt extends AppSortBy { override def toString = "updated_at" } case object CompetitionStatus extends AppSortBy { override def toString = "competition_status" } /** * 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 for 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 AppSortBy /** * 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[AppSortBy] = scala.List(Name, CreatedAt, UpdatedAt, CompetitionStatus) private val byName: Map[String, AppSortBy] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): AppSortBy = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[AppSortBy] = byName.get(value.toLowerCase) } /** * The actual status of the competition. */ sealed trait CompetitionStatus extends _root_.scala.Product with _root_.scala.Serializable object CompetitionStatus { /** * Prepared competition, waiting for start. */ case object Pending extends CompetitionStatus { override def toString = "pending" } /** * Currently active(running) competition. */ case object Active extends CompetitionStatus { override def toString = "active" } /** * Already closed competition. */ 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 for 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) } sealed trait SortOrder extends _root_.scala.Product with _root_.scala.Serializable object SortOrder { case object Asc extends SortOrder { override def toString = "asc" } case object Desc extends SortOrder { override def toString = "desc" } /** * 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 for 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 SortOrder /** * 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[SortOrder] = scala.List(Asc, Desc) private val byName: Map[String, SortOrder] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): SortOrder = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[SortOrder] = byName.get(value.toLowerCase) } /** * The actual status of the competition. */ sealed trait VoteType extends _root_.scala.Product with _root_.scala.Serializable object VoteType { /** * Basic vote. */ case object Basic extends VoteType { override def toString = "basic" } /** * Premium vote. */ case object Premium extends VoteType { override def toString = "premium" } /** * 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 for 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 VoteType /** * 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[VoteType] = scala.List(Basic, Premium) private val byName: Map[String, VoteType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): VoteType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[VoteType] = byName.get(value.toLowerCase) } }