{-# 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.DataBrew.Types.RecipeVersionErrorDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RecipeVersionErrorDetail = RecipeVersionErrorDetail'
{
RecipeVersionErrorDetail -> Maybe Text
recipeVersion :: Prelude.Maybe Prelude.Text,
RecipeVersionErrorDetail -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
RecipeVersionErrorDetail -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text
}
deriving (RecipeVersionErrorDetail -> RecipeVersionErrorDetail -> Bool
(RecipeVersionErrorDetail -> RecipeVersionErrorDetail -> Bool)
-> (RecipeVersionErrorDetail -> RecipeVersionErrorDetail -> Bool)
-> Eq RecipeVersionErrorDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipeVersionErrorDetail -> RecipeVersionErrorDetail -> Bool
$c/= :: RecipeVersionErrorDetail -> RecipeVersionErrorDetail -> Bool
== :: RecipeVersionErrorDetail -> RecipeVersionErrorDetail -> Bool
$c== :: RecipeVersionErrorDetail -> RecipeVersionErrorDetail -> Bool
Prelude.Eq, ReadPrec [RecipeVersionErrorDetail]
ReadPrec RecipeVersionErrorDetail
Int -> ReadS RecipeVersionErrorDetail
ReadS [RecipeVersionErrorDetail]
(Int -> ReadS RecipeVersionErrorDetail)
-> ReadS [RecipeVersionErrorDetail]
-> ReadPrec RecipeVersionErrorDetail
-> ReadPrec [RecipeVersionErrorDetail]
-> Read RecipeVersionErrorDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecipeVersionErrorDetail]
$creadListPrec :: ReadPrec [RecipeVersionErrorDetail]
readPrec :: ReadPrec RecipeVersionErrorDetail
$creadPrec :: ReadPrec RecipeVersionErrorDetail
readList :: ReadS [RecipeVersionErrorDetail]
$creadList :: ReadS [RecipeVersionErrorDetail]
readsPrec :: Int -> ReadS RecipeVersionErrorDetail
$creadsPrec :: Int -> ReadS RecipeVersionErrorDetail
Prelude.Read, Int -> RecipeVersionErrorDetail -> ShowS
[RecipeVersionErrorDetail] -> ShowS
RecipeVersionErrorDetail -> String
(Int -> RecipeVersionErrorDetail -> ShowS)
-> (RecipeVersionErrorDetail -> String)
-> ([RecipeVersionErrorDetail] -> ShowS)
-> Show RecipeVersionErrorDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipeVersionErrorDetail] -> ShowS
$cshowList :: [RecipeVersionErrorDetail] -> ShowS
show :: RecipeVersionErrorDetail -> String
$cshow :: RecipeVersionErrorDetail -> String
showsPrec :: Int -> RecipeVersionErrorDetail -> ShowS
$cshowsPrec :: Int -> RecipeVersionErrorDetail -> ShowS
Prelude.Show, (forall x.
RecipeVersionErrorDetail -> Rep RecipeVersionErrorDetail x)
-> (forall x.
Rep RecipeVersionErrorDetail x -> RecipeVersionErrorDetail)
-> Generic RecipeVersionErrorDetail
forall x.
Rep RecipeVersionErrorDetail x -> RecipeVersionErrorDetail
forall x.
RecipeVersionErrorDetail -> Rep RecipeVersionErrorDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RecipeVersionErrorDetail x -> RecipeVersionErrorDetail
$cfrom :: forall x.
RecipeVersionErrorDetail -> Rep RecipeVersionErrorDetail x
Prelude.Generic)
newRecipeVersionErrorDetail ::
RecipeVersionErrorDetail
newRecipeVersionErrorDetail :: RecipeVersionErrorDetail
newRecipeVersionErrorDetail =
RecipeVersionErrorDetail' :: Maybe Text -> Maybe Text -> Maybe Text -> RecipeVersionErrorDetail
RecipeVersionErrorDetail'
{ $sel:recipeVersion:RecipeVersionErrorDetail' :: Maybe Text
recipeVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorCode:RecipeVersionErrorDetail' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:RecipeVersionErrorDetail' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
recipeVersionErrorDetail_recipeVersion :: Lens.Lens' RecipeVersionErrorDetail (Prelude.Maybe Prelude.Text)
recipeVersionErrorDetail_recipeVersion :: (Maybe Text -> f (Maybe Text))
-> RecipeVersionErrorDetail -> f RecipeVersionErrorDetail
recipeVersionErrorDetail_recipeVersion = (RecipeVersionErrorDetail -> Maybe Text)
-> (RecipeVersionErrorDetail
-> Maybe Text -> RecipeVersionErrorDetail)
-> Lens
RecipeVersionErrorDetail
RecipeVersionErrorDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipeVersionErrorDetail' {Maybe Text
recipeVersion :: Maybe Text
$sel:recipeVersion:RecipeVersionErrorDetail' :: RecipeVersionErrorDetail -> Maybe Text
recipeVersion} -> Maybe Text
recipeVersion) (\s :: RecipeVersionErrorDetail
s@RecipeVersionErrorDetail' {} Maybe Text
a -> RecipeVersionErrorDetail
s {$sel:recipeVersion:RecipeVersionErrorDetail' :: Maybe Text
recipeVersion = Maybe Text
a} :: RecipeVersionErrorDetail)
recipeVersionErrorDetail_errorCode :: Lens.Lens' RecipeVersionErrorDetail (Prelude.Maybe Prelude.Text)
recipeVersionErrorDetail_errorCode :: (Maybe Text -> f (Maybe Text))
-> RecipeVersionErrorDetail -> f RecipeVersionErrorDetail
recipeVersionErrorDetail_errorCode = (RecipeVersionErrorDetail -> Maybe Text)
-> (RecipeVersionErrorDetail
-> Maybe Text -> RecipeVersionErrorDetail)
-> Lens
RecipeVersionErrorDetail
RecipeVersionErrorDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipeVersionErrorDetail' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:RecipeVersionErrorDetail' :: RecipeVersionErrorDetail -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: RecipeVersionErrorDetail
s@RecipeVersionErrorDetail' {} Maybe Text
a -> RecipeVersionErrorDetail
s {$sel:errorCode:RecipeVersionErrorDetail' :: Maybe Text
errorCode = Maybe Text
a} :: RecipeVersionErrorDetail)
recipeVersionErrorDetail_errorMessage :: Lens.Lens' RecipeVersionErrorDetail (Prelude.Maybe Prelude.Text)
recipeVersionErrorDetail_errorMessage :: (Maybe Text -> f (Maybe Text))
-> RecipeVersionErrorDetail -> f RecipeVersionErrorDetail
recipeVersionErrorDetail_errorMessage = (RecipeVersionErrorDetail -> Maybe Text)
-> (RecipeVersionErrorDetail
-> Maybe Text -> RecipeVersionErrorDetail)
-> Lens
RecipeVersionErrorDetail
RecipeVersionErrorDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipeVersionErrorDetail' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:RecipeVersionErrorDetail' :: RecipeVersionErrorDetail -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: RecipeVersionErrorDetail
s@RecipeVersionErrorDetail' {} Maybe Text
a -> RecipeVersionErrorDetail
s {$sel:errorMessage:RecipeVersionErrorDetail' :: Maybe Text
errorMessage = Maybe Text
a} :: RecipeVersionErrorDetail)
instance Core.FromJSON RecipeVersionErrorDetail where
parseJSON :: Value -> Parser RecipeVersionErrorDetail
parseJSON =
String
-> (Object -> Parser RecipeVersionErrorDetail)
-> Value
-> Parser RecipeVersionErrorDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RecipeVersionErrorDetail"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> RecipeVersionErrorDetail
RecipeVersionErrorDetail'
(Maybe Text
-> Maybe Text -> Maybe Text -> RecipeVersionErrorDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> RecipeVersionErrorDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecipeVersion")
Parser (Maybe Text -> Maybe Text -> RecipeVersionErrorDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> RecipeVersionErrorDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorCode")
Parser (Maybe Text -> RecipeVersionErrorDetail)
-> Parser (Maybe Text) -> Parser RecipeVersionErrorDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorMessage")
)
instance Prelude.Hashable RecipeVersionErrorDetail
instance Prelude.NFData RecipeVersionErrorDetail