{-# 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.MigrationHub.Types.MigrationTaskSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MigrationHub.Types.MigrationStatus
import qualified Amazonka.Prelude as Prelude
data MigrationTaskSummary = MigrationTaskSummary'
{
MigrationTaskSummary -> Maybe MigrationStatus
status :: Prelude.Maybe MigrationStatus,
MigrationTaskSummary -> Maybe POSIX
updateDateTime :: Prelude.Maybe Core.POSIX,
MigrationTaskSummary -> Maybe Natural
progressPercent :: Prelude.Maybe Prelude.Natural,
MigrationTaskSummary -> Maybe Text
statusDetail :: Prelude.Maybe Prelude.Text,
MigrationTaskSummary -> Maybe Text
progressUpdateStream :: Prelude.Maybe Prelude.Text,
MigrationTaskSummary -> Maybe Text
migrationTaskName :: Prelude.Maybe Prelude.Text
}
deriving (MigrationTaskSummary -> MigrationTaskSummary -> Bool
(MigrationTaskSummary -> MigrationTaskSummary -> Bool)
-> (MigrationTaskSummary -> MigrationTaskSummary -> Bool)
-> Eq MigrationTaskSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MigrationTaskSummary -> MigrationTaskSummary -> Bool
$c/= :: MigrationTaskSummary -> MigrationTaskSummary -> Bool
== :: MigrationTaskSummary -> MigrationTaskSummary -> Bool
$c== :: MigrationTaskSummary -> MigrationTaskSummary -> Bool
Prelude.Eq, ReadPrec [MigrationTaskSummary]
ReadPrec MigrationTaskSummary
Int -> ReadS MigrationTaskSummary
ReadS [MigrationTaskSummary]
(Int -> ReadS MigrationTaskSummary)
-> ReadS [MigrationTaskSummary]
-> ReadPrec MigrationTaskSummary
-> ReadPrec [MigrationTaskSummary]
-> Read MigrationTaskSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MigrationTaskSummary]
$creadListPrec :: ReadPrec [MigrationTaskSummary]
readPrec :: ReadPrec MigrationTaskSummary
$creadPrec :: ReadPrec MigrationTaskSummary
readList :: ReadS [MigrationTaskSummary]
$creadList :: ReadS [MigrationTaskSummary]
readsPrec :: Int -> ReadS MigrationTaskSummary
$creadsPrec :: Int -> ReadS MigrationTaskSummary
Prelude.Read, Int -> MigrationTaskSummary -> ShowS
[MigrationTaskSummary] -> ShowS
MigrationTaskSummary -> String
(Int -> MigrationTaskSummary -> ShowS)
-> (MigrationTaskSummary -> String)
-> ([MigrationTaskSummary] -> ShowS)
-> Show MigrationTaskSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MigrationTaskSummary] -> ShowS
$cshowList :: [MigrationTaskSummary] -> ShowS
show :: MigrationTaskSummary -> String
$cshow :: MigrationTaskSummary -> String
showsPrec :: Int -> MigrationTaskSummary -> ShowS
$cshowsPrec :: Int -> MigrationTaskSummary -> ShowS
Prelude.Show, (forall x. MigrationTaskSummary -> Rep MigrationTaskSummary x)
-> (forall x. Rep MigrationTaskSummary x -> MigrationTaskSummary)
-> Generic MigrationTaskSummary
forall x. Rep MigrationTaskSummary x -> MigrationTaskSummary
forall x. MigrationTaskSummary -> Rep MigrationTaskSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MigrationTaskSummary x -> MigrationTaskSummary
$cfrom :: forall x. MigrationTaskSummary -> Rep MigrationTaskSummary x
Prelude.Generic)
newMigrationTaskSummary ::
MigrationTaskSummary
newMigrationTaskSummary :: MigrationTaskSummary
newMigrationTaskSummary =
MigrationTaskSummary' :: Maybe MigrationStatus
-> Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationTaskSummary
MigrationTaskSummary'
{ $sel:status:MigrationTaskSummary' :: Maybe MigrationStatus
status = Maybe MigrationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:updateDateTime:MigrationTaskSummary' :: Maybe POSIX
updateDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:progressPercent:MigrationTaskSummary' :: Maybe Natural
progressPercent = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:statusDetail:MigrationTaskSummary' :: Maybe Text
statusDetail = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:progressUpdateStream:MigrationTaskSummary' :: Maybe Text
progressUpdateStream = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:migrationTaskName:MigrationTaskSummary' :: Maybe Text
migrationTaskName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
migrationTaskSummary_status :: Lens.Lens' MigrationTaskSummary (Prelude.Maybe MigrationStatus)
migrationTaskSummary_status :: (Maybe MigrationStatus -> f (Maybe MigrationStatus))
-> MigrationTaskSummary -> f MigrationTaskSummary
migrationTaskSummary_status = (MigrationTaskSummary -> Maybe MigrationStatus)
-> (MigrationTaskSummary
-> Maybe MigrationStatus -> MigrationTaskSummary)
-> Lens
MigrationTaskSummary
MigrationTaskSummary
(Maybe MigrationStatus)
(Maybe MigrationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationTaskSummary' {Maybe MigrationStatus
status :: Maybe MigrationStatus
$sel:status:MigrationTaskSummary' :: MigrationTaskSummary -> Maybe MigrationStatus
status} -> Maybe MigrationStatus
status) (\s :: MigrationTaskSummary
s@MigrationTaskSummary' {} Maybe MigrationStatus
a -> MigrationTaskSummary
s {$sel:status:MigrationTaskSummary' :: Maybe MigrationStatus
status = Maybe MigrationStatus
a} :: MigrationTaskSummary)
migrationTaskSummary_updateDateTime :: Lens.Lens' MigrationTaskSummary (Prelude.Maybe Prelude.UTCTime)
migrationTaskSummary_updateDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MigrationTaskSummary -> f MigrationTaskSummary
migrationTaskSummary_updateDateTime = (MigrationTaskSummary -> Maybe POSIX)
-> (MigrationTaskSummary -> Maybe POSIX -> MigrationTaskSummary)
-> Lens
MigrationTaskSummary
MigrationTaskSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationTaskSummary' {Maybe POSIX
updateDateTime :: Maybe POSIX
$sel:updateDateTime:MigrationTaskSummary' :: MigrationTaskSummary -> Maybe POSIX
updateDateTime} -> Maybe POSIX
updateDateTime) (\s :: MigrationTaskSummary
s@MigrationTaskSummary' {} Maybe POSIX
a -> MigrationTaskSummary
s {$sel:updateDateTime:MigrationTaskSummary' :: Maybe POSIX
updateDateTime = Maybe POSIX
a} :: MigrationTaskSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> MigrationTaskSummary -> f MigrationTaskSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MigrationTaskSummary
-> f MigrationTaskSummary
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
migrationTaskSummary_progressPercent :: Lens.Lens' MigrationTaskSummary (Prelude.Maybe Prelude.Natural)
migrationTaskSummary_progressPercent :: (Maybe Natural -> f (Maybe Natural))
-> MigrationTaskSummary -> f MigrationTaskSummary
migrationTaskSummary_progressPercent = (MigrationTaskSummary -> Maybe Natural)
-> (MigrationTaskSummary -> Maybe Natural -> MigrationTaskSummary)
-> Lens
MigrationTaskSummary
MigrationTaskSummary
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationTaskSummary' {Maybe Natural
progressPercent :: Maybe Natural
$sel:progressPercent:MigrationTaskSummary' :: MigrationTaskSummary -> Maybe Natural
progressPercent} -> Maybe Natural
progressPercent) (\s :: MigrationTaskSummary
s@MigrationTaskSummary' {} Maybe Natural
a -> MigrationTaskSummary
s {$sel:progressPercent:MigrationTaskSummary' :: Maybe Natural
progressPercent = Maybe Natural
a} :: MigrationTaskSummary)
migrationTaskSummary_statusDetail :: Lens.Lens' MigrationTaskSummary (Prelude.Maybe Prelude.Text)
migrationTaskSummary_statusDetail :: (Maybe Text -> f (Maybe Text))
-> MigrationTaskSummary -> f MigrationTaskSummary
migrationTaskSummary_statusDetail = (MigrationTaskSummary -> Maybe Text)
-> (MigrationTaskSummary -> Maybe Text -> MigrationTaskSummary)
-> Lens
MigrationTaskSummary MigrationTaskSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationTaskSummary' {Maybe Text
statusDetail :: Maybe Text
$sel:statusDetail:MigrationTaskSummary' :: MigrationTaskSummary -> Maybe Text
statusDetail} -> Maybe Text
statusDetail) (\s :: MigrationTaskSummary
s@MigrationTaskSummary' {} Maybe Text
a -> MigrationTaskSummary
s {$sel:statusDetail:MigrationTaskSummary' :: Maybe Text
statusDetail = Maybe Text
a} :: MigrationTaskSummary)
migrationTaskSummary_progressUpdateStream :: Lens.Lens' MigrationTaskSummary (Prelude.Maybe Prelude.Text)
migrationTaskSummary_progressUpdateStream :: (Maybe Text -> f (Maybe Text))
-> MigrationTaskSummary -> f MigrationTaskSummary
migrationTaskSummary_progressUpdateStream = (MigrationTaskSummary -> Maybe Text)
-> (MigrationTaskSummary -> Maybe Text -> MigrationTaskSummary)
-> Lens
MigrationTaskSummary MigrationTaskSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationTaskSummary' {Maybe Text
progressUpdateStream :: Maybe Text
$sel:progressUpdateStream:MigrationTaskSummary' :: MigrationTaskSummary -> Maybe Text
progressUpdateStream} -> Maybe Text
progressUpdateStream) (\s :: MigrationTaskSummary
s@MigrationTaskSummary' {} Maybe Text
a -> MigrationTaskSummary
s {$sel:progressUpdateStream:MigrationTaskSummary' :: Maybe Text
progressUpdateStream = Maybe Text
a} :: MigrationTaskSummary)
migrationTaskSummary_migrationTaskName :: Lens.Lens' MigrationTaskSummary (Prelude.Maybe Prelude.Text)
migrationTaskSummary_migrationTaskName :: (Maybe Text -> f (Maybe Text))
-> MigrationTaskSummary -> f MigrationTaskSummary
migrationTaskSummary_migrationTaskName = (MigrationTaskSummary -> Maybe Text)
-> (MigrationTaskSummary -> Maybe Text -> MigrationTaskSummary)
-> Lens
MigrationTaskSummary MigrationTaskSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MigrationTaskSummary' {Maybe Text
migrationTaskName :: Maybe Text
$sel:migrationTaskName:MigrationTaskSummary' :: MigrationTaskSummary -> Maybe Text
migrationTaskName} -> Maybe Text
migrationTaskName) (\s :: MigrationTaskSummary
s@MigrationTaskSummary' {} Maybe Text
a -> MigrationTaskSummary
s {$sel:migrationTaskName:MigrationTaskSummary' :: Maybe Text
migrationTaskName = Maybe Text
a} :: MigrationTaskSummary)
instance Core.FromJSON MigrationTaskSummary where
parseJSON :: Value -> Parser MigrationTaskSummary
parseJSON =
String
-> (Object -> Parser MigrationTaskSummary)
-> Value
-> Parser MigrationTaskSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MigrationTaskSummary"
( \Object
x ->
Maybe MigrationStatus
-> Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationTaskSummary
MigrationTaskSummary'
(Maybe MigrationStatus
-> Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationTaskSummary)
-> Parser (Maybe MigrationStatus)
-> Parser
(Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationTaskSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MigrationStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MigrationTaskSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Natural
-> Maybe Text -> Maybe Text -> Maybe Text -> MigrationTaskSummary)
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
"UpdateDateTime")
Parser
(Maybe Natural
-> Maybe Text -> Maybe Text -> Maybe Text -> MigrationTaskSummary)
-> Parser (Maybe Natural)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> MigrationTaskSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProgressPercent")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> MigrationTaskSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> MigrationTaskSummary)
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
"StatusDetail")
Parser (Maybe Text -> Maybe Text -> MigrationTaskSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> MigrationTaskSummary)
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
"ProgressUpdateStream")
Parser (Maybe Text -> MigrationTaskSummary)
-> Parser (Maybe Text) -> Parser MigrationTaskSummary
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
"MigrationTaskName")
)
instance Prelude.Hashable MigrationTaskSummary
instance Prelude.NFData MigrationTaskSummary