{-# LANGUAGE DeriveAnyClass #-}

module Hercules.API.Evaluation.AttributeError where

import Hercules.API.Prelude

data AttributeError = AttributeError
  { AttributeError -> Text
errorMessage :: Text,
    -- | Not intended to be displayed to the user. This is
    --   @Just "BuildException"@ for evaluation time build failures.
    AttributeError -> Maybe Text
errorType :: Maybe Text,
    AttributeError -> Maybe Text
errorDerivation :: Maybe Text
  }
  deriving ((forall x. AttributeError -> Rep AttributeError x)
-> (forall x. Rep AttributeError x -> AttributeError)
-> Generic AttributeError
forall x. Rep AttributeError x -> AttributeError
forall x. AttributeError -> Rep AttributeError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AttributeError x -> AttributeError
$cfrom :: forall x. AttributeError -> Rep AttributeError x
Generic, Int -> AttributeError -> ShowS
[AttributeError] -> ShowS
AttributeError -> String
(Int -> AttributeError -> ShowS)
-> (AttributeError -> String)
-> ([AttributeError] -> ShowS)
-> Show AttributeError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttributeError] -> ShowS
$cshowList :: [AttributeError] -> ShowS
show :: AttributeError -> String
$cshow :: AttributeError -> String
showsPrec :: Int -> AttributeError -> ShowS
$cshowsPrec :: Int -> AttributeError -> ShowS
Show, AttributeError -> AttributeError -> Bool
(AttributeError -> AttributeError -> Bool)
-> (AttributeError -> AttributeError -> Bool) -> Eq AttributeError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttributeError -> AttributeError -> Bool
$c/= :: AttributeError -> AttributeError -> Bool
== :: AttributeError -> AttributeError -> Bool
$c== :: AttributeError -> AttributeError -> Bool
Eq, AttributeError -> ()
(AttributeError -> ()) -> NFData AttributeError
forall a. (a -> ()) -> NFData a
rnf :: AttributeError -> ()
$crnf :: AttributeError -> ()
NFData, [AttributeError] -> Encoding
[AttributeError] -> Value
AttributeError -> Encoding
AttributeError -> Value
(AttributeError -> Value)
-> (AttributeError -> Encoding)
-> ([AttributeError] -> Value)
-> ([AttributeError] -> Encoding)
-> ToJSON AttributeError
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AttributeError] -> Encoding
$ctoEncodingList :: [AttributeError] -> Encoding
toJSONList :: [AttributeError] -> Value
$ctoJSONList :: [AttributeError] -> Value
toEncoding :: AttributeError -> Encoding
$ctoEncoding :: AttributeError -> Encoding
toJSON :: AttributeError -> Value
$ctoJSON :: AttributeError -> Value
ToJSON, Value -> Parser [AttributeError]
Value -> Parser AttributeError
(Value -> Parser AttributeError)
-> (Value -> Parser [AttributeError]) -> FromJSON AttributeError
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [AttributeError]
$cparseJSONList :: Value -> Parser [AttributeError]
parseJSON :: Value -> Parser AttributeError
$cparseJSON :: Value -> Parser AttributeError
FromJSON, Proxy AttributeError -> Declare (Definitions Schema) NamedSchema
(Proxy AttributeError -> Declare (Definitions Schema) NamedSchema)
-> ToSchema AttributeError
forall a.
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
declareNamedSchema :: Proxy AttributeError -> Declare (Definitions Schema) NamedSchema
$cdeclareNamedSchema :: Proxy AttributeError -> Declare (Definitions Schema) NamedSchema
ToSchema)