{-# 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.DMS.Types.ReplicationTaskAssessmentRun
-- 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.DMS.Types.ReplicationTaskAssessmentRun where

import qualified Amazonka.Core as Core
import Amazonka.DMS.Types.ReplicationTaskAssessmentRunProgress
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides information that describes a premigration assessment run that
-- you have started using the @StartReplicationTaskAssessmentRun@
-- operation.
--
-- Some of the information appears based on other operations that can
-- return the @ReplicationTaskAssessmentRun@ object.
--
-- /See:/ 'newReplicationTaskAssessmentRun' smart constructor.
data ReplicationTaskAssessmentRun = ReplicationTaskAssessmentRun'
  { -- | Assessment run status.
    --
    -- This status can have one of the following values:
    --
    -- -   @\"cancelling\"@ – The assessment run was canceled by the
    --     @CancelReplicationTaskAssessmentRun@ operation.
    --
    -- -   @\"deleting\"@ – The assessment run was deleted by the
    --     @DeleteReplicationTaskAssessmentRun@ operation.
    --
    -- -   @\"failed\"@ – At least one individual assessment completed with a
    --     @failed@ status.
    --
    -- -   @\"error-provisioning\"@ – An internal error occurred while
    --     resources were provisioned (during @provisioning@ status).
    --
    -- -   @\"error-executing\"@ – An internal error occurred while individual
    --     assessments ran (during @running@ status).
    --
    -- -   @\"invalid state\"@ – The assessment run is in an unknown state.
    --
    -- -   @\"passed\"@ – All individual assessments have completed, and none
    --     has a @failed@ status.
    --
    -- -   @\"provisioning\"@ – Resources required to run individual
    --     assessments are being provisioned.
    --
    -- -   @\"running\"@ – Individual assessments are being run.
    --
    -- -   @\"starting\"@ – The assessment run is starting, but resources are
    --     not yet being provisioned for individual assessments.
    ReplicationTaskAssessmentRun -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | ARN of the service role used to start the assessment run using the
    -- @StartReplicationTaskAssessmentRun@ operation. The role must allow the
    -- @iam:PassRole@ action.
    ReplicationTaskAssessmentRun -> Maybe Text
serviceAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Date on which the assessment run was created using the
    -- @StartReplicationTaskAssessmentRun@ operation.
    ReplicationTaskAssessmentRun -> Maybe POSIX
replicationTaskAssessmentRunCreationDate :: Prelude.Maybe Core.POSIX,
    -- | Indication of the completion progress for the individual assessments
    -- specified to run.
    ReplicationTaskAssessmentRun
-> Maybe ReplicationTaskAssessmentRunProgress
assessmentProgress :: Prelude.Maybe ReplicationTaskAssessmentRunProgress,
    -- | ARN of the KMS encryption key used to encrypt the assessment run
    -- results.
    ReplicationTaskAssessmentRun -> Maybe Text
resultKmsKeyArn :: Prelude.Maybe Prelude.Text,
    -- | ARN of the migration task associated with this premigration assessment
    -- run.
    ReplicationTaskAssessmentRun -> Maybe Text
replicationTaskArn :: Prelude.Maybe Prelude.Text,
    -- | Amazon S3 bucket where DMS stores the results of this assessment run.
    ReplicationTaskAssessmentRun -> Maybe Text
resultLocationBucket :: Prelude.Maybe Prelude.Text,
    -- | Folder in an Amazon S3 bucket where DMS stores the results of this
    -- assessment run.
    ReplicationTaskAssessmentRun -> Maybe Text
resultLocationFolder :: Prelude.Maybe Prelude.Text,
    -- | Encryption mode used to encrypt the assessment run results.
    ReplicationTaskAssessmentRun -> Maybe Text
resultEncryptionMode :: Prelude.Maybe Prelude.Text,
    -- | Unique name of the assessment run.
    ReplicationTaskAssessmentRun -> Maybe Text
assessmentRunName :: Prelude.Maybe Prelude.Text,
    -- | Amazon Resource Name (ARN) of this assessment run.
    ReplicationTaskAssessmentRun -> Maybe Text
replicationTaskAssessmentRunArn :: Prelude.Maybe Prelude.Text,
    -- | Last message generated by an individual assessment failure.
    ReplicationTaskAssessmentRun -> Maybe Text
lastFailureMessage :: Prelude.Maybe Prelude.Text
  }
  deriving (ReplicationTaskAssessmentRun
-> ReplicationTaskAssessmentRun -> Bool
(ReplicationTaskAssessmentRun
 -> ReplicationTaskAssessmentRun -> Bool)
-> (ReplicationTaskAssessmentRun
    -> ReplicationTaskAssessmentRun -> Bool)
-> Eq ReplicationTaskAssessmentRun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicationTaskAssessmentRun
-> ReplicationTaskAssessmentRun -> Bool
$c/= :: ReplicationTaskAssessmentRun
-> ReplicationTaskAssessmentRun -> Bool
== :: ReplicationTaskAssessmentRun
-> ReplicationTaskAssessmentRun -> Bool
$c== :: ReplicationTaskAssessmentRun
-> ReplicationTaskAssessmentRun -> Bool
Prelude.Eq, ReadPrec [ReplicationTaskAssessmentRun]
ReadPrec ReplicationTaskAssessmentRun
Int -> ReadS ReplicationTaskAssessmentRun
ReadS [ReplicationTaskAssessmentRun]
(Int -> ReadS ReplicationTaskAssessmentRun)
-> ReadS [ReplicationTaskAssessmentRun]
-> ReadPrec ReplicationTaskAssessmentRun
-> ReadPrec [ReplicationTaskAssessmentRun]
-> Read ReplicationTaskAssessmentRun
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicationTaskAssessmentRun]
$creadListPrec :: ReadPrec [ReplicationTaskAssessmentRun]
readPrec :: ReadPrec ReplicationTaskAssessmentRun
$creadPrec :: ReadPrec ReplicationTaskAssessmentRun
readList :: ReadS [ReplicationTaskAssessmentRun]
$creadList :: ReadS [ReplicationTaskAssessmentRun]
readsPrec :: Int -> ReadS ReplicationTaskAssessmentRun
$creadsPrec :: Int -> ReadS ReplicationTaskAssessmentRun
Prelude.Read, Int -> ReplicationTaskAssessmentRun -> ShowS
[ReplicationTaskAssessmentRun] -> ShowS
ReplicationTaskAssessmentRun -> String
(Int -> ReplicationTaskAssessmentRun -> ShowS)
-> (ReplicationTaskAssessmentRun -> String)
-> ([ReplicationTaskAssessmentRun] -> ShowS)
-> Show ReplicationTaskAssessmentRun
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicationTaskAssessmentRun] -> ShowS
$cshowList :: [ReplicationTaskAssessmentRun] -> ShowS
show :: ReplicationTaskAssessmentRun -> String
$cshow :: ReplicationTaskAssessmentRun -> String
showsPrec :: Int -> ReplicationTaskAssessmentRun -> ShowS
$cshowsPrec :: Int -> ReplicationTaskAssessmentRun -> ShowS
Prelude.Show, (forall x.
 ReplicationTaskAssessmentRun -> Rep ReplicationTaskAssessmentRun x)
