{-# 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.DeleteConfigurationSet
(
DeleteConfigurationSet (..),
newDeleteConfigurationSet,
deleteConfigurationSet_configurationSetName,
DeleteConfigurationSetResponse (..),
newDeleteConfigurationSetResponse,
deleteConfigurationSetResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.PinpointSMSVoice.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteConfigurationSet = DeleteConfigurationSet'
{
DeleteConfigurationSet -> Text
configurationSetName :: Prelude.Text
}
deriving (DeleteConfigurationSet -> DeleteConfigurationSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteConfigurationSet -> DeleteConfigurationSet -> Bool
$c/= :: DeleteConfigurationSet -> DeleteConfigurationSet -> Bool
== :: DeleteConfigurationSet -> DeleteConfigurationSet -> Bool
$c== :: DeleteConfigurationSet -> DeleteConfigurationSet -> Bool
Prelude.Eq, ReadPrec [DeleteConfigurationSet]
ReadPrec DeleteConfigurationSet
Int -> ReadS DeleteConfigurationSet
ReadS [DeleteConfigurationSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteConfigurationSet]
$creadListPrec :: ReadPrec [DeleteConfigurationSet]
readPrec :: ReadPrec DeleteConfigurationSet
$creadPrec :: ReadPrec DeleteConfigurationSet
readList :: ReadS [DeleteConfigurationSet]
$creadList :: ReadS [DeleteConfigurationSet]
readsPrec :: Int -> ReadS DeleteConfigurationSet
$creadsPrec :: Int -> ReadS DeleteConfigurationSet
Prelude.Read, Int -> DeleteConfigurationSet -> ShowS
[DeleteConfigurationSet] -> ShowS
DeleteConfigurationSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteConfigurationSet] -> ShowS
$cshowList :: [DeleteConfigurationSet] -> ShowS
show :: DeleteConfigurationSet -> String
$cshow :: DeleteConfigurationSet -> String
showsPrec :: Int -> DeleteConfigurationSet -> ShowS
$cshowsPrec :: Int -> DeleteConfigurationSet -> ShowS
Prelude.Show, forall x. Rep DeleteConfigurationSet x -> DeleteConfigurationSet
forall x. DeleteConfigurationSet -> Rep DeleteConfigurationSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteConfigurationSet x -> DeleteConfigurationSet
$cfrom :: forall x. DeleteConfigurationSet -> Rep DeleteConfigurationSet x
Prelude.Generic)
newDeleteConfigurationSet ::
Prelude.Text ->
DeleteConfigurationSet
newDeleteConfigurationSet :: Text -> DeleteConfigurationSet
newDeleteConfigurationSet Text
pConfigurationSetName_ =
DeleteConfigurationSet'
{ $sel:configurationSetName:DeleteConfigurationSet' :: Text
configurationSetName =
Text
pConfigurationSetName_
}
deleteConfigurationSet_configurationSetName :: Lens.Lens' DeleteConfigurationSet Prelude.Text
deleteConfigurationSet_configurationSetName :: Lens' DeleteConfigurationSet Text
deleteConfigurationSet_configurationSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConfigurationSet' {Text
configurationSetName :: Text
$sel:configurationSetName:DeleteConfigurationSet' :: DeleteConfigurationSet -> Text
configurationSetName} -> Text
configurationSetName) (\s :: DeleteConfigurationSet
s@DeleteConfigurationSet' {} Text
a -> DeleteConfigurationSet
s {$sel:configurationSetName:DeleteConfigurationSet' :: Text
configurationSetName = Text
a} :: DeleteConfigurationSet)
instance Core.AWSRequest DeleteConfigurationSet where
type
AWSResponse DeleteConfigurationSet =
DeleteConfigurationSetResponse
request :: (Service -> Service)
-> DeleteConfigurationSet -> Request DeleteConfigurationSet
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 DeleteConfigurationSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteConfigurationSet)))
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 -> DeleteConfigurationSetResponse
DeleteConfigurationSetResponse'
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 DeleteConfigurationSet where
hashWithSalt :: Int -> DeleteConfigurationSet -> Int
hashWithSalt Int
_salt DeleteConfigurationSet' {Text
configurationSetName :: Text
$sel:configurationSetName:DeleteConfigurationSet' :: DeleteConfigurationSet -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
configurationSetName
instance Prelude.NFData DeleteConfigurationSet where
rnf :: DeleteConfigurationSet -> ()
rnf DeleteConfigurationSet' {Text
configurationSetName :: Text
$sel:configurationSetName:DeleteConfigurationSet' :: DeleteConfigurationSet -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
configurationSetName
instance Data.ToHeaders DeleteConfigurationSet where
toHeaders :: DeleteConfigurationSet -> 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 DeleteConfigurationSet where
toPath :: DeleteConfigurationSet -> ByteString
toPath DeleteConfigurationSet' {Text
configurationSetName :: Text
$sel:configurationSetName:DeleteConfigurationSet' :: DeleteConfigurationSet -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v1/sms-voice/configuration-sets/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
configurationSetName
]
instance Data.ToQuery DeleteConfigurationSet where
toQuery :: DeleteConfigurationSet -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteConfigurationSetResponse = DeleteConfigurationSetResponse'
{
DeleteConfigurationSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool
$c/= :: DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool
== :: DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool
$c== :: DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteConfigurationSetResponse]
ReadPrec DeleteConfigurationSetResponse
Int -> ReadS DeleteConfigurationSetResponse
ReadS [DeleteConfigurationSetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteConfigurationSetResponse]
$creadListPrec :: ReadPrec [DeleteConfigurationSetResponse]
readPrec :: ReadPrec DeleteConfigurationSetResponse
$creadPrec :: ReadPrec DeleteConfigurationSetResponse
readList :: ReadS [DeleteConfigurationSetResponse]
$creadList :: ReadS [DeleteConfigurationSetResponse]
readsPrec :: Int -> ReadS DeleteConfigurationSetResponse
$creadsPrec :: Int -> ReadS DeleteConfigurationSetResponse
Prelude.Read, Int -> DeleteConfigurationSetResponse -> ShowS
[DeleteConfigurationSetResponse] -> ShowS
DeleteConfigurationSetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteConfigurationSetResponse] -> ShowS
$cshowList :: [DeleteConfigurationSetResponse] -> ShowS
show :: DeleteConfigurationSetResponse -> String
$cshow :: DeleteConfigurationSetResponse -> String
showsPrec :: Int -> DeleteConfigurationSetResponse -> ShowS
$cshowsPrec :: Int -> DeleteConfigurationSetResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteConfigurationSetResponse x
-> DeleteConfigurationSetResponse
forall x.
DeleteConfigurationSetResponse
-> Rep DeleteConfigurationSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteConfigurationSetResponse x
-> DeleteConfigurationSetResponse
$cfrom :: forall x.
DeleteConfigurationSetResponse
-> Rep DeleteConfigurationSetResponse x
Prelude.Generic)
newDeleteConfigurationSetResponse ::
Prelude.Int ->
DeleteConfigurationSetResponse
newDeleteConfigurationSetResponse :: Int -> DeleteConfigurationSetResponse
newDeleteConfigurationSetResponse Int
pHttpStatus_ =
DeleteConfigurationSetResponse'
{ $sel:httpStatus:DeleteConfigurationSetResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteConfigurationSetResponse_httpStatus :: Lens.Lens' DeleteConfigurationSetResponse Prelude.Int
deleteConfigurationSetResponse_httpStatus :: Lens' DeleteConfigurationSetResponse Int
deleteConfigurationSetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConfigurationSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteConfigurationSetResponse' :: DeleteConfigurationSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteConfigurationSetResponse
s@DeleteConfigurationSetResponse' {} Int
a -> DeleteConfigurationSetResponse
s {$sel:httpStatus:DeleteConfigurationSetResponse' :: Int
httpStatus = Int
a} :: DeleteConfigurationSetResponse)
instance
Prelude.NFData
DeleteConfigurationSetResponse
where
rnf :: DeleteConfigurationSetResponse -> ()
rnf DeleteConfigurationSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteConfigurationSetResponse' :: DeleteConfigurationSetResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus