{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DescribeApplicableIndividualAssessments
-- 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)
--
-- Provides a list of individual assessments that you can specify for a new
-- premigration assessment run, given one or more parameters.
--
-- If you specify an existing migration task, this operation provides the
-- default individual assessments you can specify for that task. Otherwise,
-- the specified parameters model elements of a possible migration task on
-- which to base a premigration assessment run.
--
-- To use these migration task modeling parameters, you must specify an
-- existing replication instance, a source database engine, a target
-- database engine, and a migration type. This combination of parameters
-- potentially limits the default individual assessments available for an
-- assessment run created for a corresponding migration task.
--
-- If you specify no parameters, this operation provides a list of all
-- possible individual assessments that you can specify for an assessment
-- run. If you specify any one of the task modeling parameters, you must
-- specify all of them or the operation cannot provide a list of individual
-- assessments. The only parameter that you can specify alone is for an
-- existing migration task. The specified task definition then determines
-- the default list of individual assessments that you can specify in an
-- assessment run for the task.
module Amazonka.DMS.DescribeApplicableIndividualAssessments
  ( -- * Creating a Request
    DescribeApplicableIndividualAssessments (..),
    newDescribeApplicableIndividualAssessments,

    -- * Request Lenses
    describeApplicableIndividualAssessments_migrationType,
    describeApplicableIndividualAssessments_sourceEngineName,
    describeApplicableIndividualAssessments_replicationTaskArn,
    describeApplicableIndividualAssessments_marker,
    describeApplicableIndividualAssessments_maxRecords,
    describeApplicableIndividualAssessments_targetEngineName,
    describeApplicableIndividualAssessments_replicationInstanceArn,

    -- * Destructuring the Response
    DescribeApplicableIndividualAssessmentsResponse (..),
    newDescribeApplicableIndividualAssessmentsResponse,

    -- * Response Lenses
    describeApplicableIndividualAssessmentsResponse_marker,
    describeApplicableIndividualAssessmentsResponse_individualAssessmentNames,
    describeApplicableIndividualAssessmentsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DMS.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- |
--
-- /See:/ 'newDescribeApplicableIndividualAssessments' smart constructor.
data DescribeApplicableIndividualAssessments = DescribeApplicableIndividualAssessments'
  { -- | Name of the migration type that each provided individual assessment must
    -- support.
    DescribeApplicableIndividualAssessments -> Maybe MigrationTypeValue
migrationType :: Prelude.Maybe MigrationTypeValue,
    -- | Name of a database engine that the specified replication instance
    -- supports as a source.
    DescribeApplicableIndividualAssessments -> Maybe Text
sourceEngineName :: Prelude.Maybe Prelude.Text,
    -- | Amazon Resource Name (ARN) of a migration task on which you want to base
    -- the default list of individual assessments.
    DescribeApplicableIndividualAssessments -> Maybe Text
replicationTaskArn :: Prelude.Maybe Prelude.Text,
    -- | Optional pagination token provided by a previous request. If this
    -- parameter is specified, the response includes only records beyond the
    -- marker, up to the value specified by @MaxRecords@.
    DescribeApplicableIndividualAssessments -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Maximum number of records to include in the response. If more records
    -- exist than the specified @MaxRecords@ value, a pagination token called a
    -- marker is included in the response so that the remaining results can be
    -- retrieved.
    DescribeApplicableIndividualAssessments -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | Name of a database engine that the specified replication instance
    -- supports as a target.
    DescribeApplicableIndividualAssessments -> Maybe Text
targetEngineName :: Prelude.Maybe Prelude.Text,
    -- | ARN of a replication instance on which you want to base the default list
    -- of individual assessments.
    DescribeApplicableIndividualAssessments -> Maybe Text
replicationInstanceArn :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeApplicableIndividualAssessments
-> DescribeApplicableIndividualAssessments -> Bool
(DescribeApplicableIndividualAssessments
 -> DescribeApplicableIndividualAssessments -> Bool)
-> (DescribeApplicableIndividualAssessments
    -> DescribeApplicableIndividualAssessments -> Bool)
-> Eq DescribeApplicableIndividualAssessments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeApplicableIndividualAssessments
-> DescribeApplicableIndividualAssessments -> Bool
$c/= :: DescribeApplicableIndividualAssessments
-> DescribeApplicableIndividualAssessments -> Bool
== :: DescribeApplicableIndividualAssessments
-> DescribeApplicableIndividualAssessments -> Bool
$c== :: DescribeApplicableIndividualAssessments
-> DescribeApplicableIndividualAssessments -> Bool
Prelude.Eq, ReadPrec [DescribeApplicableIndividualAssessments]
ReadPrec DescribeApplicableIndividualAssessments
Int -> ReadS DescribeApplicableIndividualAssessments
ReadS [DescribeApplicableIndividualAssessments]
(Int -> ReadS DescribeApplicableIndividualAssessments)
-> ReadS [DescribeApplicableIndividualAssessments]
-> ReadPrec DescribeApplicableIndividualAssessments
-> ReadPrec [DescribeApplicableIndividualAssessments]
-> Read DescribeApplicableIndividualAssessments
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeApplicableIndividualAssessments]
$creadListPrec :: ReadPrec [DescribeApplicableIndividualAssessments]
readPrec :: ReadPrec DescribeApplicableIndividualAssessments
$creadPrec :: ReadPrec DescribeApplicableIndividualAssessments
readList :: ReadS [DescribeApplicableIndividualAssessments]
$creadList :: ReadS [DescribeApplicableIndividualAssessments]
readsPrec :: Int -> ReadS DescribeApplicableIndividualAssessments
$creadsPrec :: Int -> ReadS DescribeApplicableIndividualAssessments
Prelude.Read, Int -> DescribeApplicableIndividualAssessments -> ShowS
[DescribeApplicableIndividualAssessments] -> ShowS
DescribeApplicableIndividualAssessments -> String
(Int -> DescribeApplicableIndividualAssessments -> ShowS)
-> (DescribeApplicableIndividualAssessments -> String)
-> ([DescribeApplicableIndividualAssessments] -> ShowS)
-> Show DescribeApplicableIndividualAssessments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeApplicableIndividualAssessments] -> ShowS
$cshowList :: [DescribeApplicableIndividualAssessments] -> ShowS
show :: DescribeApplicableIndividualAssessments -> String
$cshow :: DescribeApplicableIndividualAssessments -> String
showsPrec :: Int -> DescribeApplicableIndividualAssessments -> ShowS
$cshowsPrec :: Int -> DescribeApplicableIndividualAssessments -> ShowS
Prelude.Show, (forall x.
 DescribeApplicableIndividualAssessments
 -> Rep DescribeApplicableIndividualAssessments x)
