{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SMS.Types.ReplicationJob
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Represents a replication job.
--
-- /See:/ 'newReplicationJob' smart constructor.
data ReplicationJob = ReplicationJob'
  { -- | The time between consecutive replication runs, in hours.
    ReplicationJob -> Maybe Int
frequency :: Prelude.Maybe Prelude.Int,
    -- | The number of recent AMIs to keep in the customer\'s account for a
    -- replication job. By default, the value is set to zero, meaning that all
    -- AMIs are kept.
    ReplicationJob -> Maybe Int
numberOfRecentAmisToKeep :: Prelude.Maybe Prelude.Int,
    -- | The state of the replication job.
    ReplicationJob -> Maybe ReplicationJobState
state :: Prelude.Maybe ReplicationJobState,
    -- | The type of server.
    ReplicationJob -> Maybe ServerType
serverType :: Prelude.Maybe ServerType,
    -- | The ID of the server.
    ReplicationJob -> Maybe Text
serverId :: Prelude.Maybe Prelude.Text,
    -- | The license type to be used for the AMI created by a successful
    -- replication run.
    ReplicationJob -> Maybe LicenseType
licenseType :: Prelude.Maybe LicenseType,
    -- | The name of the IAM role to be used by AWS SMS.
    ReplicationJob -> Maybe Text
roleName :: Prelude.Maybe Prelude.Text,
    -- | Information about the VM server.
    ReplicationJob -> Maybe VmServer
vmServer :: Prelude.Maybe VmServer,
    -- | Indicates whether the replication job should produce encrypted AMIs.
    ReplicationJob -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
    -- | The ID of the replication job.
    ReplicationJob -> Maybe Text
replicationJobId :: Prelude.Maybe Prelude.Text,
    -- | Information about the replication runs.
    ReplicationJob -> Maybe [ReplicationRun]
replicationRunList :: Prelude.Maybe [ReplicationRun],
    -- | The start time of the next replication run.
    ReplicationJob -> Maybe POSIX
nextReplicationRunStartTime :: Prelude.Maybe Core.POSIX,
    -- | The description of the current status of the replication job.
    ReplicationJob -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The ID of the KMS key for replication jobs that produce encrypted AMIs.
    -- This value can be any of the following:
    --
    -- -   KMS key ID
    --
    -- -   KMS key alias
    --
    -- -   ARN referring to the KMS key ID
    --
    -- -   ARN referring to the KMS key alias
    --
    -- If encrypted is enabled but a KMS key ID is not specified, the
    -- customer\'s default KMS key for Amazon EBS is used.
    ReplicationJob -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the latest Amazon Machine Image (AMI).
    ReplicationJob -> Maybe Text
latestAmiId :: Prelude.Maybe Prelude.Text,
    -- | The seed replication time.
    ReplicationJob -> Maybe POSIX
seedReplicationTime :: Prelude.Maybe Core.POSIX,
    -- | Indicates whether to run the replication job one time.
    ReplicationJob -> Maybe Bool
runOnce :: Prelude.Maybe Prelude.Bool,
    -- | The description of the replication job.
    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)

-- |
-- Create a value of 'ReplicationJob' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'frequency', 'replicationJob_frequency' - The time between consecutive replication runs, in hours.
--
-- 'numberOfRecentAmisToKeep', 'replicationJob_numberOfRecentAmisToKeep' - The number of recent AMIs to keep in the customer\'s account for a
-- replication job. By default, the value is set to zero, meaning that all
-- AMIs are kept.
--
-- 'state', 'replicationJob_state' - The state of the replication job.
--
-- 'serverType', 'replicationJob_serverType' - The type of server.
--
-- 'serverId', 'replicationJob_serverId' - The ID of the server.
--
-- 'licenseType', 'replicationJob_licenseType' - The license type to be used for the AMI created by a successful
-- replication run.
--
-- 'roleName', 'replicationJob_roleName' - The name of the IAM role to be used by AWS SMS.
--
-- 'vmServer', 'replicationJob_vmServer' - Information about the VM server.
--
-- 'encrypted', 'replicationJob_encrypted' - Indicates whether the replication job should produce encrypted AMIs.
--
-- 'replicationJobId', 'replicationJob_replicationJobId' - The ID of the replication job.
--
-- 'replicationRunList', 'replicationJob_replicationRunList' - Information about the replication runs.
--
-- 'nextReplicationRunStartTime', 'replicationJob_nextReplicationRunStartTime' - The start time of the next replication run.
--
-- 'statusMessage', 'replicationJob_statusMessage' - The description of the current status of the replication job.
--
-- 'kmsKeyId', 'replicationJob_kmsKeyId' - The ID of the KMS key for replication jobs that produce encrypted AMIs.
-- This value can be any of the following:
--
-- -   KMS key ID
--
-- -   KMS key alias
--
-- -   ARN referring to the KMS key ID
--
-- -   ARN referring to the KMS key alias
--
-- If encrypted is enabled but a KMS key ID is not specified, the
-- customer\'s default KMS key for Amazon EBS is used.
--
-- 'latestAmiId', 'replicationJob_latestAmiId' - The ID of the latest Amazon Machine Image (AMI).
--
-- 'seedReplicationTime', 'replicationJob_seedReplicationTime' - The seed replication time.
--
-- 'runOnce', 'replicationJob_runOnce' - Indicates whether to run the replication job one time.
--
-- 'description', 'replicationJob_description' - The description of the replication job.
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
    }

-- | The time between consecutive replication runs, in hours.
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)

-- | The number of recent AMIs to keep in the customer\'s account for a
-- replication job. By default, the value is set to zero, meaning that all
-- AMIs are kept.
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)

-- | The state of the replication job.
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)

-- | The type of server.
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)

-- | The ID of the server.
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)

-- | The license type to be used for the AMI created by a successful
-- replication run.
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)

-- | The name of the IAM role to be used by AWS SMS.
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)

-- | Information about the VM server.
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)

-- | Indicates whether the replication job should produce encrypted AMIs.
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)

-- | The ID of the replication job.
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)

-- | Information about the replication runs.
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

-- | The start time of the next replication run.
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

-- | The description of the current status of the replication job.
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)

-- | The ID of the KMS key for replication jobs that produce encrypted AMIs.
-- This value can be any of the following:
--
-- -   KMS key ID
--
-- -   KMS key alias
--
-- -   ARN referring to the KMS key ID
--
-- -   ARN referring to the KMS key alias
--
-- If encrypted is enabled but a KMS key ID is not specified, the
-- customer\'s default KMS key for Amazon EBS is used.
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)

-- | The ID of the latest Amazon Machine Image (AMI).
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)

-- | The seed replication time.
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

-- | Indicates whether to run the replication job one 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)

-- | The description of the replication job.
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