{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE ExplicitForAll #-}

module Admin.Components.ComponentDescription where

import Data.Aeson (FromJSON, ToJSON)
import Data.Version (Version)
import GHC.Generics (Generic)

data ComponentDescription =
  ComponentDescription
    { ComponentDescription -> String
componentName :: String
    , ComponentDescription -> Version
componentVersion :: Version
    }
  deriving (ReadPrec [ComponentDescription]
ReadPrec ComponentDescription
Int -> ReadS ComponentDescription
ReadS [ComponentDescription]
(Int -> ReadS ComponentDescription)
-> ReadS [ComponentDescription]
-> ReadPrec ComponentDescription
-> ReadPrec [ComponentDescription]
-> Read ComponentDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComponentDescription]
$creadListPrec :: ReadPrec [ComponentDescription]
readPrec :: ReadPrec ComponentDescription
$creadPrec :: ReadPrec ComponentDescription
readList :: ReadS [ComponentDescription]
$creadList :: ReadS [ComponentDescription]
readsPrec :: Int -> ReadS ComponentDescription
$creadsPrec :: Int -> ReadS ComponentDescription
Read, Int -> ComponentDescription -> ShowS
[ComponentDescription] -> ShowS
ComponentDescription -> String
(Int -> ComponentDescription -> ShowS)
-> (ComponentDescription -> String)
-> ([ComponentDescription] -> ShowS)
-> Show ComponentDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComponentDescription] -> ShowS
$cshowList :: [ComponentDescription] -> ShowS
show :: ComponentDescription -> String
$cshow :: ComponentDescription -> String
showsPrec :: Int -> ComponentDescription -> ShowS
$cshowsPrec :: Int -> ComponentDescription -> ShowS
Show, ComponentDescription -> ComponentDescription -> Bool
(ComponentDescription -> ComponentDescription -> Bool)
-> (ComponentDescription -> ComponentDescription -> Bool)
-> Eq ComponentDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComponentDescription -> ComponentDescription -> Bool
$c/= :: ComponentDescription -> ComponentDescription -> Bool
== :: ComponentDescription -> ComponentDescription -> Bool
$c== :: ComponentDescription -> ComponentDescription -> Bool
Eq, (forall x. ComponentDescription -> Rep ComponentDescription x)
-> (forall x. Rep ComponentDescription x -> ComponentDescription)
-> Generic ComponentDescription
forall x. Rep ComponentDescription x -> ComponentDescription
forall x. ComponentDescription -> Rep ComponentDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComponentDescription x -> ComponentDescription
$cfrom :: forall x. ComponentDescription -> Rep ComponentDescription x
Generic, [ComponentDescription] -> Encoding
[ComponentDescription] -> Value
ComponentDescription -> Encoding
ComponentDescription -> Value
(ComponentDescription -> Value)
-> (ComponentDescription -> Encoding)
-> ([ComponentDescription] -> Value)
-> ([ComponentDescription] -> Encoding)
-> ToJSON ComponentDescription
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ComponentDescription] -> Encoding
$ctoEncodingList :: [ComponentDescription] -> Encoding
toJSONList :: [ComponentDescription] -> Value
$ctoJSONList :: [ComponentDescription] -> Value
toEncoding :: ComponentDescription -> Encoding
$ctoEncoding :: ComponentDescription -> Encoding
toJSON :: ComponentDescription -> Value
$ctoJSON :: ComponentDescription -> Value
ToJSON, Value -> Parser [ComponentDescription]
Value -> Parser ComponentDescription
(Value -> Parser ComponentDescription)
-> (Value -> Parser [ComponentDescription])
-> FromJSON ComponentDescription
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [ComponentDescription]
$cparseJSONList :: Value -> Parser [ComponentDescription]
parseJSON :: Value -> Parser ComponentDescription
$cparseJSON :: Value -> Parser ComponentDescription
FromJSON)