-> (forall x.
    Rep DescribeApplicableIndividualAssessments x
    -> DescribeApplicableIndividualAssessments)
-> Generic DescribeApplicableIndividualAssessments
forall x.
Rep DescribeApplicableIndividualAssessments x
-> DescribeApplicableIndividualAssessments
forall x.
DescribeApplicableIndividualAssessments
-> Rep DescribeApplicableIndividualAssessments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeApplicableIndividualAssessments x
-> DescribeApplicableIndividualAssessments
$cfrom :: forall x.
DescribeApplicableIndividualAssessments
-> Rep DescribeApplicableIndividualAssessments x
Prelude.Generic)

-- |
-- Create a value of 'DescribeApplicableIndividualAssessments' 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:
--
-- 'migrationType', 'describeApplicableIndividualAssessments_migrationType' - Name of the migration type that each provided individual assessment must
-- support.
--
-- 'sourceEngineName', 'describeApplicableIndividualAssessments_sourceEngineName' - Name of a database engine that the specified replication instance
-- supports as a source.
--
-- 'replicationTaskArn', 'describeApplicableIndividualAssessments_replicationTaskArn' - Amazon Resource Name (ARN) of a migration task on which you want to base
-- the default list of individual assessments.
--
-- 'marker', 'describeApplicableIndividualAssessments_marker' - Optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
--
-- 'maxRecords', 'describeApplicableIndividualAssessments_maxRecords' - Maximum number of records to include in the response. If more records
-- exist than the specified @MaxRecords@ value, a pagination token called a
-- marker is included in the response so that the remaining results can be
-- retrieved.
--
-- 'targetEngineName', 'describeApplicableIndividualAssessments_targetEngineName' - Name of a database engine that the specified replication instance
-- supports as a target.
--
-- 'replicationInstanceArn', 'describeApplicableIndividualAssessments_replicationInstanceArn' - ARN of a replication instance on which you want to base the default list
-- of individual assessments.
newDescribeApplicableIndividualAssessments ::
  DescribeApplicableIndividualAssessments
