{-# 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.MGN.DeleteReplicationConfigurationTemplate
(
DeleteReplicationConfigurationTemplate (..),
newDeleteReplicationConfigurationTemplate,
deleteReplicationConfigurationTemplate_replicationConfigurationTemplateID,
DeleteReplicationConfigurationTemplateResponse (..),
newDeleteReplicationConfigurationTemplateResponse,
deleteReplicationConfigurationTemplateResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MGN.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteReplicationConfigurationTemplate = DeleteReplicationConfigurationTemplate'
{
DeleteReplicationConfigurationTemplate -> Text
replicationConfigurationTemplateID :: Prelude.Text
}
deriving (DeleteReplicationConfigurationTemplate
-> DeleteReplicationConfigurationTemplate -> Bool
(DeleteReplicationConfigurationTemplate
-> DeleteReplicationConfigurationTemplate -> Bool)
-> (DeleteReplicationConfigurationTemplate
-> DeleteReplicationConfigurationTemplate -> Bool)
-> Eq DeleteReplicationConfigurationTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReplicationConfigurationTemplate
-> DeleteReplicationConfigurationTemplate -> Bool
$c/= :: DeleteReplicationConfigurationTemplate
-> DeleteReplicationConfigurationTemplate -> Bool
== :: DeleteReplicationConfigurationTemplate
-> DeleteReplicationConfigurationTemplate -> Bool
$c== :: DeleteReplicationConfigurationTemplate
-> DeleteReplicationConfigurationTemplate -> Bool
Prelude.Eq, ReadPrec [DeleteReplicationConfigurationTemplate]
ReadPrec DeleteReplicationConfigurationTemplate
Int -> ReadS DeleteReplicationConfigurationTemplate
ReadS [DeleteReplicationConfigurationTemplate]
(Int -> ReadS DeleteReplicationConfigurationTemplate)
-> ReadS [DeleteReplicationConfigurationTemplate]
-> ReadPrec DeleteReplicationConfigurationTemplate
-> ReadPrec [DeleteReplicationConfigurationTemplate]
-> Read DeleteReplicationConfigurationTemplate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReplicationConfigurationTemplate]
$creadListPrec :: ReadPrec [DeleteReplicationConfigurationTemplate]
readPrec :: ReadPrec DeleteReplicationConfigurationTemplate
$creadPrec :: ReadPrec DeleteReplicationConfigurationTemplate
readList :: ReadS [DeleteReplicationConfigurationTemplate]
$creadList :: ReadS [DeleteReplicationConfigurationTemplate]
readsPrec :: Int -> ReadS DeleteReplicationConfigurationTemplate
$creadsPrec :: Int -> ReadS DeleteReplicationConfigurationTemplate
Prelude.Read, Int -> DeleteReplicationConfigurationTemplate -> ShowS
[DeleteReplicationConfigurationTemplate] -> ShowS
DeleteReplicationConfigurationTemplate -> String
(Int -> DeleteReplicationConfigurationTemplate -> ShowS)
-> (DeleteReplicationConfigurationTemplate -> String)
-> ([DeleteReplicationConfigurationTemplate] -> ShowS)
-> Show DeleteReplicationConfigurationTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReplicationConfigurationTemplate] -> ShowS
$cshowList :: [DeleteReplicationConfigurationTemplate] -> ShowS
show :: DeleteReplicationConfigurationTemplate -> String
$cshow :: DeleteReplicationConfigurationTemplate -> String
showsPrec :: Int -> DeleteReplicationConfigurationTemplate -> ShowS
$cshowsPrec :: Int -> DeleteReplicationConfigurationTemplate -> ShowS
Prelude.Show, (forall x.
DeleteReplicationConfigurationTemplate
-> Rep DeleteReplicationConfigurationTemplate x)
-> (forall x.
Rep DeleteReplicationConfigurationTemplate x
-> DeleteReplicationConfigurationTemplate)
-> Generic DeleteReplicationConfigurationTemplate
forall x.
Rep DeleteReplicationConfigurationTemplate x
-> DeleteReplicationConfigurationTemplate
forall x.
DeleteReplicationConfigurationTemplate
-> Rep DeleteReplicationConfigurationTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteReplicationConfigurationTemplate x
-> DeleteReplicationConfigurationTemplate
$cfrom :: forall x.
DeleteReplicationConfigurationTemplate
-> Rep DeleteReplicationConfigurationTemplate x
Prelude.Generic)
newDeleteReplicationConfigurationTemplate ::
Prelude.Text ->
DeleteReplicationConfigurationTemplate
newDeleteReplicationConfigurationTemplate :: Text -> DeleteReplicationConfigurationTemplate
newDeleteReplicationConfigurationTemplate
Text
pReplicationConfigurationTemplateID_ =
DeleteReplicationConfigurationTemplate' :: Text -> DeleteReplicationConfigurationTemplate
DeleteReplicationConfigurationTemplate'
{ $sel:replicationConfigurationTemplateID:DeleteReplicationConfigurationTemplate' :: Text
replicationConfigurationTemplateID =
Text
pReplicationConfigurationTemplateID_
}
deleteReplicationConfigurationTemplate_replicationConfigurationTemplateID :: Lens.Lens' DeleteReplicationConfigurationTemplate Prelude.Text
deleteReplicationConfigurationTemplate_replicationConfigurationTemplateID :: (Text -> f Text)
-> DeleteReplicationConfigurationTemplate
-> f DeleteReplicationConfigurationTemplate
deleteReplicationConfigurationTemplate_replicationConfigurationTemplateID = (DeleteReplicationConfigurationTemplate -> Text)
-> (DeleteReplicationConfigurationTemplate
-> Text -> DeleteReplicationConfigurationTemplate)
-> Lens
DeleteReplicationConfigurationTemplate
DeleteReplicationConfigurationTemplate
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReplicationConfigurationTemplate' {Text
replicationConfigurationTemplateID :: Text
$sel:replicationConfigurationTemplateID:DeleteReplicationConfigurationTemplate' :: DeleteReplicationConfigurationTemplate -> Text
replicationConfigurationTemplateID} -> Text
replicationConfigurationTemplateID) (\s :: DeleteReplicationConfigurationTemplate
s@DeleteReplicationConfigurationTemplate' {} Text
a -> DeleteReplicationConfigurationTemplate
s {$sel:replicationConfigurationTemplateID:DeleteReplicationConfigurationTemplate' :: Text
replicationConfigurationTemplateID = Text
a} :: DeleteReplicationConfigurationTemplate)
instance
Core.AWSRequest
DeleteReplicationConfigurationTemplate
where
type
AWSResponse
DeleteReplicationConfigurationTemplate =
DeleteReplicationConfigurationTemplateResponse
request :: DeleteReplicationConfigurationTemplate
-> Request DeleteReplicationConfigurationTemplate
request = Service
-> DeleteReplicationConfigurationTemplate
-> Request DeleteReplicationConfigurationTemplate
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteReplicationConfigurationTemplate
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DeleteReplicationConfigurationTemplate)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either
String (AWSResponse DeleteReplicationConfigurationTemplate))
-> Logger
-> Service
-> Proxy DeleteReplicationConfigurationTemplate
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DeleteReplicationConfigurationTemplate)))
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 -> DeleteReplicationConfigurationTemplateResponse
DeleteReplicationConfigurationTemplateResponse'
(Int -> DeleteReplicationConfigurationTemplateResponse)
-> Either String Int
-> Either String DeleteReplicationConfigurationTemplateResponse
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
DeleteReplicationConfigurationTemplate
instance
Prelude.NFData
DeleteReplicationConfigurationTemplate
instance
Core.ToHeaders
DeleteReplicationConfigurationTemplate
where
toHeaders :: DeleteReplicationConfigurationTemplate -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DeleteReplicationConfigurationTemplate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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
DeleteReplicationConfigurationTemplate
where
toJSON :: DeleteReplicationConfigurationTemplate -> Value
toJSON DeleteReplicationConfigurationTemplate' {Text
replicationConfigurationTemplateID :: Text
$sel:replicationConfigurationTemplateID:DeleteReplicationConfigurationTemplate' :: DeleteReplicationConfigurationTemplate -> 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
"replicationConfigurationTemplateID"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
replicationConfigurationTemplateID
)
]
)
instance
Core.ToPath
DeleteReplicationConfigurationTemplate
where
toPath :: DeleteReplicationConfigurationTemplate -> ByteString
toPath =
ByteString -> DeleteReplicationConfigurationTemplate -> ByteString
forall a b. a -> b -> a
Prelude.const
ByteString
"/DeleteReplicationConfigurationTemplate"
instance
Core.ToQuery
DeleteReplicationConfigurationTemplate
where
toQuery :: DeleteReplicationConfigurationTemplate -> QueryString
toQuery = QueryString
-> DeleteReplicationConfigurationTemplate -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteReplicationConfigurationTemplateResponse = DeleteReplicationConfigurationTemplateResponse'
{
DeleteReplicationConfigurationTemplateResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteReplicationConfigurationTemplateResponse
-> DeleteReplicationConfigurationTemplateResponse -> Bool
(DeleteReplicationConfigurationTemplateResponse
-> DeleteReplicationConfigurationTemplateResponse -> Bool)
-> (DeleteReplicationConfigurationTemplateResponse
-> DeleteReplicationConfigurationTemplateResponse -> Bool)
-> Eq DeleteReplicationConfigurationTemplateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReplicationConfigurationTemplateResponse
-> DeleteReplicationConfigurationTemplateResponse -> Bool
$c/= :: DeleteReplicationConfigurationTemplateResponse
-> DeleteReplicationConfigurationTemplateResponse -> Bool
== :: DeleteReplicationConfigurationTemplateResponse
-> DeleteReplicationConfigurationTemplateResponse -> Bool
$c== :: DeleteReplicationConfigurationTemplateResponse
-> DeleteReplicationConfigurationTemplateResponse -> Bool
Prelude.Eq, ReadPrec [DeleteReplicationConfigurationTemplateResponse]
ReadPrec DeleteReplicationConfigurationTemplateResponse
Int -> ReadS DeleteReplicationConfigurationTemplateResponse
ReadS [DeleteReplicationConfigurationTemplateResponse]
(Int -> ReadS DeleteReplicationConfigurationTemplateResponse)
-> ReadS [DeleteReplicationConfigurationTemplateResponse]
-> ReadPrec DeleteReplicationConfigurationTemplateResponse
-> ReadPrec [DeleteReplicationConfigurationTemplateResponse]
-> Read DeleteReplicationConfigurationTemplateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReplicationConfigurationTemplateResponse]
$creadListPrec :: ReadPrec [DeleteReplicationConfigurationTemplateResponse]
readPrec :: ReadPrec DeleteReplicationConfigurationTemplateResponse
$creadPrec :: ReadPrec DeleteReplicationConfigurationTemplateResponse
readList :: ReadS [DeleteReplicationConfigurationTemplateResponse]
$creadList :: ReadS [DeleteReplicationConfigurationTemplateResponse]
readsPrec :: Int -> ReadS DeleteReplicationConfigurationTemplateResponse
$creadsPrec :: Int -> ReadS DeleteReplicationConfigurationTemplateResponse
Prelude.Read, Int -> DeleteReplicationConfigurationTemplateResponse -> ShowS
[DeleteReplicationConfigurationTemplateResponse] -> ShowS
DeleteReplicationConfigurationTemplateResponse -> String
(Int -> DeleteReplicationConfigurationTemplateResponse -> ShowS)
-> (DeleteReplicationConfigurationTemplateResponse -> String)
-> ([DeleteReplicationConfigurationTemplateResponse] -> ShowS)
-> Show DeleteReplicationConfigurationTemplateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReplicationConfigurationTemplateResponse] -> ShowS
$cshowList :: [DeleteReplicationConfigurationTemplateResponse] -> ShowS
show :: DeleteReplicationConfigurationTemplateResponse -> String
$cshow :: DeleteReplicationConfigurationTemplateResponse -> String
showsPrec :: Int -> DeleteReplicationConfigurationTemplateResponse -> ShowS
$cshowsPrec :: Int -> DeleteReplicationConfigurationTemplateResponse -> ShowS
Prelude.Show, (forall x.
DeleteReplicationConfigurationTemplateResponse
-> Rep DeleteReplicationConfigurationTemplateResponse x)
-> (forall x.
Rep DeleteReplicationConfigurationTemplateResponse x
-> DeleteReplicationConfigurationTemplateResponse)
-> Generic DeleteReplicationConfigurationTemplateResponse
forall x.
Rep DeleteReplicationConfigurationTemplateResponse x
-> DeleteReplicationConfigurationTemplateResponse
forall x.
DeleteReplicationConfigurationTemplateResponse
-> Rep DeleteReplicationConfigurationTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteReplicationConfigurationTemplateResponse x
-> DeleteReplicationConfigurationTemplateResponse
$cfrom :: forall x.
DeleteReplicationConfigurationTemplateResponse
-> Rep DeleteReplicationConfigurationTemplateResponse x
Prelude.Generic)
newDeleteReplicationConfigurationTemplateResponse ::
Prelude.Int ->
DeleteReplicationConfigurationTemplateResponse
newDeleteReplicationConfigurationTemplateResponse :: Int -> DeleteReplicationConfigurationTemplateResponse
newDeleteReplicationConfigurationTemplateResponse
Int
pHttpStatus_ =
DeleteReplicationConfigurationTemplateResponse' :: Int -> DeleteReplicationConfigurationTemplateResponse
DeleteReplicationConfigurationTemplateResponse'
{ $sel:httpStatus:DeleteReplicationConfigurationTemplateResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteReplicationConfigurationTemplateResponse_httpStatus :: Lens.Lens' DeleteReplicationConfigurationTemplateResponse Prelude.Int
deleteReplicationConfigurationTemplateResponse_httpStatus :: (Int -> f Int)
-> DeleteReplicationConfigurationTemplateResponse
-> f DeleteReplicationConfigurationTemplateResponse
deleteReplicationConfigurationTemplateResponse_httpStatus = (DeleteReplicationConfigurationTemplateResponse -> Int)
-> (DeleteReplicationConfigurationTemplateResponse
-> Int -> DeleteReplicationConfigurationTemplateResponse)
-> Lens
DeleteReplicationConfigurationTemplateResponse
DeleteReplicationConfigurationTemplateResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReplicationConfigurationTemplateResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReplicationConfigurationTemplateResponse' :: DeleteReplicationConfigurationTemplateResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteReplicationConfigurationTemplateResponse
s@DeleteReplicationConfigurationTemplateResponse' {} Int
a -> DeleteReplicationConfigurationTemplateResponse
s {$sel:httpStatus:DeleteReplicationConfigurationTemplateResponse' :: Int
httpStatus = Int
a} :: DeleteReplicationConfigurationTemplateResponse)
instance
Prelude.NFData
DeleteReplicationConfigurationTemplateResponse