{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Inspector.Types.FailedItemErrorCode
import qualified Amazonka.Prelude as Prelude
data FailedItemDetails = FailedItemDetails'
{
FailedItemDetails -> FailedItemErrorCode
failureCode :: FailedItemErrorCode,
FailedItemDetails -> Bool
retryable :: Prelude.Bool
}
deriving (FailedItemDetails -> FailedItemDetails -> Bool
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]
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
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. 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'
{ $sel:failureCode:FailedItemDetails' :: FailedItemErrorCode
failureCode = FailedItemErrorCode
pFailureCode_,
$sel:retryable:FailedItemDetails' :: Bool
retryable = Bool
pRetryable_
}
failedItemDetails_failureCode :: Lens.Lens' FailedItemDetails FailedItemErrorCode
failedItemDetails_failureCode :: Lens' FailedItemDetails FailedItemErrorCode
failedItemDetails_failureCode = 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 :: Lens' FailedItemDetails Bool
failedItemDetails_retryable = 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 Data.FromJSON FailedItemDetails where
parseJSON :: Value -> Parser FailedItemDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FailedItemDetails"
( \Object
x ->
FailedItemErrorCode -> Bool -> FailedItemDetails
FailedItemDetails'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"failureCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"retryable")
)
instance Prelude.Hashable FailedItemDetails where
hashWithSalt :: Int -> FailedItemDetails -> Int
hashWithSalt Int
_salt FailedItemDetails' {Bool
FailedItemErrorCode
retryable :: Bool
failureCode :: FailedItemErrorCode
$sel:retryable:FailedItemDetails' :: FailedItemDetails -> Bool
$sel:failureCode:FailedItemDetails' :: FailedItemDetails -> FailedItemErrorCode
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` FailedItemErrorCode
failureCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
retryable
instance Prelude.NFData FailedItemDetails where
rnf :: FailedItemDetails -> ()
rnf FailedItemDetails' {Bool
FailedItemErrorCode
retryable :: Bool
failureCode :: FailedItemErrorCode
$sel:retryable:FailedItemDetails' :: FailedItemDetails -> Bool
$sel:failureCode:FailedItemDetails' :: FailedItemDetails -> FailedItemErrorCode
..} =
forall a. NFData a => a -> ()
Prelude.rnf FailedItemErrorCode
failureCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
retryable