All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
lucuma.core.enums.GpiFPM.scala Maven / Gradle / Ivy
// Copyright (c) 2016-2023 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause
package lucuma
package core
package enums
import cats.syntax.eq.*
import lucuma.core.util.Enumerated
/**
* Enumerated type for GPI FPM.
* @group Enumerations (Generated)
*/
sealed abstract class GpiFPM(
val tag: String,
val shortName: String,
val longName: String,
val obsolete: Boolean
) extends Product with Serializable
object GpiFPM {
/** @group Constructors */ case object OPEN extends GpiFPM("OPEN", "Open", "Open", false)
/** @group Constructors */ case object F50umPIN extends GpiFPM("F50umPIN", "50umPIN", "50umPIN", false)
/** @group Constructors */ case object WITH_DOT extends GpiFPM("WITH_DOT", "WITH_DOT", "WITH_DOT", false)
/** @group Constructors */ case object SCIENCE extends GpiFPM("SCIENCE", "SCIENCE", "SCIENCE", false)
/** @group Constructors */ case object FPM_K1 extends GpiFPM("FPM_K1", "FPM_K1", "FPM_K1", false)
/** @group Constructors */ case object FPM_H extends GpiFPM("FPM_H", "FPM_H", "FPM_H", false)
/** @group Constructors */ case object FPM_J extends GpiFPM("FPM_J", "FPM_J", "FPM_J", false)
/** @group Constructors */ case object FPM_Y extends GpiFPM("FPM_Y", "FPM_Y", "FPM_Y", false)
/** All members of GpiFPM, in canonical order. */
val all: List[GpiFPM] =
List(OPEN, F50umPIN, WITH_DOT, SCIENCE, FPM_K1, FPM_H, FPM_J, FPM_Y)
/** Select the member of GpiFPM with the given tag, if any. */
def fromTag(s: String): Option[GpiFPM] =
all.find(_.tag === s)
/** Select the member of GpiFPM with the given tag, throwing if absent. */
def unsafeFromTag(s: String): GpiFPM =
fromTag(s).getOrElse(throw new NoSuchElementException(s"GpiFPM: Invalid tag: '$s'"))
/** @group Typeclass Instances */
implicit val GpiFPMEnumerated: Enumerated[GpiFPM] =
new Enumerated[GpiFPM] {
def all = GpiFPM.all
def tag(a: GpiFPM) = a.tag
override def unsafeFromTag(s: String): GpiFPM =
GpiFPM.unsafeFromTag(s)
}
}