module Asana.Api.Project ( Project (..), ) where import Asana.Api.Gid (Gid) import Asana.Api.Prelude import Data.Aeson (FromJSON, genericParseJSON, parseJSON) import Data.Aeson.Casing (aesonPrefix, snakeCase) import Data.Time (UTCTime) data Project = Project { Project -> Gid pGid :: Gid, Project -> Text pName :: Text, Project -> UTCTime pCreatedAt :: UTCTime } deriving stock ((forall x. Project -> Rep Project x) -> (forall x. Rep Project x -> Project) -> Generic Project forall x. Rep Project x -> Project forall x. Project -> Rep Project x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cfrom :: forall x. Project -> Rep Project x from :: forall x. Project -> Rep Project x $cto :: forall x. Rep Project x -> Project to :: forall x. Rep Project x -> Project Generic, Int -> Project -> ShowS [Project] -> ShowS Project -> String (Int -> Project -> ShowS) -> (Project -> String) -> ([Project] -> ShowS) -> Show Project forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> Project -> ShowS showsPrec :: Int -> Project -> ShowS $cshow :: Project -> String show :: Project -> String $cshowList :: [Project] -> ShowS showList :: [Project] -> ShowS Show) instance FromJSON Project where parseJSON :: Value -> Parser Project parseJSON = Options -> Value -> Parser Project forall a. (Generic a, GFromJSON Zero (Rep a)) => Options -> Value -> Parser a genericParseJSON (Options -> Value -> Parser Project) -> Options -> Value -> Parser Project forall a b. (a -> b) -> a -> b $ ShowS -> Options aesonPrefix ShowS snakeCase