{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingStrategies #-}

module Hercules.API.Evaluation.AttributeError where

import Data.OpenApi qualified as O3
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,
    AttributeError -> Maybe Text
trace :: 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
$cfrom :: forall x. AttributeError -> Rep AttributeError x
from :: forall x. AttributeError -> Rep AttributeError x
$cto :: forall x. Rep AttributeError x -> AttributeError
to :: forall x. Rep AttributeError x -> AttributeError
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
$cshowsPrec :: Int -> AttributeError -> ShowS
showsPrec :: Int -> AttributeError -> ShowS
$cshow :: AttributeError -> String
show :: AttributeError -> String
$cshowList :: [AttributeError] -> ShowS
showList :: [AttributeError] -> ShowS
Show, AttributeError -> AttributeError -> Bool
(AttributeError -> AttributeError -> Bool)
-> (AttributeError -> AttributeError -> Bool) -> Eq AttributeError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AttributeError -> AttributeError -> Bool
== :: AttributeError -> AttributeError -> Bool
$c/= :: AttributeError -> AttributeError -> Bool
/= :: AttributeError -> AttributeError -> Bool
Eq)
  deriving anyclass (AttributeError -> ()
(AttributeError -> ()) -> NFData AttributeError
forall a. (a -> ()) -> NFData a
$crnf :: AttributeError -> ()
rnf :: AttributeError -> ()
NFData, [AttributeError] -> Value
[AttributeError] -> Encoding
AttributeError -> Value
AttributeError -> Encoding
(AttributeError -> Value)
-> (AttributeError -> Encoding)
-> ([AttributeError] -> Value)
-> ([AttributeError] -> Encoding)
-> ToJSON AttributeError
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: AttributeError -> Value
toJSON :: AttributeError -> Value
$ctoEncoding :: AttributeError -> Encoding
toEncoding :: AttributeError -> Encoding
$ctoJSONList :: [AttributeError] -> Value
toJSONList :: [AttributeError] -> Value
$ctoEncodingList :: [AttributeError] -> Encoding
toEncodingList :: [AttributeError] -> Encoding
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
$cparseJSON :: Value -> Parser AttributeError
parseJSON :: Value -> Parser AttributeError
$cparseJSONList :: Value -> Parser [AttributeError]
parseJSONList :: 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
$cdeclareNamedSchema :: Proxy AttributeError -> Declare (Definitions Schema) NamedSchema
declareNamedSchema :: Proxy AttributeError -> Declare (Definitions Schema) NamedSchema
ToSchema, Typeable AttributeError
Typeable AttributeError =>
(Proxy AttributeError -> Declare (Definitions Schema) NamedSchema)
-> ToSchema AttributeError
Proxy AttributeError -> Declare (Definitions Schema) NamedSchema
forall a.
Typeable a =>
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
$cdeclareNamedSchema :: Proxy AttributeError -> Declare (Definitions Schema) NamedSchema
declareNamedSchema :: Proxy AttributeError -> Declare (Definitions Schema) NamedSchema
O3.ToSchema)