{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DMS.Types.ReplicationTaskIndividualAssessment where

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

-- | Name of this individual assessment.
replicationTaskIndividualAssessment_individualAssessmentName :: Lens.Lens' ReplicationTaskIndividualAssessment (Prelude.Maybe Prelude.Text)
replicationTaskIndividualAssessment_individualAssessmentName :: Lens' ReplicationTaskIndividualAssessment (Maybe Text)
replicationTaskIndividualAssessment_individualAssessmentName = 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)

-- | 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 :: Lens' ReplicationTaskIndividualAssessment (Maybe Text)
replicationTaskIndividualAssessment_replicationTaskAssessmentRunArn = 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)

-- | Amazon Resource Name (ARN) of this individual assessment.
replicationTaskIndividualAssessment_replicationTaskIndividualAssessmentArn :: Lens.Lens' ReplicationTaskIndividualAssessment (Prelude.Maybe Prelude.Text)
replicationTaskIndividualAssessment_replicationTaskIndividualAssessmentArn :: Lens' ReplicationTaskIndividualAssessment (Maybe Text)
replicationTaskIndividualAssessment_replicationTaskIndividualAssessmentArn = 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)

-- | 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 :: Lens' ReplicationTaskIndividualAssessment (Maybe UTCTime)
replicationTaskIndividualAssessment_replicationTaskIndividualAssessmentStartDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | 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 :: Lens' ReplicationTaskIndividualAssessment (Maybe Text)
replicationTaskIndividualAssessment_status = 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)

instance
  Data.FromJSON
    ReplicationTaskIndividualAssessment
  where
  parseJSON :: Value -> Parser ReplicationTaskIndividualAssessment
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ReplicationTaskIndividualAssessment"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ReplicationTaskIndividualAssessment
ReplicationTaskIndividualAssessment'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IndividualAssessmentName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReplicationTaskAssessmentRunArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReplicationTaskIndividualAssessmentArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReplicationTaskIndividualAssessmentStartDate"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
      )

instance
  Prelude.Hashable
    ReplicationTaskIndividualAssessment
  where
  hashWithSalt :: Int -> ReplicationTaskIndividualAssessment -> Int
hashWithSalt
    Int
_salt
    ReplicationTaskIndividualAssessment' {Maybe Text
Maybe POSIX
status :: Maybe Text
replicationTaskIndividualAssessmentStartDate :: Maybe POSIX
replicationTaskIndividualAssessmentArn :: Maybe Text
replicationTaskAssessmentRunArn :: Maybe Text
individualAssessmentName :: Maybe Text
$sel:status:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
$sel:replicationTaskIndividualAssessmentStartDate:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe POSIX
$sel:replicationTaskIndividualAssessmentArn:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
$sel:replicationTaskAssessmentRunArn:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
$sel:individualAssessmentName:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
individualAssessmentName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
replicationTaskAssessmentRunArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
replicationTaskIndividualAssessmentArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
replicationTaskIndividualAssessmentStartDate
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status

instance
  Prelude.NFData
    ReplicationTaskIndividualAssessment
  where
  rnf :: ReplicationTaskIndividualAssessment -> ()
rnf ReplicationTaskIndividualAssessment' {Maybe Text
Maybe POSIX
status :: Maybe Text
replicationTaskIndividualAssessmentStartDate :: Maybe POSIX
replicationTaskIndividualAssessmentArn :: Maybe Text
replicationTaskAssessmentRunArn :: Maybe Text
individualAssessmentName :: Maybe Text
$sel:status:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
$sel:replicationTaskIndividualAssessmentStartDate:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe POSIX
$sel:replicationTaskIndividualAssessmentArn:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
$sel:replicationTaskAssessmentRunArn:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
$sel:individualAssessmentName:ReplicationTaskIndividualAssessment' :: ReplicationTaskIndividualAssessment -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
individualAssessmentName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
replicationTaskAssessmentRunArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
replicationTaskIndividualAssessmentArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe POSIX
replicationTaskIndividualAssessmentStartDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status