module Proteome.Data.ActiveProject where

import Ribosome (MsgpackDecode, MsgpackEncode)

import Proteome.Data.ProjectLang (ProjectLang)
import Proteome.Data.ProjectName (ProjectName)
import Proteome.Data.ProjectType (ProjectType)

data ActiveProject =
  ActiveProject {
    ActiveProject -> ProjectName
name :: ProjectName,
    ActiveProject -> ProjectType
tpe :: ProjectType,
    ActiveProject -> Maybe ProjectLang
lang :: Maybe ProjectLang
  }
  deriving stock (ActiveProject -> ActiveProject -> Bool
(ActiveProject -> ActiveProject -> Bool)
-> (ActiveProject -> ActiveProject -> Bool) -> Eq ActiveProject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActiveProject -> ActiveProject -> Bool
$c/= :: ActiveProject -> ActiveProject -> Bool
== :: ActiveProject -> ActiveProject -> Bool
$c== :: ActiveProject -> ActiveProject -> Bool
Eq, Int -> ActiveProject -> ShowS
[ActiveProject] -> ShowS
ActiveProject -> String
(Int -> ActiveProject -> ShowS)
-> (ActiveProject -> String)
-> ([ActiveProject] -> ShowS)
-> Show ActiveProject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActiveProject] -> ShowS
$cshowList :: [ActiveProject] -> ShowS
show :: ActiveProject -> String
$cshow :: ActiveProject -> String
showsPrec :: Int -> ActiveProject -> ShowS
$cshowsPrec :: Int -> ActiveProject -> ShowS
Show, (forall x. ActiveProject -> Rep ActiveProject x)
-> (forall x. Rep ActiveProject x -> ActiveProject)
-> Generic ActiveProject
forall x. Rep ActiveProject x -> ActiveProject
forall x. ActiveProject -> Rep ActiveProject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActiveProject x -> ActiveProject
$cfrom :: forall x. ActiveProject -> Rep ActiveProject x
Generic)
  deriving anyclass (Object -> Either DecodeError ActiveProject
(Object -> Either DecodeError ActiveProject)
-> MsgpackDecode ActiveProject
forall a. (Object -> Either DecodeError a) -> MsgpackDecode a
fromMsgpack :: Object -> Either DecodeError ActiveProject
$cfromMsgpack :: Object -> Either DecodeError ActiveProject
MsgpackDecode, ActiveProject -> Object
(ActiveProject -> Object) -> MsgpackEncode ActiveProject
forall a. (a -> Object) -> MsgpackEncode a
toMsgpack :: ActiveProject -> Object
$ctoMsgpack :: ActiveProject -> Object
MsgpackEncode)