{-# 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.PinpointSMSVoice.DeleteConfigurationSetEventDestination
(
DeleteConfigurationSetEventDestination (..),
newDeleteConfigurationSetEventDestination,
deleteConfigurationSetEventDestination_eventDestinationName,
deleteConfigurationSetEventDestination_configurationSetName,
DeleteConfigurationSetEventDestinationResponse (..),
newDeleteConfigurationSetEventDestinationResponse,
deleteConfigurationSetEventDestinationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.PinpointSMSVoice.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteConfigurationSetEventDestination = DeleteConfigurationSetEventDestination'
{
DeleteConfigurationSetEventDestination -> Text
eventDestinationName :: Prelude.Text,
DeleteConfigurationSetEventDestination -> Text
configurationSetName :: Prelude.Text
}
deriving (DeleteConfigurationSetEventDestination
-> DeleteConfigurationSetEventDestination -> Bool
(DeleteConfigurationSetEventDestination
-> DeleteConfigurationSetEventDestination -> Bool)
-> (DeleteConfigurationSetEventDestination
-> DeleteConfigurationSetEventDestination -> Bool)
-> Eq DeleteConfigurationSetEventDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteConfigurationSetEventDestination
-> DeleteConfigurationSetEventDestination -> Bool
$c/= :: DeleteConfigurationSetEventDestination
-> DeleteConfigurationSetEventDestination -> Bool
== :: DeleteConfigurationSetEventDestination
-> DeleteConfigurationSetEventDestination -> Bool
$c== :: DeleteConfigurationSetEventDestination
-> DeleteConfigurationSetEventDestination -> Bool
Prelude.Eq, ReadPrec [DeleteConfigurationSetEventDestination]
ReadPrec DeleteConfigurationSetEventDestination
Int -> ReadS DeleteConfigurationSetEventDestination
ReadS [DeleteConfigurationSetEventDestination]
(Int -> ReadS DeleteConfigurationSetEventDestination)
-> ReadS [DeleteConfigurationSetEventDestination]
-> ReadPrec DeleteConfigurationSetEventDestination
-> ReadPrec [DeleteConfigurationSetEventDestination]
-> Read DeleteConfigurationSetEventDestination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteConfigurationSetEventDestination]
$creadListPrec :: ReadPrec [DeleteConfigurationSetEventDestination]
readPrec :: ReadPrec DeleteConfigurationSetEventDestination
$creadPrec :: ReadPrec DeleteConfigurationSetEventDestination
readList :: ReadS [DeleteConfigurationSetEventDestination]
$creadList :: ReadS [DeleteConfigurationSetEventDestination]
readsPrec :: Int -> ReadS DeleteConfigurationSetEventDestination
$creadsPrec :: Int -> ReadS DeleteConfigurationSetEventDestination
Prelude.Read, Int -> DeleteConfigurationSetEventDestination -> ShowS
[DeleteConfigurationSetEventDestination] -> ShowS
DeleteConfigurationSetEventDestination -> String
(Int -> DeleteConfigurationSetEventDestination -> ShowS)
-> (DeleteConfigurationSetEventDestination -> String)
-> ([DeleteConfigurationSetEventDestination] -> ShowS)
-> Show DeleteConfigurationSetEventDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteConfigurationSetEventDestination] -> ShowS
$cshowList :: [DeleteConfigurationSetEventDestination] -> ShowS
show :: DeleteConfigurationSetEventDestination -> String
$cshow :: DeleteConfigurationSetEventDestination -> String
showsPrec :: Int -> DeleteConfigurationSetEventDestination -> ShowS
$cshowsPrec :: Int -> DeleteConfigurationSetEventDestination -> ShowS
Prelude.Show, (forall x.
DeleteConfigurationSetEventDestination
-> Rep DeleteConfigurationSetEventDestination x)
-> (forall x.
Rep DeleteConfigurationSetEventDestination x
-> DeleteConfigurationSetEventDestination)
-> Generic DeleteConfigurationSetEventDestination
forall x.
Rep DeleteConfigurationSetEventDestination x
-> DeleteConfigurationSetEventDestination
forall x.
DeleteConfigurationSetEventDestination
-> Rep DeleteConfigurationSetEventDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteConfigurationSetEventDestination x
-> DeleteConfigurationSetEventDestination
$cfrom :: forall x.
DeleteConfigurationSetEventDestination
-> Rep DeleteConfigurationSetEventDestination x
Prelude.Generic)
newDeleteConfigurationSetEventDestination ::
Prelude.Text ->
Prelude.Text ->
DeleteConfigurationSetEventDestination
newDeleteConfigurationSetEventDestination :: Text -> Text -> DeleteConfigurationSetEventDestination
newDeleteConfigurationSetEventDestination
Text
pEventDestinationName_
Text
pConfigurationSetName_ =
DeleteConfigurationSetEventDestination' :: Text -> Text -> DeleteConfigurationSetEventDestination
DeleteConfigurationSetEventDestination'
{ $sel:eventDestinationName:DeleteConfigurationSetEventDestination' :: Text
eventDestinationName =
Text
pEventDestinationName_,
$sel:configurationSetName:DeleteConfigurationSetEventDestination' :: Text
configurationSetName =
Text
pConfigurationSetName_
}
deleteConfigurationSetEventDestination_eventDestinationName :: Lens.Lens' DeleteConfigurationSetEventDestination Prelude.Text
deleteConfigurationSetEventDestination_eventDestinationName :: (Text -> f Text)
-> DeleteConfigurationSetEventDestination
-> f DeleteConfigurationSetEventDestination
deleteConfigurationSetEventDestination_eventDestinationName = (DeleteConfigurationSetEventDestination -> Text)
-> (DeleteConfigurationSetEventDestination
-> Text -> DeleteConfigurationSetEventDestination)
-> Lens
DeleteConfigurationSetEventDestination
DeleteConfigurationSetEventDestination
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConfigurationSetEventDestination' {Text
eventDestinationName :: Text
$sel:eventDestinationName:DeleteConfigurationSetEventDestination' :: DeleteConfigurationSetEventDestination -> Text
eventDestinationName} -> Text
eventDestinationName) (\s :: DeleteConfigurationSetEventDestination
s@DeleteConfigurationSetEventDestination' {} Text
a -> DeleteConfigurationSetEventDestination
s {$sel:eventDestinationName:DeleteConfigurationSetEventDestination' :: Text
eventDestinationName = Text
a} :: DeleteConfigurationSetEventDestination)
deleteConfigurationSetEventDestination_configurationSetName :: Lens.Lens' DeleteConfigurationSetEventDestination Prelude.Text
deleteConfigurationSetEventDestination_configurationSetName :: (Text -> f Text)
-> DeleteConfigurationSetEventDestination
-> f DeleteConfigurationSetEventDestination
deleteConfigurationSetEventDestination_configurationSetName = (DeleteConfigurationSetEventDestination -> Text)
-> (DeleteConfigurationSetEventDestination
-> Text -> DeleteConfigurationSetEventDestination)
-> Lens
DeleteConfigurationSetEventDestination
DeleteConfigurationSetEventDestination
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConfigurationSetEventDestination' {Text
configurationSetName :: Text
$sel:configurationSetName:DeleteConfigurationSetEventDestination' :: DeleteConfigurationSetEventDestination -> Text
configurationSetName} -> Text
configurationSetName) (\s :: DeleteConfigurationSetEventDestination
s@DeleteConfigurationSetEventDestination' {} Text
a -> DeleteConfigurationSetEventDestination
s {$sel:configurationSetName:DeleteConfigurationSetEventDestination' :: Text
configurationSetName = Text
a} :: DeleteConfigurationSetEventDestination)
instance
Core.AWSRequest
DeleteConfigurationSetEventDestination
where
type
AWSResponse
DeleteConfigurationSetEventDestination =
DeleteConfigurationSetEventDestinationResponse
request :: DeleteConfigurationSetEventDestination
-> Request DeleteConfigurationSetEventDestination
request = Service
-> DeleteConfigurationSetEventDestination
-> Request DeleteConfigurationSetEventDestination
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteConfigurationSetEventDestination
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DeleteConfigurationSetEventDestination)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either
String (AWSResponse DeleteConfigurationSetEventDestination))
-> Logger
-> Service
-> Proxy DeleteConfigurationSetEventDestination
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DeleteConfigurationSetEventDestination)))
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 -> DeleteConfigurationSetEventDestinationResponse
DeleteConfigurationSetEventDestinationResponse'
(Int -> DeleteConfigurationSetEventDestinationResponse)
-> Either String Int
-> Either String DeleteConfigurationSetEventDestinationResponse
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
DeleteConfigurationSetEventDestination
instance
Prelude.NFData
DeleteConfigurationSetEventDestination
instance
Core.ToHeaders
DeleteConfigurationSetEventDestination
where
toHeaders :: DeleteConfigurationSetEventDestination -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DeleteConfigurationSetEventDestination -> 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
DeleteConfigurationSetEventDestination
where
toPath :: DeleteConfigurationSetEventDestination -> ByteString
toPath DeleteConfigurationSetEventDestination' {Text
configurationSetName :: Text
eventDestinationName :: Text
$sel:configurationSetName:DeleteConfigurationSetEventDestination' :: DeleteConfigurationSetEventDestination -> Text
$sel:eventDestinationName:DeleteConfigurationSetEventDestination' :: DeleteConfigurationSetEventDestination -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v1/sms-voice/configuration-sets/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
configurationSetName,
ByteString
"/event-destinations/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
eventDestinationName
]
instance
Core.ToQuery
DeleteConfigurationSetEventDestination
where
toQuery :: DeleteConfigurationSetEventDestination -> QueryString
toQuery = QueryString
-> DeleteConfigurationSetEventDestination -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteConfigurationSetEventDestinationResponse = DeleteConfigurationSetEventDestinationResponse'
{
DeleteConfigurationSetEventDestinationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteConfigurationSetEventDestinationResponse
-> DeleteConfigurationSetEventDestinationResponse -> Bool
(DeleteConfigurationSetEventDestinationResponse
-> DeleteConfigurationSetEventDestinationResponse -> Bool)
-> (DeleteConfigurationSetEventDestinationResponse
-> DeleteConfigurationSetEventDestinationResponse -> Bool)
-> Eq DeleteConfigurationSetEventDestinationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteConfigurationSetEventDestinationResponse
-> DeleteConfigurationSetEventDestinationResponse -> Bool
$c/= :: DeleteConfigurationSetEventDestinationResponse
-> DeleteConfigurationSetEventDestinationResponse -> Bool
== :: DeleteConfigurationSetEventDestinationResponse
-> DeleteConfigurationSetEventDestinationResponse -> Bool
$c== :: DeleteConfigurationSetEventDestinationResponse
-> DeleteConfigurationSetEventDestinationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteConfigurationSetEventDestinationResponse]
ReadPrec DeleteConfigurationSetEventDestinationResponse
Int -> ReadS DeleteConfigurationSetEventDestinationResponse
ReadS [DeleteConfigurationSetEventDestinationResponse]
(Int -> ReadS DeleteConfigurationSetEventDestinationResponse)
-> ReadS [DeleteConfigurationSetEventDestinationResponse]
-> ReadPrec DeleteConfigurationSetEventDestinationResponse
-> ReadPrec [DeleteConfigurationSetEventDestinationResponse]
-> Read DeleteConfigurationSetEventDestinationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteConfigurationSetEventDestinationResponse]
$creadListPrec :: ReadPrec [DeleteConfigurationSetEventDestinationResponse]
readPrec :: ReadPrec DeleteConfigurationSetEventDestinationResponse
$creadPrec :: ReadPrec DeleteConfigurationSetEventDestinationResponse
readList :: ReadS [DeleteConfigurationSetEventDestinationResponse]
$creadList :: ReadS [DeleteConfigurationSetEventDestinationResponse]
readsPrec :: Int -> ReadS DeleteConfigurationSetEventDestinationResponse
$creadsPrec :: Int -> ReadS DeleteConfigurationSetEventDestinationResponse
Prelude.Read, Int -> DeleteConfigurationSetEventDestinationResponse -> ShowS
[DeleteConfigurationSetEventDestinationResponse] -> ShowS
DeleteConfigurationSetEventDestinationResponse -> String
(Int -> DeleteConfigurationSetEventDestinationResponse -> ShowS)
-> (DeleteConfigurationSetEventDestinationResponse -> String)
-> ([DeleteConfigurationSetEventDestinationResponse] -> ShowS)
-> Show DeleteConfigurationSetEventDestinationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteConfigurationSetEventDestinationResponse] -> ShowS
$cshowList :: [DeleteConfigurationSetEventDestinationResponse] -> ShowS
show :: DeleteConfigurationSetEventDestinationResponse -> String
$cshow :: DeleteConfigurationSetEventDestinationResponse -> String
showsPrec :: Int -> DeleteConfigurationSetEventDestinationResponse -> ShowS
$cshowsPrec :: Int -> DeleteConfigurationSetEventDestinationResponse -> ShowS
Prelude.Show, (forall x.
DeleteConfigurationSetEventDestinationResponse
-> Rep DeleteConfigurationSetEventDestinationResponse x)
-> (forall x.
Rep DeleteConfigurationSetEventDestinationResponse x
-> DeleteConfigurationSetEventDestinationResponse)
-> Generic DeleteConfigurationSetEventDestinationResponse
forall x.
Rep DeleteConfigurationSetEventDestinationResponse x
-> DeleteConfigurationSetEventDestinationResponse
forall x.
DeleteConfigurationSetEventDestinationResponse
-> Rep DeleteConfigurationSetEventDestinationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteConfigurationSetEventDestinationResponse x
-> DeleteConfigurationSetEventDestinationResponse
$cfrom :: forall x.
DeleteConfigurationSetEventDestinationResponse
-> Rep DeleteConfigurationSetEventDestinationResponse x
Prelude.Generic)
newDeleteConfigurationSetEventDestinationResponse ::
Prelude.Int ->
DeleteConfigurationSetEventDestinationResponse
newDeleteConfigurationSetEventDestinationResponse :: Int -> DeleteConfigurationSetEventDestinationResponse
newDeleteConfigurationSetEventDestinationResponse
Int
pHttpStatus_ =
DeleteConfigurationSetEventDestinationResponse' :: Int -> DeleteConfigurationSetEventDestinationResponse
DeleteConfigurationSetEventDestinationResponse'
{ $sel:httpStatus:DeleteConfigurationSetEventDestinationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteConfigurationSetEventDestinationResponse_httpStatus :: Lens.Lens' DeleteConfigurationSetEventDestinationResponse Prelude.Int
deleteConfigurationSetEventDestinationResponse_httpStatus :: (Int -> f Int)
-> DeleteConfigurationSetEventDestinationResponse
-> f DeleteConfigurationSetEventDestinationResponse
deleteConfigurationSetEventDestinationResponse_httpStatus = (DeleteConfigurationSetEventDestinationResponse -> Int)
-> (DeleteConfigurationSetEventDestinationResponse
-> Int -> DeleteConfigurationSetEventDestinationResponse)
-> Lens
DeleteConfigurationSetEventDestinationResponse
DeleteConfigurationSetEventDestinationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConfigurationSetEventDestinationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteConfigurationSetEventDestinationResponse' :: DeleteConfigurationSetEventDestinationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteConfigurationSetEventDestinationResponse
s@DeleteConfigurationSetEventDestinationResponse' {} Int
a -> DeleteConfigurationSetEventDestinationResponse
s {$sel:httpStatus:DeleteConfigurationSetEventDestinationResponse' :: Int
httpStatus = Int
a} :: DeleteConfigurationSetEventDestinationResponse)
instance
Prelude.NFData
DeleteConfigurationSetEventDestinationResponse