All Downloads are FREE. Search and download functionalities are using the official Maven repository.

harness.cli.HelpHint.scala Maven / Gradle / Ivy

package harness.cli

sealed trait HelpHint
object HelpHint {

  final case class Help(message: String) extends HelpHint
  final case class HelpExtra(message: String) extends HelpHint

  final case class EnumValues(values: Seq[Any]) extends HelpHint
  final case class Default(value: Any) extends HelpHint
  case object Optional extends HelpHint
  case object Repeated extends HelpHint
  case object RepeatedNel extends HelpHint

  final case class Error(message: String) extends HelpHint

  type Make = String | HelpHint

  def apply(make: HelpHint.Make): HelpHint = make match
    case string: String => HelpHint.Help(string)
    case hint: HelpHint => hint

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy