{-# 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.AuditManager.Types.Insights where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Insights = Insights'
{
Insights -> Maybe Int
activeAssessmentsCount :: Prelude.Maybe Prelude.Int,
Insights -> Maybe Int
assessmentControlsCountByNoncompliantEvidence :: Prelude.Maybe Prelude.Int,
Insights -> Maybe Int
compliantEvidenceCount :: Prelude.Maybe Prelude.Int,
Insights -> Maybe Int
inconclusiveEvidenceCount :: Prelude.Maybe Prelude.Int,
Insights -> Maybe POSIX
lastUpdated :: Prelude.Maybe Data.POSIX,
Insights -> Maybe Int
noncompliantEvidenceCount :: Prelude.Maybe Prelude.Int,
Insights -> Maybe Int
totalAssessmentControlsCount :: Prelude.Maybe Prelude.Int
}
deriving (Insights -> Insights -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Insights -> Insights -> Bool
$c/= :: Insights -> Insights -> Bool
== :: Insights -> Insights -> Bool
$c== :: Insights -> Insights -> Bool
Prelude.Eq, ReadPrec [Insights]
ReadPrec Insights
Int -> ReadS Insights
ReadS [Insights]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Insights]
$creadListPrec :: ReadPrec [Insights]
readPrec :: ReadPrec Insights
$creadPrec :: ReadPrec Insights
readList :: ReadS [Insights]
$creadList :: ReadS [Insights]
readsPrec :: Int -> ReadS Insights
$creadsPrec :: Int -> ReadS Insights
Prelude.Read, Int -> Insights -> ShowS
[Insights] -> ShowS
Insights -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Insights] -> ShowS
$cshowList :: [Insights] -> ShowS
show :: Insights -> String
$cshow :: Insights -> String
showsPrec :: Int -> Insights -> ShowS
$cshowsPrec :: Int -> Insights -> ShowS
Prelude.Show, forall x. Rep Insights x -> Insights
forall x. Insights -> Rep Insights x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Insights x -> Insights
$cfrom :: forall x. Insights -> Rep Insights x
Prelude.Generic)
newInsights ::
Insights
newInsights :: Insights
newInsights =
Insights'
{ $sel:activeAssessmentsCount:Insights' :: Maybe Int
activeAssessmentsCount = forall a. Maybe a
Prelude.Nothing,
$sel:assessmentControlsCountByNoncompliantEvidence:Insights' :: Maybe Int
assessmentControlsCountByNoncompliantEvidence =
forall a. Maybe a
Prelude.Nothing,
$sel:compliantEvidenceCount:Insights' :: Maybe Int
compliantEvidenceCount = forall a. Maybe a
Prelude.Nothing,
$sel:inconclusiveEvidenceCount:Insights' :: Maybe Int
inconclusiveEvidenceCount = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdated:Insights' :: Maybe POSIX
lastUpdated = forall a. Maybe a
Prelude.Nothing,
$sel:noncompliantEvidenceCount:Insights' :: Maybe Int
noncompliantEvidenceCount = forall a. Maybe a
Prelude.Nothing,
$sel:totalAssessmentControlsCount:Insights' :: Maybe Int
totalAssessmentControlsCount = forall a. Maybe a
Prelude.Nothing
}
insights_activeAssessmentsCount :: Lens.Lens' Insights (Prelude.Maybe Prelude.Int)
insights_activeAssessmentsCount :: Lens' Insights (Maybe Int)
insights_activeAssessmentsCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insights' {Maybe Int
activeAssessmentsCount :: Maybe Int
$sel:activeAssessmentsCount:Insights' :: Insights -> Maybe Int
activeAssessmentsCount} -> Maybe Int
activeAssessmentsCount) (\s :: Insights
s@Insights' {} Maybe Int
a -> Insights
s {$sel:activeAssessmentsCount:Insights' :: Maybe Int
activeAssessmentsCount = Maybe Int
a} :: Insights)
insights_assessmentControlsCountByNoncompliantEvidence :: Lens.Lens' Insights (Prelude.Maybe Prelude.Int)
insights_assessmentControlsCountByNoncompliantEvidence :: Lens' Insights (Maybe Int)
insights_assessmentControlsCountByNoncompliantEvidence = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insights' {Maybe Int
assessmentControlsCountByNoncompliantEvidence :: Maybe Int
$sel:assessmentControlsCountByNoncompliantEvidence:Insights' :: Insights -> Maybe Int
assessmentControlsCountByNoncompliantEvidence} -> Maybe Int
assessmentControlsCountByNoncompliantEvidence) (\s :: Insights
s@Insights' {} Maybe Int
a -> Insights
s {$sel:assessmentControlsCountByNoncompliantEvidence:Insights' :: Maybe Int
assessmentControlsCountByNoncompliantEvidence = Maybe Int
a} :: Insights)
insights_compliantEvidenceCount :: Lens.Lens' Insights (Prelude.Maybe Prelude.Int)
insights_compliantEvidenceCount :: Lens' Insights (Maybe Int)
insights_compliantEvidenceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insights' {Maybe Int
compliantEvidenceCount :: Maybe Int
$sel:compliantEvidenceCount:Insights' :: Insights -> Maybe Int
compliantEvidenceCount} -> Maybe Int
compliantEvidenceCount) (\s :: Insights
s@Insights' {} Maybe Int
a -> Insights
s {$sel:compliantEvidenceCount:Insights' :: Maybe Int
compliantEvidenceCount = Maybe Int
a} :: Insights)
insights_inconclusiveEvidenceCount :: Lens.Lens' Insights (Prelude.Maybe Prelude.Int)
insights_inconclusiveEvidenceCount :: Lens' Insights (Maybe Int)
insights_inconclusiveEvidenceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insights' {Maybe Int
inconclusiveEvidenceCount :: Maybe Int
$sel:inconclusiveEvidenceCount:Insights' :: Insights -> Maybe Int
inconclusiveEvidenceCount} -> Maybe Int
inconclusiveEvidenceCount) (\s :: Insights
s@Insights' {} Maybe Int
a -> Insights
s {$sel:inconclusiveEvidenceCount:Insights' :: Maybe Int
inconclusiveEvidenceCount = Maybe Int
a} :: Insights)
insights_lastUpdated :: Lens.Lens' Insights (Prelude.Maybe Prelude.UTCTime)
insights_lastUpdated :: Lens' Insights (Maybe UTCTime)
insights_lastUpdated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insights' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:Insights' :: Insights -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: Insights
s@Insights' {} Maybe POSIX
a -> Insights
s {$sel:lastUpdated:Insights' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: Insights) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
insights_noncompliantEvidenceCount :: Lens.Lens' Insights (Prelude.Maybe Prelude.Int)
insights_noncompliantEvidenceCount :: Lens' Insights (Maybe Int)
insights_noncompliantEvidenceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insights' {Maybe Int
noncompliantEvidenceCount :: Maybe Int
$sel:noncompliantEvidenceCount:Insights' :: Insights -> Maybe Int
noncompliantEvidenceCount} -> Maybe Int
noncompliantEvidenceCount) (\s :: Insights
s@Insights' {} Maybe Int
a -> Insights
s {$sel:noncompliantEvidenceCount:Insights' :: Maybe Int
noncompliantEvidenceCount = Maybe Int
a} :: Insights)
insights_totalAssessmentControlsCount :: Lens.Lens' Insights (Prelude.Maybe Prelude.Int)
insights_totalAssessmentControlsCount :: Lens' Insights (Maybe Int)
insights_totalAssessmentControlsCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insights' {Maybe Int
totalAssessmentControlsCount :: Maybe Int
$sel:totalAssessmentControlsCount:Insights' :: Insights -> Maybe Int
totalAssessmentControlsCount} -> Maybe Int
totalAssessmentControlsCount) (\s :: Insights
s@Insights' {} Maybe Int
a -> Insights
s {$sel:totalAssessmentControlsCount:Insights' :: Maybe Int
totalAssessmentControlsCount = Maybe Int
a} :: Insights)
instance Data.FromJSON Insights where
parseJSON :: Value -> Parser Insights
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Insights"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe POSIX
-> Maybe Int
-> Maybe Int
-> Insights
Insights'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"activeAssessmentsCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"assessmentControlsCountByNoncompliantEvidence"
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"compliantEvidenceCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"inconclusiveEvidenceCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"lastUpdated")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"noncompliantEvidenceCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"totalAssessmentControlsCount")
)
instance Prelude.Hashable Insights where
hashWithSalt :: Int -> Insights -> Int
hashWithSalt Int
_salt Insights' {Maybe Int
Maybe POSIX
totalAssessmentControlsCount :: Maybe Int
noncompliantEvidenceCount :: Maybe Int
lastUpdated :: Maybe POSIX
inconclusiveEvidenceCount :: Maybe Int
compliantEvidenceCount :: Maybe Int
assessmentControlsCountByNoncompliantEvidence :: Maybe Int
activeAssessmentsCount :: Maybe Int
$sel:totalAssessmentControlsCount:Insights' :: Insights -> Maybe Int
$sel:noncompliantEvidenceCount:Insights' :: Insights -> Maybe Int
$sel:lastUpdated:Insights' :: Insights -> Maybe POSIX
$sel:inconclusiveEvidenceCount:Insights' :: Insights -> Maybe Int
$sel:compliantEvidenceCount:Insights' :: Insights -> Maybe Int
$sel:assessmentControlsCountByNoncompliantEvidence:Insights' :: Insights -> Maybe Int
$sel:activeAssessmentsCount:Insights' :: Insights -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
activeAssessmentsCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
assessmentControlsCountByNoncompliantEvidence
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
compliantEvidenceCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
inconclusiveEvidenceCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
noncompliantEvidenceCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
totalAssessmentControlsCount
instance Prelude.NFData Insights where
rnf :: Insights -> ()
rnf Insights' {Maybe Int
Maybe POSIX
totalAssessmentControlsCount :: Maybe Int
noncompliantEvidenceCount :: Maybe Int
lastUpdated :: Maybe POSIX
inconclusiveEvidenceCount :: Maybe Int
compliantEvidenceCount :: Maybe Int
assessmentControlsCountByNoncompliantEvidence :: Maybe Int
activeAssessmentsCount :: Maybe Int
$sel:totalAssessmentControlsCount:Insights' :: Insights -> Maybe Int
$sel:noncompliantEvidenceCount:Insights' :: Insights -> Maybe Int
$sel:lastUpdated:Insights' :: Insights -> Maybe POSIX
$sel:inconclusiveEvidenceCount:Insights' :: Insights -> Maybe Int
$sel:compliantEvidenceCount:Insights' :: Insights -> Maybe Int
$sel:assessmentControlsCountByNoncompliantEvidence:Insights' :: Insights -> Maybe Int
$sel:activeAssessmentsCount:Insights' :: Insights -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
activeAssessmentsCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
Maybe Int
assessmentControlsCountByNoncompliantEvidence
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
compliantEvidenceCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
inconclusiveEvidenceCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
noncompliantEvidenceCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
totalAssessmentControlsCount