{-# 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.ReplicationTaskIndividualAssessment
-- 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.ReplicationTaskIndividualAssessment where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides information that describes an individual assessment from a
-- premigration assessment run.
--
-- /See:/ 'newReplicationTaskIndividualAssessment' smart constructor.
data ReplicationTaskIndividualAssessment = ReplicationTaskIndividualAssessment'
  { -- | Individual assessment status.
    --
    -- This status can have one of the following values:
    --
    -- -   @\"cancelled\"@
    --
    -- -   @\"error\"@
    --
    -- -   @\"failed\"@
    --
    -- -   @\"passed\"@
    --
    -- -   @\"pending\"@
    --
    -- -   @\"running\"@
    ReplicationTaskIndividualAssessment -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | Date when this individual assessment was started as part of running the
    -- @StartReplicationTaskAssessmentRun@ operation.
    ReplicationTaskIndividualAssessment -> Maybe POSIX
replicationTaskIndividualAssessmentStartDate :: Prelude.Maybe Core.POSIX,
    -- | Name of this individual assessment.
    ReplicationTaskIndividualAssessment -> Maybe Text
individualAssessmentName :: Prelude.Maybe Prelude.Text,
    -- | Amazon Resource Name (ARN) of this individual assessment.
    ReplicationTaskIndividualAssessment -> Maybe Text
replicationTaskIndividualAssessmentArn :: Prelude.Maybe Prelude.Text,
    -- | ARN of the premigration assessment run that is created to run this
    -- individual assessment.
    ReplicationTaskIndividualAssessment -> Maybe Text
replicationTaskAssessmentRunArn :: Prelude.Maybe Prelude.Text
  }
  deriving (ReplicationTaskIndividualAssessment
-> ReplicationTaskIndividualAssessment -> Bool
(ReplicationTaskIndividualAssessment
 -> ReplicationTaskIndividualAssessment -> Bool)
-> (ReplicationTaskIndividualAssessment
    -> ReplicationTaskIndividualAssessment -> Bool)
-> Eq ReplicationTaskIndividualAssessment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicationTaskIndividualAssessment
-> ReplicationTaskIndividualAssessment -> Bool
$c/= :: ReplicationTaskIndividualAssessment
-> ReplicationTaskIndividualAssessment -> Bool
== :: ReplicationTaskIndividualAssessment
-> ReplicationTaskIndividualAssessment -> Bool
$c== :: ReplicationTaskIndividualAssessment
-> ReplicationTaskIndividualAssessment -> Bool
Prelude.Eq, ReadPrec [ReplicationTaskIndividualAssessment]
ReadPrec ReplicationTaskIndividualAssessment
Int -> ReadS ReplicationTaskIndividualAssessment
ReadS [ReplicationTaskIndividualAssessment]
(Int -> ReadS ReplicationTaskIndividualAssessment)
-> ReadS [ReplicationTaskIndividualAssessment]
-> ReadPrec ReplicationTaskIndividualAssessment
-> ReadPrec [ReplicationTaskIndividualAssessment]
-> Read ReplicationTaskIndividualAssessment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicationTaskIndividualAssessment]
$creadListPrec :: ReadPrec [ReplicationTaskIndividualAssessment]
readPrec :: ReadPrec ReplicationTaskIndividualAssessment
$creadPrec :: ReadPrec ReplicationTaskIndividualAssessment
readList :: ReadS [ReplicationTaskIndividualAssessment]
$creadList :: ReadS [ReplicationTaskIndividualAssessment]
readsPrec :: Int -> ReadS ReplicationTaskIndividualAssessment
$creadsPrec :: Int -> ReadS ReplicationTaskIndividualAssessment
Prelude.Read, Int -> ReplicationTaskIndividualAssessment -> ShowS
[ReplicationTaskIndividualAssessment] -> ShowS
ReplicationTaskIndividualAssessment -> String
(Int -> ReplicationTaskIndividualAssessment -> ShowS)
-> (ReplicationTaskIndividualAssessment -> String)
-> ([ReplicationTaskIndividualAssessment] -> ShowS)
-> Show ReplicationTaskIndividualAssessment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicationTaskIndividualAssessment] -> ShowS
$cshowList :: [ReplicationTaskIndividualAssessment] -> ShowS
show :: ReplicationTaskIndividualAssessment -> String
$cshow :: ReplicationTaskIndividualAssessment -> String
showsPrec :: Int -> ReplicationTaskIndividualAssessment -> ShowS
$cshowsPrec :: Int -> ReplicationTaskIndividualAssessment -> ShowS
Prelude.Show, (forall x.
 ReplicationTaskIndividualAssessment
 -> Rep ReplicationTaskIndividualAssessment x)
-> (forall x.
    Rep ReplicationTaskIndividualAssessment x
    -> ReplicationTaskIndividualAssessment)
-> Generic ReplicationTaskIndividualAssessment
forall x.
Rep ReplicationTaskIndividualAssessment x
-> ReplicationTaskIndividualAssessment
forall x.
ReplicationTaskIndividualAssessment
-> Rep ReplicationTaskIndividualAssessment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReplicationTaskIndividualAssessment x
-> ReplicationTaskIndividualAssessment
$cfrom :: forall x.
ReplicationTaskIndividualAssessment
-> Rep ReplicationTaskIndividualAssessment x
Prelude.Generic)

-- |
-- Create a value of 'ReplicationTaskIndividualAssessment' 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', 'replicationTaskIndividualAssessment_status' - Individual assessment status.
--
-- This status can have one of the following values:
--
-- -   @\"cancelled\"@
--
-- -   @\"error\"@
--
-- -   @\"failed\"@
--
-- -   @\"passed\"@
--
-- -   @\"pending\"@
--
-- -   @\"running\"@
--
-- 'replicationTaskIndividualAssessmentStartDate', 'replicationTaskIndividualAssessment_replicationTaskIndividualAssessmentStartDate' - Date when this individual assessment was started as part of running the
-- @StartReplicationTaskAssessmentRun@ operation.
--
-- 'individualAssessmentName', 'replicationTaskIndividualAssessment_individualAssessmentName' - Name of this individual assessment.
--
-- 'replicationTaskIndividualAssessmentArn', 'replicationTaskIndividualAssessment_replicationTaskIndividualAssessmentArn' - Amazon Resource Name (ARN) of this individual assessment.
--
-- 'replicationTaskAssessmentRunArn', 'replicationTaskIndividualAssessment_replicationTaskAssessmentRunArn' - ARN of the premigration assessment run that is created to run this
-- individual assessment.
newReplicationTaskIndividualAssessment ::
  ReplicationTaskIndividualAssessment
newReplicationTaskIndividualAssessment :: ReplicationTaskIndividualAssessment
newReplicationTaskIndividualAssessment =
  ReplicationTaskIndividualAssessment' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReplicationTaskIndividualAssessment
ReplicationTaskIndividualAssessment'
    { $sel:status:ReplicationTaskIndividualAssessment' :: Maybe Text
status =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationTaskIndividualAssessmentStartDate:ReplicationTaskIndividualAssessment' :: Maybe POSIX
replicationTaskIndividualAssessmentStartDate =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:individualAssessmentName:ReplicationTaskIndividualAssessment' :: Maybe Text
individualAssessmentName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationTaskIndividualAssessmentArn:ReplicationTaskIndividualAssessment' :: Maybe Text
replicationTaskIndividualAssessmentArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationTaskAssessmentRunArn:ReplicationTaskIndividualAssessment' :: Maybe Text
replicationTaskAssessmentRunArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Individual assessment status.
--
-- This status can have one of the following values:
--
-- -   @\"cancelled\"@
--
-- -   @\"error\"@
--
-- -   @\"failed\"@
--
-- -   @\"passed\"@
--
-- -   @\"pending\"@
--
-- -   @\"running\"@
replicationTaskIndividualAssessment_status :: Lens.Lens' ReplicationTaskIndividualAssessment (Prelude.Maybe Prelude.Text)
replicationTaskIndividualAssessment_status :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskIndividualAssessment
-> f ReplicationTaskIndividualAssessment
replicationTaskIndividualAssessment_status = (ReplicationTaskIndividualAssessment -> Maybe Text)
-> (ReplicationTaskIndividualAssessment
    -> Maybe Text -> ReplicationTaskIndividualAssessment)
-> Lens
     ReplicationTaskIndividualAssessment
     ReplicationTaskIndividualAssessment
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskIndividualAssessment' {Maybe Text
status :: Maybe Text
$sel:status:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
status} -> Maybe Text
status) (\s :: ReplicationTaskIndividualAssessment
s@ReplicationTaskIndividualAssessment' {} Maybe Text
a -> ReplicationTaskIndividualAssessment
s {$sel:status:ReplicationTaskIndividualAssessment' :: Maybe Text
status = Maybe Text
a} :: ReplicationTaskIndividualAssessment)

-- | Date when this individual assessment was started as part of running the
-- @StartReplicationTaskAssessmentRun@ operation.
replicationTaskIndividualAssessment_replicationTaskIndividualAssessmentStartDate :: Lens.Lens' ReplicationTaskIndividualAssessment (Prelude.Maybe Prelude.UTCTime)
replicationTaskIndividualAssessment_replicationTaskIndividualAssessmentStartDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReplicationTaskIndividualAssessment
-> f ReplicationTaskIndividualAssessment
replicationTaskIndividualAssessment_replicationTaskIndividualAssessmentStartDate = (ReplicationTaskIndividualAssessment -> Maybe POSIX)
-> (ReplicationTaskIndividualAssessment
    -> Maybe POSIX -> ReplicationTaskIndividualAssessment)
-> Lens
     ReplicationTaskIndividualAssessment
     ReplicationTaskIndividualAssessment
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskIndividualAssessment' {Maybe POSIX
replicationTaskIndividualAssessmentStartDate :: Maybe POSIX
$sel:replicationTaskIndividualAssessmentStartDate:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe POSIX
replicationTaskIndividualAssessmentStartDate} -> Maybe POSIX
replicationTaskIndividualAssessmentStartDate) (\s :: ReplicationTaskIndividualAssessment
s@ReplicationTaskIndividualAssessment' {} Maybe POSIX
a -> ReplicationTaskIndividualAssessment
s {$sel:replicationTaskIndividualAssessmentStartDate:ReplicationTaskIndividualAssessment' :: Maybe POSIX
replicationTaskIndividualAssessmentStartDate = Maybe POSIX
a} :: ReplicationTaskIndividualAssessment) ((Maybe POSIX -> f (Maybe POSIX))
 -> ReplicationTaskIndividualAssessment
 -> f ReplicationTaskIndividualAssessment)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReplicationTaskIndividualAssessment
-> f ReplicationTaskIndividualAssessment
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

-- | Name of this individual assessment.
replicationTaskIndividualAssessment_individualAssessmentName :: Lens.Lens' ReplicationTaskIndividualAssessment (Prelude.Maybe Prelude.Text)
replicationTaskIndividualAssessment_individualAssessmentName :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskIndividualAssessment
-> f ReplicationTaskIndividualAssessment
replicationTaskIndividualAssessment_individualAssessmentName = (ReplicationTaskIndividualAssessment -> Maybe Text)
-> (ReplicationTaskIndividualAssessment
    -> Maybe Text -> ReplicationTaskIndividualAssessment)
-> Lens
     ReplicationTaskIndividualAssessment
     ReplicationTaskIndividualAssessment
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskIndividualAssessment' {Maybe Text
individualAssessmentName :: Maybe Text
$sel:individualAssessmentName:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
individualAssessmentName} -> Maybe Text
individualAssessmentName) (\s :: ReplicationTaskIndividualAssessment
s@ReplicationTaskIndividualAssessment' {} Maybe Text
a -> ReplicationTaskIndividualAssessment
s {$sel:individualAssessmentName:ReplicationTaskIndividualAssessment' :: Maybe Text
individualAssessmentName = Maybe Text
a} :: ReplicationTaskIndividualAssessment)

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

-- | ARN of the premigration assessment run that is created to run this
-- individual assessment.
replicationTaskIndividualAssessment_replicationTaskAssessmentRunArn :: Lens.Lens' ReplicationTaskIndividualAssessment (Prelude.Maybe Prelude.Text)
replicationTaskIndividualAssessment_replicationTaskAssessmentRunArn :: (Maybe Text -> f (Maybe Text))
-> ReplicationTaskIndividualAssessment
-> f ReplicationTaskIndividualAssessment
replicationTaskIndividualAssessment_replicationTaskAssessmentRunArn = (ReplicationTaskIndividualAssessment -> Maybe Text)
-> (ReplicationTaskIndividualAssessment
    -> Maybe Text -> ReplicationTaskIndividualAssessment)
-> Lens
     ReplicationTaskIndividualAssessment
     ReplicationTaskIndividualAssessment
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationTaskIndividualAssessment' {Maybe Text
replicationTaskAssessmentRunArn :: Maybe Text
$sel:replicationTaskAssessmentRunArn:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
replicationTaskAssessmentRunArn} -> Maybe Text
replicationTaskAssessmentRunArn) (\s :: ReplicationTaskIndividualAssessment
s@ReplicationTaskIndividualAssessment' {} Maybe Text
a -> ReplicationTaskIndividualAssessment
s {$sel:replicationTaskAssessmentRunArn:ReplicationTaskIndividualAssessment' :: Maybe Text
replicationTaskAssessmentRunArn = Maybe Text
a} :: ReplicationTaskIndividualAssessment)

instance
  Core.FromJSON
    ReplicationTaskIndividualAssessment
  where
  parseJSON :: Value -> Parser ReplicationTaskIndividualAssessment
parseJSON =
    String
-> (Object -> Parser ReplicationTaskIndividualAssessment)
-> Value
-> Parser ReplicationTaskIndividualAssessment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReplicationTaskIndividualAssessment"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReplicationTaskIndividualAssessment
ReplicationTaskIndividualAssessment'
            (Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> ReplicationTaskIndividualAssessment)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReplicationTaskIndividualAssessment)
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 POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReplicationTaskIndividualAssessment)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> ReplicationTaskIndividualAssessment)
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
"ReplicationTaskIndividualAssessmentStartDate"
                        )
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> ReplicationTaskIndividualAssessment)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> ReplicationTaskIndividualAssessment)
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
"IndividualAssessmentName")
            Parser
  (Maybe Text -> Maybe Text -> ReplicationTaskIndividualAssessment)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ReplicationTaskIndividualAssessment)
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
"ReplicationTaskIndividualAssessmentArn")
            Parser (Maybe Text -> ReplicationTaskIndividualAssessment)
-> Parser (Maybe Text)
-> Parser ReplicationTaskIndividualAssessment
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")
      )

instance
  Prelude.Hashable
    ReplicationTaskIndividualAssessment

instance
  Prelude.NFData
    ReplicationTaskIndividualAssessment