{-# 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. 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
$cto :: forall x. Rep InputDeclaration x -> InputDeclaration
$cfrom :: forall x. InputDeclaration -> Rep InputDeclaration x
Generic, Int -> InputDeclaration -> ShowS
[InputDeclaration] -> ShowS
InputDeclaration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputDeclaration] -> ShowS
$cshowList :: [InputDeclaration] -> ShowS
show :: InputDeclaration -> String
$cshow :: InputDeclaration -> String
showsPrec :: Int -> InputDeclaration -> ShowS
$cshowsPrec :: Int -> InputDeclaration -> ShowS
Show, InputDeclaration -> InputDeclaration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputDeclaration -> InputDeclaration -> Bool
$c/= :: InputDeclaration -> InputDeclaration -> Bool
== :: InputDeclaration -> InputDeclaration -> Bool
$c== :: InputDeclaration -> InputDeclaration -> Bool
Eq, InputDeclaration -> ()
forall a. (a -> ()) -> NFData a
rnf :: InputDeclaration -> ()
$crnf :: InputDeclaration -> ()
NFData, Value -> Parser [InputDeclaration]
Value -> Parser InputDeclaration
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [InputDeclaration]
$cparseJSONList :: Value -> Parser [InputDeclaration]
parseJSON :: Value -> Parser InputDeclaration
$cparseJSON :: Value -> Parser InputDeclaration
FromJSON, [InputDeclaration] -> Encoding
[InputDeclaration] -> Value
InputDeclaration -> Encoding
InputDeclaration -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [InputDeclaration] -> Encoding
$ctoEncodingList :: [InputDeclaration] -> Encoding
toJSONList :: [InputDeclaration] -> Value
$ctoJSONList :: [InputDeclaration] -> Value
toEncoding :: InputDeclaration -> Encoding
$ctoEncoding :: InputDeclaration -> Encoding
toJSON :: InputDeclaration -> Value
$ctoJSON :: InputDeclaration -> Value
ToJSON)

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