newDescribeApplicableIndividualAssessments :: DescribeApplicableIndividualAssessments
newDescribeApplicableIndividualAssessments =
  DescribeApplicableIndividualAssessments' :: Maybe MigrationTypeValue
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> DescribeApplicableIndividualAssessments
DescribeApplicableIndividualAssessments'
    { $sel:migrationType:DescribeApplicableIndividualAssessments' :: Maybe MigrationTypeValue
migrationType =
        Maybe MigrationTypeValue
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceEngineName:DescribeApplicableIndividualAssessments' :: Maybe Text
sourceEngineName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationTaskArn:DescribeApplicableIndividualAssessments' :: Maybe Text
replicationTaskArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeApplicableIndividualAssessments' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeApplicableIndividualAssessments' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:targetEngineName:DescribeApplicableIndividualAssessments' :: Maybe Text
targetEngineName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationInstanceArn:DescribeApplicableIndividualAssessments' :: Maybe Text
replicationInstanceArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Name of the migration type that each provided individual assessment must
-- support.
describeApplicableIndividualAssessments_migrationType :: Lens.Lens' DescribeApplicableIndividualAssessments (Prelude.Maybe MigrationTypeValue)
describeApplicableIndividualAssessments_migrationType :: (Maybe MigrationTypeValue -> f (Maybe MigrationTypeValue))
-> DescribeApplicableIndividualAssessments
-> f DescribeApplicableIndividualAssessments
describeApplicableIndividualAssessments_migrationType = (DescribeApplicableIndividualAssessments
 -> Maybe MigrationTypeValue)
-> (DescribeApplicableIndividualAssessments
    -> Maybe MigrationTypeValue
    -> DescribeApplicableIndividualAssessments)
-> Lens
     DescribeApplicableIndividualAssessments
     DescribeApplicableIndividualAssessments
     (Maybe MigrationTypeValue)
     (Maybe MigrationTypeValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicableIndividualAssessments' {Maybe MigrationTypeValue
migrationType :: Maybe MigrationTypeValue
$sel:migrationType:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe MigrationTypeValue
migrationType} -> Maybe MigrationTypeValue
migrationType) (\s :: DescribeApplicableIndividualAssessments
s@DescribeApplicableIndividualAssessments' {} Maybe MigrationTypeValue
a -> DescribeApplicableIndividualAssessments
s {$sel:migrationType:DescribeApplicableIndividualAssessments' :: Maybe MigrationTypeValue
migrationType = Maybe MigrationTypeValue
a} :: DescribeApplicableIndividualAssessments)

-- | Name of a database engine that the specified replication instance
-- supports as a source.
describeApplicableIndividualAssessments_sourceEngineName :: Lens.Lens' DescribeApplicableIndividualAssessments (Prelude.Maybe Prelude.Text)
describeApplicableIndividualAssessments_sourceEngineName :: (Maybe Text -> f (Maybe Text))
-> DescribeApplicableIndividualAssessments
-> f DescribeApplicableIndividualAssessments
describeApplicableIndividualAssessments_sourceEngineName = (DescribeApplicableIndividualAssessments -> Maybe Text)
-> (DescribeApplicableIndividualAssessments
    -> Maybe Text -> DescribeApplicableIndividualAssessments)
-> Lens
     DescribeApplicableIndividualAssessments
     DescribeApplicableIndividualAssessments
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicableIndividualAssessments' {Maybe Text
sourceEngineName :: Maybe Text
$sel:sourceEngineName:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Text
sourceEngineName} -> Maybe Text
sourceEngineName) (\s :: DescribeApplicableIndividualAssessments
s@DescribeApplicableIndividualAssessments' {} Maybe Text
a -> DescribeApplicableIndividualAssessments
s {$sel:sourceEngineName:DescribeApplicableIndividualAssessments' :: Maybe Text
sourceEngineName = Maybe Text
a} :: DescribeApplicableIndividualAssessments)