-> (forall x.
    Rep ReplicationTaskAssessmentRun x -> ReplicationTaskAssessmentRun)
-> Generic ReplicationTaskAssessmentRun
forall x.
Rep ReplicationTaskAssessmentRun x -> ReplicationTaskAssessmentRun
forall x.
ReplicationTaskAssessmentRun -> Rep ReplicationTaskAssessmentRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReplicationTaskAssessmentRun x -> ReplicationTaskAssessmentRun
$cfrom :: forall x.
ReplicationTaskAssessmentRun -> Rep ReplicationTaskAssessmentRun x
Prelude.Generic)

-- |
-- Create a value of 'ReplicationTaskAssessmentRun' 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:
--
-- 'status', 'replicationTaskAssessmentRun_status' - Assessment run status.
--
-- This status can have one of the following values:
--
-- -   @\"cancelling\"@ – The assessment run was canceled by the
--     @CancelReplicationTaskAssessmentRun@ operation.
--
-- -   @\"deleting\"@ – The assessment run was deleted by the
--     @DeleteReplicationTaskAssessmentRun@ operation.
--
-- -   @\"failed\"@ – At least one individual assessment completed with a
--     @failed@ status.
--
-- -   @\"error-provisioning\"@ – An internal error occurred while
--     resources were provisioned (during @provisioning@ status).
--
-- -   @\"error-executing\"@ – An internal error occurred while individual
--     assessments ran (during @running@ status).
--
-- -   @\"invalid state\"@ – The assessment run is in an unknown state.
--
-- -   @\"passed\"@ – All individual assessments have completed, and none
--     has a @failed@ status.
--
-- -   @\"provisioning\"@ – Resources required to run individual
--     assessments are being provisioned.
--
-- -   @\"running\"@ – Individual assessments are being run.
--
-- -   @\"starting\"@ – The assessment run is starting, but resources are
--     not yet being provisioned for individual assessments.
--
-- 'serviceAccessRoleArn', 'replicationTaskAssessmentRun_serviceAccessRoleArn' - ARN of the service role used to start the assessment run using the
-- @StartReplicationTaskAssessmentRun@ operation. The role must allow the
-- @iam:PassRole@ action.
--
-- 'replicationTaskAssessmentRunCreationDate', 'replicationTaskAssessmentRun_replicationTaskAssessmentRunCreationDate' - Date on which the assessment run was created using the
-- @StartReplicationTaskAssessmentRun@ operation.
--
-- 'assessmentProgress', 'replicationTaskAssessmentRun_assessmentProgress' - Indication of the completion progress for the individual assessments
-- specified to run.
--
-- 'resultKmsKeyArn', 'replicationTaskAssessmentRun_resultKmsKeyArn' - ARN of the KMS encryption key used to encrypt the assessment run
-- results.
--
-- 'replicationTaskArn', 'replicationTaskAssessmentRun_replicationTaskArn' - ARN of the migration task associated with this premigration assessment
-- run.
--
-- 'resultLocationBucket', 'replicationTaskAssessmentRun_resultLocationBucket' - Amazon S3 bucket where DMS stores the results of this assessment run.
--
-- 'resultLocationFolder', 'replicationTaskAssessmentRun_resultLocationFolder' - Folder in an Amazon S3 bucket where DMS stores the results of this
-- assessment run.
--
-- 'resultEncryptionMode', 'replicationTaskAssessmentRun_resultEncryptionMode' - Encryption mode used to encrypt the assessment run results.
--
-- 'assessmentRunName', 'replicationTaskAssessmentRun_assessmentRunName' - Unique name of the assessment run.
--
-- 'replicationTaskAssessmentRunArn', 'replicationTaskAssessmentRun_replicationTaskAssessmentRunArn' - Amazon Resource Name (ARN) of this assessment run.
--
-- 'lastFailureMessage', 'replicationTaskAssessmentRun_lastFailureMessage' - Last message generated by an individual assessment failure.
newReplicationTaskAssessmentRun ::
  ReplicationTaskAssessmentRun
