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

module Hercules.API.Projects.SimpleProject where

import Data.OpenApi qualified as O3
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. SimpleProject -> Rep SimpleProject x)
-> (forall x. Rep SimpleProject x -> SimpleProject)
-> Generic SimpleProject
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
$cfrom :: forall x. SimpleProject -> Rep SimpleProject x
from :: forall x. SimpleProject -> Rep SimpleProject x
$cto :: forall x. Rep SimpleProject x -> SimpleProject
to :: forall x. Rep SimpleProject x -> SimpleProject
Generic, Int -> SimpleProject -> ShowS
[SimpleProject] -> ShowS
SimpleProject -> String
(Int -> SimpleProject -> ShowS)
-> (SimpleProject -> String)
-> ([SimpleProject] -> ShowS)
-> Show SimpleProject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SimpleProject -> ShowS
showsPrec :: Int -> SimpleProject -> ShowS
$cshow :: SimpleProject -> String
show :: SimpleProject -> String
$cshowList :: [SimpleProject] -> ShowS
showList :: [SimpleProject] -> ShowS
Show, SimpleProject -> SimpleProject -> Bool
(SimpleProject -> SimpleProject -> Bool)
-> (SimpleProject -> SimpleProject -> Bool) -> Eq SimpleProject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SimpleProject -> SimpleProject -> Bool
== :: SimpleProject -> SimpleProject -> Bool
$c/= :: SimpleProject -> SimpleProject -> Bool
/= :: SimpleProject -> SimpleProject -> Bool
Eq)
  deriving anyclass (SimpleProject -> ()
(SimpleProject -> ()) -> NFData SimpleProject
forall a. (a -> ()) -> NFData a
$crnf :: SimpleProject -> ()
rnf :: SimpleProject -> ()
NFData, [SimpleProject] -> Value
[SimpleProject] -> Encoding
SimpleProject -> Value
SimpleProject -> Encoding
(SimpleProject -> Value)
-> (SimpleProject -> Encoding)
-> ([SimpleProject] -> Value)
-> ([SimpleProject] -> Encoding)
-> ToJSON SimpleProject
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: SimpleProject -> Value
toJSON :: SimpleProject -> Value
$ctoEncoding :: SimpleProject -> Encoding
toEncoding :: SimpleProject -> Encoding
$ctoJSONList :: [SimpleProject] -> Value
toJSONList :: [SimpleProject] -> Value
$ctoEncodingList :: [SimpleProject] -> Encoding
toEncodingList :: [SimpleProject] -> Encoding
ToJSON, Value -> Parser [SimpleProject]
Value -> Parser SimpleProject
(Value -> Parser SimpleProject)
-> (Value -> Parser [SimpleProject]) -> FromJSON SimpleProject
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
$cparseJSON :: Value -> Parser SimpleProject
parseJSON :: Value -> Parser SimpleProject
$cparseJSONList :: Value -> Parser [SimpleProject]
parseJSONList :: Value -> Parser [SimpleProject]
FromJSON, Proxy SimpleProject -> Declare (Definitions Schema) NamedSchema
(Proxy SimpleProject -> Declare (Definitions Schema) NamedSchema)
-> ToSchema SimpleProject
forall a.
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
$cdeclareNamedSchema :: Proxy SimpleProject -> Declare (Definitions Schema) NamedSchema
declareNamedSchema :: Proxy SimpleProject -> Declare (Definitions Schema) NamedSchema
ToSchema, Typeable SimpleProject
Typeable SimpleProject
-> (Proxy SimpleProject
    -> Declare (Definitions Schema) NamedSchema)
-> ToSchema SimpleProject
Proxy SimpleProject -> Declare (Definitions Schema) NamedSchema
forall a.
Typeable a
-> (Proxy a -> Declare (Definitions Schema) NamedSchema)
-> ToSchema a
$cdeclareNamedSchema :: Proxy SimpleProject -> Declare (Definitions Schema) NamedSchema
declareNamedSchema :: Proxy SimpleProject -> Declare (Definitions Schema) NamedSchema
O3.ToSchema)