{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SES.DeleteVerifiedEmailAddress
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deprecated. Use the @DeleteIdentity@ operation to delete email addresses
-- and domains.
module Amazonka.SES.DeleteVerifiedEmailAddress
  ( -- * Creating a Request
    DeleteVerifiedEmailAddress (..),
    newDeleteVerifiedEmailAddress,

    -- * Request Lenses
    deleteVerifiedEmailAddress_emailAddress,

    -- * Destructuring the Response
    DeleteVerifiedEmailAddressResponse (..),
    newDeleteVerifiedEmailAddressResponse,
  )
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.SES.Types

-- | Represents a request to delete an email address from the list of email
-- addresses you have attempted to verify under your AWS account.
--
-- /See:/ 'newDeleteVerifiedEmailAddress' smart constructor.
data DeleteVerifiedEmailAddress = DeleteVerifiedEmailAddress'
  { -- | An email address to be removed from the list of verified addresses.
    DeleteVerifiedEmailAddress -> Text
emailAddress :: Prelude.Text
  }
  deriving (DeleteVerifiedEmailAddress -> DeleteVerifiedEmailAddress -> Bool
(DeleteVerifiedEmailAddress -> DeleteVerifiedEmailAddress -> Bool)
-> (DeleteVerifiedEmailAddress
    -> DeleteVerifiedEmailAddress -> Bool)
-> Eq DeleteVerifiedEmailAddress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVerifiedEmailAddress -> DeleteVerifiedEmailAddress -> Bool
$c/= :: DeleteVerifiedEmailAddress -> DeleteVerifiedEmailAddress -> Bool
== :: DeleteVerifiedEmailAddress -> DeleteVerifiedEmailAddress -> Bool
$c== :: DeleteVerifiedEmailAddress -> DeleteVerifiedEmailAddress -> Bool
Prelude.Eq, ReadPrec [DeleteVerifiedEmailAddress]
ReadPrec DeleteVerifiedEmailAddress
Int -> ReadS DeleteVerifiedEmailAddress
ReadS [DeleteVerifiedEmailAddress]
(Int -> ReadS DeleteVerifiedEmailAddress)
-> ReadS [DeleteVerifiedEmailAddress]
-> ReadPrec DeleteVerifiedEmailAddress
-> ReadPrec [DeleteVerifiedEmailAddress]
-> Read DeleteVerifiedEmailAddress
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVerifiedEmailAddress]
$creadListPrec :: ReadPrec [DeleteVerifiedEmailAddress]
readPrec :: ReadPrec DeleteVerifiedEmailAddress
$creadPrec :: ReadPrec DeleteVerifiedEmailAddress
readList :: ReadS [DeleteVerifiedEmailAddress]
$creadList :: ReadS [DeleteVerifiedEmailAddress]
readsPrec :: Int -> ReadS DeleteVerifiedEmailAddress
$creadsPrec :: Int -> ReadS DeleteVerifiedEmailAddress
Prelude.Read, Int -> DeleteVerifiedEmailAddress -> ShowS
[DeleteVerifiedEmailAddress] -> ShowS
DeleteVerifiedEmailAddress -> String
(Int -> DeleteVerifiedEmailAddress -> ShowS)
-> (DeleteVerifiedEmailAddress -> String)
-> ([DeleteVerifiedEmailAddress] -> ShowS)
-> Show DeleteVerifiedEmailAddress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVerifiedEmailAddress] -> ShowS
$cshowList :: [DeleteVerifiedEmailAddress] -> ShowS
show :: DeleteVerifiedEmailAddress -> String
$cshow :: DeleteVerifiedEmailAddress -> String
showsPrec :: Int -> DeleteVerifiedEmailAddress -> ShowS
$cshowsPrec :: Int -> DeleteVerifiedEmailAddress -> ShowS
Prelude.Show, (forall x.
 DeleteVerifiedEmailAddress -> Rep DeleteVerifiedEmailAddress x)
-> (forall x.
    Rep DeleteVerifiedEmailAddress x -> DeleteVerifiedEmailAddress)