newReplicationTaskAssessmentRun :: ReplicationTaskAssessmentRun
newReplicationTaskAssessmentRun =
  ReplicationTaskAssessmentRun' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ReplicationTaskAssessmentRunProgress
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReplicationTaskAssessmentRun
ReplicationTaskAssessmentRun'
    { $sel:status:ReplicationTaskAssessmentRun' :: Maybe Text
status =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceAccessRoleArn:ReplicationTaskAssessmentRun' :: Maybe Text
serviceAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationTaskAssessmentRunCreationDate:ReplicationTaskAssessmentRun' :: Maybe POSIX
replicationTaskAssessmentRunCreationDate =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:assessmentProgress:ReplicationTaskAssessmentRun' :: Maybe ReplicationTaskAssessmentRunProgress
assessmentProgress = Maybe ReplicationTaskAssessmentRunProgress
forall a. Maybe a
Prelude.Nothing,
      $sel:resultKmsKeyArn:ReplicationTaskAssessmentRun' :: Maybe Text
resultKmsKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationTaskArn:ReplicationTaskAssessmentRun' :: Maybe Text
replicationTaskArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resultLocationBucket:ReplicationTaskAssessmentRun' :: Maybe Text
resultLocationBucket = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resultLocationFolder:ReplicationTaskAssessmentRun' :: Maybe Text
resultLocationFolder = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resultEncryptionMode:ReplicationTaskAssessmentRun' :: Maybe Text
resultEncryptionMode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assessmentRunName:ReplicationTaskAssessmentRun' :: Maybe Text
assessmentRunName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationTaskAssessmentRunArn:ReplicationTaskAssessmentRun' :: Maybe Text
replicationTaskAssessmentRunArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastFailureMessage:ReplicationTaskAssessmentRun' :: Maybe Text
lastFailureMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Assessment run status.
--
-- This status can have one of the following values:
--
-- -   @\"cancelling\"@ – The assessment run was canceled by the
--     @CancelReplicationTaskAssessmentRun@ operation.
--
-- -   @\"deleting\"@ – The assessment run was deleted by the
--     @DeleteReplicationTaskAssessmentRun@ operation.
--
-- -   @\"failed\"@ – At least one individual assessment completed with a
--     @failed@ status.
--
-- -   @\"error-provisioning\"@ – An internal error occurred while
--     resources were provisioned (during @provisioning@ status).
--
-- -   @\"error-executing\"@ – An internal error occurred while individual
--     assessments ran (during @running@ status).
--
-- -   @\"invalid state\"@ – The assessment run is in an unknown state.
--
-- -   @\"passed\"@ – All individual assessments have completed, and none
--     has a @failed@ status.
--
-- -   @\"provisioning\"@ – Resources required to run individual
--     assessments are being provisioned.
--
-- -   @\"running\"@ – Individual assessments are being run.
--
-- -   @\"starting\"@ – The assessment run is starting, but resources are
--     not yet being provisioned for individual assessments.
replicationTaskAssessmentRun_status :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.Text)
replicationTaskAssessmentRun_status :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_status = (ReplicationTaskAssessmentRun -> Maybe Text)
-> (ReplicationTaskAssessmentRun
    -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe Text
status :: Maybe Text
$sel:status:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe Text
status} -> Maybe Text
status) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe Text
a -> ReplicationTaskAssessmentRun
s {$sel:status:ReplicationTaskAssessmentRun' :: Maybe Text
status = Maybe Text
a} :: ReplicationTaskAssessmentRun)

-- | ARN of the service role used to start the assessment run using the
-- @StartReplicationTaskAssessmentRun@ operation. The role must allow the
-- @iam:PassRole@ action.
replicationTaskAssessmentRun_serviceAccessRoleArn :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.Text)
replicationTaskAssessmentRun_serviceAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_serviceAccessRoleArn = (ReplicationTaskAssessmentRun -> Maybe Text)
-> (ReplicationTaskAssessmentRun
    -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe Text
serviceAccessRoleArn :: Maybe Text
$sel:serviceAccessRoleArn:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe Text
serviceAccessRoleArn} -> Maybe Text
serviceAccessRoleArn) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe Text
a -> ReplicationTaskAssessmentRun
s {$sel:serviceAccessRoleArn:ReplicationTaskAssessmentRun' :: Maybe Text
serviceAccessRoleArn = Maybe Text
a} :: ReplicationTaskAssessmentRun)

-- | Date on which the assessment run was created using the
-- @StartReplicationTaskAssessmentRun@ operation.
replicationTaskAssessmentRun_replicationTaskAssessmentRunCreationDate :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.UTCTime)
replicationTaskAssessmentRun_replicationTaskAssessmentRunCreationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_replicationTaskAssessmentRunCreationDate = (ReplicationTaskAssessmentRun -> Maybe POSIX)
-> (ReplicationTaskAssessmentRun
    -> Maybe POSIX -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe POSIX
replicationTaskAssessmentRunCreationDate :: Maybe POSIX
$sel:replicationTaskAssessmentRunCreationDate:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe POSIX
replicationTaskAssessmentRunCreationDate} -> Maybe POSIX
replicationTaskAssessmentRunCreationDate) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe POSIX
a -> ReplicationTaskAssessmentRun
s {$sel:replicationTaskAssessmentRunCreationDate:ReplicationTaskAssessmentRun' :: Maybe POSIX
replicationTaskAssessmentRunCreationDate = Maybe POSIX
a} :: ReplicationTaskAssessmentRun) ((Maybe POSIX -> f (Maybe POSIX))
 -> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReplicationTaskAssessmentRun
-> f ReplicationTaskAssessmentRun
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

-- | Indication of the completion progress for the individual assessments
-- specified to run.
replicationTaskAssessmentRun_assessmentProgress :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe ReplicationTaskAssessmentRunProgress)
replicationTaskAssessmentRun_assessmentProgress :: (Maybe ReplicationTaskAssessmentRunProgress
 -> f (Maybe ReplicationTaskAssessmentRunProgress))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_assessmentProgress = (ReplicationTaskAssessmentRun
 -> Maybe ReplicationTaskAssessmentRunProgress)
-> (ReplicationTaskAssessmentRun
    -> Maybe ReplicationTaskAssessmentRunProgress
    -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe ReplicationTaskAssessmentRunProgress)
     (Maybe ReplicationTaskAssessmentRunProgress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe ReplicationTaskAssessmentRunProgress
assessmentProgress :: Maybe ReplicationTaskAssessmentRunProgress
$sel:assessmentProgress:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun
-> Maybe ReplicationTaskAssessmentRunProgress
assessmentProgress} -> Maybe ReplicationTaskAssessmentRunProgress
assessmentProgress) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe ReplicationTaskAssessmentRunProgress
a -> ReplicationTaskAssessmentRun
s {$sel:assessmentProgress:ReplicationTaskAssessmentRun' :: Maybe ReplicationTaskAssessmentRunProgress
assessmentProgress = Maybe ReplicationTaskAssessmentRunProgress
a} :: ReplicationTaskAssessmentRun)

-- | ARN of the KMS encryption key used to encrypt the assessment run
-- results.
replicationTaskAssessmentRun_resultKmsKeyArn :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.Text)
replicationTaskAssessmentRun_resultKmsKeyArn :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_resultKmsKeyArn = (ReplicationTaskAssessmentRun -> Maybe Text)
-> (ReplicationTaskAssessmentRun
    -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe Text
resultKmsKeyArn :: Maybe Text
$sel:resultKmsKeyArn:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe Text
resultKmsKeyArn} -> Maybe Text
resultKmsKeyArn) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe Text
a -> ReplicationTaskAssessmentRun
s {$sel:resultKmsKeyArn:ReplicationTaskAssessmentRun' :: Maybe Text
resultKmsKeyArn = Maybe Text
a} :: ReplicationTaskAssessmentRun)

-- | ARN of the migration task associated with this premigration assessment
-- run.
replicationTaskAssessmentRun_replicationTaskArn :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.Text)
replicationTaskAssessmentRun_replicationTaskArn :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_replicationTaskArn = (ReplicationTaskAssessmentRun -> Maybe Text)
-> (ReplicationTaskAssessmentRun
    -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe Text
replicationTaskArn :: Maybe Text
$sel:replicationTaskArn:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe Text
replicationTaskArn} -> Maybe Text
replicationTaskArn) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe Text
a -> ReplicationTaskAssessmentRun
s {$sel:replicationTaskArn:ReplicationTaskAssessmentRun' :: Maybe Text
replicationTaskArn = Maybe Text
a} :: ReplicationTaskAssessmentRun)

