{-# 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.DeleteEmailIdentity
(
DeleteEmailIdentity (..),
newDeleteEmailIdentity,
deleteEmailIdentity_emailIdentity,
DeleteEmailIdentityResponse (..),
newDeleteEmailIdentityResponse,
deleteEmailIdentityResponse_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.SESV2.Types
data DeleteEmailIdentity = DeleteEmailIdentity'
{
DeleteEmailIdentity -> Text
emailIdentity :: Prelude.Text
}
deriving (DeleteEmailIdentity -> DeleteEmailIdentity -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEmailIdentity -> DeleteEmailIdentity -> Bool
$c/= :: DeleteEmailIdentity -> DeleteEmailIdentity -> Bool
== :: DeleteEmailIdentity -> DeleteEmailIdentity -> Bool
$c== :: DeleteEmailIdentity -> DeleteEmailIdentity -> Bool
Prelude.Eq, ReadPrec [DeleteEmailIdentity]
ReadPrec DeleteEmailIdentity
Int -> ReadS DeleteEmailIdentity
ReadS [DeleteEmailIdentity]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEmailIdentity]
$creadListPrec :: ReadPrec [DeleteEmailIdentity]
readPrec :: ReadPrec DeleteEmailIdentity
$creadPrec :: ReadPrec DeleteEmailIdentity
readList :: ReadS [DeleteEmailIdentity]
$creadList :: ReadS [DeleteEmailIdentity]
readsPrec :: Int -> ReadS DeleteEmailIdentity
$creadsPrec :: Int -> ReadS DeleteEmailIdentity
Prelude.Read, Int -> DeleteEmailIdentity -> ShowS
[DeleteEmailIdentity] -> ShowS
DeleteEmailIdentity -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEmailIdentity] -> ShowS
$cshowList :: [DeleteEmailIdentity] -> ShowS
show :: DeleteEmailIdentity -> String
$cshow :: DeleteEmailIdentity -> String
showsPrec :: Int -> DeleteEmailIdentity -> ShowS
$cshowsPrec :: Int -> DeleteEmailIdentity -> ShowS
Prelude.Show, forall x. Rep DeleteEmailIdentity x -> DeleteEmailIdentity
forall x. DeleteEmailIdentity -> Rep DeleteEmailIdentity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteEmailIdentity x -> DeleteEmailIdentity
$cfrom :: forall x. DeleteEmailIdentity -> Rep DeleteEmailIdentity x
Prelude.Generic)
newDeleteEmailIdentity ::
Prelude.Text ->
DeleteEmailIdentity
newDeleteEmailIdentity :: Text -> DeleteEmailIdentity
newDeleteEmailIdentity Text
pEmailIdentity_ =
DeleteEmailIdentity'
{ $sel:emailIdentity:DeleteEmailIdentity' :: Text
emailIdentity =
Text
pEmailIdentity_
}
deleteEmailIdentity_emailIdentity :: Lens.Lens' DeleteEmailIdentity Prelude.Text
deleteEmailIdentity_emailIdentity :: Lens' DeleteEmailIdentity Text
deleteEmailIdentity_emailIdentity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEmailIdentity' {Text
emailIdentity :: Text
$sel:emailIdentity:DeleteEmailIdentity' :: DeleteEmailIdentity -> Text
emailIdentity} -> Text
emailIdentity) (\s :: DeleteEmailIdentity
s@DeleteEmailIdentity' {} Text
a -> DeleteEmailIdentity
s {$sel:emailIdentity:DeleteEmailIdentity' :: Text
emailIdentity = Text
a} :: DeleteEmailIdentity)
instance Core.AWSRequest DeleteEmailIdentity where
type
AWSResponse DeleteEmailIdentity =
DeleteEmailIdentityResponse
request :: (Service -> Service)
-> DeleteEmailIdentity -> Request DeleteEmailIdentity
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 DeleteEmailIdentity
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteEmailIdentity)))
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 -> DeleteEmailIdentityResponse
DeleteEmailIdentityResponse'
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 DeleteEmailIdentity where
hashWithSalt :: Int -> DeleteEmailIdentity -> Int
hashWithSalt Int
_salt DeleteEmailIdentity' {Text
emailIdentity :: Text
$sel:emailIdentity:DeleteEmailIdentity' :: DeleteEmailIdentity -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
emailIdentity
instance Prelude.NFData DeleteEmailIdentity where
rnf :: DeleteEmailIdentity -> ()
rnf DeleteEmailIdentity' {Text
emailIdentity :: Text
$sel:emailIdentity:DeleteEmailIdentity' :: DeleteEmailIdentity -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
emailIdentity
instance Data.ToHeaders DeleteEmailIdentity where
toHeaders :: DeleteEmailIdentity -> 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 DeleteEmailIdentity where
toPath :: DeleteEmailIdentity -> ByteString
toPath DeleteEmailIdentity' {Text
emailIdentity :: Text
$sel:emailIdentity:DeleteEmailIdentity' :: DeleteEmailIdentity -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/v2/email/identities/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
emailIdentity]
instance Data.ToQuery DeleteEmailIdentity where
toQuery :: DeleteEmailIdentity -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteEmailIdentityResponse = DeleteEmailIdentityResponse'
{
DeleteEmailIdentityResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteEmailIdentityResponse -> DeleteEmailIdentityResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEmailIdentityResponse -> DeleteEmailIdentityResponse -> Bool
$c/= :: DeleteEmailIdentityResponse -> DeleteEmailIdentityResponse -> Bool
== :: DeleteEmailIdentityResponse -> DeleteEmailIdentityResponse -> Bool
$c== :: DeleteEmailIdentityResponse -> DeleteEmailIdentityResponse -> Bool
Prelude.Eq, ReadPrec [DeleteEmailIdentityResponse]
ReadPrec DeleteEmailIdentityResponse
Int -> ReadS DeleteEmailIdentityResponse
ReadS [DeleteEmailIdentityResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEmailIdentityResponse]
$creadListPrec :: ReadPrec [DeleteEmailIdentityResponse]
readPrec :: ReadPrec DeleteEmailIdentityResponse
$creadPrec :: ReadPrec DeleteEmailIdentityResponse
readList :: ReadS [DeleteEmailIdentityResponse]
$creadList :: ReadS [DeleteEmailIdentityResponse]
readsPrec :: Int -> ReadS DeleteEmailIdentityResponse
$creadsPrec :: Int -> ReadS DeleteEmailIdentityResponse
Prelude.Read, Int -> DeleteEmailIdentityResponse -> ShowS
[DeleteEmailIdentityResponse] -> ShowS
DeleteEmailIdentityResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEmailIdentityResponse] -> ShowS
$cshowList :: [DeleteEmailIdentityResponse] -> ShowS
show :: DeleteEmailIdentityResponse -> String
$cshow :: DeleteEmailIdentityResponse -> String
showsPrec :: Int -> DeleteEmailIdentityResponse -> ShowS
$cshowsPrec :: Int -> DeleteEmailIdentityResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteEmailIdentityResponse x -> DeleteEmailIdentityResponse
forall x.
DeleteEmailIdentityResponse -> Rep DeleteEmailIdentityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteEmailIdentityResponse x -> DeleteEmailIdentityResponse
$cfrom :: forall x.
DeleteEmailIdentityResponse -> Rep DeleteEmailIdentityResponse x
Prelude.Generic)
newDeleteEmailIdentityResponse ::
Prelude.Int ->
DeleteEmailIdentityResponse
newDeleteEmailIdentityResponse :: Int -> DeleteEmailIdentityResponse
newDeleteEmailIdentityResponse Int
pHttpStatus_ =
DeleteEmailIdentityResponse'
{ $sel:httpStatus:DeleteEmailIdentityResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteEmailIdentityResponse_httpStatus :: Lens.Lens' DeleteEmailIdentityResponse Prelude.Int
deleteEmailIdentityResponse_httpStatus :: Lens' DeleteEmailIdentityResponse Int
deleteEmailIdentityResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEmailIdentityResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteEmailIdentityResponse' :: DeleteEmailIdentityResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteEmailIdentityResponse
s@DeleteEmailIdentityResponse' {} Int
a -> DeleteEmailIdentityResponse
s {$sel:httpStatus:DeleteEmailIdentityResponse' :: Int
httpStatus = Int
a} :: DeleteEmailIdentityResponse)
instance Prelude.NFData DeleteEmailIdentityResponse where
rnf :: DeleteEmailIdentityResponse -> ()
rnf DeleteEmailIdentityResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteEmailIdentityResponse' :: DeleteEmailIdentityResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus