{-# 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.Config.Types.FailedRemediationExceptionBatch where
import Amazonka.Config.Types.RemediationException
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FailedRemediationExceptionBatch = FailedRemediationExceptionBatch'
{
FailedRemediationExceptionBatch -> Maybe Text
failureMessage :: Prelude.Maybe Prelude.Text,
FailedRemediationExceptionBatch -> Maybe [RemediationException]
failedItems :: Prelude.Maybe [RemediationException]
}
deriving (FailedRemediationExceptionBatch
-> FailedRemediationExceptionBatch -> Bool
(FailedRemediationExceptionBatch
-> FailedRemediationExceptionBatch -> Bool)
-> (FailedRemediationExceptionBatch
-> FailedRemediationExceptionBatch -> Bool)
-> Eq FailedRemediationExceptionBatch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FailedRemediationExceptionBatch
-> FailedRemediationExceptionBatch -> Bool
$c/= :: FailedRemediationExceptionBatch
-> FailedRemediationExceptionBatch -> Bool
== :: FailedRemediationExceptionBatch
-> FailedRemediationExceptionBatch -> Bool
$c== :: FailedRemediationExceptionBatch
-> FailedRemediationExceptionBatch -> Bool
Prelude.Eq, ReadPrec [FailedRemediationExceptionBatch]
ReadPrec FailedRemediationExceptionBatch
Int -> ReadS FailedRemediationExceptionBatch
ReadS [FailedRemediationExceptionBatch]
(Int -> ReadS FailedRemediationExceptionBatch)
-> ReadS [FailedRemediationExceptionBatch]
-> ReadPrec FailedRemediationExceptionBatch
-> ReadPrec [FailedRemediationExceptionBatch]
-> Read FailedRemediationExceptionBatch
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FailedRemediationExceptionBatch]
$creadListPrec :: ReadPrec [FailedRemediationExceptionBatch]
readPrec :: ReadPrec FailedRemediationExceptionBatch
$creadPrec :: ReadPrec FailedRemediationExceptionBatch
readList :: ReadS [FailedRemediationExceptionBatch]
$creadList :: ReadS [FailedRemediationExceptionBatch]
readsPrec :: Int -> ReadS FailedRemediationExceptionBatch
$creadsPrec :: Int -> ReadS FailedRemediationExceptionBatch
Prelude.Read, Int -> FailedRemediationExceptionBatch -> ShowS
[FailedRemediationExceptionBatch] -> ShowS
FailedRemediationExceptionBatch -> String
(Int -> FailedRemediationExceptionBatch -> ShowS)
-> (FailedRemediationExceptionBatch -> String)
-> ([FailedRemediationExceptionBatch] -> ShowS)
-> Show FailedRemediationExceptionBatch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FailedRemediationExceptionBatch] -> ShowS
$cshowList :: [FailedRemediationExceptionBatch] -> ShowS
show :: FailedRemediationExceptionBatch -> String
$cshow :: FailedRemediationExceptionBatch -> String
showsPrec :: Int -> FailedRemediationExceptionBatch -> ShowS
$cshowsPrec :: Int -> FailedRemediationExceptionBatch -> ShowS
Prelude.Show, (forall x.
FailedRemediationExceptionBatch
-> Rep FailedRemediationExceptionBatch x)
-> (forall x.
Rep FailedRemediationExceptionBatch x
-> FailedRemediationExceptionBatch)
-> Generic FailedRemediationExceptionBatch
forall x.
Rep FailedRemediationExceptionBatch x
-> FailedRemediationExceptionBatch
forall x.
FailedRemediationExceptionBatch
-> Rep FailedRemediationExceptionBatch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FailedRemediationExceptionBatch x
-> FailedRemediationExceptionBatch
$cfrom :: forall x.
FailedRemediationExceptionBatch
-> Rep FailedRemediationExceptionBatch x
Prelude.Generic)
newFailedRemediationExceptionBatch ::
FailedRemediationExceptionBatch
newFailedRemediationExceptionBatch :: FailedRemediationExceptionBatch
newFailedRemediationExceptionBatch =
FailedRemediationExceptionBatch' :: Maybe Text
-> Maybe [RemediationException] -> FailedRemediationExceptionBatch
FailedRemediationExceptionBatch'
{ $sel:failureMessage:FailedRemediationExceptionBatch' :: Maybe Text
failureMessage =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:failedItems:FailedRemediationExceptionBatch' :: Maybe [RemediationException]
failedItems = Maybe [RemediationException]
forall a. Maybe a
Prelude.Nothing
}
failedRemediationExceptionBatch_failureMessage :: Lens.Lens' FailedRemediationExceptionBatch (Prelude.Maybe Prelude.Text)
failedRemediationExceptionBatch_failureMessage :: (Maybe Text -> f (Maybe Text))
-> FailedRemediationExceptionBatch
-> f FailedRemediationExceptionBatch
failedRemediationExceptionBatch_failureMessage = (FailedRemediationExceptionBatch -> Maybe Text)
-> (FailedRemediationExceptionBatch
-> Maybe Text -> FailedRemediationExceptionBatch)
-> Lens
FailedRemediationExceptionBatch
FailedRemediationExceptionBatch
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailedRemediationExceptionBatch' {Maybe Text
failureMessage :: Maybe Text
$sel:failureMessage:FailedRemediationExceptionBatch' :: FailedRemediationExceptionBatch -> Maybe Text
failureMessage} -> Maybe Text
failureMessage) (\s :: FailedRemediationExceptionBatch
s@FailedRemediationExceptionBatch' {} Maybe Text
a -> FailedRemediationExceptionBatch
s {$sel:failureMessage:FailedRemediationExceptionBatch' :: Maybe Text
failureMessage = Maybe Text
a} :: FailedRemediationExceptionBatch)
failedRemediationExceptionBatch_failedItems :: Lens.Lens' FailedRemediationExceptionBatch (Prelude.Maybe [RemediationException])
failedRemediationExceptionBatch_failedItems :: (Maybe [RemediationException] -> f (Maybe [RemediationException]))
-> FailedRemediationExceptionBatch
-> f FailedRemediationExceptionBatch
failedRemediationExceptionBatch_failedItems = (FailedRemediationExceptionBatch -> Maybe [RemediationException])
-> (FailedRemediationExceptionBatch
-> Maybe [RemediationException] -> FailedRemediationExceptionBatch)
-> Lens
FailedRemediationExceptionBatch
FailedRemediationExceptionBatch
(Maybe [RemediationException])
(Maybe [RemediationException])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailedRemediationExceptionBatch' {Maybe [RemediationException]
failedItems :: Maybe [RemediationException]
$sel:failedItems:FailedRemediationExceptionBatch' :: FailedRemediationExceptionBatch -> Maybe [RemediationException]
failedItems} -> Maybe [RemediationException]
failedItems) (\s :: FailedRemediationExceptionBatch
s@FailedRemediationExceptionBatch' {} Maybe [RemediationException]
a -> FailedRemediationExceptionBatch
s {$sel:failedItems:FailedRemediationExceptionBatch' :: Maybe [RemediationException]
failedItems = Maybe [RemediationException]
a} :: FailedRemediationExceptionBatch) ((Maybe [RemediationException] -> f (Maybe [RemediationException]))
-> FailedRemediationExceptionBatch
-> f FailedRemediationExceptionBatch)
-> ((Maybe [RemediationException]
-> f (Maybe [RemediationException]))
-> Maybe [RemediationException]
-> f (Maybe [RemediationException]))
-> (Maybe [RemediationException]
-> f (Maybe [RemediationException]))
-> FailedRemediationExceptionBatch
-> f FailedRemediationExceptionBatch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[RemediationException]
[RemediationException]
[RemediationException]
[RemediationException]
-> Iso
(Maybe [RemediationException])
(Maybe [RemediationException])
(Maybe [RemediationException])
(Maybe [RemediationException])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[RemediationException]
[RemediationException]
[RemediationException]
[RemediationException]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromJSON
FailedRemediationExceptionBatch
where
parseJSON :: Value -> Parser FailedRemediationExceptionBatch
parseJSON =
String
-> (Object -> Parser FailedRemediationExceptionBatch)
-> Value
-> Parser FailedRemediationExceptionBatch
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FailedRemediationExceptionBatch"
( \Object
x ->
Maybe Text
-> Maybe [RemediationException] -> FailedRemediationExceptionBatch
FailedRemediationExceptionBatch'
(Maybe Text
-> Maybe [RemediationException] -> FailedRemediationExceptionBatch)
-> Parser (Maybe Text)
-> Parser
(Maybe [RemediationException] -> FailedRemediationExceptionBatch)
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
"FailureMessage")
Parser
(Maybe [RemediationException] -> FailedRemediationExceptionBatch)
-> Parser (Maybe [RemediationException])
-> Parser FailedRemediationExceptionBatch
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [RemediationException]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FailedItems" Parser (Maybe (Maybe [RemediationException]))
-> Maybe [RemediationException]
-> Parser (Maybe [RemediationException])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [RemediationException]
forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
FailedRemediationExceptionBatch
instance
Prelude.NFData
FailedRemediationExceptionBatch