-> Generic DeleteVerifiedEmailAddress
forall x.
Rep DeleteVerifiedEmailAddress x -> DeleteVerifiedEmailAddress
forall x.
DeleteVerifiedEmailAddress -> Rep DeleteVerifiedEmailAddress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVerifiedEmailAddress x -> DeleteVerifiedEmailAddress
$cfrom :: forall x.
DeleteVerifiedEmailAddress -> Rep DeleteVerifiedEmailAddress x
Prelude.Generic)

-- |
-- Create a value of 'DeleteVerifiedEmailAddress' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'emailAddress', 'deleteVerifiedEmailAddress_emailAddress' - An email address to be removed from the list of verified addresses.
newDeleteVerifiedEmailAddress ::
  -- | 'emailAddress'
  Prelude.Text ->
  DeleteVerifiedEmailAddress
newDeleteVerifiedEmailAddress :: Text -> DeleteVerifiedEmailAddress
newDeleteVerifiedEmailAddress Text
pEmailAddress_ =
  DeleteVerifiedEmailAddress' :: Text -> DeleteVerifiedEmailAddress
DeleteVerifiedEmailAddress'
    { $sel:emailAddress:DeleteVerifiedEmailAddress' :: Text
emailAddress =
        Text
pEmailAddress_
    }

-- | An email address to be removed from the list of verified addresses.
deleteVerifiedEmailAddress_emailAddress :: Lens.Lens' DeleteVerifiedEmailAddress Prelude.Text
deleteVerifiedEmailAddress_emailAddress :: (Text -> f Text)
-> DeleteVerifiedEmailAddress -> f DeleteVerifiedEmailAddress
deleteVerifiedEmailAddress_emailAddress = (DeleteVerifiedEmailAddress -> Text)
-> (DeleteVerifiedEmailAddress
    -> Text -> DeleteVerifiedEmailAddress)
-> Lens
     DeleteVerifiedEmailAddress DeleteVerifiedEmailAddress Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVerifiedEmailAddress' {Text
emailAddress :: Text
$sel:emailAddress:DeleteVerifiedEmailAddress' :: DeleteVerifiedEmailAddress -> Text
emailAddress} -> Text
emailAddress) (\s :: DeleteVerifiedEmailAddress
s@DeleteVerifiedEmailAddress' {} Text
a -> DeleteVerifiedEmailAddress
s {$sel:emailAddress:DeleteVerifiedEmailAddress' :: Text
emailAddress = Text
a} :: DeleteVerifiedEmailAddress)

instance Core.AWSRequest DeleteVerifiedEmailAddress where
  type
    AWSResponse DeleteVerifiedEmailAddress =
      DeleteVerifiedEmailAddressResponse
  request :: DeleteVerifiedEmailAddress -> Request DeleteVerifiedEmailAddress
request = Service
-> DeleteVerifiedEmailAddress -> Request DeleteVerifiedEmailAddress
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteVerifiedEmailAddress
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteVerifiedEmailAddress)))
response =
    AWSResponse DeleteVerifiedEmailAddress
-> Logger
-> Service
-> Proxy DeleteVerifiedEmailAddress
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteVerifiedEmailAddress)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse DeleteVerifiedEmailAddress
DeleteVerifiedEmailAddressResponse
DeleteVerifiedEmailAddressResponse'

instance Prelude.Hashable DeleteVerifiedEmailAddress

instance Prelude.NFData DeleteVerifiedEmailAddress

instance Core.ToHeaders DeleteVerifiedEmailAddress where
  toHeaders :: DeleteVerifiedEmailAddress -> [Header]
toHeaders = [Header] -> DeleteVerifiedEmailAddress -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DeleteVerifiedEmailAddress where
  toPath :: DeleteVerifiedEmailAddress -> ByteString
toPath = ByteString -> DeleteVerifiedEmailAddress -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DeleteVerifiedEmailAddress where
  toQuery :: DeleteVerifiedEmailAddress -> QueryString
toQuery DeleteVerifiedEmailAddress' {Text
emailAddress :: Text
$sel:emailAddress:DeleteVerifiedEmailAddress' :: DeleteVerifiedEmailAddress -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteVerifiedEmailAddress" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
        ByteString
"EmailAddress" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
emailAddress
      ]

