{-# 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.AssessmentReport where
import Amazonka.AuditManager.Types.AssessmentReportStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AssessmentReport = AssessmentReport'
{
AssessmentReport -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
AssessmentReport -> Maybe AssessmentReportStatus
status :: Prelude.Maybe AssessmentReportStatus,
AssessmentReport -> Maybe Text
awsAccountId :: Prelude.Maybe Prelude.Text,
AssessmentReport -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
AssessmentReport -> Maybe Text
author :: Prelude.Maybe Prelude.Text,
AssessmentReport -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
AssessmentReport -> Maybe Text
assessmentId :: Prelude.Maybe Prelude.Text,
AssessmentReport -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
AssessmentReport -> Maybe Text
assessmentName :: Prelude.Maybe Prelude.Text
}
deriving (AssessmentReport -> AssessmentReport -> Bool
(AssessmentReport -> AssessmentReport -> Bool)
-> (AssessmentReport -> AssessmentReport -> Bool)
-> Eq AssessmentReport
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssessmentReport -> AssessmentReport -> Bool
$c/= :: AssessmentReport -> AssessmentReport -> Bool
== :: AssessmentReport -> AssessmentReport -> Bool
$c== :: AssessmentReport -> AssessmentReport -> Bool
Prelude.Eq, ReadPrec [AssessmentReport]
ReadPrec AssessmentReport
Int -> ReadS AssessmentReport
ReadS [AssessmentReport]
(Int -> ReadS AssessmentReport)
-> ReadS [AssessmentReport]
-> ReadPrec AssessmentReport
-> ReadPrec [AssessmentReport]
-> Read AssessmentReport
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssessmentReport]
$creadListPrec :: ReadPrec [AssessmentReport]
readPrec :: ReadPrec AssessmentReport
$creadPrec :: ReadPrec AssessmentReport
readList :: ReadS [AssessmentReport]
$creadList :: ReadS [AssessmentReport]
readsPrec :: Int -> ReadS AssessmentReport
$creadsPrec :: Int -> ReadS AssessmentReport
Prelude.Read, Int -> AssessmentReport -> ShowS
[AssessmentReport] -> ShowS
AssessmentReport -> String
(Int -> AssessmentReport -> ShowS)
-> (AssessmentReport -> String)
-> ([AssessmentReport] -> ShowS)
-> Show AssessmentReport
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssessmentReport] -> ShowS
$cshowList :: [AssessmentReport] -> ShowS
show :: AssessmentReport -> String
$cshow :: AssessmentReport -> String
showsPrec :: Int -> AssessmentReport -> ShowS
$cshowsPrec :: Int -> AssessmentReport -> ShowS
Prelude.Show, (forall x. AssessmentReport -> Rep AssessmentReport x)
-> (forall x. Rep AssessmentReport x -> AssessmentReport)
-> Generic AssessmentReport
forall x. Rep AssessmentReport x -> AssessmentReport
forall x. AssessmentReport -> Rep AssessmentReport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssessmentReport x -> AssessmentReport
$cfrom :: forall x. AssessmentReport -> Rep AssessmentReport x
Prelude.Generic)
newAssessmentReport ::
AssessmentReport
newAssessmentReport :: AssessmentReport
newAssessmentReport =
AssessmentReport' :: Maybe POSIX
-> Maybe AssessmentReportStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport
AssessmentReport'
{ $sel:creationTime:AssessmentReport' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:status:AssessmentReport' :: Maybe AssessmentReportStatus
status = Maybe AssessmentReportStatus
forall a. Maybe a
Prelude.Nothing,
$sel:awsAccountId:AssessmentReport' :: Maybe Text
awsAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:AssessmentReport' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:author:AssessmentReport' :: Maybe Text
author = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:AssessmentReport' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:assessmentId:AssessmentReport' :: Maybe Text
assessmentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:AssessmentReport' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:assessmentName:AssessmentReport' :: Maybe Text
assessmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
assessmentReport_creationTime :: Lens.Lens' AssessmentReport (Prelude.Maybe Prelude.UTCTime)
assessmentReport_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AssessmentReport -> f AssessmentReport
assessmentReport_creationTime = (AssessmentReport -> Maybe POSIX)
-> (AssessmentReport -> Maybe POSIX -> AssessmentReport)
-> Lens
AssessmentReport AssessmentReport (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReport' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:AssessmentReport' :: AssessmentReport -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: AssessmentReport
s@AssessmentReport' {} Maybe POSIX
a -> AssessmentReport
s {$sel:creationTime:AssessmentReport' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: AssessmentReport) ((Maybe POSIX -> f (Maybe POSIX))
-> AssessmentReport -> f AssessmentReport)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AssessmentReport
-> f AssessmentReport
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
assessmentReport_status :: Lens.Lens' AssessmentReport (Prelude.Maybe AssessmentReportStatus)
assessmentReport_status :: (Maybe AssessmentReportStatus -> f (Maybe AssessmentReportStatus))
-> AssessmentReport -> f AssessmentReport
assessmentReport_status = (AssessmentReport -> Maybe AssessmentReportStatus)
-> (AssessmentReport
-> Maybe AssessmentReportStatus -> AssessmentReport)
-> Lens
AssessmentReport
AssessmentReport
(Maybe AssessmentReportStatus)
(Maybe AssessmentReportStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReport' {Maybe AssessmentReportStatus
status :: Maybe AssessmentReportStatus
$sel:status:AssessmentReport' :: AssessmentReport -> Maybe AssessmentReportStatus
status} -> Maybe AssessmentReportStatus
status) (\s :: AssessmentReport
s@AssessmentReport' {} Maybe AssessmentReportStatus
a -> AssessmentReport
s {$sel:status:AssessmentReport' :: Maybe AssessmentReportStatus
status = Maybe AssessmentReportStatus
a} :: AssessmentReport)
assessmentReport_awsAccountId :: Lens.Lens' AssessmentReport (Prelude.Maybe Prelude.Text)
assessmentReport_awsAccountId :: (Maybe Text -> f (Maybe Text))
-> AssessmentReport -> f AssessmentReport
assessmentReport_awsAccountId = (AssessmentReport -> Maybe Text)
-> (AssessmentReport -> Maybe Text -> AssessmentReport)
-> Lens AssessmentReport AssessmentReport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReport' {Maybe Text
awsAccountId :: Maybe Text
$sel:awsAccountId:AssessmentReport' :: AssessmentReport -> Maybe Text
awsAccountId} -> Maybe Text
awsAccountId) (\s :: AssessmentReport
s@AssessmentReport' {} Maybe Text
a -> AssessmentReport
s {$sel:awsAccountId:AssessmentReport' :: Maybe Text
awsAccountId = Maybe Text
a} :: AssessmentReport)
assessmentReport_name :: Lens.Lens' AssessmentReport (Prelude.Maybe Prelude.Text)
assessmentReport_name :: (Maybe Text -> f (Maybe Text))
-> AssessmentReport -> f AssessmentReport
assessmentReport_name = (AssessmentReport -> Maybe Text)
-> (AssessmentReport -> Maybe Text -> AssessmentReport)
-> Lens AssessmentReport AssessmentReport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReport' {Maybe Text
name :: Maybe Text
$sel:name:AssessmentReport' :: AssessmentReport -> Maybe Text
name} -> Maybe Text
name) (\s :: AssessmentReport
s@AssessmentReport' {} Maybe Text
a -> AssessmentReport
s {$sel:name:AssessmentReport' :: Maybe Text
name = Maybe Text
a} :: AssessmentReport)
assessmentReport_author :: Lens.Lens' AssessmentReport (Prelude.Maybe Prelude.Text)
assessmentReport_author :: (Maybe Text -> f (Maybe Text))
-> AssessmentReport -> f AssessmentReport
assessmentReport_author = (AssessmentReport -> Maybe Text)
-> (AssessmentReport -> Maybe Text -> AssessmentReport)
-> Lens AssessmentReport AssessmentReport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReport' {Maybe Text
author :: Maybe Text
$sel:author:AssessmentReport' :: AssessmentReport -> Maybe Text
author} -> Maybe Text
author) (\s :: AssessmentReport
s@AssessmentReport' {} Maybe Text
a -> AssessmentReport
s {$sel:author:AssessmentReport' :: Maybe Text
author = Maybe Text
a} :: AssessmentReport)
assessmentReport_id :: Lens.Lens' AssessmentReport (Prelude.Maybe Prelude.Text)
assessmentReport_id :: (Maybe Text -> f (Maybe Text))
-> AssessmentReport -> f AssessmentReport
assessmentReport_id = (AssessmentReport -> Maybe Text)
-> (AssessmentReport -> Maybe Text -> AssessmentReport)
-> Lens AssessmentReport AssessmentReport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReport' {Maybe Text
id :: Maybe Text
$sel:id:AssessmentReport' :: AssessmentReport -> Maybe Text
id} -> Maybe Text
id) (\s :: AssessmentReport
s@AssessmentReport' {} Maybe Text
a -> AssessmentReport
s {$sel:id:AssessmentReport' :: Maybe Text
id = Maybe Text
a} :: AssessmentReport)
assessmentReport_assessmentId :: Lens.Lens' AssessmentReport (Prelude.Maybe Prelude.Text)
assessmentReport_assessmentId :: (Maybe Text -> f (Maybe Text))
-> AssessmentReport -> f AssessmentReport
assessmentReport_assessmentId = (AssessmentReport -> Maybe Text)
-> (AssessmentReport -> Maybe Text -> AssessmentReport)
-> Lens AssessmentReport AssessmentReport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReport' {Maybe Text
assessmentId :: Maybe Text
$sel:assessmentId:AssessmentReport' :: AssessmentReport -> Maybe Text
assessmentId} -> Maybe Text
assessmentId) (\s :: AssessmentReport
s@AssessmentReport' {} Maybe Text
a -> AssessmentReport
s {$sel:assessmentId:AssessmentReport' :: Maybe Text
assessmentId = Maybe Text
a} :: AssessmentReport)
assessmentReport_description :: Lens.Lens' AssessmentReport (Prelude.Maybe Prelude.Text)
assessmentReport_description :: (Maybe Text -> f (Maybe Text))
-> AssessmentReport -> f AssessmentReport
assessmentReport_description = (AssessmentReport -> Maybe Text)
-> (AssessmentReport -> Maybe Text -> AssessmentReport)
-> Lens AssessmentReport AssessmentReport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReport' {Maybe Text
description :: Maybe Text
$sel:description:AssessmentReport' :: AssessmentReport -> Maybe Text
description} -> Maybe Text
description) (\s :: AssessmentReport
s@AssessmentReport' {} Maybe Text
a -> AssessmentReport
s {$sel:description:AssessmentReport' :: Maybe Text
description = Maybe Text
a} :: AssessmentReport)
assessmentReport_assessmentName :: Lens.Lens' AssessmentReport (Prelude.Maybe Prelude.Text)
assessmentReport_assessmentName :: (Maybe Text -> f (Maybe Text))
-> AssessmentReport -> f AssessmentReport
assessmentReport_assessmentName = (AssessmentReport -> Maybe Text)
-> (AssessmentReport -> Maybe Text -> AssessmentReport)
-> Lens AssessmentReport AssessmentReport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReport' {Maybe Text
assessmentName :: Maybe Text
$sel:assessmentName:AssessmentReport' :: AssessmentReport -> Maybe Text
assessmentName} -> Maybe Text
assessmentName) (\s :: AssessmentReport
s@AssessmentReport' {} Maybe Text
a -> AssessmentReport
s {$sel:assessmentName:AssessmentReport' :: Maybe Text
assessmentName = Maybe Text
a} :: AssessmentReport)
instance Core.FromJSON AssessmentReport where
parseJSON :: Value -> Parser AssessmentReport
parseJSON =
String
-> (Object -> Parser AssessmentReport)
-> Value
-> Parser AssessmentReport
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AssessmentReport"
( \Object
x ->
Maybe POSIX
-> Maybe AssessmentReportStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport
AssessmentReport'
(Maybe POSIX
-> Maybe AssessmentReportStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport)
-> Parser (Maybe POSIX)
-> Parser
(Maybe AssessmentReportStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationTime")
Parser
(Maybe AssessmentReportStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport)
-> Parser (Maybe AssessmentReportStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AssessmentReportStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport)
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
"awsAccountId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport)
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
"name")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReport)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> AssessmentReport)
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
"author")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> AssessmentReport)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> AssessmentReport)
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
"id")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> AssessmentReport)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> AssessmentReport)
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
"assessmentId")
Parser (Maybe Text -> Maybe Text -> AssessmentReport)
-> Parser (Maybe Text) -> Parser (Maybe Text -> AssessmentReport)
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
"description")
Parser (Maybe Text -> AssessmentReport)
-> Parser (Maybe Text) -> Parser AssessmentReport
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
"assessmentName")
)
instance Prelude.Hashable AssessmentReport
instance Prelude.NFData AssessmentReport