{-# 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.IoT.Types.AuditCheckDetails where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types.AuditCheckRunStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AuditCheckDetails = AuditCheckDetails'
{
AuditCheckDetails -> Maybe Integer
suppressedNonCompliantResourcesCount :: Prelude.Maybe Prelude.Integer,
AuditCheckDetails -> Maybe Integer
totalResourcesCount :: Prelude.Maybe Prelude.Integer,
AuditCheckDetails -> Maybe Bool
checkCompliant :: Prelude.Maybe Prelude.Bool,
AuditCheckDetails -> Maybe Integer
nonCompliantResourcesCount :: Prelude.Maybe Prelude.Integer,
AuditCheckDetails -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
AuditCheckDetails -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
AuditCheckDetails -> Maybe AuditCheckRunStatus
checkRunStatus :: Prelude.Maybe AuditCheckRunStatus
}
deriving (AuditCheckDetails -> AuditCheckDetails -> Bool
(AuditCheckDetails -> AuditCheckDetails -> Bool)
-> (AuditCheckDetails -> AuditCheckDetails -> Bool)
-> Eq AuditCheckDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuditCheckDetails -> AuditCheckDetails -> Bool
$c/= :: AuditCheckDetails -> AuditCheckDetails -> Bool
== :: AuditCheckDetails -> AuditCheckDetails -> Bool
$c== :: AuditCheckDetails -> AuditCheckDetails -> Bool
Prelude.Eq, ReadPrec [AuditCheckDetails]
ReadPrec AuditCheckDetails
Int -> ReadS AuditCheckDetails
ReadS [AuditCheckDetails]
(Int -> ReadS AuditCheckDetails)
-> ReadS [AuditCheckDetails]
-> ReadPrec AuditCheckDetails
-> ReadPrec [AuditCheckDetails]
-> Read AuditCheckDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AuditCheckDetails]
$creadListPrec :: ReadPrec [AuditCheckDetails]
readPrec :: ReadPrec AuditCheckDetails
$creadPrec :: ReadPrec AuditCheckDetails
readList :: ReadS [AuditCheckDetails]
$creadList :: ReadS [AuditCheckDetails]
readsPrec :: Int -> ReadS AuditCheckDetails
$creadsPrec :: Int -> ReadS AuditCheckDetails
Prelude.Read, Int -> AuditCheckDetails -> ShowS
[AuditCheckDetails] -> ShowS
AuditCheckDetails -> String
(Int -> AuditCheckDetails -> ShowS)
-> (AuditCheckDetails -> String)
-> ([AuditCheckDetails] -> ShowS)
-> Show AuditCheckDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuditCheckDetails] -> ShowS
$cshowList :: [AuditCheckDetails] -> ShowS
show :: AuditCheckDetails -> String
$cshow :: AuditCheckDetails -> String
showsPrec :: Int -> AuditCheckDetails -> ShowS
$cshowsPrec :: Int -> AuditCheckDetails -> ShowS
Prelude.Show, (forall x. AuditCheckDetails -> Rep AuditCheckDetails x)
-> (forall x. Rep AuditCheckDetails x -> AuditCheckDetails)
-> Generic AuditCheckDetails
forall x. Rep AuditCheckDetails x -> AuditCheckDetails
forall x. AuditCheckDetails -> Rep AuditCheckDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AuditCheckDetails x -> AuditCheckDetails
$cfrom :: forall x. AuditCheckDetails -> Rep AuditCheckDetails x
Prelude.Generic)
newAuditCheckDetails ::
AuditCheckDetails
newAuditCheckDetails :: AuditCheckDetails
newAuditCheckDetails =
AuditCheckDetails' :: Maybe Integer
-> Maybe Integer
-> Maybe Bool
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe AuditCheckRunStatus
-> AuditCheckDetails
AuditCheckDetails'
{ $sel:suppressedNonCompliantResourcesCount:AuditCheckDetails' :: Maybe Integer
suppressedNonCompliantResourcesCount =
Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:totalResourcesCount:AuditCheckDetails' :: Maybe Integer
totalResourcesCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:checkCompliant:AuditCheckDetails' :: Maybe Bool
checkCompliant = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:nonCompliantResourcesCount:AuditCheckDetails' :: Maybe Integer
nonCompliantResourcesCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:errorCode:AuditCheckDetails' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:AuditCheckDetails' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:checkRunStatus:AuditCheckDetails' :: Maybe AuditCheckRunStatus
checkRunStatus = Maybe AuditCheckRunStatus
forall a. Maybe a
Prelude.Nothing
}
auditCheckDetails_suppressedNonCompliantResourcesCount :: Lens.Lens' AuditCheckDetails (Prelude.Maybe Prelude.Integer)
auditCheckDetails_suppressedNonCompliantResourcesCount :: (Maybe Integer -> f (Maybe Integer))
-> AuditCheckDetails -> f AuditCheckDetails
auditCheckDetails_suppressedNonCompliantResourcesCount = (AuditCheckDetails -> Maybe Integer)
-> (AuditCheckDetails -> Maybe Integer -> AuditCheckDetails)
-> Lens
AuditCheckDetails AuditCheckDetails (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditCheckDetails' {Maybe Integer
suppressedNonCompliantResourcesCount :: Maybe Integer
$sel:suppressedNonCompliantResourcesCount:AuditCheckDetails' :: AuditCheckDetails -> Maybe Integer
suppressedNonCompliantResourcesCount} -> Maybe Integer
suppressedNonCompliantResourcesCount) (\s :: AuditCheckDetails
s@AuditCheckDetails' {} Maybe Integer
a -> AuditCheckDetails
s {$sel:suppressedNonCompliantResourcesCount:AuditCheckDetails' :: Maybe Integer
suppressedNonCompliantResourcesCount = Maybe Integer
a} :: AuditCheckDetails)
auditCheckDetails_totalResourcesCount :: Lens.Lens' AuditCheckDetails (Prelude.Maybe Prelude.Integer)
auditCheckDetails_totalResourcesCount :: (Maybe Integer -> f (Maybe Integer))
-> AuditCheckDetails -> f AuditCheckDetails
auditCheckDetails_totalResourcesCount = (AuditCheckDetails -> Maybe Integer)
-> (AuditCheckDetails -> Maybe Integer -> AuditCheckDetails)
-> Lens
AuditCheckDetails AuditCheckDetails (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditCheckDetails' {Maybe Integer
totalResourcesCount :: Maybe Integer
$sel:totalResourcesCount:AuditCheckDetails' :: AuditCheckDetails -> Maybe Integer
totalResourcesCount} -> Maybe Integer
totalResourcesCount) (\s :: AuditCheckDetails
s@AuditCheckDetails' {} Maybe Integer
a -> AuditCheckDetails
s {$sel:totalResourcesCount:AuditCheckDetails' :: Maybe Integer
totalResourcesCount = Maybe Integer
a} :: AuditCheckDetails)
auditCheckDetails_checkCompliant :: Lens.Lens' AuditCheckDetails (Prelude.Maybe Prelude.Bool)
auditCheckDetails_checkCompliant :: (Maybe Bool -> f (Maybe Bool))
-> AuditCheckDetails -> f AuditCheckDetails
auditCheckDetails_checkCompliant = (AuditCheckDetails -> Maybe Bool)
-> (AuditCheckDetails -> Maybe Bool -> AuditCheckDetails)
-> Lens
AuditCheckDetails AuditCheckDetails (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditCheckDetails' {Maybe Bool
checkCompliant :: Maybe Bool
$sel:checkCompliant:AuditCheckDetails' :: AuditCheckDetails -> Maybe Bool
checkCompliant} -> Maybe Bool
checkCompliant) (\s :: AuditCheckDetails
s@AuditCheckDetails' {} Maybe Bool
a -> AuditCheckDetails
s {$sel:checkCompliant:AuditCheckDetails' :: Maybe Bool
checkCompliant = Maybe Bool
a} :: AuditCheckDetails)
auditCheckDetails_nonCompliantResourcesCount :: Lens.Lens' AuditCheckDetails (Prelude.Maybe Prelude.Integer)
auditCheckDetails_nonCompliantResourcesCount :: (Maybe Integer -> f (Maybe Integer))
-> AuditCheckDetails -> f AuditCheckDetails
auditCheckDetails_nonCompliantResourcesCount = (AuditCheckDetails -> Maybe Integer)
-> (AuditCheckDetails -> Maybe Integer -> AuditCheckDetails)
-> Lens
AuditCheckDetails AuditCheckDetails (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditCheckDetails' {Maybe Integer
nonCompliantResourcesCount :: Maybe Integer
$sel:nonCompliantResourcesCount:AuditCheckDetails' :: AuditCheckDetails -> Maybe Integer
nonCompliantResourcesCount} -> Maybe Integer
nonCompliantResourcesCount) (\s :: AuditCheckDetails
s@AuditCheckDetails' {} Maybe Integer
a -> AuditCheckDetails
s {$sel:nonCompliantResourcesCount:AuditCheckDetails' :: Maybe Integer
nonCompliantResourcesCount = Maybe Integer
a} :: AuditCheckDetails)
auditCheckDetails_errorCode :: Lens.Lens' AuditCheckDetails (Prelude.Maybe Prelude.Text)
auditCheckDetails_errorCode :: (Maybe Text -> f (Maybe Text))
-> AuditCheckDetails -> f AuditCheckDetails
auditCheckDetails_errorCode = (AuditCheckDetails -> Maybe Text)
-> (AuditCheckDetails -> Maybe Text -> AuditCheckDetails)
-> Lens
AuditCheckDetails AuditCheckDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditCheckDetails' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:AuditCheckDetails' :: AuditCheckDetails -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: AuditCheckDetails
s@AuditCheckDetails' {} Maybe Text
a -> AuditCheckDetails
s {$sel:errorCode:AuditCheckDetails' :: Maybe Text
errorCode = Maybe Text
a} :: AuditCheckDetails)
auditCheckDetails_message :: Lens.Lens' AuditCheckDetails (Prelude.Maybe Prelude.Text)
auditCheckDetails_message :: (Maybe Text -> f (Maybe Text))
-> AuditCheckDetails -> f AuditCheckDetails
auditCheckDetails_message = (AuditCheckDetails -> Maybe Text)
-> (AuditCheckDetails -> Maybe Text -> AuditCheckDetails)
-> Lens
AuditCheckDetails AuditCheckDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditCheckDetails' {Maybe Text
message :: Maybe Text
$sel:message:AuditCheckDetails' :: AuditCheckDetails -> Maybe Text
message} -> Maybe Text
message) (\s :: AuditCheckDetails
s@AuditCheckDetails' {} Maybe Text
a -> AuditCheckDetails
s {$sel:message:AuditCheckDetails' :: Maybe Text
message = Maybe Text
a} :: AuditCheckDetails)
auditCheckDetails_checkRunStatus :: Lens.Lens' AuditCheckDetails (Prelude.Maybe AuditCheckRunStatus)
auditCheckDetails_checkRunStatus :: (Maybe AuditCheckRunStatus -> f (Maybe AuditCheckRunStatus))
-> AuditCheckDetails -> f AuditCheckDetails
auditCheckDetails_checkRunStatus = (AuditCheckDetails -> Maybe AuditCheckRunStatus)
-> (AuditCheckDetails
-> Maybe AuditCheckRunStatus -> AuditCheckDetails)
-> Lens
AuditCheckDetails
AuditCheckDetails
(Maybe AuditCheckRunStatus)
(Maybe AuditCheckRunStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuditCheckDetails' {Maybe AuditCheckRunStatus
checkRunStatus :: Maybe AuditCheckRunStatus
$sel:checkRunStatus:AuditCheckDetails' :: AuditCheckDetails -> Maybe AuditCheckRunStatus
checkRunStatus} -> Maybe AuditCheckRunStatus
checkRunStatus) (\s :: AuditCheckDetails
s@AuditCheckDetails' {} Maybe AuditCheckRunStatus
a -> AuditCheckDetails
s {$sel:checkRunStatus:AuditCheckDetails' :: Maybe AuditCheckRunStatus
checkRunStatus = Maybe AuditCheckRunStatus
a} :: AuditCheckDetails)
instance Core.FromJSON AuditCheckDetails where
parseJSON :: Value -> Parser AuditCheckDetails
parseJSON =
String
-> (Object -> Parser AuditCheckDetails)
-> Value
-> Parser AuditCheckDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AuditCheckDetails"
( \Object
x ->
Maybe Integer
-> Maybe Integer
-> Maybe Bool
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe AuditCheckRunStatus
-> AuditCheckDetails
AuditCheckDetails'
(Maybe Integer
-> Maybe Integer
-> Maybe Bool
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe AuditCheckRunStatus
-> AuditCheckDetails)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Bool
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe AuditCheckRunStatus
-> AuditCheckDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"suppressedNonCompliantResourcesCount")
Parser
(Maybe Integer
-> Maybe Bool
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe AuditCheckRunStatus
-> AuditCheckDetails)
-> Parser (Maybe Integer)
-> Parser
(Maybe Bool
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe AuditCheckRunStatus
-> AuditCheckDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"totalResourcesCount")
Parser
(Maybe Bool
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe AuditCheckRunStatus
-> AuditCheckDetails)
-> Parser (Maybe Bool)
-> Parser
(Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe AuditCheckRunStatus
-> AuditCheckDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"checkCompliant")
Parser
(Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe AuditCheckRunStatus
-> AuditCheckDetails)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe AuditCheckRunStatus -> AuditCheckDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nonCompliantResourcesCount")
Parser
(Maybe Text
-> Maybe Text -> Maybe AuditCheckRunStatus -> AuditCheckDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe AuditCheckRunStatus -> AuditCheckDetails)
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 -> Maybe AuditCheckRunStatus -> AuditCheckDetails)
-> Parser (Maybe Text)
-> Parser (Maybe AuditCheckRunStatus -> AuditCheckDetails)
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
"message")
Parser (Maybe AuditCheckRunStatus -> AuditCheckDetails)
-> Parser (Maybe AuditCheckRunStatus) -> Parser AuditCheckDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AuditCheckRunStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"checkRunStatus")
)
instance Prelude.Hashable AuditCheckDetails
instance Prelude.NFData AuditCheckDetails