{-# LANGUAGE DeriveAnyClass #-}

module Hercules.API.Accounts.SimpleAccount where

import Hercules.API.Accounts.Account (Account, AccountType)
import Hercules.API.Prelude
import Hercules.API.SourceHostingSite.SimpleSite (SimpleSite)

data SimpleAccount = SimpleAccount
  { SimpleAccount -> Id Account
id :: Id Account,
    SimpleAccount -> Name Account
name :: Name Account,
    SimpleAccount -> Text
displayName :: Text,
    SimpleAccount -> AccountType
typ :: AccountType,
    SimpleAccount -> Text
imageURL :: Text,
    SimpleAccount -> SimpleSite
site :: SimpleSite
  }
  deriving ((forall x. SimpleAccount -> Rep SimpleAccount x)
-> (forall x. Rep SimpleAccount x -> SimpleAccount)
-> Generic SimpleAccount
forall x. Rep SimpleAccount x -> SimpleAccount
forall x. SimpleAccount -> Rep SimpleAccount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SimpleAccount x -> SimpleAccount
$cfrom :: forall x. SimpleAccount -> Rep SimpleAccount x
Generic, Int -> SimpleAccount -> ShowS
[SimpleAccount] -> ShowS
SimpleAccount -> String
(Int -> SimpleAccount -> ShowS)
-> (SimpleAccount -> String)
-> ([SimpleAccount] -> ShowS)
-> Show SimpleAccount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SimpleAccount] -> ShowS
$cshowList :: [SimpleAccount] -> ShowS
show :: SimpleAccount -> String
$cshow :: SimpleAccount -> String
showsPrec :: Int -> SimpleAccount -> ShowS
$cshowsPrec :: Int -> SimpleAccount -> ShowS
Show, SimpleAccount -> SimpleAccount -> Bool
(SimpleAccount -> SimpleAccount -> Bool)
-> (SimpleAccount -> SimpleAccount -> Bool) -> Eq SimpleAccount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SimpleAccount -> SimpleAccount -> Bool
$c/= :: SimpleAccount -> SimpleAccount -> Bool
== :: SimpleAccount -> SimpleAccount -> Bool
$c== :: SimpleAccount -> SimpleAccount -> Bool
Eq, SimpleAccount -> ()
(SimpleAccount -> ()) -> NFData SimpleAccount
forall a. (a -> ()) -> NFData a
rnf :: SimpleAccount -> ()
$crnf :: SimpleAccount -> ()
NFData, [SimpleAccount] -> Encoding
[SimpleAccount] -> Value
SimpleAccount -> Encoding
SimpleAccount -> Value
(SimpleAccount -> Value)
-> (SimpleAccount -> Encoding)
-> ([SimpleAccount] -> Value)
-> ([SimpleAccount] -> Encoding)
-> ToJSON SimpleAccount
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [SimpleAccount] -> Encoding
$ctoEncodingList :: [SimpleAccount] -> Encoding
toJSONList :: [SimpleAccount] -> Value
$ctoJSONList :: [SimpleAccount] -> Value
toEncoding :: SimpleAccount -> Encoding
$ctoEncoding :: SimpleAccount -> Encoding
toJSON :: SimpleAccount -> Value
$ctoJSON :: SimpleAccount -> Value
ToJSON, Value -> Parser [SimpleAccount]
Value -> Parser SimpleAccount
(Value -> Parser SimpleAccount)
-> (Value -> Parser [SimpleAccount]) -> FromJSON SimpleAccount
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [SimpleAccount]
$cparseJSONList :: Value -> Parser [SimpleAccount]
parseJSON :: Value -> Parser SimpleAccount
$cparseJSON :: Value -> Parser SimpleAccount
FromJSON, Proxy SimpleAccount -> Declare (Definitions Schema) NamedSchema
(Proxy SimpleAccount -> Declare (Definitions Schema) NamedSchema)
-> ToSchema SimpleAccount
forall a.
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
declareNamedSchema :: Proxy SimpleAccount -> Declare (Definitions Schema) NamedSchema
$cdeclareNamedSchema :: Proxy SimpleAccount -> Declare (Definitions Schema) NamedSchema
ToSchema)