/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1 * User agent: apibuilder app.apibuilder.io/bml/atlas-tags/0.0.1/scala_models */ package org.bml.atlas.tags.v0.models { /** * A response model for the standard health check resource. * * @param health A general health status code. * @param status A general service status code. */ final case class HealthCheck( health: org.bml.atlas.tags.v0.models.HealthCode, status: org.bml.atlas.tags.v0.models.ServiceStatus ) /** * Encapsulates an Object UUID Id. * * @param id The tag services guid for this ObjectId. * @param externalId The external caller systems resource id for this Object. * @param description A short description of this object. */ final case class ObjectId( id: _root_.java.util.UUID, externalId: _root_.java.util.UUID, description: _root_.scala.Option[String] = None ) /** * A slice of a set of objects. * * @param slice The slice data for this slice. * @param objects A set of ObjectId's for this slice. */ final case class ObjectsSlice( slice: org.bml.atlas.tags.v0.models.Slice, objects: Seq[org.bml.atlas.tags.v0.models.ObjectId] ) /** * An cursor Slice for iterating through sets. * * @param number The number of the current Slice. * @param numberOfElements The number of elements currently on this Slice. * @param size The size of this Slice. * @param hasContent Is there any content for this Slice. * @param hasNext Is there is a next Slice. * @param hasPrevious Is there is a previous Slice. * @param isFirst Is this the first Slice. * @param isLast Is this the last Slice. */ final case class Slice( number: Int, numberOfElements: Int, size: Int, hasContent: Boolean, hasNext: Boolean, hasPrevious: Boolean, isFirst: Boolean, isLast: Boolean ) /** * A field and an order used to sort sets. * * @param field The field you want to sort on. * @param order The order you want to sort. */ final case class SortField( field: org.bml.atlas.tags.v0.models.TagSortField, order: org.bml.atlas.tags.v0.models.SortOrder ) /** * A tag. * * @param id A UUID string for this tag. * @param value The tag value */ final case class Tag( id: _root_.java.util.UUID, value: String ) /** * A form for creating a tag object. * * @param value The tag value */ final case class TagForm( value: String ) sealed trait HealthCode extends _root_.scala.Product with _root_.scala.Serializable object HealthCode { case object Healthy extends HealthCode { override def toString = "HEALTHY" } case object Unhealthy extends HealthCode { override def toString = "UNHEALTHY" } /** * 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 HealthCode /** * 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[HealthCode] = scala.List(Healthy, Unhealthy) private val byName: Map[String, HealthCode] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): HealthCode = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[HealthCode] = byName.get(value.toLowerCase) } sealed trait ObjectSortField extends _root_.scala.Product with _root_.scala.Serializable object ObjectSortField { case object Id extends ObjectSortField { override def toString = "id" } case object CreatedAt extends ObjectSortField { override def toString = "createdAt" } case object UpdatedAt extends ObjectSortField { override def toString = "updatedAt" } /** * 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 ObjectSortField /** * 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[ObjectSortField] = scala.List(Id, CreatedAt, UpdatedAt) private val byName: Map[String, ObjectSortField] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): ObjectSortField = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[ObjectSortField] = byName.get(value.toLowerCase) } sealed trait ServiceStatus extends _root_.scala.Product with _root_.scala.Serializable object ServiceStatus { case object StartingUp extends ServiceStatus { override def toString = "STARTING_UP" } case object Running extends ServiceStatus { override def toString = "RUNNING" } case object ShuttingDown extends ServiceStatus { override def toString = "SHUTTING_DOWN" } /** * 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 ServiceStatus /** * 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[ServiceStatus] = scala.List(StartingUp, Running, ShuttingDown) private val byName: Map[String, ServiceStatus] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): ServiceStatus = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[ServiceStatus] = 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 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 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) } sealed trait TagSortField extends _root_.scala.Product with _root_.scala.Serializable object TagSortField { case object Name extends TagSortField { override def toString = "name" } case object CreatedAt extends TagSortField { override def toString = "createdAt" } case object UpdatedAt extends TagSortField { override def toString = "updatedAt" } /** * 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 TagSortField /** * 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[TagSortField] = scala.List(Name, CreatedAt, UpdatedAt) private val byName: Map[String, TagSortField] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): TagSortField = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[TagSortField] = byName.get(value.toLowerCase) } }