-- | Amazon Resource Name (ARN) of a migration task on which you want to base
-- the default list of individual assessments.
describeApplicableIndividualAssessments_replicationTaskArn :: Lens.Lens' DescribeApplicableIndividualAssessments (Prelude.Maybe Prelude.Text)
describeApplicableIndividualAssessments_replicationTaskArn :: (Maybe Text -> f (Maybe Text))
-> DescribeApplicableIndividualAssessments
-> f DescribeApplicableIndividualAssessments
describeApplicableIndividualAssessments_replicationTaskArn = (DescribeApplicableIndividualAssessments -> Maybe Text)
-> (DescribeApplicableIndividualAssessments
    -> Maybe Text -> DescribeApplicableIndividualAssessments)
-> Lens
     DescribeApplicableIndividualAssessments
     DescribeApplicableIndividualAssessments
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicableIndividualAssessments' {Maybe Text
replicationTaskArn :: Maybe Text
$sel:replicationTaskArn:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Text
replicationTaskArn} -> Maybe Text
replicationTaskArn) (\s :: DescribeApplicableIndividualAssessments
s@DescribeApplicableIndividualAssessments' {} Maybe Text
a -> DescribeApplicableIndividualAssessments
s {$sel:replicationTaskArn:DescribeApplicableIndividualAssessments' :: Maybe Text
replicationTaskArn = Maybe Text
a} :: DescribeApplicableIndividualAssessments)

-- | Optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
describeApplicableIndividualAssessments_marker :: Lens.Lens' DescribeApplicableIndividualAssessments (Prelude.Maybe Prelude.Text)
describeApplicableIndividualAssessments_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeApplicableIndividualAssessments
-> f DescribeApplicableIndividualAssessments
describeApplicableIndividualAssessments_marker = (DescribeApplicableIndividualAssessments -> Maybe Text)
-> (DescribeApplicableIndividualAssessments
    -> Maybe Text -> DescribeApplicableIndividualAssessments)
-> Lens
     DescribeApplicableIndividualAssessments
     DescribeApplicableIndividualAssessments
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicableIndividualAssessments' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeApplicableIndividualAssessments
s@DescribeApplicableIndividualAssessments' {} Maybe Text
a -> DescribeApplicableIndividualAssessments
s {$sel:marker:DescribeApplicableIndividualAssessments' :: Maybe Text
marker = Maybe Text
a} :: DescribeApplicableIndividualAssessments)

-- | Maximum number of records to include in the response. If more records
-- exist than the specified @MaxRecords@ value, a pagination token called a
-- marker is included in the response so that the remaining results can be
-- retrieved.
describeApplicableIndividualAssessments_maxRecords :: Lens.Lens' DescribeApplicableIndividualAssessments (Prelude.Maybe Prelude.Int)
describeApplicableIndividualAssessments_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeApplicableIndividualAssessments
-> f DescribeApplicableIndividualAssessments
describeApplicableIndividualAssessments_maxRecords = (DescribeApplicableIndividualAssessments -> Maybe Int)
-> (DescribeApplicableIndividualAssessments
    -> Maybe Int -> DescribeApplicableIndividualAssessments)
-> Lens
     DescribeApplicableIndividualAssessments
     DescribeApplicableIndividualAssessments
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicableIndividualAssessments' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeApplicableIndividualAssessments
s@DescribeApplicableIndividualAssessments' {} Maybe Int
a -> DescribeApplicableIndividualAssessments
s {$sel:maxRecords:DescribeApplicableIndividualAssessments' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeApplicableIndividualAssessments)

-- | Name of a database engine that the specified replication instance
-- supports as a target.
describeApplicableIndividualAssessments_targetEngineName :: Lens.Lens' DescribeApplicableIndividualAssessments (Prelude.Maybe Prelude.Text)
describeApplicableIndividualAssessments_targetEngineName :: (Maybe Text -> f (Maybe Text))
-> DescribeApplicableIndividualAssessments
-> f DescribeApplicableIndividualAssessments
describeApplicableIndividualAssessments_targetEngineName = (DescribeApplicableIndividualAssessments -> Maybe Text)
-> (DescribeApplicableIndividualAssessments
    -> Maybe Text -> DescribeApplicableIndividualAssessments)
-> Lens
     DescribeApplicableIndividualAssessments
     DescribeApplicableIndividualAssessments
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicableIndividualAssessments' {Maybe Text
targetEngineName :: Maybe Text
$sel:targetEngineName:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Text
targetEngineName} -> Maybe Text
targetEngineName) (\s :: DescribeApplicableIndividualAssessments
s@DescribeApplicableIndividualAssessments' {} Maybe Text
a -> DescribeApplicableIndividualAssessments
s {$sel:targetEngineName:DescribeApplicableIndividualAssessments' :: Maybe Text
targetEngineName = Maybe Text
a} :: DescribeApplicableIndividualAssessments)