-- | /See:/ 'newDeleteVerifiedEmailAddressResponse' smart constructor.
data DeleteVerifiedEmailAddressResponse = DeleteVerifiedEmailAddressResponse'
  {
  }
  deriving (DeleteVerifiedEmailAddressResponse
-> DeleteVerifiedEmailAddressResponse -> Bool
(DeleteVerifiedEmailAddressResponse
 -> DeleteVerifiedEmailAddressResponse -> Bool)
-> (DeleteVerifiedEmailAddressResponse
    -> DeleteVerifiedEmailAddressResponse -> Bool)
-> Eq DeleteVerifiedEmailAddressResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVerifiedEmailAddressResponse
-> DeleteVerifiedEmailAddressResponse -> Bool
$c/= :: DeleteVerifiedEmailAddressResponse
-> DeleteVerifiedEmailAddressResponse -> Bool
== :: DeleteVerifiedEmailAddressResponse
-> DeleteVerifiedEmailAddressResponse -> Bool
$c== :: DeleteVerifiedEmailAddressResponse
-> DeleteVerifiedEmailAddressResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVerifiedEmailAddressResponse]
ReadPrec DeleteVerifiedEmailAddressResponse
Int -> ReadS DeleteVerifiedEmailAddressResponse
ReadS [DeleteVerifiedEmailAddressResponse]
(Int -> ReadS DeleteVerifiedEmailAddressResponse)
-> ReadS [DeleteVerifiedEmailAddressResponse]
-> ReadPrec DeleteVerifiedEmailAddressResponse
-> ReadPrec [DeleteVerifiedEmailAddressResponse]
-> Read DeleteVerifiedEmailAddressResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVerifiedEmailAddressResponse]
$creadListPrec :: ReadPrec [DeleteVerifiedEmailAddressResponse]
readPrec :: ReadPrec DeleteVerifiedEmailAddressResponse
$creadPrec :: ReadPrec DeleteVerifiedEmailAddressResponse
readList :: ReadS [DeleteVerifiedEmailAddressResponse]
$creadList :: ReadS [DeleteVerifiedEmailAddressResponse]
readsPrec :: Int -> ReadS DeleteVerifiedEmailAddressResponse
$creadsPrec :: Int -> ReadS DeleteVerifiedEmailAddressResponse
Prelude.Read, Int -> DeleteVerifiedEmailAddressResponse -> ShowS
[DeleteVerifiedEmailAddressResponse] -> ShowS
DeleteVerifiedEmailAddressResponse -> String
(Int -> DeleteVerifiedEmailAddressResponse -> ShowS)
-> (DeleteVerifiedEmailAddressResponse -> String)
-> ([DeleteVerifiedEmailAddressResponse] -> ShowS)
-> Show DeleteVerifiedEmailAddressResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVerifiedEmailAddressResponse] -> ShowS
$cshowList :: [DeleteVerifiedEmailAddressResponse] -> ShowS
show :: DeleteVerifiedEmailAddressResponse -> String
$cshow :: DeleteVerifiedEmailAddressResponse -> String
showsPrec :: Int -> DeleteVerifiedEmailAddressResponse -> ShowS
$cshowsPrec :: Int -> DeleteVerifiedEmailAddressResponse -> ShowS
Prelude.Show, (forall x.
 DeleteVerifiedEmailAddressResponse
 -> Rep DeleteVerifiedEmailAddressResponse x)
-> (forall x.
    Rep DeleteVerifiedEmailAddressResponse x
    -> DeleteVerifiedEmailAddressResponse)
-> Generic DeleteVerifiedEmailAddressResponse
forall x.
Rep DeleteVerifiedEmailAddressResponse x
-> DeleteVerifiedEmailAddressResponse
forall x.
DeleteVerifiedEmailAddressResponse
-> Rep DeleteVerifiedEmailAddressResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVerifiedEmailAddressResponse x
-> DeleteVerifiedEmailAddressResponse
$cfrom :: forall x.
DeleteVerifiedEmailAddressResponse
-> Rep DeleteVerifiedEmailAddressResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteVerifiedEmailAddressResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newDeleteVerifiedEmailAddressResponse ::
  DeleteVerifiedEmailAddressResponse
newDeleteVerifiedEmailAddressResponse :: DeleteVerifiedEmailAddressResponse
newDeleteVerifiedEmailAddressResponse =
  DeleteVerifiedEmailAddressResponse
DeleteVerifiedEmailAddressResponse'

instance
  Prelude.NFData
    DeleteVerifiedEmailAddressResponse