{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}

module Hercules.API.Projects.SimpleProject where

import Hercules.API.Accounts.SimpleAccount (SimpleAccount)
import Hercules.API.Prelude
import Hercules.API.Projects.Project (Project)

data SimpleProject = SimpleProject
  { SimpleProject -> Id Project
id :: Id Project,
    SimpleProject -> Name Project
name :: Name Project,
    SimpleProject -> SimpleAccount
owner :: SimpleAccount,
    SimpleProject -> Text
displayName :: Text,
    SimpleProject -> Maybe Text
imageURL :: Maybe Text,
    -- | True if no authorization is required for retrieving basic
    --   information about a project, such as its existence, name,
    --   job statuses etc.
    SimpleProject -> Bool
isPublic :: Bool
  }
  deriving (forall x. Rep SimpleProject x -> SimpleProject
forall x. SimpleProject -> Rep SimpleProject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SimpleProject x -> SimpleProject
$cfrom :: forall x. SimpleProject -> Rep SimpleProject x
Generic, Int -> SimpleProject -> ShowS
[SimpleProject] -> ShowS
SimpleProject -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SimpleProject] -> ShowS
$cshowList :: [SimpleProject] -> ShowS
show :: SimpleProject -> String
$cshow :: SimpleProject -> String
showsPrec :: Int -> SimpleProject -> ShowS
$cshowsPrec :: Int -> SimpleProject -> ShowS
Show, SimpleProject -> SimpleProject -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SimpleProject -> SimpleProject -> Bool
$c/= :: SimpleProject -> SimpleProject -> Bool
== :: SimpleProject -> SimpleProject -> Bool
$c== :: SimpleProject -> SimpleProject -> Bool
Eq, SimpleProject -> ()
forall a. (a -> ()) -> NFData a
rnf :: SimpleProject -> ()
$crnf :: SimpleProject -> ()
NFData, [SimpleProject] -> Encoding
[SimpleProject] -> Value
SimpleProject -> Encoding
SimpleProject -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [SimpleProject] -> Encoding
$ctoEncodingList :: [SimpleProject] -> Encoding
toJSONList :: [SimpleProject] -> Value
$ctoJSONList :: [SimpleProject] -> Value
toEncoding :: SimpleProject -> Encoding
$ctoEncoding :: SimpleProject -> Encoding
toJSON :: SimpleProject -> Value
$ctoJSON :: SimpleProject -> Value
ToJSON, Value -> Parser [SimpleProject]
Value -> Parser SimpleProject
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [SimpleProject]
$cparseJSONList :: Value -> Parser [SimpleProject]
parseJSON :: Value -> Parser SimpleProject
$cparseJSON :: Value -> Parser SimpleProject
FromJSON, Proxy SimpleProject -> Declare (Definitions Schema) NamedSchema
forall a.
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
declareNamedSchema :: Proxy SimpleProject -> Declare (Definitions Schema) NamedSchema
$cdeclareNamedSchema :: Proxy SimpleProject -> Declare (Definitions Schema) NamedSchema
ToSchema)