{-# LANGUAGE DeriveAnyClass #-}

module Hercules.API.Agent.Evaluate.ImmutableInput where

import Hercules.API.Agent.Evaluate.ImmutableGitInput (ImmutableGitInput)
import Hercules.API.Prelude

-- | A location
data ImmutableInput
  = -- | A de facto immutable URL. Do not use with URLs locating mutable contents!
    --
    -- Translates to @builtins.fetchTarball@
    ArchiveUrl Text
  | -- | A git commit below a ref.
    --
    -- Translates to @builtins.fetchGit@
    Git ImmutableGitInput
  deriving ((forall x. ImmutableInput -> Rep ImmutableInput x)
-> (forall x. Rep ImmutableInput x -> ImmutableInput)
-> Generic ImmutableInput
forall x. Rep ImmutableInput x -> ImmutableInput
forall x. ImmutableInput -> Rep ImmutableInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ImmutableInput -> Rep ImmutableInput x
from :: forall x. ImmutableInput -> Rep ImmutableInput x
$cto :: forall x. Rep ImmutableInput x -> ImmutableInput
to :: forall x. Rep ImmutableInput x -> ImmutableInput
Generic, Int -> ImmutableInput -> ShowS
[ImmutableInput] -> ShowS
ImmutableInput -> String
(Int -> ImmutableInput -> ShowS)
-> (ImmutableInput -> String)
-> ([ImmutableInput] -> ShowS)
-> Show ImmutableInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ImmutableInput -> ShowS
showsPrec :: Int -> ImmutableInput -> ShowS
$cshow :: ImmutableInput -> String
show :: ImmutableInput -> String
$cshowList :: [ImmutableInput] -> ShowS
showList :: [ImmutableInput] -> ShowS
Show, ImmutableInput -> ImmutableInput -> Bool
(ImmutableInput -> ImmutableInput -> Bool)
-> (ImmutableInput -> ImmutableInput -> Bool) -> Eq ImmutableInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ImmutableInput -> ImmutableInput -> Bool
== :: ImmutableInput -> ImmutableInput -> Bool
$c/= :: ImmutableInput -> ImmutableInput -> Bool
/= :: ImmutableInput -> ImmutableInput -> Bool
Eq)
  deriving anyclass (ImmutableInput -> ()
(ImmutableInput -> ()) -> NFData ImmutableInput
forall a. (a -> ()) -> NFData a
$crnf :: ImmutableInput -> ()
rnf :: ImmutableInput -> ()
NFData, [ImmutableInput] -> Value
[ImmutableInput] -> Encoding
ImmutableInput -> Value
ImmutableInput -> Encoding
(ImmutableInput -> Value)
-> (ImmutableInput -> Encoding)
-> ([ImmutableInput] -> Value)
-> ([ImmutableInput] -> Encoding)
-> ToJSON ImmutableInput
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: ImmutableInput -> Value
toJSON :: ImmutableInput -> Value
$ctoEncoding :: ImmutableInput -> Encoding
toEncoding :: ImmutableInput -> Encoding
$ctoJSONList :: [ImmutableInput] -> Value
toJSONList :: [ImmutableInput] -> Value
$ctoEncodingList :: [ImmutableInput] -> Encoding
toEncodingList :: [ImmutableInput] -> Encoding
ToJSON, Value -> Parser [ImmutableInput]
Value -> Parser ImmutableInput
(Value -> Parser ImmutableInput)
-> (Value -> Parser [ImmutableInput]) -> FromJSON ImmutableInput
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
$cparseJSON :: Value -> Parser ImmutableInput
parseJSON :: Value -> Parser ImmutableInput
$cparseJSONList :: Value -> Parser [ImmutableInput]
parseJSONList :: Value -> Parser [ImmutableInput]
FromJSON, Proxy ImmutableInput -> Declare (Definitions Schema) NamedSchema
(Proxy ImmutableInput -> Declare (Definitions Schema) NamedSchema)
-> ToSchema ImmutableInput
forall a.
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
$cdeclareNamedSchema :: Proxy ImmutableInput -> Declare (Definitions Schema) NamedSchema
declareNamedSchema :: Proxy ImmutableInput -> Declare (Definitions Schema) NamedSchema
ToSchema)