{-# 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.MigrationHub.DisassociateCreatedArtifact
(
DisassociateCreatedArtifact (..),
newDisassociateCreatedArtifact,
disassociateCreatedArtifact_dryRun,
disassociateCreatedArtifact_progressUpdateStream,
disassociateCreatedArtifact_migrationTaskName,
disassociateCreatedArtifact_createdArtifactName,
DisassociateCreatedArtifactResponse (..),
newDisassociateCreatedArtifactResponse,
disassociateCreatedArtifactResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MigrationHub.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DisassociateCreatedArtifact = DisassociateCreatedArtifact'
{
DisassociateCreatedArtifact -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
DisassociateCreatedArtifact -> Text
progressUpdateStream :: Prelude.Text,
DisassociateCreatedArtifact -> Text
migrationTaskName :: Prelude.Text,
DisassociateCreatedArtifact -> Text
createdArtifactName :: Prelude.Text
}
deriving (DisassociateCreatedArtifact -> DisassociateCreatedArtifact -> Bool
(DisassociateCreatedArtifact
-> DisassociateCreatedArtifact -> Bool)
-> (DisassociateCreatedArtifact
-> DisassociateCreatedArtifact -> Bool)
-> Eq DisassociateCreatedArtifact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateCreatedArtifact -> DisassociateCreatedArtifact -> Bool
$c/= :: DisassociateCreatedArtifact -> DisassociateCreatedArtifact -> Bool
== :: DisassociateCreatedArtifact -> DisassociateCreatedArtifact -> Bool
$c== :: DisassociateCreatedArtifact -> DisassociateCreatedArtifact -> Bool
Prelude.Eq, ReadPrec [DisassociateCreatedArtifact]
ReadPrec DisassociateCreatedArtifact
Int -> ReadS DisassociateCreatedArtifact
ReadS [DisassociateCreatedArtifact]
(Int -> ReadS DisassociateCreatedArtifact)
-> ReadS [DisassociateCreatedArtifact]
-> ReadPrec DisassociateCreatedArtifact
-> ReadPrec [DisassociateCreatedArtifact]
-> Read DisassociateCreatedArtifact
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateCreatedArtifact]
$creadListPrec :: ReadPrec [DisassociateCreatedArtifact]
readPrec :: ReadPrec DisassociateCreatedArtifact
$creadPrec :: ReadPrec DisassociateCreatedArtifact
readList :: ReadS [DisassociateCreatedArtifact]
$creadList :: ReadS [DisassociateCreatedArtifact]
readsPrec :: Int -> ReadS DisassociateCreatedArtifact
$creadsPrec :: Int -> ReadS DisassociateCreatedArtifact
Prelude.Read, Int -> DisassociateCreatedArtifact -> ShowS
[DisassociateCreatedArtifact] -> ShowS
DisassociateCreatedArtifact -> String
(Int -> DisassociateCreatedArtifact -> ShowS)
-> (DisassociateCreatedArtifact -> String)
-> ([DisassociateCreatedArtifact] -> ShowS)
-> Show DisassociateCreatedArtifact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateCreatedArtifact] -> ShowS
$cshowList :: [DisassociateCreatedArtifact] -> ShowS
show :: DisassociateCreatedArtifact -> String
$cshow :: DisassociateCreatedArtifact -> String
showsPrec :: Int -> DisassociateCreatedArtifact -> ShowS
$cshowsPrec :: Int -> DisassociateCreatedArtifact -> ShowS
Prelude.Show, (forall x.
DisassociateCreatedArtifact -> Rep DisassociateCreatedArtifact x)
-> (forall x.
Rep DisassociateCreatedArtifact x -> DisassociateCreatedArtifact)
-> Generic DisassociateCreatedArtifact
forall x.
Rep DisassociateCreatedArtifact x -> DisassociateCreatedArtifact
forall x.
DisassociateCreatedArtifact -> Rep DisassociateCreatedArtifact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateCreatedArtifact x -> DisassociateCreatedArtifact
$cfrom :: forall x.
DisassociateCreatedArtifact -> Rep DisassociateCreatedArtifact x
Prelude.Generic)
newDisassociateCreatedArtifact ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DisassociateCreatedArtifact
newDisassociateCreatedArtifact :: Text -> Text -> Text -> DisassociateCreatedArtifact
newDisassociateCreatedArtifact
Text
pProgressUpdateStream_
Text
pMigrationTaskName_
Text
pCreatedArtifactName_ =
DisassociateCreatedArtifact' :: Maybe Bool -> Text -> Text -> Text -> DisassociateCreatedArtifact
DisassociateCreatedArtifact'
{ $sel:dryRun:DisassociateCreatedArtifact' :: Maybe Bool
dryRun =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:progressUpdateStream:DisassociateCreatedArtifact' :: Text
progressUpdateStream = Text
pProgressUpdateStream_,
$sel:migrationTaskName:DisassociateCreatedArtifact' :: Text
migrationTaskName = Text
pMigrationTaskName_,
$sel:createdArtifactName:DisassociateCreatedArtifact' :: Text
createdArtifactName = Text
pCreatedArtifactName_
}
disassociateCreatedArtifact_dryRun :: Lens.Lens' DisassociateCreatedArtifact (Prelude.Maybe Prelude.Bool)
disassociateCreatedArtifact_dryRun :: (Maybe Bool -> f (Maybe Bool))
-> DisassociateCreatedArtifact -> f DisassociateCreatedArtifact
disassociateCreatedArtifact_dryRun = (DisassociateCreatedArtifact -> Maybe Bool)
-> (DisassociateCreatedArtifact
-> Maybe Bool -> DisassociateCreatedArtifact)
-> Lens
DisassociateCreatedArtifact
DisassociateCreatedArtifact
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCreatedArtifact' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DisassociateCreatedArtifact' :: DisassociateCreatedArtifact -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DisassociateCreatedArtifact
s@DisassociateCreatedArtifact' {} Maybe Bool
a -> DisassociateCreatedArtifact
s {$sel:dryRun:DisassociateCreatedArtifact' :: Maybe Bool
dryRun = Maybe Bool
a} :: DisassociateCreatedArtifact)
disassociateCreatedArtifact_progressUpdateStream :: Lens.Lens' DisassociateCreatedArtifact Prelude.Text
disassociateCreatedArtifact_progressUpdateStream :: (Text -> f Text)
-> DisassociateCreatedArtifact -> f DisassociateCreatedArtifact
disassociateCreatedArtifact_progressUpdateStream = (DisassociateCreatedArtifact -> Text)
-> (DisassociateCreatedArtifact
-> Text -> DisassociateCreatedArtifact)
-> Lens
DisassociateCreatedArtifact DisassociateCreatedArtifact Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCreatedArtifact' {Text
progressUpdateStream :: Text
$sel:progressUpdateStream:DisassociateCreatedArtifact' :: DisassociateCreatedArtifact -> Text
progressUpdateStream} -> Text
progressUpdateStream) (\s :: DisassociateCreatedArtifact
s@DisassociateCreatedArtifact' {} Text
a -> DisassociateCreatedArtifact
s {$sel:progressUpdateStream:DisassociateCreatedArtifact' :: Text
progressUpdateStream = Text
a} :: DisassociateCreatedArtifact)
disassociateCreatedArtifact_migrationTaskName :: Lens.Lens' DisassociateCreatedArtifact Prelude.Text
disassociateCreatedArtifact_migrationTaskName :: (Text -> f Text)
-> DisassociateCreatedArtifact -> f DisassociateCreatedArtifact
disassociateCreatedArtifact_migrationTaskName = (DisassociateCreatedArtifact -> Text)
-> (DisassociateCreatedArtifact
-> Text -> DisassociateCreatedArtifact)
-> Lens
DisassociateCreatedArtifact DisassociateCreatedArtifact Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCreatedArtifact' {Text
migrationTaskName :: Text
$sel:migrationTaskName:DisassociateCreatedArtifact' :: DisassociateCreatedArtifact -> Text
migrationTaskName} -> Text
migrationTaskName) (\s :: DisassociateCreatedArtifact
s@DisassociateCreatedArtifact' {} Text
a -> DisassociateCreatedArtifact
s {$sel:migrationTaskName:DisassociateCreatedArtifact' :: Text
migrationTaskName = Text
a} :: DisassociateCreatedArtifact)
disassociateCreatedArtifact_createdArtifactName :: Lens.Lens' DisassociateCreatedArtifact Prelude.Text
disassociateCreatedArtifact_createdArtifactName :: (Text -> f Text)
-> DisassociateCreatedArtifact -> f DisassociateCreatedArtifact
disassociateCreatedArtifact_createdArtifactName = (DisassociateCreatedArtifact -> Text)
-> (DisassociateCreatedArtifact
-> Text -> DisassociateCreatedArtifact)
-> Lens
DisassociateCreatedArtifact DisassociateCreatedArtifact Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCreatedArtifact' {Text
createdArtifactName :: Text
$sel:createdArtifactName:DisassociateCreatedArtifact' :: DisassociateCreatedArtifact -> Text
createdArtifactName} -> Text
createdArtifactName) (\s :: DisassociateCreatedArtifact
s@DisassociateCreatedArtifact' {} Text
a -> DisassociateCreatedArtifact
s {$sel:createdArtifactName:DisassociateCreatedArtifact' :: Text
createdArtifactName = Text
a} :: DisassociateCreatedArtifact)
instance Core.AWSRequest DisassociateCreatedArtifact where
type
AWSResponse DisassociateCreatedArtifact =
DisassociateCreatedArtifactResponse
request :: DisassociateCreatedArtifact -> Request DisassociateCreatedArtifact
request = Service
-> DisassociateCreatedArtifact
-> Request DisassociateCreatedArtifact
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateCreatedArtifact
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateCreatedArtifact)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DisassociateCreatedArtifact))
-> Logger
-> Service
-> Proxy DisassociateCreatedArtifact
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateCreatedArtifact)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DisassociateCreatedArtifactResponse
DisassociateCreatedArtifactResponse'
(Int -> DisassociateCreatedArtifactResponse)
-> Either String Int
-> Either String DisassociateCreatedArtifactResponse
forall (f :: * -> *) a b. Functor 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 DisassociateCreatedArtifact
instance Prelude.NFData DisassociateCreatedArtifact
instance Core.ToHeaders DisassociateCreatedArtifact where
toHeaders :: DisassociateCreatedArtifact -> ResponseHeaders
toHeaders =
ResponseHeaders -> DisassociateCreatedArtifact -> 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
"AWSMigrationHub.DisassociateCreatedArtifact" ::
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 DisassociateCreatedArtifact where
toJSON :: DisassociateCreatedArtifact -> Value
toJSON DisassociateCreatedArtifact' {Maybe Bool
Text
createdArtifactName :: Text
migrationTaskName :: Text
progressUpdateStream :: Text
dryRun :: Maybe Bool
$sel:createdArtifactName:DisassociateCreatedArtifact' :: DisassociateCreatedArtifact -> Text
$sel:migrationTaskName:DisassociateCreatedArtifact' :: DisassociateCreatedArtifact -> Text
$sel:progressUpdateStream:DisassociateCreatedArtifact' :: DisassociateCreatedArtifact -> Text
$sel:dryRun:DisassociateCreatedArtifact' :: DisassociateCreatedArtifact -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DryRun" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dryRun,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ProgressUpdateStream"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
progressUpdateStream
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"MigrationTaskName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
migrationTaskName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"CreatedArtifactName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
createdArtifactName)
]
)
instance Core.ToPath DisassociateCreatedArtifact where
toPath :: DisassociateCreatedArtifact -> ByteString
toPath = ByteString -> DisassociateCreatedArtifact -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DisassociateCreatedArtifact where
toQuery :: DisassociateCreatedArtifact -> QueryString
toQuery = QueryString -> DisassociateCreatedArtifact -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateCreatedArtifactResponse = DisassociateCreatedArtifactResponse'
{
DisassociateCreatedArtifactResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateCreatedArtifactResponse
-> DisassociateCreatedArtifactResponse -> Bool
(DisassociateCreatedArtifactResponse
-> DisassociateCreatedArtifactResponse -> Bool)
-> (DisassociateCreatedArtifactResponse
-> DisassociateCreatedArtifactResponse -> Bool)
-> Eq DisassociateCreatedArtifactResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateCreatedArtifactResponse
-> DisassociateCreatedArtifactResponse -> Bool
$c/= :: DisassociateCreatedArtifactResponse
-> DisassociateCreatedArtifactResponse -> Bool
== :: DisassociateCreatedArtifactResponse
-> DisassociateCreatedArtifactResponse -> Bool
$c== :: DisassociateCreatedArtifactResponse
-> DisassociateCreatedArtifactResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateCreatedArtifactResponse]
ReadPrec DisassociateCreatedArtifactResponse
Int -> ReadS DisassociateCreatedArtifactResponse
ReadS [DisassociateCreatedArtifactResponse]
(Int -> ReadS DisassociateCreatedArtifactResponse)
-> ReadS [DisassociateCreatedArtifactResponse]
-> ReadPrec DisassociateCreatedArtifactResponse
-> ReadPrec [DisassociateCreatedArtifactResponse]
-> Read DisassociateCreatedArtifactResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateCreatedArtifactResponse]
$creadListPrec :: ReadPrec [DisassociateCreatedArtifactResponse]
readPrec :: ReadPrec DisassociateCreatedArtifactResponse
$creadPrec :: ReadPrec DisassociateCreatedArtifactResponse
readList :: ReadS [DisassociateCreatedArtifactResponse]
$creadList :: ReadS [DisassociateCreatedArtifactResponse]
readsPrec :: Int -> ReadS DisassociateCreatedArtifactResponse
$creadsPrec :: Int -> ReadS DisassociateCreatedArtifactResponse
Prelude.Read, Int -> DisassociateCreatedArtifactResponse -> ShowS
[DisassociateCreatedArtifactResponse] -> ShowS
DisassociateCreatedArtifactResponse -> String
(Int -> DisassociateCreatedArtifactResponse -> ShowS)
-> (DisassociateCreatedArtifactResponse -> String)
-> ([DisassociateCreatedArtifactResponse] -> ShowS)
-> Show DisassociateCreatedArtifactResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateCreatedArtifactResponse] -> ShowS
$cshowList :: [DisassociateCreatedArtifactResponse] -> ShowS
show :: DisassociateCreatedArtifactResponse -> String
$cshow :: DisassociateCreatedArtifactResponse -> String
showsPrec :: Int -> DisassociateCreatedArtifactResponse -> ShowS
$cshowsPrec :: Int -> DisassociateCreatedArtifactResponse -> ShowS
Prelude.Show, (forall x.
DisassociateCreatedArtifactResponse
-> Rep DisassociateCreatedArtifactResponse x)
-> (forall x.
Rep DisassociateCreatedArtifactResponse x
-> DisassociateCreatedArtifactResponse)
-> Generic DisassociateCreatedArtifactResponse
forall x.
Rep DisassociateCreatedArtifactResponse x
-> DisassociateCreatedArtifactResponse
forall x.
DisassociateCreatedArtifactResponse
-> Rep DisassociateCreatedArtifactResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateCreatedArtifactResponse x
-> DisassociateCreatedArtifactResponse
$cfrom :: forall x.
DisassociateCreatedArtifactResponse
-> Rep DisassociateCreatedArtifactResponse x
Prelude.Generic)
newDisassociateCreatedArtifactResponse ::
Prelude.Int ->
DisassociateCreatedArtifactResponse
newDisassociateCreatedArtifactResponse :: Int -> DisassociateCreatedArtifactResponse
newDisassociateCreatedArtifactResponse Int
pHttpStatus_ =
DisassociateCreatedArtifactResponse' :: Int -> DisassociateCreatedArtifactResponse
DisassociateCreatedArtifactResponse'
{ $sel:httpStatus:DisassociateCreatedArtifactResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateCreatedArtifactResponse_httpStatus :: Lens.Lens' DisassociateCreatedArtifactResponse Prelude.Int
disassociateCreatedArtifactResponse_httpStatus :: (Int -> f Int)
-> DisassociateCreatedArtifactResponse
-> f DisassociateCreatedArtifactResponse
disassociateCreatedArtifactResponse_httpStatus = (DisassociateCreatedArtifactResponse -> Int)
-> (DisassociateCreatedArtifactResponse
-> Int -> DisassociateCreatedArtifactResponse)
-> Lens
DisassociateCreatedArtifactResponse
DisassociateCreatedArtifactResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCreatedArtifactResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateCreatedArtifactResponse' :: DisassociateCreatedArtifactResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateCreatedArtifactResponse
s@DisassociateCreatedArtifactResponse' {} Int
a -> DisassociateCreatedArtifactResponse
s {$sel:httpStatus:DisassociateCreatedArtifactResponse' :: Int
httpStatus = Int
a} :: DisassociateCreatedArtifactResponse)
instance
Prelude.NFData
DisassociateCreatedArtifactResponse