{-# 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.SESV2.DeleteDedicatedIpPool
(
DeleteDedicatedIpPool (..),
newDeleteDedicatedIpPool,
deleteDedicatedIpPool_poolName,
DeleteDedicatedIpPoolResponse (..),
newDeleteDedicatedIpPoolResponse,
deleteDedicatedIpPoolResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SESV2.Types
data DeleteDedicatedIpPool = DeleteDedicatedIpPool'
{
DeleteDedicatedIpPool -> Text
poolName :: Prelude.Text
}
deriving (DeleteDedicatedIpPool -> DeleteDedicatedIpPool -> Bool
(DeleteDedicatedIpPool -> DeleteDedicatedIpPool -> Bool)
-> (DeleteDedicatedIpPool -> DeleteDedicatedIpPool -> Bool)
-> Eq DeleteDedicatedIpPool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDedicatedIpPool -> DeleteDedicatedIpPool -> Bool
$c/= :: DeleteDedicatedIpPool -> DeleteDedicatedIpPool -> Bool
== :: DeleteDedicatedIpPool -> DeleteDedicatedIpPool -> Bool
$c== :: DeleteDedicatedIpPool -> DeleteDedicatedIpPool -> Bool
Prelude.Eq, ReadPrec [DeleteDedicatedIpPool]
ReadPrec DeleteDedicatedIpPool
Int -> ReadS DeleteDedicatedIpPool
ReadS [DeleteDedicatedIpPool]
(Int -> ReadS DeleteDedicatedIpPool)
-> ReadS [DeleteDedicatedIpPool]
-> ReadPrec DeleteDedicatedIpPool
-> ReadPrec [DeleteDedicatedIpPool]
-> Read DeleteDedicatedIpPool
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDedicatedIpPool]
$creadListPrec :: ReadPrec [DeleteDedicatedIpPool]
readPrec :: ReadPrec DeleteDedicatedIpPool
$creadPrec :: ReadPrec DeleteDedicatedIpPool
readList :: ReadS [DeleteDedicatedIpPool]
$creadList :: ReadS [DeleteDedicatedIpPool]
readsPrec :: Int -> ReadS DeleteDedicatedIpPool
$creadsPrec :: Int -> ReadS DeleteDedicatedIpPool
Prelude.Read, Int -> DeleteDedicatedIpPool -> ShowS
[DeleteDedicatedIpPool] -> ShowS
DeleteDedicatedIpPool -> String
(Int -> DeleteDedicatedIpPool -> ShowS)
-> (DeleteDedicatedIpPool -> String)
-> ([DeleteDedicatedIpPool] -> ShowS)
-> Show DeleteDedicatedIpPool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDedicatedIpPool] -> ShowS
$cshowList :: [DeleteDedicatedIpPool] -> ShowS
show :: DeleteDedicatedIpPool -> String
$cshow :: DeleteDedicatedIpPool -> String
showsPrec :: Int -> DeleteDedicatedIpPool -> ShowS
$cshowsPrec :: Int -> DeleteDedicatedIpPool -> ShowS
Prelude.Show, (forall x. DeleteDedicatedIpPool -> Rep DeleteDedicatedIpPool x)
-> (forall x. Rep DeleteDedicatedIpPool x -> DeleteDedicatedIpPool)
-> Generic DeleteDedicatedIpPool
forall x. Rep DeleteDedicatedIpPool x -> DeleteDedicatedIpPool
forall x. DeleteDedicatedIpPool -> Rep DeleteDedicatedIpPool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteDedicatedIpPool x -> DeleteDedicatedIpPool
$cfrom :: forall x. DeleteDedicatedIpPool -> Rep DeleteDedicatedIpPool x
Prelude.Generic)
newDeleteDedicatedIpPool ::
Prelude.Text ->
DeleteDedicatedIpPool
newDeleteDedicatedIpPool :: Text -> DeleteDedicatedIpPool
newDeleteDedicatedIpPool Text
pPoolName_ =
DeleteDedicatedIpPool' :: Text -> DeleteDedicatedIpPool
DeleteDedicatedIpPool' {$sel:poolName:DeleteDedicatedIpPool' :: Text
poolName = Text
pPoolName_}
deleteDedicatedIpPool_poolName :: Lens.Lens' DeleteDedicatedIpPool Prelude.Text
deleteDedicatedIpPool_poolName :: (Text -> f Text)
-> DeleteDedicatedIpPool -> f DeleteDedicatedIpPool
deleteDedicatedIpPool_poolName = (DeleteDedicatedIpPool -> Text)
-> (DeleteDedicatedIpPool -> Text -> DeleteDedicatedIpPool)
-> Lens DeleteDedicatedIpPool DeleteDedicatedIpPool Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDedicatedIpPool' {Text
poolName :: Text
$sel:poolName:DeleteDedicatedIpPool' :: DeleteDedicatedIpPool -> Text
poolName} -> Text
poolName) (\s :: DeleteDedicatedIpPool
s@DeleteDedicatedIpPool' {} Text
a -> DeleteDedicatedIpPool
s {$sel:poolName:DeleteDedicatedIpPool' :: Text
poolName = Text
a} :: DeleteDedicatedIpPool)
instance Core.AWSRequest DeleteDedicatedIpPool where
type
AWSResponse DeleteDedicatedIpPool =
DeleteDedicatedIpPoolResponse
request :: DeleteDedicatedIpPool -> Request DeleteDedicatedIpPool
request = Service -> DeleteDedicatedIpPool -> Request DeleteDedicatedIpPool
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteDedicatedIpPool
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDedicatedIpPool)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteDedicatedIpPool))
-> Logger
-> Service
-> Proxy DeleteDedicatedIpPool
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDedicatedIpPool)))
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 -> DeleteDedicatedIpPoolResponse
DeleteDedicatedIpPoolResponse'
(Int -> DeleteDedicatedIpPoolResponse)
-> Either String Int -> Either String DeleteDedicatedIpPoolResponse
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 DeleteDedicatedIpPool
instance Prelude.NFData DeleteDedicatedIpPool
instance Core.ToHeaders DeleteDedicatedIpPool where
toHeaders :: DeleteDedicatedIpPool -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteDedicatedIpPool -> 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.ToPath DeleteDedicatedIpPool where
toPath :: DeleteDedicatedIpPool -> ByteString
toPath DeleteDedicatedIpPool' {Text
poolName :: Text
$sel:poolName:DeleteDedicatedIpPool' :: DeleteDedicatedIpPool -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/v2/email/dedicated-ip-pools/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
poolName]
instance Core.ToQuery DeleteDedicatedIpPool where
toQuery :: DeleteDedicatedIpPool -> QueryString
toQuery = QueryString -> DeleteDedicatedIpPool -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteDedicatedIpPoolResponse = DeleteDedicatedIpPoolResponse'
{
DeleteDedicatedIpPoolResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteDedicatedIpPoolResponse
-> DeleteDedicatedIpPoolResponse -> Bool
(DeleteDedicatedIpPoolResponse
-> DeleteDedicatedIpPoolResponse -> Bool)
-> (DeleteDedicatedIpPoolResponse
-> DeleteDedicatedIpPoolResponse -> Bool)
-> Eq DeleteDedicatedIpPoolResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDedicatedIpPoolResponse
-> DeleteDedicatedIpPoolResponse -> Bool
$c/= :: DeleteDedicatedIpPoolResponse
-> DeleteDedicatedIpPoolResponse -> Bool
== :: DeleteDedicatedIpPoolResponse
-> DeleteDedicatedIpPoolResponse -> Bool
$c== :: DeleteDedicatedIpPoolResponse
-> DeleteDedicatedIpPoolResponse -> Bool
Prelude.Eq, ReadPrec [DeleteDedicatedIpPoolResponse]
ReadPrec DeleteDedicatedIpPoolResponse
Int -> ReadS DeleteDedicatedIpPoolResponse
ReadS [DeleteDedicatedIpPoolResponse]
(Int -> ReadS DeleteDedicatedIpPoolResponse)
-> ReadS [DeleteDedicatedIpPoolResponse]
-> ReadPrec DeleteDedicatedIpPoolResponse
-> ReadPrec [DeleteDedicatedIpPoolResponse]
-> Read DeleteDedicatedIpPoolResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDedicatedIpPoolResponse]
$creadListPrec :: ReadPrec [DeleteDedicatedIpPoolResponse]
readPrec :: ReadPrec DeleteDedicatedIpPoolResponse
$creadPrec :: ReadPrec DeleteDedicatedIpPoolResponse
readList :: ReadS [DeleteDedicatedIpPoolResponse]
$creadList :: ReadS [DeleteDedicatedIpPoolResponse]
readsPrec :: Int -> ReadS DeleteDedicatedIpPoolResponse
$creadsPrec :: Int -> ReadS DeleteDedicatedIpPoolResponse
Prelude.Read, Int -> DeleteDedicatedIpPoolResponse -> ShowS
[DeleteDedicatedIpPoolResponse] -> ShowS
DeleteDedicatedIpPoolResponse -> String
(Int -> DeleteDedicatedIpPoolResponse -> ShowS)
-> (DeleteDedicatedIpPoolResponse -> String)
-> ([DeleteDedicatedIpPoolResponse] -> ShowS)
-> Show DeleteDedicatedIpPoolResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDedicatedIpPoolResponse] -> ShowS
$cshowList :: [DeleteDedicatedIpPoolResponse] -> ShowS
show :: DeleteDedicatedIpPoolResponse -> String
$cshow :: DeleteDedicatedIpPoolResponse -> String
showsPrec :: Int -> DeleteDedicatedIpPoolResponse -> ShowS
$cshowsPrec :: Int -> DeleteDedicatedIpPoolResponse -> ShowS
Prelude.Show, (forall x.
DeleteDedicatedIpPoolResponse
-> Rep DeleteDedicatedIpPoolResponse x)
-> (forall x.
Rep DeleteDedicatedIpPoolResponse x
-> DeleteDedicatedIpPoolResponse)
-> Generic DeleteDedicatedIpPoolResponse
forall x.
Rep DeleteDedicatedIpPoolResponse x
-> DeleteDedicatedIpPoolResponse
forall x.
DeleteDedicatedIpPoolResponse
-> Rep DeleteDedicatedIpPoolResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDedicatedIpPoolResponse x
-> DeleteDedicatedIpPoolResponse
$cfrom :: forall x.
DeleteDedicatedIpPoolResponse
-> Rep DeleteDedicatedIpPoolResponse x
Prelude.Generic)
newDeleteDedicatedIpPoolResponse ::
Prelude.Int ->
DeleteDedicatedIpPoolResponse
newDeleteDedicatedIpPoolResponse :: Int -> DeleteDedicatedIpPoolResponse
newDeleteDedicatedIpPoolResponse Int
pHttpStatus_ =
DeleteDedicatedIpPoolResponse' :: Int -> DeleteDedicatedIpPoolResponse
DeleteDedicatedIpPoolResponse'
{ $sel:httpStatus:DeleteDedicatedIpPoolResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteDedicatedIpPoolResponse_httpStatus :: Lens.Lens' DeleteDedicatedIpPoolResponse Prelude.Int
deleteDedicatedIpPoolResponse_httpStatus :: (Int -> f Int)
-> DeleteDedicatedIpPoolResponse -> f DeleteDedicatedIpPoolResponse
deleteDedicatedIpPoolResponse_httpStatus = (DeleteDedicatedIpPoolResponse -> Int)
-> (DeleteDedicatedIpPoolResponse
-> Int -> DeleteDedicatedIpPoolResponse)
-> Lens
DeleteDedicatedIpPoolResponse DeleteDedicatedIpPoolResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDedicatedIpPoolResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteDedicatedIpPoolResponse' :: DeleteDedicatedIpPoolResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteDedicatedIpPoolResponse
s@DeleteDedicatedIpPoolResponse' {} Int
a -> DeleteDedicatedIpPoolResponse
s {$sel:httpStatus:DeleteDedicatedIpPoolResponse' :: Int
httpStatus = Int
a} :: DeleteDedicatedIpPoolResponse)
instance Prelude.NFData DeleteDedicatedIpPoolResponse