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

module Hercules.API.Accounts.SimpleAccount where

import Hercules.API.Accounts.Account (Account, AccountType)
import Hercules.API.Forge.SimpleForge (SimpleForge)
import Hercules.API.Prelude

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 -> SimpleForge
site :: SimpleForge
  }
  deriving (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
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
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)
  deriving anyclass (SimpleAccount -> ()
forall a. (a -> ()) -> NFData a
rnf :: SimpleAccount -> ()
$crnf :: SimpleAccount -> ()
NFData, [SimpleAccount] -> Encoding
[SimpleAccount] -> Value
SimpleAccount -> Encoding
SimpleAccount -> Value
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
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
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)