-- | ARN of a replication instance on which you want to base the default list
-- of individual assessments.
describeApplicableIndividualAssessments_replicationInstanceArn :: Lens.Lens' DescribeApplicableIndividualAssessments (Prelude.Maybe Prelude.Text)
describeApplicableIndividualAssessments_replicationInstanceArn :: (Maybe Text -> f (Maybe Text))
-> DescribeApplicableIndividualAssessments
-> f DescribeApplicableIndividualAssessments
describeApplicableIndividualAssessments_replicationInstanceArn = (DescribeApplicableIndividualAssessments -> Maybe Text)
-> (DescribeApplicableIndividualAssessments
    -> Maybe Text -> DescribeApplicableIndividualAssessments)
-> Lens
     DescribeApplicableIndividualAssessments
     DescribeApplicableIndividualAssessments
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicableIndividualAssessments' {Maybe Text
replicationInstanceArn :: Maybe Text
$sel:replicationInstanceArn:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Text
replicationInstanceArn} -> Maybe Text
replicationInstanceArn) (\s :: DescribeApplicableIndividualAssessments
s@DescribeApplicableIndividualAssessments' {} Maybe Text
a -> DescribeApplicableIndividualAssessments
s {$sel:replicationInstanceArn:DescribeApplicableIndividualAssessments' :: Maybe Text
replicationInstanceArn = Maybe Text
a} :: DescribeApplicableIndividualAssessments)

instance
  Core.AWSRequest
    DescribeApplicableIndividualAssessments
  where
  type
    AWSResponse
      DescribeApplicableIndividualAssessments =
      DescribeApplicableIndividualAssessmentsResponse
  request :: DescribeApplicableIndividualAssessments
