{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DerivingStrategies #-} module Hercules.API.Derivation where import Data.OpenApi qualified as O3 import Hercules.API.Prelude hiding (either) data DerivationPath = DerivationPath { DerivationPath -> Text drvPath :: Text } deriving ((forall x. DerivationPath -> Rep DerivationPath x) -> (forall x. Rep DerivationPath x -> DerivationPath) -> Generic DerivationPath forall x. Rep DerivationPath x -> DerivationPath forall x. DerivationPath -> Rep DerivationPath x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cfrom :: forall x. DerivationPath -> Rep DerivationPath x from :: forall x. DerivationPath -> Rep DerivationPath x $cto :: forall x. Rep DerivationPath x -> DerivationPath to :: forall x. Rep DerivationPath x -> DerivationPath Generic, Int -> DerivationPath -> ShowS [DerivationPath] -> ShowS DerivationPath -> String (Int -> DerivationPath -> ShowS) -> (DerivationPath -> String) -> ([DerivationPath] -> ShowS) -> Show DerivationPath forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> DerivationPath -> ShowS showsPrec :: Int -> DerivationPath -> ShowS $cshow :: DerivationPath -> String show :: DerivationPath -> String $cshowList :: [DerivationPath] -> ShowS showList :: [DerivationPath] -> ShowS Show, DerivationPath -> DerivationPath -> Bool (DerivationPath -> DerivationPath -> Bool) -> (DerivationPath -> DerivationPath -> Bool) -> Eq DerivationPath forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: DerivationPath -> DerivationPath -> Bool == :: DerivationPath -> DerivationPath -> Bool $c/= :: DerivationPath -> DerivationPath -> Bool /= :: DerivationPath -> DerivationPath -> Bool Eq) deriving anyclass (DerivationPath -> () (DerivationPath -> ()) -> NFData DerivationPath forall a. (a -> ()) -> NFData a $crnf :: DerivationPath -> () rnf :: DerivationPath -> () NFData, [DerivationPath] -> Value [DerivationPath] -> Encoding DerivationPath -> Value DerivationPath -> Encoding (DerivationPath -> Value) -> (DerivationPath -> Encoding) -> ([DerivationPath] -> Value) -> ([DerivationPath] -> Encoding) -> ToJSON DerivationPath forall a. (a -> Value) -> (a -> Encoding) -> ([a] -> Value) -> ([a] -> Encoding) -> ToJSON a $ctoJSON :: DerivationPath -> Value toJSON :: DerivationPath -> Value $ctoEncoding :: DerivationPath -> Encoding toEncoding :: DerivationPath -> Encoding $ctoJSONList :: [DerivationPath] -> Value toJSONList :: [DerivationPath] -> Value $ctoEncodingList :: [DerivationPath] -> Encoding toEncodingList :: [DerivationPath] -> Encoding ToJSON, Value -> Parser [DerivationPath] Value -> Parser DerivationPath (Value -> Parser DerivationPath) -> (Value -> Parser [DerivationPath]) -> FromJSON DerivationPath forall a. (Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a $cparseJSON :: Value -> Parser DerivationPath parseJSON :: Value -> Parser DerivationPath $cparseJSONList :: Value -> Parser [DerivationPath] parseJSONList :: Value -> Parser [DerivationPath] FromJSON, Proxy DerivationPath -> Declare (Definitions Schema) NamedSchema (Proxy DerivationPath -> Declare (Definitions Schema) NamedSchema) -> ToSchema DerivationPath forall a. (Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a $cdeclareNamedSchema :: Proxy DerivationPath -> Declare (Definitions Schema) NamedSchema declareNamedSchema :: Proxy DerivationPath -> Declare (Definitions Schema) NamedSchema ToSchema, Typeable DerivationPath Typeable DerivationPath -> (Proxy DerivationPath -> Declare (Definitions Schema) NamedSchema) -> ToSchema DerivationPath Proxy DerivationPath -> Declare (Definitions Schema) NamedSchema forall a. Typeable a -> (Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a $cdeclareNamedSchema :: Proxy DerivationPath -> Declare (Definitions Schema) NamedSchema declareNamedSchema :: Proxy DerivationPath -> Declare (Definitions Schema) NamedSchema O3.ToSchema) data Derivation = Derivation { Derivation -> DerivationStatus status :: DerivationStatus, Derivation -> Text derivationPath :: Text } deriving ((forall x. Derivation -> Rep Derivation x) -> (forall x. Rep Derivation x -> Derivation) -> Generic Derivation forall x. Rep Derivation x -> Derivation forall x. Derivation -> Rep Derivation x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cfrom :: forall x. Derivation -> Rep Derivation x from :: forall x. Derivation -> Rep Derivation x $cto :: forall x. Rep Derivation x -> Derivation to :: forall x. Rep Derivation x -> Derivation Generic, Int -> Derivation -> ShowS [Derivation] -> ShowS Derivation -> String (Int -> Derivation -> ShowS) -> (Derivation -> String) -> ([Derivation] -> ShowS) -> Show Derivation forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> Derivation -> ShowS showsPrec :: Int -> Derivation -> ShowS $cshow :: Derivation -> String show :: Derivation -> String $cshowList :: [Derivation] -> ShowS showList :: [Derivation] -> ShowS Show, Derivation -> Derivation -> Bool (Derivation -> Derivation -> Bool) -> (Derivation -> Derivation -> Bool) -> Eq Derivation forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: Derivation -> Derivation -> Bool == :: Derivation -> Derivation -> Bool $c/= :: Derivation -> Derivation -> Bool /= :: Derivation -> Derivation -> Bool Eq) deriving anyclass (Derivation -> () (Derivation -> ()) -> NFData Derivation forall a. (a -> ()) -> NFData a $crnf :: Derivation -> () rnf :: Derivation -> () NFData, [Derivation] -> Value [Derivation] -> Encoding Derivation -> Value Derivation -> Encoding (Derivation -> Value) -> (Derivation -> Encoding) -> ([Derivation] -> Value) -> ([Derivation] -> Encoding) -> ToJSON Derivation forall a. (a -> Value) -> (a -> Encoding) -> ([a] -> Value) -> ([a] -> Encoding) -> ToJSON a $ctoJSON :: Derivation -> Value toJSON :: Derivation -> Value $ctoEncoding :: Derivation -> Encoding toEncoding :: Derivation -> Encoding $ctoJSONList :: [Derivation] -> Value toJSONList :: [Derivation] -> Value $ctoEncodingList :: [Derivation] -> Encoding toEncodingList :: [Derivation] -> Encoding ToJSON, Value -> Parser [Derivation] Value -> Parser Derivation (Value -> Parser Derivation) -> (Value -> Parser [Derivation]) -> FromJSON Derivation forall a. (Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a $cparseJSON :: Value -> Parser Derivation parseJSON :: Value -> Parser Derivation $cparseJSONList :: Value -> Parser [Derivation] parseJSONList :: Value -> Parser [Derivation] FromJSON, Proxy Derivation -> Declare (Definitions Schema) NamedSchema (Proxy Derivation -> Declare (Definitions Schema) NamedSchema) -> ToSchema Derivation forall a. (Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a $cdeclareNamedSchema :: Proxy Derivation -> Declare (Definitions Schema) NamedSchema declareNamedSchema :: Proxy Derivation -> Declare (Definitions Schema) NamedSchema ToSchema, Typeable Derivation Typeable Derivation -> (Proxy Derivation -> Declare (Definitions Schema) NamedSchema) -> ToSchema Derivation Proxy Derivation -> Declare (Definitions Schema) NamedSchema forall a. Typeable a -> (Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a $cdeclareNamedSchema :: Proxy Derivation -> Declare (Definitions Schema) NamedSchema declareNamedSchema :: Proxy Derivation -> Declare (Definitions Schema) NamedSchema O3.ToSchema) data DerivationStatus = Waiting | Building | BuildFailure | DependencyFailure | BuildSuccess | Cancelled deriving ((forall x. DerivationStatus -> Rep DerivationStatus x) -> (forall x. Rep DerivationStatus x -> DerivationStatus) -> Generic DerivationStatus forall x. Rep DerivationStatus x -> DerivationStatus forall x. DerivationStatus -> Rep DerivationStatus x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cfrom :: forall x. DerivationStatus -> Rep DerivationStatus x from :: forall x. DerivationStatus -> Rep DerivationStatus x $cto :: forall x. Rep DerivationStatus x -> DerivationStatus to :: forall x. Rep DerivationStatus x -> DerivationStatus Generic, Int -> DerivationStatus -> ShowS [DerivationStatus] -> ShowS DerivationStatus -> String (Int -> DerivationStatus -> ShowS) -> (DerivationStatus -> String) -> ([DerivationStatus] -> ShowS) -> Show DerivationStatus forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> DerivationStatus -> ShowS showsPrec :: Int -> DerivationStatus -> ShowS $cshow :: DerivationStatus -> String show :: DerivationStatus -> String $cshowList :: [DerivationStatus] -> ShowS showList :: [DerivationStatus] -> ShowS Show, DerivationStatus -> DerivationStatus -> Bool (DerivationStatus -> DerivationStatus -> Bool) -> (DerivationStatus -> DerivationStatus -> Bool) -> Eq DerivationStatus forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: DerivationStatus -> DerivationStatus -> Bool == :: DerivationStatus -> DerivationStatus -> Bool $c/= :: DerivationStatus -> DerivationStatus -> Bool /= :: DerivationStatus -> DerivationStatus -> Bool Eq) deriving anyclass (DerivationStatus -> () (DerivationStatus -> ()) -> NFData DerivationStatus forall a. (a -> ()) -> NFData a $crnf :: DerivationStatus -> () rnf :: DerivationStatus -> () NFData, [DerivationStatus] -> Value [DerivationStatus] -> Encoding DerivationStatus -> Value DerivationStatus -> Encoding (DerivationStatus -> Value) -> (DerivationStatus -> Encoding) -> ([DerivationStatus] -> Value) -> ([DerivationStatus] -> Encoding) -> ToJSON DerivationStatus forall a. (a -> Value) -> (a -> Encoding) -> ([a] -> Value) -> ([a] -> Encoding) -> ToJSON a $ctoJSON :: DerivationStatus -> Value toJSON :: DerivationStatus -> Value $ctoEncoding :: DerivationStatus -> Encoding toEncoding :: DerivationStatus -> Encoding $ctoJSONList :: [DerivationStatus] -> Value toJSONList :: [DerivationStatus] -> Value $ctoEncodingList :: [DerivationStatus] -> Encoding toEncodingList :: [DerivationStatus] -> Encoding ToJSON, Value -> Parser [DerivationStatus] Value -> Parser DerivationStatus (Value -> Parser DerivationStatus) -> (Value -> Parser [DerivationStatus]) -> FromJSON DerivationStatus forall a. (Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a $cparseJSON :: Value -> Parser DerivationStatus parseJSON :: Value -> Parser DerivationStatus $cparseJSONList :: Value -> Parser [DerivationStatus] parseJSONList :: Value -> Parser [DerivationStatus] FromJSON, Proxy DerivationStatus -> Declare (Definitions Schema) NamedSchema (Proxy DerivationStatus -> Declare (Definitions Schema) NamedSchema) -> ToSchema DerivationStatus forall a. (Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a $cdeclareNamedSchema :: Proxy DerivationStatus -> Declare (Definitions Schema) NamedSchema declareNamedSchema :: Proxy DerivationStatus -> Declare (Definitions Schema) NamedSchema ToSchema, Typeable DerivationStatus Typeable DerivationStatus -> (Proxy DerivationStatus -> Declare (Definitions Schema) NamedSchema) -> ToSchema DerivationStatus Proxy DerivationStatus -> Declare (Definitions Schema) NamedSchema forall a. Typeable a -> (Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a $cdeclareNamedSchema :: Proxy DerivationStatus -> Declare (Definitions Schema) NamedSchema declareNamedSchema :: Proxy DerivationStatus -> Declare (Definitions Schema) NamedSchema O3.ToSchema)