{-# 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.SSM.Types.ReviewInformation 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
import Amazonka.SSM.Types.ReviewStatus
data ReviewInformation = ReviewInformation'
{
ReviewInformation -> Maybe POSIX
reviewedTime :: Prelude.Maybe Data.POSIX,
ReviewInformation -> Maybe Text
reviewer :: Prelude.Maybe Prelude.Text,
ReviewInformation -> Maybe ReviewStatus
status :: Prelude.Maybe ReviewStatus
}
deriving (ReviewInformation -> ReviewInformation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReviewInformation -> ReviewInformation -> Bool
$c/= :: ReviewInformation -> ReviewInformation -> Bool
== :: ReviewInformation -> ReviewInformation -> Bool
$c== :: ReviewInformation -> ReviewInformation -> Bool
Prelude.Eq, ReadPrec [ReviewInformation]
ReadPrec ReviewInformation
Int -> ReadS ReviewInformation
ReadS [ReviewInformation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReviewInformation]
$creadListPrec :: ReadPrec [ReviewInformation]
readPrec :: ReadPrec ReviewInformation
$creadPrec :: ReadPrec ReviewInformation
readList :: ReadS [ReviewInformation]
$creadList :: ReadS [ReviewInformation]
readsPrec :: Int -> ReadS ReviewInformation
$creadsPrec :: Int -> ReadS ReviewInformation
Prelude.Read, Int -> ReviewInformation -> ShowS
[ReviewInformation] -> ShowS
ReviewInformation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReviewInformation] -> ShowS
$cshowList :: [ReviewInformation] -> ShowS
show :: ReviewInformation -> String
$cshow :: ReviewInformation -> String
showsPrec :: Int -> ReviewInformation -> ShowS
$cshowsPrec :: Int -> ReviewInformation -> ShowS
Prelude.Show, forall x. Rep ReviewInformation x -> ReviewInformation
forall x. ReviewInformation -> Rep ReviewInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReviewInformation x -> ReviewInformation
$cfrom :: forall x. ReviewInformation -> Rep ReviewInformation x
Prelude.Generic)
newReviewInformation ::
ReviewInformation
newReviewInformation :: ReviewInformation
newReviewInformation =
ReviewInformation'
{ $sel:reviewedTime:ReviewInformation' :: Maybe POSIX
reviewedTime = forall a. Maybe a
Prelude.Nothing,
$sel:reviewer:ReviewInformation' :: Maybe Text
reviewer = forall a. Maybe a
Prelude.Nothing,
$sel:status:ReviewInformation' :: Maybe ReviewStatus
status = forall a. Maybe a
Prelude.Nothing
}
reviewInformation_reviewedTime :: Lens.Lens' ReviewInformation (Prelude.Maybe Prelude.UTCTime)
reviewInformation_reviewedTime :: Lens' ReviewInformation (Maybe UTCTime)
reviewInformation_reviewedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewInformation' {Maybe POSIX
reviewedTime :: Maybe POSIX
$sel:reviewedTime:ReviewInformation' :: ReviewInformation -> Maybe POSIX
reviewedTime} -> Maybe POSIX
reviewedTime) (\s :: ReviewInformation
s@ReviewInformation' {} Maybe POSIX
a -> ReviewInformation
s {$sel:reviewedTime:ReviewInformation' :: Maybe POSIX
reviewedTime = Maybe POSIX
a} :: ReviewInformation) 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
reviewInformation_reviewer :: Lens.Lens' ReviewInformation (Prelude.Maybe Prelude.Text)
reviewInformation_reviewer :: Lens' ReviewInformation (Maybe Text)
reviewInformation_reviewer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewInformation' {Maybe Text
reviewer :: Maybe Text
$sel:reviewer:ReviewInformation' :: ReviewInformation -> Maybe Text
reviewer} -> Maybe Text
reviewer) (\s :: ReviewInformation
s@ReviewInformation' {} Maybe Text
a -> ReviewInformation
s {$sel:reviewer:ReviewInformation' :: Maybe Text
reviewer = Maybe Text
a} :: ReviewInformation)
reviewInformation_status :: Lens.Lens' ReviewInformation (Prelude.Maybe ReviewStatus)
reviewInformation_status :: Lens' ReviewInformation (Maybe ReviewStatus)
reviewInformation_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewInformation' {Maybe ReviewStatus
status :: Maybe ReviewStatus
$sel:status:ReviewInformation' :: ReviewInformation -> Maybe ReviewStatus
status} -> Maybe ReviewStatus
status) (\s :: ReviewInformation
s@ReviewInformation' {} Maybe ReviewStatus
a -> ReviewInformation
s {$sel:status:ReviewInformation' :: Maybe ReviewStatus
status = Maybe ReviewStatus
a} :: ReviewInformation)
instance Data.FromJSON ReviewInformation where
parseJSON :: Value -> Parser ReviewInformation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ReviewInformation"
( \Object
x ->
Maybe POSIX
-> Maybe Text -> Maybe ReviewStatus -> ReviewInformation
ReviewInformation'
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
"ReviewedTime")
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
"Reviewer")
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
"Status")
)
instance Prelude.Hashable ReviewInformation where
hashWithSalt :: Int -> ReviewInformation -> Int
hashWithSalt Int
_salt ReviewInformation' {Maybe Text
Maybe POSIX
Maybe ReviewStatus
status :: Maybe ReviewStatus
reviewer :: Maybe Text
reviewedTime :: Maybe POSIX
$sel:status:ReviewInformation' :: ReviewInformation -> Maybe ReviewStatus
$sel:reviewer:ReviewInformation' :: ReviewInformation -> Maybe Text
$sel:reviewedTime:ReviewInformation' :: ReviewInformation -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
reviewedTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reviewer
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReviewStatus
status
instance Prelude.NFData ReviewInformation where
rnf :: ReviewInformation -> ()
rnf ReviewInformation' {Maybe Text
Maybe POSIX
Maybe ReviewStatus
status :: Maybe ReviewStatus
reviewer :: Maybe Text
reviewedTime :: Maybe POSIX
$sel:status:ReviewInformation' :: ReviewInformation -> Maybe ReviewStatus
$sel:reviewer:ReviewInformation' :: ReviewInformation -> Maybe Text
$sel:reviewedTime:ReviewInformation' :: ReviewInformation -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
reviewedTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reviewer
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReviewStatus
status