-- | Amazon S3 bucket where DMS stores the results of this assessment run.
replicationTaskAssessmentRun_resultLocationBucket :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.Text)
replicationTaskAssessmentRun_resultLocationBucket :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_resultLocationBucket = (ReplicationTaskAssessmentRun -> Maybe Text)
-> (ReplicationTaskAssessmentRun
    -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe Text
resultLocationBucket :: Maybe Text
$sel:resultLocationBucket:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe Text
resultLocationBucket} -> Maybe Text
resultLocationBucket) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe Text
a -> ReplicationTaskAssessmentRun
s {$sel:resultLocationBucket:ReplicationTaskAssessmentRun' :: Maybe Text
resultLocationBucket = Maybe Text
a} :: ReplicationTaskAssessmentRun)

-- | Folder in an Amazon S3 bucket where DMS stores the results of this
-- assessment run.
replicationTaskAssessmentRun_resultLocationFolder :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.Text)
replicationTaskAssessmentRun_resultLocationFolder :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_resultLocationFolder = (ReplicationTaskAssessmentRun -> Maybe Text)
-> (ReplicationTaskAssessmentRun
    -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe Text
resultLocationFolder :: Maybe Text
$sel:resultLocationFolder:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe Text
resultLocationFolder} -> Maybe Text
resultLocationFolder) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe Text
a -> ReplicationTaskAssessmentRun
s {$sel:resultLocationFolder:ReplicationTaskAssessmentRun' :: Maybe Text
resultLocationFolder = Maybe Text
a} :: ReplicationTaskAssessmentRun)

-- | Encryption mode used to encrypt the assessment run results.
replicationTaskAssessmentRun_resultEncryptionMode :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.Text)
replicationTaskAssessmentRun_resultEncryptionMode :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_resultEncryptionMode = (ReplicationTaskAssessmentRun -> Maybe Text)
-> (ReplicationTaskAssessmentRun
    -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe Text
resultEncryptionMode :: Maybe Text
$sel:resultEncryptionMode:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe Text
resultEncryptionMode} -> Maybe Text
resultEncryptionMode) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe Text
a -> ReplicationTaskAssessmentRun
s {$sel:resultEncryptionMode:ReplicationTaskAssessmentRun' :: Maybe Text
resultEncryptionMode = Maybe Text
a} :: ReplicationTaskAssessmentRun)

-- | Unique name of the assessment run.
replicationTaskAssessmentRun_assessmentRunName :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.Text)
replicationTaskAssessmentRun_assessmentRunName :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_assessmentRunName = (ReplicationTaskAssessmentRun -> Maybe Text)
-> (ReplicationTaskAssessmentRun
    -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe Text
assessmentRunName :: Maybe Text
$sel:assessmentRunName:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe Text
assessmentRunName} -> Maybe Text
assessmentRunName) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe Text
a -> ReplicationTaskAssessmentRun
s {$sel:assessmentRunName:ReplicationTaskAssessmentRun' :: Maybe Text
assessmentRunName = Maybe Text
a} :: ReplicationTaskAssessmentRun)

-- | Amazon Resource Name (ARN) of this assessment run.
replicationTaskAssessmentRun_replicationTaskAssessmentRunArn :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.Text)
replicationTaskAssessmentRun_replicationTaskAssessmentRunArn :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_replicationTaskAssessmentRunArn = (ReplicationTaskAssessmentRun -> Maybe Text)
-> (ReplicationTaskAssessmentRun
    -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe Text
replicationTaskAssessmentRunArn :: Maybe Text
$sel:replicationTaskAssessmentRunArn:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe Text
replicationTaskAssessmentRunArn} -> Maybe Text
replicationTaskAssessmentRunArn) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe Text
a -> ReplicationTaskAssessmentRun
s {$sel:replicationTaskAssessmentRunArn:ReplicationTaskAssessmentRun' :: Maybe Text
replicationTaskAssessmentRunArn = Maybe Text
a} :: ReplicationTaskAssessmentRun)