-> Request DescribeApplicableIndividualAssessments
request = Service
-> DescribeApplicableIndividualAssessments
-> Request DescribeApplicableIndividualAssessments
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeApplicableIndividualAssessments
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeApplicableIndividualAssessments)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse DescribeApplicableIndividualAssessments))
-> Logger
-> Service
-> Proxy DescribeApplicableIndividualAssessments
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeApplicableIndividualAssessments)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [Text]
-> Int
-> DescribeApplicableIndividualAssessmentsResponse
DescribeApplicableIndividualAssessmentsResponse'
            (Maybe Text
 -> Maybe [Text]
 -> Int
 -> DescribeApplicableIndividualAssessmentsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Int -> DescribeApplicableIndividualAssessmentsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Marker")
              Either
  String
  (Maybe [Text]
   -> Int -> DescribeApplicableIndividualAssessmentsResponse)
-> Either String (Maybe [Text])
-> Either
     String (Int -> DescribeApplicableIndividualAssessmentsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IndividualAssessmentNames"
                              Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                          )
              Either
  String (Int -> DescribeApplicableIndividualAssessmentsResponse)
-> Either String Int
-> Either String DescribeApplicableIndividualAssessmentsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    DescribeApplicableIndividualAssessments

instance
  Prelude.NFData
    DescribeApplicableIndividualAssessments

instance
  Core.ToHeaders
    DescribeApplicableIndividualAssessments
  where
  toHeaders :: DescribeApplicableIndividualAssessments -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeApplicableIndividualAssessments -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonDMSv20160101.DescribeApplicableIndividualAssessments" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Core.ToJSON
    DescribeApplicableIndividualAssessments
  where
  toJSON :: DescribeApplicableIndividualAssessments -> Value
toJSON DescribeApplicableIndividualAssessments' {Maybe Int
Maybe Text
Maybe MigrationTypeValue
replicationInstanceArn :: Maybe Text
targetEngineName :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
replicationTaskArn :: Maybe Text
sourceEngineName :: Maybe Text
migrationType :: Maybe MigrationTypeValue
$sel:replicationInstanceArn:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Text
$sel:targetEngineName:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Text
$sel:maxRecords:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Int
$sel:marker:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Text
$sel:replicationTaskArn:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Text
$sel:sourceEngineName:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe Text
$sel:migrationType:DescribeApplicableIndividualAssessments' :: DescribeApplicableIndividualAssessments -> Maybe MigrationTypeValue
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"MigrationType" Text -> MigrationTypeValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MigrationTypeValue -> Pair)
-> Maybe MigrationTypeValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MigrationTypeValue
migrationType,
            (Text
"SourceEngineName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceEngineName,
            (Text
"ReplicationTaskArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
replicationTaskArn,
            (Text
"Marker" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
marker,
            (Text
"MaxRecords" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxRecords,
            (Text
"TargetEngineName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
targetEngineName,
            (Text
"ReplicationInstanceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
replicationInstanceArn
          ]
      )

instance
  Core.ToPath
    DescribeApplicableIndividualAssessments
  where
  toPath :: DescribeApplicableIndividualAssessments -> ByteString
toPath = ByteString -> DescribeApplicableIndividualAssessments -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance
  Core.ToQuery
    DescribeApplicableIndividualAssessments
  where
  toQuery :: DescribeApplicableIndividualAssessments -> QueryString
toQuery = QueryString
-> DescribeApplicableIndividualAssessments -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- |
--
-- /See:/ 'newDescribeApplicableIndividualAssessmentsResponse' smart constructor.
data DescribeApplicableIndividualAssessmentsResponse = DescribeApplicableIndividualAssessmentsResponse'
  { -- | Pagination token returned for you to pass to a subsequent request. If
    -- you pass this token as the @Marker@ value in a subsequent request, the
    -- response includes only records beyond the marker, up to the value
    -- specified in the request by @MaxRecords@.
    DescribeApplicableIndividualAssessmentsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | List of names for the individual assessments supported by the
    -- premigration assessment run that you start based on the specified
    -- request parameters. For more information on the available individual
    -- assessments, including compatibility with different migration task
    -- configurations, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.AssessmentReport.html Working with premigration assessment runs>
    -- in the /Database Migration Service User Guide./
    DescribeApplicableIndividualAssessmentsResponse -> Maybe [Text]
individualAssessmentNames :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    DescribeApplicableIndividualAssessmentsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeApplicableIndividualAssessmentsResponse
-> DescribeApplicableIndividualAssessmentsResponse -> Bool
(DescribeApplicableIndividualAssessmentsResponse
 -> DescribeApplicableIndividualAssessmentsResponse -> Bool)
-> (DescribeApplicableIndividualAssessmentsResponse
    -> DescribeApplicableIndividualAssessmentsResponse -> Bool)
-> Eq DescribeApplicableIndividualAssessmentsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeApplicableIndividualAssessmentsResponse
-> DescribeApplicableIndividualAssessmentsResponse -> Bool
$c/= :: DescribeApplicableIndividualAssessmentsResponse
-> DescribeApplicableIndividualAssessmentsResponse -> Bool
== :: DescribeApplicableIndividualAssessmentsResponse
-> DescribeApplicableIndividualAssessmentsResponse -> Bool
$c== :: DescribeApplicableIndividualAssessmentsResponse
-> DescribeApplicableIndividualAssessmentsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeApplicableIndividualAssessmentsResponse]
ReadPrec DescribeApplicableIndividualAssessmentsResponse
Int -> ReadS DescribeApplicableIndividualAssessmentsResponse
ReadS [DescribeApplicableIndividualAssessmentsResponse]
(Int -> ReadS DescribeApplicableIndividualAssessmentsResponse)
-> ReadS [DescribeApplicableIndividualAssessmentsResponse]
-> ReadPrec DescribeApplicableIndividualAssessmentsResponse
-> ReadPrec [DescribeApplicableIndividualAssessmentsResponse]
-> Read DescribeApplicableIndividualAssessmentsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeApplicableIndividualAssessmentsResponse]
$creadListPrec :: ReadPrec [DescribeApplicableIndividualAssessmentsResponse]
readPrec :: ReadPrec DescribeApplicableIndividualAssessmentsResponse
$creadPrec :: ReadPrec DescribeApplicableIndividualAssessmentsResponse
readList :: ReadS [DescribeApplicableIndividualAssessmentsResponse]
$creadList :: ReadS [DescribeApplicableIndividualAssessmentsResponse]
readsPrec :: Int -> ReadS DescribeApplicableIndividualAssessmentsResponse
$creadsPrec :: Int -> ReadS DescribeApplicableIndividualAssessmentsResponse
Prelude.Read, Int -> DescribeApplicableIndividualAssessmentsResponse -> ShowS
[DescribeApplicableIndividualAssessmentsResponse] -> ShowS
DescribeApplicableIndividualAssessmentsResponse -> String
(Int -> DescribeApplicableIndividualAssessmentsResponse -> ShowS)
-> (DescribeApplicableIndividualAssessmentsResponse -> String)
-> ([DescribeApplicableIndividualAssessmentsResponse] -> ShowS)
-> Show DescribeApplicableIndividualAssessmentsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeApplicableIndividualAssessmentsResponse] -> ShowS
$cshowList :: [DescribeApplicableIndividualAssessmentsResponse] -> ShowS
show :: DescribeApplicableIndividualAssessmentsResponse -> String
$cshow :: DescribeApplicableIndividualAssessmentsResponse -> String
showsPrec :: Int -> DescribeApplicableIndividualAssessmentsResponse -> ShowS
$cshowsPrec :: Int -> DescribeApplicableIndividualAssessmentsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeApplicableIndividualAssessmentsResponse
 -> Rep DescribeApplicableIndividualAssessmentsResponse x)
-> (forall x.
    Rep DescribeApplicableIndividualAssessmentsResponse x
    -> DescribeApplicableIndividualAssessmentsResponse)
-> Generic DescribeApplicableIndividualAssessmentsResponse
forall x.
Rep DescribeApplicableIndividualAssessmentsResponse x
-> DescribeApplicableIndividualAssessmentsResponse
forall x.
DescribeApplicableIndividualAssessmentsResponse
-> Rep DescribeApplicableIndividualAssessmentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeApplicableIndividualAssessmentsResponse x
-> DescribeApplicableIndividualAssessmentsResponse
$cfrom :: forall x.
DescribeApplicableIndividualAssessmentsResponse
-> Rep DescribeApplicableIndividualAssessmentsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeApplicableIndividualAssessmentsResponse' 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:
--
-- 'marker', 'describeApplicableIndividualAssessmentsResponse_marker' - Pagination token returned for you to pass to a subsequent request. If
-- you pass this token as the @Marker@ value in a subsequent request, the
-- response includes only records beyond the marker, up to the value
-- specified in the request by @MaxRecords@.
--
-- 'individualAssessmentNames', 'describeApplicableIndividualAssessmentsResponse_individualAssessmentNames' - List of names for the individual assessments supported by the
-- premigration assessment run that you start based on the specified
-- request parameters. For more information on the available individual
-- assessments, including compatibility with different migration task
-- configurations, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.AssessmentReport.html Working with premigration assessment runs>
-- in the /Database Migration Service User Guide./
--
-- 'httpStatus', 'describeApplicableIndividualAssessmentsResponse_httpStatus' - The response's http status code.
newDescribeApplicableIndividualAssessmentsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeApplicableIndividualAssessmentsResponse
newDescribeApplicableIndividualAssessmentsResponse :: Int -> DescribeApplicableIndividualAssessmentsResponse
newDescribeApplicableIndividualAssessmentsResponse
  Int
pHttpStatus_ =
    DescribeApplicableIndividualAssessmentsResponse' :: Maybe Text
-> Maybe [Text]
-> Int
-> DescribeApplicableIndividualAssessmentsResponse
DescribeApplicableIndividualAssessmentsResponse'
      { $sel:marker:DescribeApplicableIndividualAssessmentsResponse' :: Maybe Text
marker =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:individualAssessmentNames:DescribeApplicableIndividualAssessmentsResponse' :: Maybe [Text]
individualAssessmentNames =
          Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeApplicableIndividualAssessmentsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Pagination token returned for you to pass to a subsequent request. If
-- you pass this token as the @Marker@ value in a subsequent request, the
-- response includes only records beyond the marker, up to the value
-- specified in the request by @MaxRecords@.
describeApplicableIndividualAssessmentsResponse_marker :: Lens.Lens' DescribeApplicableIndividualAssessmentsResponse (Prelude.Maybe Prelude.Text)
describeApplicableIndividualAssessmentsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeApplicableIndividualAssessmentsResponse
-> f DescribeApplicableIndividualAssessmentsResponse
describeApplicableIndividualAssessmentsResponse_marker = (DescribeApplicableIndividualAssessmentsResponse -> Maybe Text)
-> (DescribeApplicableIndividualAssessmentsResponse
    -> Maybe Text -> DescribeApplicableIndividualAssessmentsResponse)
-> Lens
     DescribeApplicableIndividualAssessmentsResponse
     DescribeApplicableIndividualAssessmentsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicableIndividualAssessmentsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeApplicableIndividualAssessmentsResponse' :: DescribeApplicableIndividualAssessmentsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeApplicableIndividualAssessmentsResponse
s@DescribeApplicableIndividualAssessmentsResponse' {} Maybe Text
a -> DescribeApplicableIndividualAssessmentsResponse
s {$sel:marker:DescribeApplicableIndividualAssessmentsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeApplicableIndividualAssessmentsResponse)

-- | List of names for the individual assessments supported by the
-- premigration assessment run that you start based on the specified
-- request parameters. For more information on the available individual
-- assessments, including compatibility with different migration task
-- configurations, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.AssessmentReport.html Working with premigration assessment runs>
-- in the /Database Migration Service User Guide./
describeApplicableIndividualAssessmentsResponse_individualAssessmentNames :: Lens.Lens' DescribeApplicableIndividualAssessmentsResponse (Prelude.Maybe [Prelude.Text])
describeApplicableIndividualAssessmentsResponse_individualAssessmentNames :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeApplicableIndividualAssessmentsResponse
-> f DescribeApplicableIndividualAssessmentsResponse
describeApplicableIndividualAssessmentsResponse_individualAssessmentNames = (DescribeApplicableIndividualAssessmentsResponse -> Maybe [Text])
-> (DescribeApplicableIndividualAssessmentsResponse
    -> Maybe [Text] -> DescribeApplicableIndividualAssessmentsResponse)
-> Lens
     DescribeApplicableIndividualAssessmentsResponse
     DescribeApplicableIndividualAssessmentsResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicableIndividualAssessmentsResponse' {Maybe [Text]
individualAssessmentNames :: Maybe [Text]
$sel:individualAssessmentNames:DescribeApplicableIndividualAssessmentsResponse' :: DescribeApplicableIndividualAssessmentsResponse -> Maybe [Text]
individualAssessmentNames} -> Maybe [Text]
individualAssessmentNames) (\s :: DescribeApplicableIndividualAssessmentsResponse
s@DescribeApplicableIndividualAssessmentsResponse' {} Maybe [Text]
a -> DescribeApplicableIndividualAssessmentsResponse
s {$sel:individualAssessmentNames:DescribeApplicableIndividualAssessmentsResponse' :: Maybe [Text]
individualAssessmentNames = Maybe [Text]
a} :: DescribeApplicableIndividualAssessmentsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeApplicableIndividualAssessmentsResponse
 -> f DescribeApplicableIndividualAssessmentsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeApplicableIndividualAssessmentsResponse
-> f DescribeApplicableIndividualAssessmentsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
describeApplicableIndividualAssessmentsResponse_httpStatus :: Lens.Lens' DescribeApplicableIndividualAssessmentsResponse Prelude.Int
describeApplicableIndividualAssessmentsResponse_httpStatus :: (Int -> f Int)
-> DescribeApplicableIndividualAssessmentsResponse
-> f DescribeApplicableIndividualAssessmentsResponse
describeApplicableIndividualAssessmentsResponse_httpStatus = (DescribeApplicableIndividualAssessmentsResponse -> Int)
-> (DescribeApplicableIndividualAssessmentsResponse
    -> Int -> DescribeApplicableIndividualAssessmentsResponse)
-> Lens
     DescribeApplicableIndividualAssessmentsResponse
     DescribeApplicableIndividualAssessmentsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeApplicableIndividualAssessmentsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeApplicableIndividualAssessmentsResponse' :: DescribeApplicableIndividualAssessmentsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeApplicableIndividualAssessmentsResponse
s@DescribeApplicableIndividualAssessmentsResponse' {} Int
a -> DescribeApplicableIndividualAssessmentsResponse
s {$sel:httpStatus:DescribeApplicableIndividualAssessmentsResponse' :: Int
httpStatus = Int
a} :: DescribeApplicableIndividualAssessmentsResponse)

instance
  Prelude.NFData
    DescribeApplicableIndividualAssessmentsResponse