{-# 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.DocumentReviewerResponseSource where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.DocumentReviewCommentSource
import Amazonka.SSM.Types.ReviewStatus
data DocumentReviewerResponseSource = DocumentReviewerResponseSource'
{
DocumentReviewerResponseSource -> Maybe Text
reviewer :: Prelude.Maybe Prelude.Text,
DocumentReviewerResponseSource -> Maybe ReviewStatus
reviewStatus :: Prelude.Maybe ReviewStatus,
DocumentReviewerResponseSource -> Maybe POSIX
updatedTime :: Prelude.Maybe Core.POSIX,
:: Prelude.Maybe [DocumentReviewCommentSource],
DocumentReviewerResponseSource -> Maybe POSIX
createTime :: Prelude.Maybe Core.POSIX
}
deriving (DocumentReviewerResponseSource
-> DocumentReviewerResponseSource -> Bool
(DocumentReviewerResponseSource
-> DocumentReviewerResponseSource -> Bool)
-> (DocumentReviewerResponseSource
-> DocumentReviewerResponseSource -> Bool)
-> Eq DocumentReviewerResponseSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentReviewerResponseSource
-> DocumentReviewerResponseSource -> Bool
$c/= :: DocumentReviewerResponseSource
-> DocumentReviewerResponseSource -> Bool
== :: DocumentReviewerResponseSource
-> DocumentReviewerResponseSource -> Bool
$c== :: DocumentReviewerResponseSource
-> DocumentReviewerResponseSource -> Bool
Prelude.Eq, ReadPrec [DocumentReviewerResponseSource]
ReadPrec DocumentReviewerResponseSource
Int -> ReadS DocumentReviewerResponseSource
ReadS [DocumentReviewerResponseSource]
(Int -> ReadS DocumentReviewerResponseSource)
-> ReadS [DocumentReviewerResponseSource]
-> ReadPrec DocumentReviewerResponseSource
-> ReadPrec [DocumentReviewerResponseSource]
-> Read DocumentReviewerResponseSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DocumentReviewerResponseSource]
$creadListPrec :: ReadPrec [DocumentReviewerResponseSource]
readPrec :: ReadPrec DocumentReviewerResponseSource
$creadPrec :: ReadPrec DocumentReviewerResponseSource
readList :: ReadS [DocumentReviewerResponseSource]
$creadList :: ReadS [DocumentReviewerResponseSource]
readsPrec :: Int -> ReadS DocumentReviewerResponseSource
$creadsPrec :: Int -> ReadS DocumentReviewerResponseSource
Prelude.Read, Int -> DocumentReviewerResponseSource -> ShowS
[DocumentReviewerResponseSource] -> ShowS
DocumentReviewerResponseSource -> String
(Int -> DocumentReviewerResponseSource -> ShowS)
-> (DocumentReviewerResponseSource -> String)
-> ([DocumentReviewerResponseSource] -> ShowS)
-> Show DocumentReviewerResponseSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentReviewerResponseSource] -> ShowS
$cshowList :: [DocumentReviewerResponseSource] -> ShowS
show :: DocumentReviewerResponseSource -> String
$cshow :: DocumentReviewerResponseSource -> String
showsPrec :: Int -> DocumentReviewerResponseSource -> ShowS
$cshowsPrec :: Int -> DocumentReviewerResponseSource -> ShowS
Prelude.Show, (forall x.
DocumentReviewerResponseSource
-> Rep DocumentReviewerResponseSource x)
-> (forall x.
Rep DocumentReviewerResponseSource x
-> DocumentReviewerResponseSource)
-> Generic DocumentReviewerResponseSource
forall x.
Rep DocumentReviewerResponseSource x
-> DocumentReviewerResponseSource
forall x.
DocumentReviewerResponseSource
-> Rep DocumentReviewerResponseSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DocumentReviewerResponseSource x
-> DocumentReviewerResponseSource
$cfrom :: forall x.
DocumentReviewerResponseSource
-> Rep DocumentReviewerResponseSource x
Prelude.Generic)
newDocumentReviewerResponseSource ::
DocumentReviewerResponseSource
newDocumentReviewerResponseSource :: DocumentReviewerResponseSource
newDocumentReviewerResponseSource =
DocumentReviewerResponseSource' :: Maybe Text
-> Maybe ReviewStatus
-> Maybe POSIX
-> Maybe [DocumentReviewCommentSource]
-> Maybe POSIX
-> DocumentReviewerResponseSource
DocumentReviewerResponseSource'
{ $sel:reviewer:DocumentReviewerResponseSource' :: Maybe Text
reviewer =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reviewStatus:DocumentReviewerResponseSource' :: Maybe ReviewStatus
reviewStatus = Maybe ReviewStatus
forall a. Maybe a
Prelude.Nothing,
$sel:updatedTime:DocumentReviewerResponseSource' :: Maybe POSIX
updatedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:comment:DocumentReviewerResponseSource' :: Maybe [DocumentReviewCommentSource]
comment = Maybe [DocumentReviewCommentSource]
forall a. Maybe a
Prelude.Nothing,
$sel:createTime:DocumentReviewerResponseSource' :: Maybe POSIX
createTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
documentReviewerResponseSource_reviewer :: Lens.Lens' DocumentReviewerResponseSource (Prelude.Maybe Prelude.Text)
documentReviewerResponseSource_reviewer :: (Maybe Text -> f (Maybe Text))
-> DocumentReviewerResponseSource
-> f DocumentReviewerResponseSource
documentReviewerResponseSource_reviewer = (DocumentReviewerResponseSource -> Maybe Text)
-> (DocumentReviewerResponseSource
-> Maybe Text -> DocumentReviewerResponseSource)
-> Lens
DocumentReviewerResponseSource
DocumentReviewerResponseSource
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentReviewerResponseSource' {Maybe Text
reviewer :: Maybe Text
$sel:reviewer:DocumentReviewerResponseSource' :: DocumentReviewerResponseSource -> Maybe Text
reviewer} -> Maybe Text
reviewer) (\s :: DocumentReviewerResponseSource
s@DocumentReviewerResponseSource' {} Maybe Text
a -> DocumentReviewerResponseSource
s {$sel:reviewer:DocumentReviewerResponseSource' :: Maybe Text
reviewer = Maybe Text
a} :: DocumentReviewerResponseSource)
documentReviewerResponseSource_reviewStatus :: Lens.Lens' DocumentReviewerResponseSource (Prelude.Maybe ReviewStatus)
documentReviewerResponseSource_reviewStatus :: (Maybe ReviewStatus -> f (Maybe ReviewStatus))
-> DocumentReviewerResponseSource
-> f DocumentReviewerResponseSource
documentReviewerResponseSource_reviewStatus = (DocumentReviewerResponseSource -> Maybe ReviewStatus)
-> (DocumentReviewerResponseSource
-> Maybe ReviewStatus -> DocumentReviewerResponseSource)
-> Lens
DocumentReviewerResponseSource
DocumentReviewerResponseSource
(Maybe ReviewStatus)
(Maybe ReviewStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentReviewerResponseSource' {Maybe ReviewStatus
reviewStatus :: Maybe ReviewStatus
$sel:reviewStatus:DocumentReviewerResponseSource' :: DocumentReviewerResponseSource -> Maybe ReviewStatus
reviewStatus} -> Maybe ReviewStatus
reviewStatus) (\s :: DocumentReviewerResponseSource
s@DocumentReviewerResponseSource' {} Maybe ReviewStatus
a -> DocumentReviewerResponseSource
s {$sel:reviewStatus:DocumentReviewerResponseSource' :: Maybe ReviewStatus
reviewStatus = Maybe ReviewStatus
a} :: DocumentReviewerResponseSource)
documentReviewerResponseSource_updatedTime :: Lens.Lens' DocumentReviewerResponseSource (Prelude.Maybe Prelude.UTCTime)
documentReviewerResponseSource_updatedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentReviewerResponseSource
-> f DocumentReviewerResponseSource
documentReviewerResponseSource_updatedTime = (DocumentReviewerResponseSource -> Maybe POSIX)
-> (DocumentReviewerResponseSource
-> Maybe POSIX -> DocumentReviewerResponseSource)
-> Lens
DocumentReviewerResponseSource
DocumentReviewerResponseSource
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentReviewerResponseSource' {Maybe POSIX
updatedTime :: Maybe POSIX
$sel:updatedTime:DocumentReviewerResponseSource' :: DocumentReviewerResponseSource -> Maybe POSIX
updatedTime} -> Maybe POSIX
updatedTime) (\s :: DocumentReviewerResponseSource
s@DocumentReviewerResponseSource' {} Maybe POSIX
a -> DocumentReviewerResponseSource
s {$sel:updatedTime:DocumentReviewerResponseSource' :: Maybe POSIX
updatedTime = Maybe POSIX
a} :: DocumentReviewerResponseSource) ((Maybe POSIX -> f (Maybe POSIX))
-> DocumentReviewerResponseSource
-> f DocumentReviewerResponseSource)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentReviewerResponseSource
-> f DocumentReviewerResponseSource
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
documentReviewerResponseSource_comment :: Lens.Lens' DocumentReviewerResponseSource (Prelude.Maybe [DocumentReviewCommentSource])
= (DocumentReviewerResponseSource
-> Maybe [DocumentReviewCommentSource])
-> (DocumentReviewerResponseSource
-> Maybe [DocumentReviewCommentSource]
-> DocumentReviewerResponseSource)
-> Lens
DocumentReviewerResponseSource
DocumentReviewerResponseSource
(Maybe [DocumentReviewCommentSource])
(Maybe [DocumentReviewCommentSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentReviewerResponseSource' {Maybe [DocumentReviewCommentSource]
comment :: Maybe [DocumentReviewCommentSource]
$sel:comment:DocumentReviewerResponseSource' :: DocumentReviewerResponseSource
-> Maybe [DocumentReviewCommentSource]
comment} -> Maybe [DocumentReviewCommentSource]
comment) (\s :: DocumentReviewerResponseSource
s@DocumentReviewerResponseSource' {} Maybe [DocumentReviewCommentSource]
a -> DocumentReviewerResponseSource
s {$sel:comment:DocumentReviewerResponseSource' :: Maybe [DocumentReviewCommentSource]
comment = Maybe [DocumentReviewCommentSource]
a} :: DocumentReviewerResponseSource) ((Maybe [DocumentReviewCommentSource]
-> f (Maybe [DocumentReviewCommentSource]))
-> DocumentReviewerResponseSource
-> f DocumentReviewerResponseSource)
-> ((Maybe [DocumentReviewCommentSource]
-> f (Maybe [DocumentReviewCommentSource]))
-> Maybe [DocumentReviewCommentSource]
-> f (Maybe [DocumentReviewCommentSource]))
-> (Maybe [DocumentReviewCommentSource]
-> f (Maybe [DocumentReviewCommentSource]))
-> DocumentReviewerResponseSource
-> f DocumentReviewerResponseSource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DocumentReviewCommentSource]
[DocumentReviewCommentSource]
[DocumentReviewCommentSource]
[DocumentReviewCommentSource]
-> Iso
(Maybe [DocumentReviewCommentSource])
(Maybe [DocumentReviewCommentSource])
(Maybe [DocumentReviewCommentSource])
(Maybe [DocumentReviewCommentSource])
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
[DocumentReviewCommentSource]
[DocumentReviewCommentSource]
[DocumentReviewCommentSource]
[DocumentReviewCommentSource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
documentReviewerResponseSource_createTime :: Lens.Lens' DocumentReviewerResponseSource (Prelude.Maybe Prelude.UTCTime)
documentReviewerResponseSource_createTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentReviewerResponseSource
-> f DocumentReviewerResponseSource
documentReviewerResponseSource_createTime = (DocumentReviewerResponseSource -> Maybe POSIX)
-> (DocumentReviewerResponseSource
-> Maybe POSIX -> DocumentReviewerResponseSource)
-> Lens
DocumentReviewerResponseSource
DocumentReviewerResponseSource
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentReviewerResponseSource' {Maybe POSIX
createTime :: Maybe POSIX
$sel:createTime:DocumentReviewerResponseSource' :: DocumentReviewerResponseSource -> Maybe POSIX
createTime} -> Maybe POSIX
createTime) (\s :: DocumentReviewerResponseSource
s@DocumentReviewerResponseSource' {} Maybe POSIX
a -> DocumentReviewerResponseSource
s {$sel:createTime:DocumentReviewerResponseSource' :: Maybe POSIX
createTime = Maybe POSIX
a} :: DocumentReviewerResponseSource) ((Maybe POSIX -> f (Maybe POSIX))
-> DocumentReviewerResponseSource
-> f DocumentReviewerResponseSource)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentReviewerResponseSource
-> f DocumentReviewerResponseSource
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
instance Core.FromJSON DocumentReviewerResponseSource where
parseJSON :: Value -> Parser DocumentReviewerResponseSource
parseJSON =
String
-> (Object -> Parser DocumentReviewerResponseSource)
-> Value
-> Parser DocumentReviewerResponseSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DocumentReviewerResponseSource"
( \Object
x ->
Maybe Text
-> Maybe ReviewStatus
-> Maybe POSIX
-> Maybe [DocumentReviewCommentSource]
-> Maybe POSIX
-> DocumentReviewerResponseSource
DocumentReviewerResponseSource'
(Maybe Text
-> Maybe ReviewStatus
-> Maybe POSIX
-> Maybe [DocumentReviewCommentSource]
-> Maybe POSIX
-> DocumentReviewerResponseSource)
-> Parser (Maybe Text)
-> Parser
(Maybe ReviewStatus
-> Maybe POSIX
-> Maybe [DocumentReviewCommentSource]
-> Maybe POSIX
-> DocumentReviewerResponseSource)
forall (f :: * -> *) a b. Functor 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
"Reviewer")
Parser
(Maybe ReviewStatus
-> Maybe POSIX
-> Maybe [DocumentReviewCommentSource]
-> Maybe POSIX
-> DocumentReviewerResponseSource)
-> Parser (Maybe ReviewStatus)
-> Parser
(Maybe POSIX
-> Maybe [DocumentReviewCommentSource]
-> Maybe POSIX
-> DocumentReviewerResponseSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReviewStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReviewStatus")
Parser
(Maybe POSIX
-> Maybe [DocumentReviewCommentSource]
-> Maybe POSIX
-> DocumentReviewerResponseSource)
-> Parser (Maybe POSIX)
-> Parser
(Maybe [DocumentReviewCommentSource]
-> Maybe POSIX -> DocumentReviewerResponseSource)
forall (f :: * -> *) a b. Applicative f => 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
"UpdatedTime")
Parser
(Maybe [DocumentReviewCommentSource]
-> Maybe POSIX -> DocumentReviewerResponseSource)
-> Parser (Maybe [DocumentReviewCommentSource])
-> Parser (Maybe POSIX -> DocumentReviewerResponseSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe [DocumentReviewCommentSource]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Comment" Parser (Maybe (Maybe [DocumentReviewCommentSource]))
-> Maybe [DocumentReviewCommentSource]
-> Parser (Maybe [DocumentReviewCommentSource])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [DocumentReviewCommentSource]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe POSIX -> DocumentReviewerResponseSource)
-> Parser (Maybe POSIX) -> Parser DocumentReviewerResponseSource
forall (f :: * -> *) a b. Applicative f => 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
"CreateTime")
)
instance
Prelude.Hashable
DocumentReviewerResponseSource
instance
Prelude.NFData
DocumentReviewerResponseSource