{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SageMaker.Types.RenderingError where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RenderingError = RenderingError'
{
RenderingError -> Text
code :: Prelude.Text,
RenderingError -> Text
message :: Prelude.Text
}
deriving (RenderingError -> RenderingError -> Bool
(RenderingError -> RenderingError -> Bool)
-> (RenderingError -> RenderingError -> Bool) -> Eq RenderingError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RenderingError -> RenderingError -> Bool
$c/= :: RenderingError -> RenderingError -> Bool
== :: RenderingError -> RenderingError -> Bool
$c== :: RenderingError -> RenderingError -> Bool
Prelude.Eq, ReadPrec [RenderingError]
ReadPrec RenderingError
Int -> ReadS RenderingError
ReadS [RenderingError]
(Int -> ReadS RenderingError)
-> ReadS [RenderingError]
-> ReadPrec RenderingError
-> ReadPrec [RenderingError]
-> Read RenderingError
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RenderingError]
$creadListPrec :: ReadPrec [RenderingError]
readPrec :: ReadPrec RenderingError
$creadPrec :: ReadPrec RenderingError
readList :: ReadS [RenderingError]
$creadList :: ReadS [RenderingError]
readsPrec :: Int -> ReadS RenderingError
$creadsPrec :: Int -> ReadS RenderingError
Prelude.Read, Int -> RenderingError -> ShowS
[RenderingError] -> ShowS
RenderingError -> String
(Int -> RenderingError -> ShowS)
-> (RenderingError -> String)
-> ([RenderingError] -> ShowS)
-> Show RenderingError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RenderingError] -> ShowS
$cshowList :: [RenderingError] -> ShowS
show :: RenderingError -> String
$cshow :: RenderingError -> String
showsPrec :: Int -> RenderingError -> ShowS
$cshowsPrec :: Int -> RenderingError -> ShowS
Prelude.Show, (forall x. RenderingError -> Rep RenderingError x)
-> (forall x. Rep RenderingError x -> RenderingError)
-> Generic RenderingError
forall x. Rep RenderingError x -> RenderingError
forall x. RenderingError -> Rep RenderingError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RenderingError x -> RenderingError
$cfrom :: forall x. RenderingError -> Rep RenderingError x
Prelude.Generic)
newRenderingError ::
Prelude.Text ->
Prelude.Text ->
RenderingError
newRenderingError :: Text -> Text -> RenderingError
newRenderingError Text
pCode_ Text
pMessage_ =
RenderingError' :: Text -> Text -> RenderingError
RenderingError' {$sel:code:RenderingError' :: Text
code = Text
pCode_, $sel:message:RenderingError' :: Text
message = Text
pMessage_}
renderingError_code :: Lens.Lens' RenderingError Prelude.Text
renderingError_code :: (Text -> f Text) -> RenderingError -> f RenderingError
renderingError_code = (RenderingError -> Text)
-> (RenderingError -> Text -> RenderingError)
-> Lens RenderingError RenderingError Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RenderingError' {Text
code :: Text
$sel:code:RenderingError' :: RenderingError -> Text
code} -> Text
code) (\s :: RenderingError
s@RenderingError' {} Text
a -> RenderingError
s {$sel:code:RenderingError' :: Text
code = Text
a} :: RenderingError)
renderingError_message :: Lens.Lens' RenderingError Prelude.Text
renderingError_message :: (Text -> f Text) -> RenderingError -> f RenderingError
renderingError_message = (RenderingError -> Text)
-> (RenderingError -> Text -> RenderingError)
-> Lens RenderingError RenderingError Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RenderingError' {Text
message :: Text
$sel:message:RenderingError' :: RenderingError -> Text
message} -> Text
message) (\s :: RenderingError
s@RenderingError' {} Text
a -> RenderingError
s {$sel:message:RenderingError' :: Text
message = Text
a} :: RenderingError)
instance Core.FromJSON RenderingError where
parseJSON :: Value -> Parser RenderingError
parseJSON =
String
-> (Object -> Parser RenderingError)
-> Value
-> Parser RenderingError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RenderingError"
( \Object
x ->
Text -> Text -> RenderingError
RenderingError'
(Text -> Text -> RenderingError)
-> Parser Text -> Parser (Text -> RenderingError)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Code") Parser (Text -> RenderingError)
-> Parser Text -> Parser RenderingError
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Message")
)
instance Prelude.Hashable RenderingError
instance Prelude.NFData RenderingError