{-# LANGUAGE DeriveAnyClass #-}

module Hercules.API.Agent.Evaluate.EvaluateEvent.InputDeclaration where

import Hercules.API.Prelude

data InputDeclaration
  = SiblingInput SiblingInput
  | -- | Only exists to ensure correct serialization format. Will be replaced by a real second constructor.
    BogusInput Text
  deriving ((forall x. InputDeclaration -> Rep InputDeclaration x)
-> (forall x. Rep InputDeclaration x -> InputDeclaration)
-> Generic InputDeclaration
forall x. Rep InputDeclaration x -> InputDeclaration
forall x. InputDeclaration -> Rep InputDeclaration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. InputDeclaration -> Rep InputDeclaration x
from :: forall x. InputDeclaration -> Rep InputDeclaration x
$cto :: forall x. Rep InputDeclaration x -> InputDeclaration
to :: forall x. Rep InputDeclaration x -> InputDeclaration
Generic, Int -> InputDeclaration -> ShowS
[InputDeclaration] -> ShowS
InputDeclaration -> String
(Int -> InputDeclaration -> ShowS)
-> (InputDeclaration -> String)
-> ([InputDeclaration] -> ShowS)
-> Show InputDeclaration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InputDeclaration -> ShowS
showsPrec :: Int -> InputDeclaration -> ShowS
$cshow :: InputDeclaration -> String
show :: InputDeclaration -> String
$cshowList :: [InputDeclaration] -> ShowS
showList :: [InputDeclaration] -> ShowS
Show, InputDeclaration -> InputDeclaration -> Bool
(InputDeclaration -> InputDeclaration -> Bool)
-> (InputDeclaration -> InputDeclaration -> Bool)
-> Eq InputDeclaration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InputDeclaration -> InputDeclaration -> Bool
== :: InputDeclaration -> InputDeclaration -> Bool
$c/= :: InputDeclaration -> InputDeclaration -> Bool
/= :: InputDeclaration -> InputDeclaration -> Bool
Eq, InputDeclaration -> ()
(InputDeclaration -> ()) -> NFData InputDeclaration
forall a. (a -> ()) -> NFData a
$crnf :: InputDeclaration -> ()
rnf :: InputDeclaration -> ()
NFData, Value -> Parser [InputDeclaration]
Value -> Parser InputDeclaration
(Value -> Parser InputDeclaration)
-> (Value -> Parser [InputDeclaration])
-> FromJSON InputDeclaration
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
$cparseJSON :: Value -> Parser InputDeclaration
parseJSON :: Value -> Parser InputDeclaration
$cparseJSONList :: Value -> Parser [InputDeclaration]
parseJSONList :: Value -> Parser [InputDeclaration]
FromJSON, [InputDeclaration] -> Value
[InputDeclaration] -> Encoding
InputDeclaration -> Value
InputDeclaration -> Encoding
(InputDeclaration -> Value)
-> (InputDeclaration -> Encoding)
-> ([InputDeclaration] -> Value)
-> ([InputDeclaration] -> Encoding)
-> ToJSON InputDeclaration
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: InputDeclaration -> Value
toJSON :: InputDeclaration -> Value
$ctoEncoding :: InputDeclaration -> Encoding
toEncoding :: InputDeclaration -> Encoding
$ctoJSONList :: [InputDeclaration] -> Value
toJSONList :: [InputDeclaration] -> Value
$ctoEncodingList :: [InputDeclaration] -> Encoding
toEncodingList :: [InputDeclaration] -> Encoding
ToJSON)

data SiblingInput = MkSiblingInput
  { SiblingInput -> Text
project :: Text,
    SiblingInput -> Maybe Text
ref :: Maybe Text
  }
  deriving ((forall x. SiblingInput -> Rep SiblingInput x)
-> (forall x. Rep SiblingInput x -> SiblingInput)
-> Generic SiblingInput
forall x. Rep SiblingInput x -> SiblingInput
forall x. SiblingInput -> Rep SiblingInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SiblingInput -> Rep SiblingInput x
from :: forall x. SiblingInput -> Rep SiblingInput x
$cto :: forall x. Rep SiblingInput x -> SiblingInput
to :: forall x. Rep SiblingInput x -> SiblingInput
Generic, Int -> SiblingInput -> ShowS
[SiblingInput] -> ShowS
SiblingInput -> String
(Int -> SiblingInput -> ShowS)
-> (SiblingInput -> String)
-> ([SiblingInput] -> ShowS)
-> Show SiblingInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SiblingInput -> ShowS
showsPrec :: Int -> SiblingInput -> ShowS
$cshow :: SiblingInput -> String
show :: SiblingInput -> String
$cshowList :: [SiblingInput] -> ShowS
showList :: [SiblingInput] -> ShowS
Show, SiblingInput -> SiblingInput -> Bool
(SiblingInput -> SiblingInput -> Bool)
-> (SiblingInput -> SiblingInput -> Bool) -> Eq SiblingInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SiblingInput -> SiblingInput -> Bool
== :: SiblingInput -> SiblingInput -> Bool
$c/= :: SiblingInput -> SiblingInput -> Bool
/= :: SiblingInput -> SiblingInput -> Bool
Eq, SiblingInput -> ()
(SiblingInput -> ()) -> NFData SiblingInput
forall a. (a -> ()) -> NFData a
$crnf :: SiblingInput -> ()
rnf :: SiblingInput -> ()
NFData, Value -> Parser [SiblingInput]
Value -> Parser SiblingInput
(Value -> Parser SiblingInput)
-> (Value -> Parser [SiblingInput]) -> FromJSON SiblingInput
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
$cparseJSON :: Value -> Parser SiblingInput
parseJSON :: Value -> Parser SiblingInput
$cparseJSONList :: Value -> Parser [SiblingInput]
parseJSONList :: Value -> Parser [SiblingInput]
FromJSON, [SiblingInput] -> Value
[SiblingInput] -> Encoding
SiblingInput -> Value
SiblingInput -> Encoding
(SiblingInput -> Value)
-> (SiblingInput -> Encoding)
-> ([SiblingInput] -> Value)
-> ([SiblingInput] -> Encoding)
-> ToJSON SiblingInput
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: SiblingInput -> Value
toJSON :: SiblingInput -> Value
$ctoEncoding :: SiblingInput -> Encoding
toEncoding :: SiblingInput -> Encoding
$ctoJSONList :: [SiblingInput] -> Value
toJSONList :: [SiblingInput] -> Value
$ctoEncodingList :: [SiblingInput] -> Encoding
toEncodingList :: [SiblingInput] -> Encoding
ToJSON)