{-# 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.Inspector.Types.FailedItemDetails where
import qualified Amazonka.Core as Core
import Amazonka.Inspector.Types.FailedItemErrorCode
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FailedItemDetails = FailedItemDetails'
{
FailedItemDetails -> FailedItemErrorCode
failureCode :: FailedItemErrorCode,
FailedItemDetails -> Bool
retryable :: Prelude.Bool
}
deriving (FailedItemDetails -> FailedItemDetails -> Bool
(FailedItemDetails -> FailedItemDetails -> Bool)
-> (FailedItemDetails -> FailedItemDetails -> Bool)
-> Eq FailedItemDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FailedItemDetails -> FailedItemDetails -> Bool
$c/= :: FailedItemDetails -> FailedItemDetails -> Bool
== :: FailedItemDetails -> FailedItemDetails -> Bool
$c== :: FailedItemDetails -> FailedItemDetails -> Bool
Prelude.Eq, ReadPrec [FailedItemDetails]
ReadPrec FailedItemDetails
Int -> ReadS FailedItemDetails
ReadS [FailedItemDetails]
(Int -> ReadS FailedItemDetails)
-> ReadS [FailedItemDetails]
-> ReadPrec FailedItemDetails
-> ReadPrec [FailedItemDetails]
-> Read FailedItemDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FailedItemDetails]
$creadListPrec :: ReadPrec [FailedItemDetails]
readPrec :: ReadPrec FailedItemDetails
$creadPrec :: ReadPrec FailedItemDetails
readList :: ReadS [FailedItemDetails]
$creadList :: ReadS [FailedItemDetails]
readsPrec :: Int -> ReadS FailedItemDetails
$creadsPrec :: Int -> ReadS FailedItemDetails
Prelude.Read, Int -> FailedItemDetails -> ShowS
[FailedItemDetails] -> ShowS
FailedItemDetails -> String
(Int -> FailedItemDetails -> ShowS)
-> (FailedItemDetails -> String)
-> ([FailedItemDetails] -> ShowS)
-> Show FailedItemDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FailedItemDetails] -> ShowS
$cshowList :: [FailedItemDetails] -> ShowS
show :: FailedItemDetails -> String
$cshow :: FailedItemDetails -> String
showsPrec :: Int -> FailedItemDetails -> ShowS
$cshowsPrec :: Int -> FailedItemDetails -> ShowS
Prelude.Show, (forall x. FailedItemDetails -> Rep FailedItemDetails x)
-> (forall x. Rep FailedItemDetails x -> FailedItemDetails)
-> Generic FailedItemDetails
forall x. Rep FailedItemDetails x -> FailedItemDetails
forall x. FailedItemDetails -> Rep FailedItemDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FailedItemDetails x -> FailedItemDetails
$cfrom :: forall x. FailedItemDetails -> Rep FailedItemDetails x
Prelude.Generic)
newFailedItemDetails ::
FailedItemErrorCode ->
Prelude.Bool ->
FailedItemDetails
newFailedItemDetails :: FailedItemErrorCode -> Bool -> FailedItemDetails
newFailedItemDetails FailedItemErrorCode
pFailureCode_ Bool
pRetryable_ =
FailedItemDetails' :: FailedItemErrorCode -> Bool -> FailedItemDetails
FailedItemDetails'
{ $sel:failureCode:FailedItemDetails' :: FailedItemErrorCode
failureCode = FailedItemErrorCode
pFailureCode_,
$sel:retryable:FailedItemDetails' :: Bool
retryable = Bool
pRetryable_
}
failedItemDetails_failureCode :: Lens.Lens' FailedItemDetails FailedItemErrorCode
failedItemDetails_failureCode :: (FailedItemErrorCode -> f FailedItemErrorCode)
-> FailedItemDetails -> f FailedItemDetails
failedItemDetails_failureCode = (FailedItemDetails -> FailedItemErrorCode)
-> (FailedItemDetails -> FailedItemErrorCode -> FailedItemDetails)
-> Lens
FailedItemDetails
FailedItemDetails
FailedItemErrorCode
FailedItemErrorCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailedItemDetails' {FailedItemErrorCode
failureCode :: FailedItemErrorCode
$sel:failureCode:FailedItemDetails' :: FailedItemDetails -> FailedItemErrorCode
failureCode} -> FailedItemErrorCode
failureCode) (\s :: FailedItemDetails
s@FailedItemDetails' {} FailedItemErrorCode
a -> FailedItemDetails
s {$sel:failureCode:FailedItemDetails' :: FailedItemErrorCode
failureCode = FailedItemErrorCode
a} :: FailedItemDetails)
failedItemDetails_retryable :: Lens.Lens' FailedItemDetails Prelude.Bool
failedItemDetails_retryable :: (Bool -> f Bool) -> FailedItemDetails -> f FailedItemDetails
failedItemDetails_retryable = (FailedItemDetails -> Bool)
-> (FailedItemDetails -> Bool -> FailedItemDetails)
-> Lens FailedItemDetails FailedItemDetails Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailedItemDetails' {Bool
retryable :: Bool
$sel:retryable:FailedItemDetails' :: FailedItemDetails -> Bool
retryable} -> Bool
retryable) (\s :: FailedItemDetails
s@FailedItemDetails' {} Bool
a -> FailedItemDetails
s {$sel:retryable:FailedItemDetails' :: Bool
retryable = Bool
a} :: FailedItemDetails)
instance Core.FromJSON FailedItemDetails where
parseJSON :: Value -> Parser FailedItemDetails
parseJSON =
String
-> (Object -> Parser FailedItemDetails)
-> Value
-> Parser FailedItemDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FailedItemDetails"
( \Object
x ->
FailedItemErrorCode -> Bool -> FailedItemDetails
FailedItemDetails'
(FailedItemErrorCode -> Bool -> FailedItemDetails)
-> Parser FailedItemErrorCode -> Parser (Bool -> FailedItemDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser FailedItemErrorCode
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"failureCode")
Parser (Bool -> FailedItemDetails)
-> Parser Bool -> Parser FailedItemDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"retryable")
)
instance Prelude.Hashable FailedItemDetails
instance Prelude.NFData FailedItemDetails