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