-- | Last message generated by an individual assessment failure.
replicationTaskAssessmentRun_lastFailureMessage :: Lens.Lens' ReplicationTaskAssessmentRun (Prelude.Maybe Prelude.Text)
replicationTaskAssessmentRun_lastFailureMessage :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskAssessmentRun -> f ReplicationTaskAssessmentRun
replicationTaskAssessmentRun_lastFailureMessage = (ReplicationTaskAssessmentRun -> Maybe Text)
-> (ReplicationTaskAssessmentRun
    -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Lens
     ReplicationTaskAssessmentRun
     ReplicationTaskAssessmentRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskAssessmentRun' {Maybe Text
lastFailureMessage :: Maybe Text
$sel:lastFailureMessage:ReplicationTaskAssessmentRun' :: ReplicationTaskAssessmentRun -> Maybe Text
lastFailureMessage} -> Maybe Text
lastFailureMessage) (\s :: ReplicationTaskAssessmentRun
s@ReplicationTaskAssessmentRun' {} Maybe Text
a -> ReplicationTaskAssessmentRun
s {$sel:lastFailureMessage:ReplicationTaskAssessmentRun' :: Maybe Text
lastFailureMessage = Maybe Text
a} :: ReplicationTaskAssessmentRun)

instance Core.FromJSON ReplicationTaskAssessmentRun where
  parseJSON :: Value -> Parser ReplicationTaskAssessmentRun
parseJSON =
    String
-> (Object -> Parser ReplicationTaskAssessmentRun)
-> Value
-> Parser ReplicationTaskAssessmentRun
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReplicationTaskAssessmentRun"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ReplicationTaskAssessmentRunProgress
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReplicationTaskAssessmentRun
ReplicationTaskAssessmentRun'
            (Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ReplicationTaskAssessmentRunProgress
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> ReplicationTaskAssessmentRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ReplicationTaskAssessmentRunProgress
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReplicationTaskAssessmentRun)
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
"Status")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe ReplicationTaskAssessmentRunProgress
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReplicationTaskAssessmentRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ReplicationTaskAssessmentRunProgress
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReplicationTaskAssessmentRun)
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
"ServiceAccessRoleArn")
            Parser
  (Maybe POSIX
   -> Maybe ReplicationTaskAssessmentRunProgress
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReplicationTaskAssessmentRun)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ReplicationTaskAssessmentRunProgress
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReplicationTaskAssessmentRun)
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
"ReplicationTaskAssessmentRunCreationDate"
                        )
            Parser
  (Maybe ReplicationTaskAssessmentRunProgress
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReplicationTaskAssessmentRun)
-> Parser (Maybe ReplicationTaskAssessmentRunProgress)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReplicationTaskAssessmentRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe ReplicationTaskAssessmentRunProgress)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AssessmentProgress")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReplicationTaskAssessmentRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReplicationTaskAssessmentRun)
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
"ResultKmsKeyArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReplicationTaskAssessmentRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReplicationTaskAssessmentRun)
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
"ReplicationTaskArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReplicationTaskAssessmentRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReplicationTaskAssessmentRun)
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
"ResultLocationBucket")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReplicationTaskAssessmentRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReplicationTaskAssessmentRun)
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
"ResultLocationFolder")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReplicationTaskAssessmentRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> ReplicationTaskAssessmentRun)
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
"ResultEncryptionMode")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> ReplicationTaskAssessmentRun)
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
"AssessmentRunName")
            Parser (Maybe Text -> Maybe Text -> ReplicationTaskAssessmentRun)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ReplicationTaskAssessmentRun)
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
"ReplicationTaskAssessmentRunArn")
            Parser (Maybe Text -> ReplicationTaskAssessmentRun)
-> Parser (Maybe Text) -> Parser ReplicationTaskAssessmentRun
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
"LastFailureMessage")
      )

instance
  Prelude.Hashable
    ReplicationTaskAssessmentRun

instance Prelude.NFData ReplicationTaskAssessmentRun