{-# 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.Route53RecoveryControlConfig.DeleteRoutingControl
(
DeleteRoutingControl (..),
newDeleteRoutingControl,
deleteRoutingControl_routingControlArn,
DeleteRoutingControlResponse (..),
newDeleteRoutingControlResponse,
deleteRoutingControlResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Route53RecoveryControlConfig.Types
data DeleteRoutingControl = DeleteRoutingControl'
{
DeleteRoutingControl -> Text
routingControlArn :: Prelude.Text
}
deriving (DeleteRoutingControl -> DeleteRoutingControl -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRoutingControl -> DeleteRoutingControl -> Bool
$c/= :: DeleteRoutingControl -> DeleteRoutingControl -> Bool
== :: DeleteRoutingControl -> DeleteRoutingControl -> Bool
$c== :: DeleteRoutingControl -> DeleteRoutingControl -> Bool
Prelude.Eq, ReadPrec [DeleteRoutingControl]
ReadPrec DeleteRoutingControl
Int -> ReadS DeleteRoutingControl
ReadS [DeleteRoutingControl]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRoutingControl]
$creadListPrec :: ReadPrec [DeleteRoutingControl]
readPrec :: ReadPrec DeleteRoutingControl
$creadPrec :: ReadPrec DeleteRoutingControl
readList :: ReadS [DeleteRoutingControl]
$creadList :: ReadS [DeleteRoutingControl]
readsPrec :: Int -> ReadS DeleteRoutingControl
$creadsPrec :: Int -> ReadS DeleteRoutingControl
Prelude.Read, Int -> DeleteRoutingControl -> ShowS
[DeleteRoutingControl] -> ShowS
DeleteRoutingControl -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRoutingControl] -> ShowS
$cshowList :: [DeleteRoutingControl] -> ShowS
show :: DeleteRoutingControl -> String
$cshow :: DeleteRoutingControl -> String
showsPrec :: Int -> DeleteRoutingControl -> ShowS
$cshowsPrec :: Int -> DeleteRoutingControl -> ShowS
Prelude.Show, forall x. Rep DeleteRoutingControl x -> DeleteRoutingControl
forall x. DeleteRoutingControl -> Rep DeleteRoutingControl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteRoutingControl x -> DeleteRoutingControl
$cfrom :: forall x. DeleteRoutingControl -> Rep DeleteRoutingControl x
Prelude.Generic)
newDeleteRoutingControl ::
Prelude.Text ->
DeleteRoutingControl
newDeleteRoutingControl :: Text -> DeleteRoutingControl
newDeleteRoutingControl Text
pRoutingControlArn_ =
DeleteRoutingControl'
{ $sel:routingControlArn:DeleteRoutingControl' :: Text
routingControlArn =
Text
pRoutingControlArn_
}
deleteRoutingControl_routingControlArn :: Lens.Lens' DeleteRoutingControl Prelude.Text
deleteRoutingControl_routingControlArn :: Lens' DeleteRoutingControl Text
deleteRoutingControl_routingControlArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRoutingControl' {Text
routingControlArn :: Text
$sel:routingControlArn:DeleteRoutingControl' :: DeleteRoutingControl -> Text
routingControlArn} -> Text
routingControlArn) (\s :: DeleteRoutingControl
s@DeleteRoutingControl' {} Text
a -> DeleteRoutingControl
s {$sel:routingControlArn:DeleteRoutingControl' :: Text
routingControlArn = Text
a} :: DeleteRoutingControl)
instance Core.AWSRequest DeleteRoutingControl where
type
AWSResponse DeleteRoutingControl =
DeleteRoutingControlResponse
request :: (Service -> Service)
-> DeleteRoutingControl -> Request DeleteRoutingControl
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteRoutingControl
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRoutingControl)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteRoutingControlResponse
DeleteRoutingControlResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteRoutingControl where
hashWithSalt :: Int -> DeleteRoutingControl -> Int
hashWithSalt Int
_salt DeleteRoutingControl' {Text
routingControlArn :: Text
$sel:routingControlArn:DeleteRoutingControl' :: DeleteRoutingControl -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
routingControlArn
instance Prelude.NFData DeleteRoutingControl where
rnf :: DeleteRoutingControl -> ()
rnf DeleteRoutingControl' {Text
routingControlArn :: Text
$sel:routingControlArn:DeleteRoutingControl' :: DeleteRoutingControl -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
routingControlArn
instance Data.ToHeaders DeleteRoutingControl where
toHeaders :: DeleteRoutingControl -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DeleteRoutingControl where
toPath :: DeleteRoutingControl -> ByteString
toPath DeleteRoutingControl' {Text
routingControlArn :: Text
$sel:routingControlArn:DeleteRoutingControl' :: DeleteRoutingControl -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/routingcontrol/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
routingControlArn]
instance Data.ToQuery DeleteRoutingControl where
toQuery :: DeleteRoutingControl -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteRoutingControlResponse = DeleteRoutingControlResponse'
{
DeleteRoutingControlResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteRoutingControlResponse
-> DeleteRoutingControlResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRoutingControlResponse
-> DeleteRoutingControlResponse -> Bool
$c/= :: DeleteRoutingControlResponse
-> DeleteRoutingControlResponse -> Bool
== :: DeleteRoutingControlResponse
-> DeleteRoutingControlResponse -> Bool
$c== :: DeleteRoutingControlResponse
-> DeleteRoutingControlResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRoutingControlResponse]
ReadPrec DeleteRoutingControlResponse
Int -> ReadS DeleteRoutingControlResponse
ReadS [DeleteRoutingControlResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRoutingControlResponse]
$creadListPrec :: ReadPrec [DeleteRoutingControlResponse]
readPrec :: ReadPrec DeleteRoutingControlResponse
$creadPrec :: ReadPrec DeleteRoutingControlResponse
readList :: ReadS [DeleteRoutingControlResponse]
$creadList :: ReadS [DeleteRoutingControlResponse]
readsPrec :: Int -> ReadS DeleteRoutingControlResponse
$creadsPrec :: Int -> ReadS DeleteRoutingControlResponse
Prelude.Read, Int -> DeleteRoutingControlResponse -> ShowS
[DeleteRoutingControlResponse] -> ShowS
DeleteRoutingControlResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRoutingControlResponse] -> ShowS
$cshowList :: [DeleteRoutingControlResponse] -> ShowS
show :: DeleteRoutingControlResponse -> String
$cshow :: DeleteRoutingControlResponse -> String
showsPrec :: Int -> DeleteRoutingControlResponse -> ShowS
$cshowsPrec :: Int -> DeleteRoutingControlResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteRoutingControlResponse x -> DeleteRoutingControlResponse
forall x.
DeleteRoutingControlResponse -> Rep DeleteRoutingControlResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRoutingControlResponse x -> DeleteRoutingControlResponse
$cfrom :: forall x.
DeleteRoutingControlResponse -> Rep DeleteRoutingControlResponse x
Prelude.Generic)
newDeleteRoutingControlResponse ::
Prelude.Int ->
DeleteRoutingControlResponse
newDeleteRoutingControlResponse :: Int -> DeleteRoutingControlResponse
newDeleteRoutingControlResponse Int
pHttpStatus_ =
DeleteRoutingControlResponse'
{ $sel:httpStatus:DeleteRoutingControlResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteRoutingControlResponse_httpStatus :: Lens.Lens' DeleteRoutingControlResponse Prelude.Int
deleteRoutingControlResponse_httpStatus :: Lens' DeleteRoutingControlResponse Int
deleteRoutingControlResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRoutingControlResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteRoutingControlResponse' :: DeleteRoutingControlResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteRoutingControlResponse
s@DeleteRoutingControlResponse' {} Int
a -> DeleteRoutingControlResponse
s {$sel:httpStatus:DeleteRoutingControlResponse' :: Int
httpStatus = Int
a} :: DeleteRoutingControlResponse)
instance Prelude.NFData DeleteRoutingControlResponse where
rnf :: DeleteRoutingControlResponse -> ()
rnf DeleteRoutingControlResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteRoutingControlResponse' :: DeleteRoutingControlResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus