{-# 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.AssessmentReportMetadata 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 AssessmentReportMetadata = AssessmentReportMetadata'
{
AssessmentReportMetadata -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
AssessmentReportMetadata -> Maybe AssessmentReportStatus
status :: Prelude.Maybe AssessmentReportStatus,
AssessmentReportMetadata -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
AssessmentReportMetadata -> Maybe Text
author :: Prelude.Maybe Prelude.Text,
AssessmentReportMetadata -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
AssessmentReportMetadata -> Maybe Text
assessmentId :: Prelude.Maybe Prelude.Text,
AssessmentReportMetadata -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
AssessmentReportMetadata -> Maybe Text
assessmentName :: Prelude.Maybe Prelude.Text
}
deriving (AssessmentReportMetadata -> AssessmentReportMetadata -> Bool
(AssessmentReportMetadata -> AssessmentReportMetadata -> Bool)
-> (AssessmentReportMetadata -> AssessmentReportMetadata -> Bool)
-> Eq AssessmentReportMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssessmentReportMetadata -> AssessmentReportMetadata -> Bool
$c/= :: AssessmentReportMetadata -> AssessmentReportMetadata -> Bool
== :: AssessmentReportMetadata -> AssessmentReportMetadata -> Bool
$c== :: AssessmentReportMetadata -> AssessmentReportMetadata -> Bool
Prelude.Eq, ReadPrec [AssessmentReportMetadata]
ReadPrec AssessmentReportMetadata
Int -> ReadS AssessmentReportMetadata
ReadS [AssessmentReportMetadata]
(Int -> ReadS AssessmentReportMetadata)
-> ReadS [AssessmentReportMetadata]
-> ReadPrec AssessmentReportMetadata
-> ReadPrec [AssessmentReportMetadata]
-> Read AssessmentReportMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssessmentReportMetadata]
$creadListPrec :: ReadPrec [AssessmentReportMetadata]
readPrec :: ReadPrec AssessmentReportMetadata
$creadPrec :: ReadPrec AssessmentReportMetadata
readList :: ReadS [AssessmentReportMetadata]
$creadList :: ReadS [AssessmentReportMetadata]
readsPrec :: Int -> ReadS AssessmentReportMetadata
$creadsPrec :: Int -> ReadS AssessmentReportMetadata
Prelude.Read, Int -> AssessmentReportMetadata -> ShowS
[AssessmentReportMetadata] -> ShowS
AssessmentReportMetadata -> String
(Int -> AssessmentReportMetadata -> ShowS)
-> (AssessmentReportMetadata -> String)
-> ([AssessmentReportMetadata] -> ShowS)
-> Show AssessmentReportMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssessmentReportMetadata] -> ShowS
$cshowList :: [AssessmentReportMetadata] -> ShowS
show :: AssessmentReportMetadata -> String
$cshow :: AssessmentReportMetadata -> String
showsPrec :: Int -> AssessmentReportMetadata -> ShowS
$cshowsPrec :: Int -> AssessmentReportMetadata -> ShowS
Prelude.Show, (forall x.
AssessmentReportMetadata -> Rep AssessmentReportMetadata x)
-> (forall x.
Rep AssessmentReportMetadata x -> AssessmentReportMetadata)
-> Generic AssessmentReportMetadata
forall x.
Rep AssessmentReportMetadata x -> AssessmentReportMetadata
forall x.
AssessmentReportMetadata -> Rep AssessmentReportMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssessmentReportMetadata x -> AssessmentReportMetadata
$cfrom :: forall x.
AssessmentReportMetadata -> Rep AssessmentReportMetadata x
Prelude.Generic)
newAssessmentReportMetadata ::
AssessmentReportMetadata
newAssessmentReportMetadata :: AssessmentReportMetadata
newAssessmentReportMetadata =
AssessmentReportMetadata' :: Maybe POSIX
-> Maybe AssessmentReportStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReportMetadata
AssessmentReportMetadata'
{ $sel:creationTime:AssessmentReportMetadata' :: Maybe POSIX
creationTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:status:AssessmentReportMetadata' :: Maybe AssessmentReportStatus
status = Maybe AssessmentReportStatus
forall a. Maybe a
Prelude.Nothing,
$sel:name:AssessmentReportMetadata' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:author:AssessmentReportMetadata' :: Maybe Text
author = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:AssessmentReportMetadata' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:assessmentId:AssessmentReportMetadata' :: Maybe Text
assessmentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:AssessmentReportMetadata' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:assessmentName:AssessmentReportMetadata' :: Maybe Text
assessmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
assessmentReportMetadata_creationTime :: Lens.Lens' AssessmentReportMetadata (Prelude.Maybe Prelude.UTCTime)
assessmentReportMetadata_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AssessmentReportMetadata -> f AssessmentReportMetadata
assessmentReportMetadata_creationTime = (AssessmentReportMetadata -> Maybe POSIX)
-> (AssessmentReportMetadata
-> Maybe POSIX -> AssessmentReportMetadata)
-> Lens
AssessmentReportMetadata
AssessmentReportMetadata
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReportMetadata' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:AssessmentReportMetadata' :: AssessmentReportMetadata -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: AssessmentReportMetadata
s@AssessmentReportMetadata' {} Maybe POSIX
a -> AssessmentReportMetadata
s {$sel:creationTime:AssessmentReportMetadata' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: AssessmentReportMetadata) ((Maybe POSIX -> f (Maybe POSIX))
-> AssessmentReportMetadata -> f AssessmentReportMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AssessmentReportMetadata
-> f AssessmentReportMetadata
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
assessmentReportMetadata_status :: Lens.Lens' AssessmentReportMetadata (Prelude.Maybe AssessmentReportStatus)
assessmentReportMetadata_status :: (Maybe AssessmentReportStatus -> f (Maybe AssessmentReportStatus))
-> AssessmentReportMetadata -> f AssessmentReportMetadata
assessmentReportMetadata_status = (AssessmentReportMetadata -> Maybe AssessmentReportStatus)
-> (AssessmentReportMetadata
-> Maybe AssessmentReportStatus -> AssessmentReportMetadata)
-> Lens
AssessmentReportMetadata
AssessmentReportMetadata
(Maybe AssessmentReportStatus)
(Maybe AssessmentReportStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReportMetadata' {Maybe AssessmentReportStatus
status :: Maybe AssessmentReportStatus
$sel:status:AssessmentReportMetadata' :: AssessmentReportMetadata -> Maybe AssessmentReportStatus
status} -> Maybe AssessmentReportStatus
status) (\s :: AssessmentReportMetadata
s@AssessmentReportMetadata' {} Maybe AssessmentReportStatus
a -> AssessmentReportMetadata
s {$sel:status:AssessmentReportMetadata' :: Maybe AssessmentReportStatus
status = Maybe AssessmentReportStatus
a} :: AssessmentReportMetadata)
assessmentReportMetadata_name :: Lens.Lens' AssessmentReportMetadata (Prelude.Maybe Prelude.Text)
assessmentReportMetadata_name :: (Maybe Text -> f (Maybe Text))
-> AssessmentReportMetadata -> f AssessmentReportMetadata
assessmentReportMetadata_name = (AssessmentReportMetadata -> Maybe Text)
-> (AssessmentReportMetadata
-> Maybe Text -> AssessmentReportMetadata)
-> Lens
AssessmentReportMetadata
AssessmentReportMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReportMetadata' {Maybe Text
name :: Maybe Text
$sel:name:AssessmentReportMetadata' :: AssessmentReportMetadata -> Maybe Text
name} -> Maybe Text
name) (\s :: AssessmentReportMetadata
s@AssessmentReportMetadata' {} Maybe Text
a -> AssessmentReportMetadata
s {$sel:name:AssessmentReportMetadata' :: Maybe Text
name = Maybe Text
a} :: AssessmentReportMetadata)
assessmentReportMetadata_author :: Lens.Lens' AssessmentReportMetadata (Prelude.Maybe Prelude.Text)
assessmentReportMetadata_author :: (Maybe Text -> f (Maybe Text))
-> AssessmentReportMetadata -> f AssessmentReportMetadata
assessmentReportMetadata_author = (AssessmentReportMetadata -> Maybe Text)
-> (AssessmentReportMetadata
-> Maybe Text -> AssessmentReportMetadata)
-> Lens
AssessmentReportMetadata
AssessmentReportMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReportMetadata' {Maybe Text
author :: Maybe Text
$sel:author:AssessmentReportMetadata' :: AssessmentReportMetadata -> Maybe Text
author} -> Maybe Text
author) (\s :: AssessmentReportMetadata
s@AssessmentReportMetadata' {} Maybe Text
a -> AssessmentReportMetadata
s {$sel:author:AssessmentReportMetadata' :: Maybe Text
author = Maybe Text
a} :: AssessmentReportMetadata)
assessmentReportMetadata_id :: Lens.Lens' AssessmentReportMetadata (Prelude.Maybe Prelude.Text)
assessmentReportMetadata_id :: (Maybe Text -> f (Maybe Text))
-> AssessmentReportMetadata -> f AssessmentReportMetadata
assessmentReportMetadata_id = (AssessmentReportMetadata -> Maybe Text)
-> (AssessmentReportMetadata
-> Maybe Text -> AssessmentReportMetadata)
-> Lens
AssessmentReportMetadata
AssessmentReportMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReportMetadata' {Maybe Text
id :: Maybe Text
$sel:id:AssessmentReportMetadata' :: AssessmentReportMetadata -> Maybe Text
id} -> Maybe Text
id) (\s :: AssessmentReportMetadata
s@AssessmentReportMetadata' {} Maybe Text
a -> AssessmentReportMetadata
s {$sel:id:AssessmentReportMetadata' :: Maybe Text
id = Maybe Text
a} :: AssessmentReportMetadata)
assessmentReportMetadata_assessmentId :: Lens.Lens' AssessmentReportMetadata (Prelude.Maybe Prelude.Text)
assessmentReportMetadata_assessmentId :: (Maybe Text -> f (Maybe Text))
-> AssessmentReportMetadata -> f AssessmentReportMetadata
assessmentReportMetadata_assessmentId = (AssessmentReportMetadata -> Maybe Text)
-> (AssessmentReportMetadata
-> Maybe Text -> AssessmentReportMetadata)
-> Lens
AssessmentReportMetadata
AssessmentReportMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReportMetadata' {Maybe Text
assessmentId :: Maybe Text
$sel:assessmentId:AssessmentReportMetadata' :: AssessmentReportMetadata -> Maybe Text
assessmentId} -> Maybe Text
assessmentId) (\s :: AssessmentReportMetadata
s@AssessmentReportMetadata' {} Maybe Text
a -> AssessmentReportMetadata
s {$sel:assessmentId:AssessmentReportMetadata' :: Maybe Text
assessmentId = Maybe Text
a} :: AssessmentReportMetadata)
assessmentReportMetadata_description :: Lens.Lens' AssessmentReportMetadata (Prelude.Maybe Prelude.Text)
assessmentReportMetadata_description :: (Maybe Text -> f (Maybe Text))
-> AssessmentReportMetadata -> f AssessmentReportMetadata
assessmentReportMetadata_description = (AssessmentReportMetadata -> Maybe Text)
-> (AssessmentReportMetadata
-> Maybe Text -> AssessmentReportMetadata)
-> Lens
AssessmentReportMetadata
AssessmentReportMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReportMetadata' {Maybe Text
description :: Maybe Text
$sel:description:AssessmentReportMetadata' :: AssessmentReportMetadata -> Maybe Text
description} -> Maybe Text
description) (\s :: AssessmentReportMetadata
s@AssessmentReportMetadata' {} Maybe Text
a -> AssessmentReportMetadata
s {$sel:description:AssessmentReportMetadata' :: Maybe Text
description = Maybe Text
a} :: AssessmentReportMetadata)
assessmentReportMetadata_assessmentName :: Lens.Lens' AssessmentReportMetadata (Prelude.Maybe Prelude.Text)
assessmentReportMetadata_assessmentName :: (Maybe Text -> f (Maybe Text))
-> AssessmentReportMetadata -> f AssessmentReportMetadata
assessmentReportMetadata_assessmentName = (AssessmentReportMetadata -> Maybe Text)
-> (AssessmentReportMetadata
-> Maybe Text -> AssessmentReportMetadata)
-> Lens
AssessmentReportMetadata
AssessmentReportMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentReportMetadata' {Maybe Text
assessmentName :: Maybe Text
$sel:assessmentName:AssessmentReportMetadata' :: AssessmentReportMetadata -> Maybe Text
assessmentName} -> Maybe Text
assessmentName) (\s :: AssessmentReportMetadata
s@AssessmentReportMetadata' {} Maybe Text
a -> AssessmentReportMetadata
s {$sel:assessmentName:AssessmentReportMetadata' :: Maybe Text
assessmentName = Maybe Text
a} :: AssessmentReportMetadata)
instance Core.FromJSON AssessmentReportMetadata where
parseJSON :: Value -> Parser AssessmentReportMetadata
parseJSON =
String
-> (Object -> Parser AssessmentReportMetadata)
-> Value
-> Parser AssessmentReportMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AssessmentReportMetadata"
( \Object
x ->
Maybe POSIX
-> Maybe AssessmentReportStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReportMetadata
AssessmentReportMetadata'
(Maybe POSIX
-> Maybe AssessmentReportStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReportMetadata)
-> Parser (Maybe POSIX)
-> Parser
(Maybe AssessmentReportStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReportMetadata)
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
-> AssessmentReportMetadata)
-> Parser (Maybe AssessmentReportStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReportMetadata)
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
-> AssessmentReportMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReportMetadata)
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
-> AssessmentReportMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AssessmentReportMetadata)
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
-> AssessmentReportMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> AssessmentReportMetadata)
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 -> AssessmentReportMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> AssessmentReportMetadata)
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 -> AssessmentReportMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AssessmentReportMetadata)
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 -> AssessmentReportMetadata)
-> Parser (Maybe Text) -> Parser AssessmentReportMetadata
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 AssessmentReportMetadata
instance Prelude.NFData AssessmentReportMetadata