{-# 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.DataExchange.Types.RevisionEntry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RevisionEntry = RevisionEntry'
{
RevisionEntry -> Maybe Text
sourceId :: Prelude.Maybe Prelude.Text,
RevisionEntry -> Maybe Bool
finalized :: Prelude.Maybe Prelude.Bool,
:: Prelude.Maybe Prelude.Text,
RevisionEntry -> POSIX
createdAt :: Core.POSIX,
RevisionEntry -> Text
dataSetId :: Prelude.Text,
RevisionEntry -> Text
id :: Prelude.Text,
RevisionEntry -> Text
arn :: Prelude.Text,
RevisionEntry -> POSIX
updatedAt :: Core.POSIX
}
deriving (RevisionEntry -> RevisionEntry -> Bool
(RevisionEntry -> RevisionEntry -> Bool)
-> (RevisionEntry -> RevisionEntry -> Bool) -> Eq RevisionEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevisionEntry -> RevisionEntry -> Bool
$c/= :: RevisionEntry -> RevisionEntry -> Bool
== :: RevisionEntry -> RevisionEntry -> Bool
$c== :: RevisionEntry -> RevisionEntry -> Bool
Prelude.Eq, ReadPrec [RevisionEntry]
ReadPrec RevisionEntry
Int -> ReadS RevisionEntry
ReadS [RevisionEntry]
(Int -> ReadS RevisionEntry)
-> ReadS [RevisionEntry]
-> ReadPrec RevisionEntry
-> ReadPrec [RevisionEntry]
-> Read RevisionEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevisionEntry]
$creadListPrec :: ReadPrec [RevisionEntry]
readPrec :: ReadPrec RevisionEntry
$creadPrec :: ReadPrec RevisionEntry
readList :: ReadS [RevisionEntry]
$creadList :: ReadS [RevisionEntry]
readsPrec :: Int -> ReadS RevisionEntry
$creadsPrec :: Int -> ReadS RevisionEntry
Prelude.Read, Int -> RevisionEntry -> ShowS
[RevisionEntry] -> ShowS
RevisionEntry -> String
(Int -> RevisionEntry -> ShowS)
-> (RevisionEntry -> String)
-> ([RevisionEntry] -> ShowS)
-> Show RevisionEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevisionEntry] -> ShowS
$cshowList :: [RevisionEntry] -> ShowS
show :: RevisionEntry -> String
$cshow :: RevisionEntry -> String
showsPrec :: Int -> RevisionEntry -> ShowS
$cshowsPrec :: Int -> RevisionEntry -> ShowS
Prelude.Show, (forall x. RevisionEntry -> Rep RevisionEntry x)
-> (forall x. Rep RevisionEntry x -> RevisionEntry)
-> Generic RevisionEntry
forall x. Rep RevisionEntry x -> RevisionEntry
forall x. RevisionEntry -> Rep RevisionEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RevisionEntry x -> RevisionEntry
$cfrom :: forall x. RevisionEntry -> Rep RevisionEntry x
Prelude.Generic)
newRevisionEntry ::
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
RevisionEntry
newRevisionEntry :: UTCTime -> Text -> Text -> Text -> UTCTime -> RevisionEntry
newRevisionEntry
UTCTime
pCreatedAt_
Text
pDataSetId_
Text
pId_
Text
pArn_
UTCTime
pUpdatedAt_ =
RevisionEntry' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> POSIX
-> Text
-> Text
-> Text
-> POSIX
-> RevisionEntry
RevisionEntry'
{ $sel:sourceId:RevisionEntry' :: Maybe Text
sourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:finalized:RevisionEntry' :: Maybe Bool
finalized = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:comment:RevisionEntry' :: Maybe Text
comment = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:RevisionEntry' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:dataSetId:RevisionEntry' :: Text
dataSetId = Text
pDataSetId_,
$sel:id:RevisionEntry' :: Text
id = Text
pId_,
$sel:arn:RevisionEntry' :: Text
arn = Text
pArn_,
$sel:updatedAt:RevisionEntry' :: POSIX
updatedAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_
}
revisionEntry_sourceId :: Lens.Lens' RevisionEntry (Prelude.Maybe Prelude.Text)
revisionEntry_sourceId :: (Maybe Text -> f (Maybe Text)) -> RevisionEntry -> f RevisionEntry
revisionEntry_sourceId = (RevisionEntry -> Maybe Text)
-> (RevisionEntry -> Maybe Text -> RevisionEntry)
-> Lens RevisionEntry RevisionEntry (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevisionEntry' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:RevisionEntry' :: RevisionEntry -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: RevisionEntry
s@RevisionEntry' {} Maybe Text
a -> RevisionEntry
s {$sel:sourceId:RevisionEntry' :: Maybe Text
sourceId = Maybe Text
a} :: RevisionEntry)
revisionEntry_finalized :: Lens.Lens' RevisionEntry (Prelude.Maybe Prelude.Bool)
revisionEntry_finalized :: (Maybe Bool -> f (Maybe Bool)) -> RevisionEntry -> f RevisionEntry
revisionEntry_finalized = (RevisionEntry -> Maybe Bool)
-> (RevisionEntry -> Maybe Bool -> RevisionEntry)
-> Lens RevisionEntry RevisionEntry (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevisionEntry' {Maybe Bool
finalized :: Maybe Bool
$sel:finalized:RevisionEntry' :: RevisionEntry -> Maybe Bool
finalized} -> Maybe Bool
finalized) (\s :: RevisionEntry
s@RevisionEntry' {} Maybe Bool
a -> RevisionEntry
s {$sel:finalized:RevisionEntry' :: Maybe Bool
finalized = Maybe Bool
a} :: RevisionEntry)
revisionEntry_comment :: Lens.Lens' RevisionEntry (Prelude.Maybe Prelude.Text)
= (RevisionEntry -> Maybe Text)
-> (RevisionEntry -> Maybe Text -> RevisionEntry)
-> Lens RevisionEntry RevisionEntry (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevisionEntry' {Maybe Text
comment :: Maybe Text
$sel:comment:RevisionEntry' :: RevisionEntry -> Maybe Text
comment} -> Maybe Text
comment) (\s :: RevisionEntry
s@RevisionEntry' {} Maybe Text
a -> RevisionEntry
s {$sel:comment:RevisionEntry' :: Maybe Text
comment = Maybe Text
a} :: RevisionEntry)
revisionEntry_createdAt :: Lens.Lens' RevisionEntry Prelude.UTCTime
revisionEntry_createdAt :: (UTCTime -> f UTCTime) -> RevisionEntry -> f RevisionEntry
revisionEntry_createdAt = (RevisionEntry -> POSIX)
-> (RevisionEntry -> POSIX -> RevisionEntry)
-> Lens RevisionEntry RevisionEntry POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevisionEntry' {POSIX
createdAt :: POSIX
$sel:createdAt:RevisionEntry' :: RevisionEntry -> POSIX
createdAt} -> POSIX
createdAt) (\s :: RevisionEntry
s@RevisionEntry' {} POSIX
a -> RevisionEntry
s {$sel:createdAt:RevisionEntry' :: POSIX
createdAt = POSIX
a} :: RevisionEntry) ((POSIX -> f POSIX) -> RevisionEntry -> f RevisionEntry)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> RevisionEntry
-> f RevisionEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
revisionEntry_dataSetId :: Lens.Lens' RevisionEntry Prelude.Text
revisionEntry_dataSetId :: (Text -> f Text) -> RevisionEntry -> f RevisionEntry
revisionEntry_dataSetId = (RevisionEntry -> Text)
-> (RevisionEntry -> Text -> RevisionEntry)
-> Lens RevisionEntry RevisionEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevisionEntry' {Text
dataSetId :: Text
$sel:dataSetId:RevisionEntry' :: RevisionEntry -> Text
dataSetId} -> Text
dataSetId) (\s :: RevisionEntry
s@RevisionEntry' {} Text
a -> RevisionEntry
s {$sel:dataSetId:RevisionEntry' :: Text
dataSetId = Text
a} :: RevisionEntry)
revisionEntry_id :: Lens.Lens' RevisionEntry Prelude.Text
revisionEntry_id :: (Text -> f Text) -> RevisionEntry -> f RevisionEntry
revisionEntry_id = (RevisionEntry -> Text)
-> (RevisionEntry -> Text -> RevisionEntry)
-> Lens RevisionEntry RevisionEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevisionEntry' {Text
id :: Text
$sel:id:RevisionEntry' :: RevisionEntry -> Text
id} -> Text
id) (\s :: RevisionEntry
s@RevisionEntry' {} Text
a -> RevisionEntry
s {$sel:id:RevisionEntry' :: Text
id = Text
a} :: RevisionEntry)
revisionEntry_arn :: Lens.Lens' RevisionEntry Prelude.Text
revisionEntry_arn :: (Text -> f Text) -> RevisionEntry -> f RevisionEntry
revisionEntry_arn = (RevisionEntry -> Text)
-> (RevisionEntry -> Text -> RevisionEntry)
-> Lens RevisionEntry RevisionEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevisionEntry' {Text
arn :: Text
$sel:arn:RevisionEntry' :: RevisionEntry -> Text
arn} -> Text
arn) (\s :: RevisionEntry
s@RevisionEntry' {} Text
a -> RevisionEntry
s {$sel:arn:RevisionEntry' :: Text
arn = Text
a} :: RevisionEntry)
revisionEntry_updatedAt :: Lens.Lens' RevisionEntry Prelude.UTCTime
revisionEntry_updatedAt :: (UTCTime -> f UTCTime) -> RevisionEntry -> f RevisionEntry
revisionEntry_updatedAt = (RevisionEntry -> POSIX)
-> (RevisionEntry -> POSIX -> RevisionEntry)
-> Lens RevisionEntry RevisionEntry POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevisionEntry' {POSIX
updatedAt :: POSIX
$sel:updatedAt:RevisionEntry' :: RevisionEntry -> POSIX
updatedAt} -> POSIX
updatedAt) (\s :: RevisionEntry
s@RevisionEntry' {} POSIX
a -> RevisionEntry
s {$sel:updatedAt:RevisionEntry' :: POSIX
updatedAt = POSIX
a} :: RevisionEntry) ((POSIX -> f POSIX) -> RevisionEntry -> f RevisionEntry)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> RevisionEntry
-> f RevisionEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON RevisionEntry where
parseJSON :: Value -> Parser RevisionEntry
parseJSON =
String
-> (Object -> Parser RevisionEntry)
-> Value
-> Parser RevisionEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RevisionEntry"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Text
-> POSIX
-> Text
-> Text
-> Text
-> POSIX
-> RevisionEntry
RevisionEntry'
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> POSIX
-> Text
-> Text
-> Text
-> POSIX
-> RevisionEntry)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> POSIX
-> Text
-> Text
-> Text
-> POSIX
-> RevisionEntry)
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
"SourceId")
Parser
(Maybe Bool
-> Maybe Text
-> POSIX
-> Text
-> Text
-> Text
-> POSIX
-> RevisionEntry)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> POSIX -> Text -> Text -> Text -> POSIX -> RevisionEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Finalized")
Parser
(Maybe Text
-> POSIX -> Text -> Text -> Text -> POSIX -> RevisionEntry)
-> Parser (Maybe Text)
-> Parser (POSIX -> Text -> Text -> Text -> POSIX -> RevisionEntry)
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
"Comment")
Parser (POSIX -> Text -> Text -> Text -> POSIX -> RevisionEntry)
-> Parser POSIX
-> Parser (Text -> Text -> Text -> POSIX -> RevisionEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreatedAt")
Parser (Text -> Text -> Text -> POSIX -> RevisionEntry)
-> Parser Text -> Parser (Text -> Text -> POSIX -> RevisionEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"DataSetId")
Parser (Text -> Text -> POSIX -> RevisionEntry)
-> Parser Text -> Parser (Text -> POSIX -> RevisionEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Id")
Parser (Text -> POSIX -> RevisionEntry)
-> Parser Text -> Parser (POSIX -> RevisionEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Arn")
Parser (POSIX -> RevisionEntry)
-> Parser POSIX -> Parser RevisionEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"UpdatedAt")
)
instance Prelude.Hashable RevisionEntry
instance Prelude.NFData RevisionEntry