{-# 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.SMS.Types.ReplicationJob where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SMS.Types.LicenseType
import Amazonka.SMS.Types.ReplicationJobState
import Amazonka.SMS.Types.ReplicationRun
import Amazonka.SMS.Types.ServerType
import Amazonka.SMS.Types.VmServer
data ReplicationJob = ReplicationJob'
{
ReplicationJob -> Maybe Int
frequency :: Prelude.Maybe Prelude.Int,
ReplicationJob -> Maybe Int
numberOfRecentAmisToKeep :: Prelude.Maybe Prelude.Int,
ReplicationJob -> Maybe ReplicationJobState
state :: Prelude.Maybe ReplicationJobState,
ReplicationJob -> Maybe ServerType
serverType :: Prelude.Maybe ServerType,
ReplicationJob -> Maybe Text
serverId :: Prelude.Maybe Prelude.Text,
ReplicationJob -> Maybe LicenseType
licenseType :: Prelude.Maybe LicenseType,
ReplicationJob -> Maybe Text
roleName :: Prelude.Maybe Prelude.Text,
ReplicationJob -> Maybe VmServer
vmServer :: Prelude.Maybe VmServer,
ReplicationJob -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
ReplicationJob -> Maybe Text
replicationJobId :: Prelude.Maybe Prelude.Text,
ReplicationJob -> Maybe [ReplicationRun]
replicationRunList :: Prelude.Maybe [ReplicationRun],
ReplicationJob -> Maybe POSIX
nextReplicationRunStartTime :: Prelude.Maybe Core.POSIX,
ReplicationJob -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
ReplicationJob -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
ReplicationJob -> Maybe Text
latestAmiId :: Prelude.Maybe Prelude.Text,
ReplicationJob -> Maybe POSIX
seedReplicationTime :: Prelude.Maybe Core.POSIX,
ReplicationJob -> Maybe Bool
runOnce :: Prelude.Maybe Prelude.Bool,
ReplicationJob -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (ReplicationJob -> ReplicationJob -> Bool
(ReplicationJob -> ReplicationJob -> Bool)
-> (ReplicationJob -> ReplicationJob -> Bool) -> Eq ReplicationJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicationJob -> ReplicationJob -> Bool
$c/= :: ReplicationJob -> ReplicationJob -> Bool
== :: ReplicationJob -> ReplicationJob -> Bool
$c== :: ReplicationJob -> ReplicationJob -> Bool
Prelude.Eq, ReadPrec [ReplicationJob]
ReadPrec ReplicationJob
Int -> ReadS ReplicationJob
ReadS [ReplicationJob]
(Int -> ReadS ReplicationJob)
-> ReadS [ReplicationJob]
-> ReadPrec ReplicationJob
-> ReadPrec [ReplicationJob]
-> Read ReplicationJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicationJob]
$creadListPrec :: ReadPrec [ReplicationJob]
readPrec :: ReadPrec ReplicationJob
$creadPrec :: ReadPrec ReplicationJob
readList :: ReadS [ReplicationJob]
$creadList :: ReadS [ReplicationJob]
readsPrec :: Int -> ReadS ReplicationJob
$creadsPrec :: Int -> ReadS ReplicationJob
Prelude.Read, Int -> ReplicationJob -> ShowS
[ReplicationJob] -> ShowS
ReplicationJob -> String
(Int -> ReplicationJob -> ShowS)
-> (ReplicationJob -> String)
-> ([ReplicationJob] -> ShowS)
-> Show ReplicationJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicationJob] -> ShowS
$cshowList :: [ReplicationJob] -> ShowS
show :: ReplicationJob -> String
$cshow :: ReplicationJob -> String
showsPrec :: Int -> ReplicationJob -> ShowS
$cshowsPrec :: Int -> ReplicationJob -> ShowS
Prelude.Show, (forall x. ReplicationJob -> Rep ReplicationJob x)
-> (forall x. Rep ReplicationJob x -> ReplicationJob)
-> Generic ReplicationJob
forall x. Rep ReplicationJob x -> ReplicationJob
forall x. ReplicationJob -> Rep ReplicationJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReplicationJob x -> ReplicationJob
$cfrom :: forall x. ReplicationJob -> Rep ReplicationJob x
Prelude.Generic)
newReplicationJob ::
ReplicationJob
newReplicationJob :: ReplicationJob
newReplicationJob =
ReplicationJob' :: Maybe Int
-> Maybe Int
-> Maybe ReplicationJobState
-> Maybe ServerType
-> Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob
ReplicationJob'
{ $sel:frequency:ReplicationJob' :: Maybe Int
frequency = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfRecentAmisToKeep:ReplicationJob' :: Maybe Int
numberOfRecentAmisToKeep = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:state:ReplicationJob' :: Maybe ReplicationJobState
state = Maybe ReplicationJobState
forall a. Maybe a
Prelude.Nothing,
$sel:serverType:ReplicationJob' :: Maybe ServerType
serverType = Maybe ServerType
forall a. Maybe a
Prelude.Nothing,
$sel:serverId:ReplicationJob' :: Maybe Text
serverId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:licenseType:ReplicationJob' :: Maybe LicenseType
licenseType = Maybe LicenseType
forall a. Maybe a
Prelude.Nothing,
$sel:roleName:ReplicationJob' :: Maybe Text
roleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vmServer:ReplicationJob' :: Maybe VmServer
vmServer = Maybe VmServer
forall a. Maybe a
Prelude.Nothing,
$sel:encrypted:ReplicationJob' :: Maybe Bool
encrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:replicationJobId:ReplicationJob' :: Maybe Text
replicationJobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:replicationRunList:ReplicationJob' :: Maybe [ReplicationRun]
replicationRunList = Maybe [ReplicationRun]
forall a. Maybe a
Prelude.Nothing,
$sel:nextReplicationRunStartTime:ReplicationJob' :: Maybe POSIX
nextReplicationRunStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:ReplicationJob' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:ReplicationJob' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:latestAmiId:ReplicationJob' :: Maybe Text
latestAmiId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:seedReplicationTime:ReplicationJob' :: Maybe POSIX
seedReplicationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:runOnce:ReplicationJob' :: Maybe Bool
runOnce = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:description:ReplicationJob' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
replicationJob_frequency :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Int)
replicationJob_frequency :: (Maybe Int -> f (Maybe Int)) -> ReplicationJob -> f ReplicationJob
replicationJob_frequency = (ReplicationJob -> Maybe Int)
-> (ReplicationJob -> Maybe Int -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Int
frequency :: Maybe Int
$sel:frequency:ReplicationJob' :: ReplicationJob -> Maybe Int
frequency} -> Maybe Int
frequency) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Int
a -> ReplicationJob
s {$sel:frequency:ReplicationJob' :: Maybe Int
frequency = Maybe Int
a} :: ReplicationJob)
replicationJob_numberOfRecentAmisToKeep :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Int)
replicationJob_numberOfRecentAmisToKeep :: (Maybe Int -> f (Maybe Int)) -> ReplicationJob -> f ReplicationJob
replicationJob_numberOfRecentAmisToKeep = (ReplicationJob -> Maybe Int)
-> (ReplicationJob -> Maybe Int -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Int
numberOfRecentAmisToKeep :: Maybe Int
$sel:numberOfRecentAmisToKeep:ReplicationJob' :: ReplicationJob -> Maybe Int
numberOfRecentAmisToKeep} -> Maybe Int
numberOfRecentAmisToKeep) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Int
a -> ReplicationJob
s {$sel:numberOfRecentAmisToKeep:ReplicationJob' :: Maybe Int
numberOfRecentAmisToKeep = Maybe Int
a} :: ReplicationJob)
replicationJob_state :: Lens.Lens' ReplicationJob (Prelude.Maybe ReplicationJobState)
replicationJob_state :: (Maybe ReplicationJobState -> f (Maybe ReplicationJobState))
-> ReplicationJob -> f ReplicationJob
replicationJob_state = (ReplicationJob -> Maybe ReplicationJobState)
-> (ReplicationJob -> Maybe ReplicationJobState -> ReplicationJob)
-> Lens
ReplicationJob
ReplicationJob
(Maybe ReplicationJobState)
(Maybe ReplicationJobState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe ReplicationJobState
state :: Maybe ReplicationJobState
$sel:state:ReplicationJob' :: ReplicationJob -> Maybe ReplicationJobState
state} -> Maybe ReplicationJobState
state) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe ReplicationJobState
a -> ReplicationJob
s {$sel:state:ReplicationJob' :: Maybe ReplicationJobState
state = Maybe ReplicationJobState
a} :: ReplicationJob)
replicationJob_serverType :: Lens.Lens' ReplicationJob (Prelude.Maybe ServerType)
replicationJob_serverType :: (Maybe ServerType -> f (Maybe ServerType))
-> ReplicationJob -> f ReplicationJob
replicationJob_serverType = (ReplicationJob -> Maybe ServerType)
-> (ReplicationJob -> Maybe ServerType -> ReplicationJob)
-> Lens
ReplicationJob ReplicationJob (Maybe ServerType) (Maybe ServerType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe ServerType
serverType :: Maybe ServerType
$sel:serverType:ReplicationJob' :: ReplicationJob -> Maybe ServerType
serverType} -> Maybe ServerType
serverType) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe ServerType
a -> ReplicationJob
s {$sel:serverType:ReplicationJob' :: Maybe ServerType
serverType = Maybe ServerType
a} :: ReplicationJob)
replicationJob_serverId :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Text)
replicationJob_serverId :: (Maybe Text -> f (Maybe Text))
-> ReplicationJob -> f ReplicationJob
replicationJob_serverId = (ReplicationJob -> Maybe Text)
-> (ReplicationJob -> Maybe Text -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Text
serverId :: Maybe Text
$sel:serverId:ReplicationJob' :: ReplicationJob -> Maybe Text
serverId} -> Maybe Text
serverId) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Text
a -> ReplicationJob
s {$sel:serverId:ReplicationJob' :: Maybe Text
serverId = Maybe Text
a} :: ReplicationJob)
replicationJob_licenseType :: Lens.Lens' ReplicationJob (Prelude.Maybe LicenseType)
replicationJob_licenseType :: (Maybe LicenseType -> f (Maybe LicenseType))
-> ReplicationJob -> f ReplicationJob
replicationJob_licenseType = (ReplicationJob -> Maybe LicenseType)
-> (ReplicationJob -> Maybe LicenseType -> ReplicationJob)
-> Lens
ReplicationJob
ReplicationJob
(Maybe LicenseType)
(Maybe LicenseType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe LicenseType
licenseType :: Maybe LicenseType
$sel:licenseType:ReplicationJob' :: ReplicationJob -> Maybe LicenseType
licenseType} -> Maybe LicenseType
licenseType) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe LicenseType
a -> ReplicationJob
s {$sel:licenseType:ReplicationJob' :: Maybe LicenseType
licenseType = Maybe LicenseType
a} :: ReplicationJob)
replicationJob_roleName :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Text)
replicationJob_roleName :: (Maybe Text -> f (Maybe Text))
-> ReplicationJob -> f ReplicationJob
replicationJob_roleName = (ReplicationJob -> Maybe Text)
-> (ReplicationJob -> Maybe Text -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Text
roleName :: Maybe Text
$sel:roleName:ReplicationJob' :: ReplicationJob -> Maybe Text
roleName} -> Maybe Text
roleName) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Text
a -> ReplicationJob
s {$sel:roleName:ReplicationJob' :: Maybe Text
roleName = Maybe Text
a} :: ReplicationJob)
replicationJob_vmServer :: Lens.Lens' ReplicationJob (Prelude.Maybe VmServer)
replicationJob_vmServer :: (Maybe VmServer -> f (Maybe VmServer))
-> ReplicationJob -> f ReplicationJob
replicationJob_vmServer = (ReplicationJob -> Maybe VmServer)
-> (ReplicationJob -> Maybe VmServer -> ReplicationJob)
-> Lens
ReplicationJob ReplicationJob (Maybe VmServer) (Maybe VmServer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe VmServer
vmServer :: Maybe VmServer
$sel:vmServer:ReplicationJob' :: ReplicationJob -> Maybe VmServer
vmServer} -> Maybe VmServer
vmServer) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe VmServer
a -> ReplicationJob
s {$sel:vmServer:ReplicationJob' :: Maybe VmServer
vmServer = Maybe VmServer
a} :: ReplicationJob)
replicationJob_encrypted :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Bool)
replicationJob_encrypted :: (Maybe Bool -> f (Maybe Bool))
-> ReplicationJob -> f ReplicationJob
replicationJob_encrypted = (ReplicationJob -> Maybe Bool)
-> (ReplicationJob -> Maybe Bool -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Bool
encrypted :: Maybe Bool
$sel:encrypted:ReplicationJob' :: ReplicationJob -> Maybe Bool
encrypted} -> Maybe Bool
encrypted) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Bool
a -> ReplicationJob
s {$sel:encrypted:ReplicationJob' :: Maybe Bool
encrypted = Maybe Bool
a} :: ReplicationJob)
replicationJob_replicationJobId :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Text)
replicationJob_replicationJobId :: (Maybe Text -> f (Maybe Text))
-> ReplicationJob -> f ReplicationJob
replicationJob_replicationJobId = (ReplicationJob -> Maybe Text)
-> (ReplicationJob -> Maybe Text -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Text
replicationJobId :: Maybe Text
$sel:replicationJobId:ReplicationJob' :: ReplicationJob -> Maybe Text
replicationJobId} -> Maybe Text
replicationJobId) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Text
a -> ReplicationJob
s {$sel:replicationJobId:ReplicationJob' :: Maybe Text
replicationJobId = Maybe Text
a} :: ReplicationJob)
replicationJob_replicationRunList :: Lens.Lens' ReplicationJob (Prelude.Maybe [ReplicationRun])
replicationJob_replicationRunList :: (Maybe [ReplicationRun] -> f (Maybe [ReplicationRun]))
-> ReplicationJob -> f ReplicationJob
replicationJob_replicationRunList = (ReplicationJob -> Maybe [ReplicationRun])
-> (ReplicationJob -> Maybe [ReplicationRun] -> ReplicationJob)
-> Lens
ReplicationJob
ReplicationJob
(Maybe [ReplicationRun])
(Maybe [ReplicationRun])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe [ReplicationRun]
replicationRunList :: Maybe [ReplicationRun]
$sel:replicationRunList:ReplicationJob' :: ReplicationJob -> Maybe [ReplicationRun]
replicationRunList} -> Maybe [ReplicationRun]
replicationRunList) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe [ReplicationRun]
a -> ReplicationJob
s {$sel:replicationRunList:ReplicationJob' :: Maybe [ReplicationRun]
replicationRunList = Maybe [ReplicationRun]
a} :: ReplicationJob) ((Maybe [ReplicationRun] -> f (Maybe [ReplicationRun]))
-> ReplicationJob -> f ReplicationJob)
-> ((Maybe [ReplicationRun] -> f (Maybe [ReplicationRun]))
-> Maybe [ReplicationRun] -> f (Maybe [ReplicationRun]))
-> (Maybe [ReplicationRun] -> f (Maybe [ReplicationRun]))
-> ReplicationJob
-> f ReplicationJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ReplicationRun] [ReplicationRun] [ReplicationRun] [ReplicationRun]
-> Iso
(Maybe [ReplicationRun])
(Maybe [ReplicationRun])
(Maybe [ReplicationRun])
(Maybe [ReplicationRun])
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
[ReplicationRun] [ReplicationRun] [ReplicationRun] [ReplicationRun]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
replicationJob_nextReplicationRunStartTime :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.UTCTime)
replicationJob_nextReplicationRunStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReplicationJob -> f ReplicationJob
replicationJob_nextReplicationRunStartTime = (ReplicationJob -> Maybe POSIX)
-> (ReplicationJob -> Maybe POSIX -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe POSIX
nextReplicationRunStartTime :: Maybe POSIX
$sel:nextReplicationRunStartTime:ReplicationJob' :: ReplicationJob -> Maybe POSIX
nextReplicationRunStartTime} -> Maybe POSIX
nextReplicationRunStartTime) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe POSIX
a -> ReplicationJob
s {$sel:nextReplicationRunStartTime:ReplicationJob' :: Maybe POSIX
nextReplicationRunStartTime = Maybe POSIX
a} :: ReplicationJob) ((Maybe POSIX -> f (Maybe POSIX))
-> ReplicationJob -> f ReplicationJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReplicationJob
-> f ReplicationJob
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
replicationJob_statusMessage :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Text)
replicationJob_statusMessage :: (Maybe Text -> f (Maybe Text))
-> ReplicationJob -> f ReplicationJob
replicationJob_statusMessage = (ReplicationJob -> Maybe Text)
-> (ReplicationJob -> Maybe Text -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:ReplicationJob' :: ReplicationJob -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Text
a -> ReplicationJob
s {$sel:statusMessage:ReplicationJob' :: Maybe Text
statusMessage = Maybe Text
a} :: ReplicationJob)
replicationJob_kmsKeyId :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Text)
replicationJob_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> ReplicationJob -> f ReplicationJob
replicationJob_kmsKeyId = (ReplicationJob -> Maybe Text)
-> (ReplicationJob -> Maybe Text -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:ReplicationJob' :: ReplicationJob -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Text
a -> ReplicationJob
s {$sel:kmsKeyId:ReplicationJob' :: Maybe Text
kmsKeyId = Maybe Text
a} :: ReplicationJob)
replicationJob_latestAmiId :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Text)
replicationJob_latestAmiId :: (Maybe Text -> f (Maybe Text))
-> ReplicationJob -> f ReplicationJob
replicationJob_latestAmiId = (ReplicationJob -> Maybe Text)
-> (ReplicationJob -> Maybe Text -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Text
latestAmiId :: Maybe Text
$sel:latestAmiId:ReplicationJob' :: ReplicationJob -> Maybe Text
latestAmiId} -> Maybe Text
latestAmiId) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Text
a -> ReplicationJob
s {$sel:latestAmiId:ReplicationJob' :: Maybe Text
latestAmiId = Maybe Text
a} :: ReplicationJob)
replicationJob_seedReplicationTime :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.UTCTime)
replicationJob_seedReplicationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReplicationJob -> f ReplicationJob
replicationJob_seedReplicationTime = (ReplicationJob -> Maybe POSIX)
-> (ReplicationJob -> Maybe POSIX -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe POSIX
seedReplicationTime :: Maybe POSIX
$sel:seedReplicationTime:ReplicationJob' :: ReplicationJob -> Maybe POSIX
seedReplicationTime} -> Maybe POSIX
seedReplicationTime) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe POSIX
a -> ReplicationJob
s {$sel:seedReplicationTime:ReplicationJob' :: Maybe POSIX
seedReplicationTime = Maybe POSIX
a} :: ReplicationJob) ((Maybe POSIX -> f (Maybe POSIX))
-> ReplicationJob -> f ReplicationJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReplicationJob
-> f ReplicationJob
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
replicationJob_runOnce :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Bool)
replicationJob_runOnce :: (Maybe Bool -> f (Maybe Bool))
-> ReplicationJob -> f ReplicationJob
replicationJob_runOnce = (ReplicationJob -> Maybe Bool)
-> (ReplicationJob -> Maybe Bool -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Bool
runOnce :: Maybe Bool
$sel:runOnce:ReplicationJob' :: ReplicationJob -> Maybe Bool
runOnce} -> Maybe Bool
runOnce) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Bool
a -> ReplicationJob
s {$sel:runOnce:ReplicationJob' :: Maybe Bool
runOnce = Maybe Bool
a} :: ReplicationJob)
replicationJob_description :: Lens.Lens' ReplicationJob (Prelude.Maybe Prelude.Text)
replicationJob_description :: (Maybe Text -> f (Maybe Text))
-> ReplicationJob -> f ReplicationJob
replicationJob_description = (ReplicationJob -> Maybe Text)
-> (ReplicationJob -> Maybe Text -> ReplicationJob)
-> Lens ReplicationJob ReplicationJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationJob' {Maybe Text
description :: Maybe Text
$sel:description:ReplicationJob' :: ReplicationJob -> Maybe Text
description} -> Maybe Text
description) (\s :: ReplicationJob
s@ReplicationJob' {} Maybe Text
a -> ReplicationJob
s {$sel:description:ReplicationJob' :: Maybe Text
description = Maybe Text
a} :: ReplicationJob)
instance Core.FromJSON ReplicationJob where
parseJSON :: Value -> Parser ReplicationJob
parseJSON =
String
-> (Object -> Parser ReplicationJob)
-> Value
-> Parser ReplicationJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReplicationJob"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe ReplicationJobState
-> Maybe ServerType
-> Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob
ReplicationJob'
(Maybe Int
-> Maybe Int
-> Maybe ReplicationJobState
-> Maybe ServerType
-> Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe ReplicationJobState
-> Maybe ServerType
-> Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"frequency")
Parser
(Maybe Int
-> Maybe ReplicationJobState
-> Maybe ServerType
-> Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe Int)
-> Parser
(Maybe ReplicationJobState
-> Maybe ServerType
-> Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfRecentAmisToKeep")
Parser
(Maybe ReplicationJobState
-> Maybe ServerType
-> Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe ReplicationJobState)
-> Parser
(Maybe ServerType
-> Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReplicationJobState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
Parser
(Maybe ServerType
-> Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe ServerType)
-> Parser
(Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ServerType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serverType")
Parser
(Maybe Text
-> Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe Text)
-> Parser
(Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
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
"serverId")
Parser
(Maybe LicenseType
-> Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe LicenseType)
-> Parser
(Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LicenseType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"licenseType")
Parser
(Maybe Text
-> Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe Text)
-> Parser
(Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
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
"roleName")
Parser
(Maybe VmServer
-> Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe VmServer)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VmServer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vmServer")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
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
"encrypted")
Parser
(Maybe Text
-> Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe Text)
-> Parser
(Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
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
"replicationJobId")
Parser
(Maybe [ReplicationRun]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe [ReplicationRun])
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ReplicationRun]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"replicationRunList"
Parser (Maybe (Maybe [ReplicationRun]))
-> Maybe [ReplicationRun] -> Parser (Maybe [ReplicationRun])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ReplicationRun]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
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
"nextReplicationRunStartTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
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
"statusMessage")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> ReplicationJob)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX -> Maybe Bool -> Maybe Text -> ReplicationJob)
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
"kmsKeyId")
Parser
(Maybe Text
-> Maybe POSIX -> Maybe Bool -> Maybe Text -> ReplicationJob)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX -> Maybe Bool -> Maybe Text -> ReplicationJob)
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
"latestAmiId")
Parser (Maybe POSIX -> Maybe Bool -> Maybe Text -> ReplicationJob)
-> Parser (Maybe POSIX)
-> Parser (Maybe Bool -> Maybe Text -> ReplicationJob)
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
"seedReplicationTime")
Parser (Maybe Bool -> Maybe Text -> ReplicationJob)
-> Parser (Maybe Bool) -> Parser (Maybe Text -> ReplicationJob)
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
"runOnce")
Parser (Maybe Text -> ReplicationJob)
-> Parser (Maybe Text) -> Parser ReplicationJob
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")
)
instance Prelude.Hashable ReplicationJob
instance Prelude.NFData ReplicationJob