{-# 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 #-}
module Amazonka.DMS.CancelReplicationTaskAssessmentRun
(
CancelReplicationTaskAssessmentRun (..),
newCancelReplicationTaskAssessmentRun,
cancelReplicationTaskAssessmentRun_replicationTaskAssessmentRunArn,
CancelReplicationTaskAssessmentRunResponse (..),
newCancelReplicationTaskAssessmentRunResponse,
cancelReplicationTaskAssessmentRunResponse_replicationTaskAssessmentRun,
cancelReplicationTaskAssessmentRunResponse_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
data CancelReplicationTaskAssessmentRun = CancelReplicationTaskAssessmentRun'
{
CancelReplicationTaskAssessmentRun -> Text
replicationTaskAssessmentRunArn :: Prelude.Text
}
deriving (CancelReplicationTaskAssessmentRun
-> CancelReplicationTaskAssessmentRun -> Bool
(CancelReplicationTaskAssessmentRun
-> CancelReplicationTaskAssessmentRun -> Bool)
-> (CancelReplicationTaskAssessmentRun
-> CancelReplicationTaskAssessmentRun -> Bool)
-> Eq CancelReplicationTaskAssessmentRun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelReplicationTaskAssessmentRun
-> CancelReplicationTaskAssessmentRun -> Bool
$c/= :: CancelReplicationTaskAssessmentRun
-> CancelReplicationTaskAssessmentRun -> Bool
== :: CancelReplicationTaskAssessmentRun
-> CancelReplicationTaskAssessmentRun -> Bool
$c== :: CancelReplicationTaskAssessmentRun
-> CancelReplicationTaskAssessmentRun -> Bool
Prelude.Eq, ReadPrec [CancelReplicationTaskAssessmentRun]
ReadPrec CancelReplicationTaskAssessmentRun
Int -> ReadS CancelReplicationTaskAssessmentRun
ReadS [CancelReplicationTaskAssessmentRun]
(Int -> ReadS CancelReplicationTaskAssessmentRun)
-> ReadS [CancelReplicationTaskAssessmentRun]
-> ReadPrec CancelReplicationTaskAssessmentRun
-> ReadPrec [CancelReplicationTaskAssessmentRun]
-> Read CancelReplicationTaskAssessmentRun
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelReplicationTaskAssessmentRun]
$creadListPrec :: ReadPrec [CancelReplicationTaskAssessmentRun]
readPrec :: ReadPrec CancelReplicationTaskAssessmentRun
$creadPrec :: ReadPrec CancelReplicationTaskAssessmentRun
readList :: ReadS [CancelReplicationTaskAssessmentRun]
$creadList :: ReadS [CancelReplicationTaskAssessmentRun]
readsPrec :: Int -> ReadS CancelReplicationTaskAssessmentRun
$creadsPrec :: Int -> ReadS CancelReplicationTaskAssessmentRun
Prelude.Read, Int -> CancelReplicationTaskAssessmentRun -> ShowS
[CancelReplicationTaskAssessmentRun] -> ShowS
CancelReplicationTaskAssessmentRun -> String
(Int -> CancelReplicationTaskAssessmentRun -> ShowS)
-> (CancelReplicationTaskAssessmentRun -> String)
-> ([CancelReplicationTaskAssessmentRun] -> ShowS)
-> Show CancelReplicationTaskAssessmentRun
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelReplicationTaskAssessmentRun] -> ShowS
$cshowList :: [CancelReplicationTaskAssessmentRun] -> ShowS
show :: CancelReplicationTaskAssessmentRun -> String
$cshow :: CancelReplicationTaskAssessmentRun -> String
showsPrec :: Int -> CancelReplicationTaskAssessmentRun -> ShowS
$cshowsPrec :: Int -> CancelReplicationTaskAssessmentRun -> ShowS
Prelude.Show, (forall x.
CancelReplicationTaskAssessmentRun
-> Rep CancelReplicationTaskAssessmentRun x)
-> (forall x.
Rep CancelReplicationTaskAssessmentRun x
-> CancelReplicationTaskAssessmentRun)
-> Generic CancelReplicationTaskAssessmentRun
forall x.
Rep CancelReplicationTaskAssessmentRun x
-> CancelReplicationTaskAssessmentRun
forall x.
CancelReplicationTaskAssessmentRun
-> Rep CancelReplicationTaskAssessmentRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelReplicationTaskAssessmentRun x
-> CancelReplicationTaskAssessmentRun
$cfrom :: forall x.
CancelReplicationTaskAssessmentRun
-> Rep CancelReplicationTaskAssessmentRun x
Prelude.Generic)
newCancelReplicationTaskAssessmentRun ::
Prelude.Text ->
CancelReplicationTaskAssessmentRun
newCancelReplicationTaskAssessmentRun :: Text -> CancelReplicationTaskAssessmentRun
newCancelReplicationTaskAssessmentRun
Text
pReplicationTaskAssessmentRunArn_ =
CancelReplicationTaskAssessmentRun' :: Text -> CancelReplicationTaskAssessmentRun
CancelReplicationTaskAssessmentRun'
{ $sel:replicationTaskAssessmentRunArn:CancelReplicationTaskAssessmentRun' :: Text
replicationTaskAssessmentRunArn =
Text
pReplicationTaskAssessmentRunArn_
}
cancelReplicationTaskAssessmentRun_replicationTaskAssessmentRunArn :: Lens.Lens' CancelReplicationTaskAssessmentRun Prelude.Text
cancelReplicationTaskAssessmentRun_replicationTaskAssessmentRunArn :: (Text -> f Text)
-> CancelReplicationTaskAssessmentRun
-> f CancelReplicationTaskAssessmentRun
cancelReplicationTaskAssessmentRun_replicationTaskAssessmentRunArn = (CancelReplicationTaskAssessmentRun -> Text)
-> (CancelReplicationTaskAssessmentRun
-> Text -> CancelReplicationTaskAssessmentRun)
-> Lens
CancelReplicationTaskAssessmentRun
CancelReplicationTaskAssessmentRun
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelReplicationTaskAssessmentRun' {Text
replicationTaskAssessmentRunArn :: Text
$sel:replicationTaskAssessmentRunArn:CancelReplicationTaskAssessmentRun' :: CancelReplicationTaskAssessmentRun -> Text
replicationTaskAssessmentRunArn} -> Text
replicationTaskAssessmentRunArn) (\s :: CancelReplicationTaskAssessmentRun
s@CancelReplicationTaskAssessmentRun' {} Text
a -> CancelReplicationTaskAssessmentRun
s {$sel:replicationTaskAssessmentRunArn:CancelReplicationTaskAssessmentRun' :: Text
replicationTaskAssessmentRunArn = Text
a} :: CancelReplicationTaskAssessmentRun)
instance
Core.AWSRequest
CancelReplicationTaskAssessmentRun
where
type
AWSResponse CancelReplicationTaskAssessmentRun =
CancelReplicationTaskAssessmentRunResponse
request :: CancelReplicationTaskAssessmentRun
-> Request CancelReplicationTaskAssessmentRun
request = Service
-> CancelReplicationTaskAssessmentRun
-> Request CancelReplicationTaskAssessmentRun
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CancelReplicationTaskAssessmentRun
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse CancelReplicationTaskAssessmentRun)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CancelReplicationTaskAssessmentRun))
-> Logger
-> Service
-> Proxy CancelReplicationTaskAssessmentRun
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse CancelReplicationTaskAssessmentRun)))
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 ReplicationTaskAssessmentRun
-> Int -> CancelReplicationTaskAssessmentRunResponse
CancelReplicationTaskAssessmentRunResponse'
(Maybe ReplicationTaskAssessmentRun
-> Int -> CancelReplicationTaskAssessmentRunResponse)
-> Either String (Maybe ReplicationTaskAssessmentRun)
-> Either
String (Int -> CancelReplicationTaskAssessmentRunResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe ReplicationTaskAssessmentRun)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReplicationTaskAssessmentRun")
Either String (Int -> CancelReplicationTaskAssessmentRunResponse)
-> Either String Int
-> Either String CancelReplicationTaskAssessmentRunResponse
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
CancelReplicationTaskAssessmentRun
instance
Prelude.NFData
CancelReplicationTaskAssessmentRun
instance
Core.ToHeaders
CancelReplicationTaskAssessmentRun
where
toHeaders :: CancelReplicationTaskAssessmentRun -> ResponseHeaders
toHeaders =
ResponseHeaders
-> CancelReplicationTaskAssessmentRun -> 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.CancelReplicationTaskAssessmentRun" ::
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
CancelReplicationTaskAssessmentRun
where
toJSON :: CancelReplicationTaskAssessmentRun -> Value
toJSON CancelReplicationTaskAssessmentRun' {Text
replicationTaskAssessmentRunArn :: Text
$sel:replicationTaskAssessmentRunArn:CancelReplicationTaskAssessmentRun' :: CancelReplicationTaskAssessmentRun -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ReplicationTaskAssessmentRunArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
replicationTaskAssessmentRunArn
)
]
)
instance
Core.ToPath
CancelReplicationTaskAssessmentRun
where
toPath :: CancelReplicationTaskAssessmentRun -> ByteString
toPath = ByteString -> CancelReplicationTaskAssessmentRun -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
CancelReplicationTaskAssessmentRun
where
toQuery :: CancelReplicationTaskAssessmentRun -> QueryString
toQuery = QueryString -> CancelReplicationTaskAssessmentRun -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CancelReplicationTaskAssessmentRunResponse = CancelReplicationTaskAssessmentRunResponse'
{
CancelReplicationTaskAssessmentRunResponse
-> Maybe ReplicationTaskAssessmentRun
replicationTaskAssessmentRun :: Prelude.Maybe ReplicationTaskAssessmentRun,
CancelReplicationTaskAssessmentRunResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CancelReplicationTaskAssessmentRunResponse
-> CancelReplicationTaskAssessmentRunResponse -> Bool
(CancelReplicationTaskAssessmentRunResponse
-> CancelReplicationTaskAssessmentRunResponse -> Bool)
-> (CancelReplicationTaskAssessmentRunResponse
-> CancelReplicationTaskAssessmentRunResponse -> Bool)
-> Eq CancelReplicationTaskAssessmentRunResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelReplicationTaskAssessmentRunResponse
-> CancelReplicationTaskAssessmentRunResponse -> Bool
$c/= :: CancelReplicationTaskAssessmentRunResponse
-> CancelReplicationTaskAssessmentRunResponse -> Bool
== :: CancelReplicationTaskAssessmentRunResponse
-> CancelReplicationTaskAssessmentRunResponse -> Bool
$c== :: CancelReplicationTaskAssessmentRunResponse
-> CancelReplicationTaskAssessmentRunResponse -> Bool
Prelude.Eq, ReadPrec [CancelReplicationTaskAssessmentRunResponse]
ReadPrec CancelReplicationTaskAssessmentRunResponse
Int -> ReadS CancelReplicationTaskAssessmentRunResponse
ReadS [CancelReplicationTaskAssessmentRunResponse]
(Int -> ReadS CancelReplicationTaskAssessmentRunResponse)
-> ReadS [CancelReplicationTaskAssessmentRunResponse]
-> ReadPrec CancelReplicationTaskAssessmentRunResponse
-> ReadPrec [CancelReplicationTaskAssessmentRunResponse]
-> Read CancelReplicationTaskAssessmentRunResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelReplicationTaskAssessmentRunResponse]
$creadListPrec :: ReadPrec [CancelReplicationTaskAssessmentRunResponse]
readPrec :: ReadPrec CancelReplicationTaskAssessmentRunResponse
$creadPrec :: ReadPrec CancelReplicationTaskAssessmentRunResponse
readList :: ReadS [CancelReplicationTaskAssessmentRunResponse]
$creadList :: ReadS [CancelReplicationTaskAssessmentRunResponse]
readsPrec :: Int -> ReadS CancelReplicationTaskAssessmentRunResponse
$creadsPrec :: Int -> ReadS CancelReplicationTaskAssessmentRunResponse
Prelude.Read, Int -> CancelReplicationTaskAssessmentRunResponse -> ShowS
[CancelReplicationTaskAssessmentRunResponse] -> ShowS
CancelReplicationTaskAssessmentRunResponse -> String
(Int -> CancelReplicationTaskAssessmentRunResponse -> ShowS)
-> (CancelReplicationTaskAssessmentRunResponse -> String)
-> ([CancelReplicationTaskAssessmentRunResponse] -> ShowS)
-> Show CancelReplicationTaskAssessmentRunResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelReplicationTaskAssessmentRunResponse] -> ShowS
$cshowList :: [CancelReplicationTaskAssessmentRunResponse] -> ShowS
show :: CancelReplicationTaskAssessmentRunResponse -> String
$cshow :: CancelReplicationTaskAssessmentRunResponse -> String
showsPrec :: Int -> CancelReplicationTaskAssessmentRunResponse -> ShowS
$cshowsPrec :: Int -> CancelReplicationTaskAssessmentRunResponse -> ShowS
Prelude.Show, (forall x.
CancelReplicationTaskAssessmentRunResponse
-> Rep CancelReplicationTaskAssessmentRunResponse x)
-> (forall x.
Rep CancelReplicationTaskAssessmentRunResponse x
-> CancelReplicationTaskAssessmentRunResponse)
-> Generic CancelReplicationTaskAssessmentRunResponse
forall x.
Rep CancelReplicationTaskAssessmentRunResponse x
-> CancelReplicationTaskAssessmentRunResponse
forall x.
CancelReplicationTaskAssessmentRunResponse
-> Rep CancelReplicationTaskAssessmentRunResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelReplicationTaskAssessmentRunResponse x
-> CancelReplicationTaskAssessmentRunResponse
$cfrom :: forall x.
CancelReplicationTaskAssessmentRunResponse
-> Rep CancelReplicationTaskAssessmentRunResponse x
Prelude.Generic)
newCancelReplicationTaskAssessmentRunResponse ::
Prelude.Int ->
CancelReplicationTaskAssessmentRunResponse
newCancelReplicationTaskAssessmentRunResponse :: Int -> CancelReplicationTaskAssessmentRunResponse
newCancelReplicationTaskAssessmentRunResponse
Int
pHttpStatus_ =
CancelReplicationTaskAssessmentRunResponse' :: Maybe ReplicationTaskAssessmentRun
-> Int -> CancelReplicationTaskAssessmentRunResponse
CancelReplicationTaskAssessmentRunResponse'
{ $sel:replicationTaskAssessmentRun:CancelReplicationTaskAssessmentRunResponse' :: Maybe ReplicationTaskAssessmentRun
replicationTaskAssessmentRun =
Maybe ReplicationTaskAssessmentRun
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CancelReplicationTaskAssessmentRunResponse' :: Int
httpStatus = Int
pHttpStatus_
}
cancelReplicationTaskAssessmentRunResponse_replicationTaskAssessmentRun :: Lens.Lens' CancelReplicationTaskAssessmentRunResponse (Prelude.Maybe ReplicationTaskAssessmentRun)
cancelReplicationTaskAssessmentRunResponse_replicationTaskAssessmentRun :: (Maybe ReplicationTaskAssessmentRun
-> f (Maybe ReplicationTaskAssessmentRun))
-> CancelReplicationTaskAssessmentRunResponse
-> f CancelReplicationTaskAssessmentRunResponse
cancelReplicationTaskAssessmentRunResponse_replicationTaskAssessmentRun = (CancelReplicationTaskAssessmentRunResponse
-> Maybe ReplicationTaskAssessmentRun)
-> (CancelReplicationTaskAssessmentRunResponse
-> Maybe ReplicationTaskAssessmentRun
-> CancelReplicationTaskAssessmentRunResponse)
-> Lens
CancelReplicationTaskAssessmentRunResponse
CancelReplicationTaskAssessmentRunResponse
(Maybe ReplicationTaskAssessmentRun)
(Maybe ReplicationTaskAssessmentRun)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelReplicationTaskAssessmentRunResponse' {Maybe ReplicationTaskAssessmentRun
replicationTaskAssessmentRun :: Maybe ReplicationTaskAssessmentRun
$sel:replicationTaskAssessmentRun:CancelReplicationTaskAssessmentRunResponse' :: CancelReplicationTaskAssessmentRunResponse
-> Maybe ReplicationTaskAssessmentRun
replicationTaskAssessmentRun} -> Maybe ReplicationTaskAssessmentRun
replicationTaskAssessmentRun) (\s :: CancelReplicationTaskAssessmentRunResponse
s@CancelReplicationTaskAssessmentRunResponse' {} Maybe ReplicationTaskAssessmentRun
a -> CancelReplicationTaskAssessmentRunResponse
s {$sel:replicationTaskAssessmentRun:CancelReplicationTaskAssessmentRunResponse' :: Maybe ReplicationTaskAssessmentRun
replicationTaskAssessmentRun = Maybe ReplicationTaskAssessmentRun
a} :: CancelReplicationTaskAssessmentRunResponse)
cancelReplicationTaskAssessmentRunResponse_httpStatus :: Lens.Lens' CancelReplicationTaskAssessmentRunResponse Prelude.Int
cancelReplicationTaskAssessmentRunResponse_httpStatus :: (Int -> f Int)
-> CancelReplicationTaskAssessmentRunResponse
-> f CancelReplicationTaskAssessmentRunResponse
cancelReplicationTaskAssessmentRunResponse_httpStatus = (CancelReplicationTaskAssessmentRunResponse -> Int)
-> (CancelReplicationTaskAssessmentRunResponse
-> Int -> CancelReplicationTaskAssessmentRunResponse)
-> Lens
CancelReplicationTaskAssessmentRunResponse
CancelReplicationTaskAssessmentRunResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelReplicationTaskAssessmentRunResponse' {Int
httpStatus :: Int
$sel:httpStatus:CancelReplicationTaskAssessmentRunResponse' :: CancelReplicationTaskAssessmentRunResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CancelReplicationTaskAssessmentRunResponse
s@CancelReplicationTaskAssessmentRunResponse' {} Int
a -> CancelReplicationTaskAssessmentRunResponse
s {$sel:httpStatus:CancelReplicationTaskAssessmentRunResponse' :: Int
httpStatus = Int
a} :: CancelReplicationTaskAssessmentRunResponse)
instance
Prelude.NFData
CancelReplicationTaskAssessmentRunResponse