/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.13 * User agent: apibuilder app.apibuilder.io/trifectalabs/roadquality/0.0.13/http4s_0_18 */ package com.trifectalabs.roadquality.v0.models { /** * A routable path on a map - not necessarily a segment */ final case class MapRoute( polyline: String, distance: Double ) /** * A longitudinal or latitudinal coordatine */ final case class Point( lat: Double, lng: Double ) /** * A segment of road which will be rated and tagged * * @param createdBy The user who created the segment * @param hidden Whether a segment is user visible or not */ final case class Segment( id: _root_.java.util.UUID, name: _root_.scala.Option[String] = None, description: _root_.scala.Option[String] = None, polyline: String, createdBy: _root_.java.util.UUID, hidden: Boolean ) /** * Form the client uses to create a segment */ final case class SegmentCreateForm( name: _root_.scala.Option[String] = None, description: _root_.scala.Option[String] = None, polylines: Seq[String], surfaceRating: Int, trafficRating: Int, surfaceType: com.trifectalabs.roadquality.v0.models.SurfaceType, pathType: com.trifectalabs.roadquality.v0.models.PathType ) /** * A rating that is supplied with the segment */ final case class SegmentRating( id: _root_.java.util.UUID, segmentId: _root_.java.util.UUID, userId: _root_.java.util.UUID, trafficRating: Int, surfaceRating: Int, surfaceType: com.trifectalabs.roadquality.v0.models.SurfaceType, pathType: com.trifectalabs.roadquality.v0.models.PathType, createdAt: _root_.java.time.Instant, updatedAt: _root_.java.time.Instant, deletedAt: _root_.scala.Option[_root_.java.time.Instant] = None ) /** * Form to modify an existing segment */ final case class SegmentUpdateForm( name: _root_.scala.Option[String] = None, description: _root_.scala.Option[String] = None, surfaceRating: _root_.scala.Option[Int] = None, trafficRating: _root_.scala.Option[Int] = None, surfaceType: _root_.scala.Option[com.trifectalabs.roadquality.v0.models.SurfaceType] = None, pathType: _root_.scala.Option[com.trifectalabs.roadquality.v0.models.PathType] = None ) /** * A user of the service * * @param stravaToken Strava API token */ final case class User( id: _root_.java.util.UUID, firstName: String, lastName: String, email: String, city: _root_.scala.Option[String] = None, province: _root_.scala.Option[String] = None, country: _root_.scala.Option[String] = None, birthdate: _root_.scala.Option[_root_.java.time.Instant] = None, sex: _root_.scala.Option[String] = None, role: com.trifectalabs.roadquality.v0.models.UserRole, stravaToken: String, createdAt: _root_.java.time.Instant, updatedAt: _root_.java.time.Instant, deletedAt: _root_.scala.Option[_root_.java.time.Instant] = None ) /** * A form to update attributes about a user */ final case class UserUpdateForm( birthdate: _root_.scala.Option[_root_.java.time.Instant] = None, sex: _root_.scala.Option[String] = None ) /** * @param name Name of this service * @param version Version of this service * @param scalaVersion Version of Scala used to build this service * @param sbtVersion Version of SBT used to build this service */ final case class VersionInfo( name: String, version: String, scalaVersion: String, sbtVersion: String ) /** * The level of dedication of the segment to cycling */ sealed trait PathType extends _root_.scala.Product with _root_.scala.Serializable object PathType { /** * A shared road for cars and bikes (road shoulder) */ case object Shared extends PathType { override def toString = "shared" } /** * A dedicated bike lane on the road */ case object DedicatedLane extends PathType { override def toString = "dedicatedLane" } /** * A completely isolated bike lane (a natural barrier from road traffic) */ case object BikePath extends PathType { override def toString = "bikePath" } /** * 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 PathType /** * 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[PathType] = scala.List(Shared, DedicatedLane, BikePath) private val byName: Map[String, PathType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): PathType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[PathType] = byName.get(value.toLowerCase) } /** * The surface type of a segment (road type) */ sealed trait SurfaceType extends _root_.scala.Product with _root_.scala.Serializable object SurfaceType { /** * Road consisting of small rocks */ case object Gravel extends SurfaceType { override def toString = "gravel" } /** * Road consisting of paved asphalt */ case object Asphalt extends SurfaceType { override def toString = "asphalt" } /** * Road consisting of cleared dirt */ case object Dirt extends SurfaceType { override def toString = "dirt" } /** * 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 SurfaceType /** * 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[SurfaceType] = scala.List(Gravel, Asphalt, Dirt) private val byName: Map[String, SurfaceType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): SurfaceType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[SurfaceType] = byName.get(value.toLowerCase) } /** * The type of user (user or admin) */ sealed trait UserRole extends _root_.scala.Product with _root_.scala.Serializable object UserRole { /** * A standard consumer of the service */ case object User extends UserRole { override def toString = "user" } /** * An administrator of the application */ case object Admin extends UserRole { override def toString = "admin" } /** * 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 UserRole /** * 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[UserRole] = scala.List(User, Admin) private val byName: Map[String, UserRole] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): UserRole = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[UserRole] = byName.get(value.toLowerCase) } }