{-# 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.SNS.DeleteSMSSandboxPhoneNumber
(
DeleteSMSSandboxPhoneNumber (..),
newDeleteSMSSandboxPhoneNumber,
deleteSMSSandboxPhoneNumber_phoneNumber,
DeleteSMSSandboxPhoneNumberResponse (..),
newDeleteSMSSandboxPhoneNumberResponse,
deleteSMSSandboxPhoneNumberResponse_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.SNS.Types
data DeleteSMSSandboxPhoneNumber = DeleteSMSSandboxPhoneNumber'
{
DeleteSMSSandboxPhoneNumber -> Text
phoneNumber :: Prelude.Text
}
deriving (DeleteSMSSandboxPhoneNumber -> DeleteSMSSandboxPhoneNumber -> Bool
(DeleteSMSSandboxPhoneNumber
-> DeleteSMSSandboxPhoneNumber -> Bool)
-> (DeleteSMSSandboxPhoneNumber
-> DeleteSMSSandboxPhoneNumber -> Bool)
-> Eq DeleteSMSSandboxPhoneNumber
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSMSSandboxPhoneNumber -> DeleteSMSSandboxPhoneNumber -> Bool
$c/= :: DeleteSMSSandboxPhoneNumber -> DeleteSMSSandboxPhoneNumber -> Bool
== :: DeleteSMSSandboxPhoneNumber -> DeleteSMSSandboxPhoneNumber -> Bool
$c== :: DeleteSMSSandboxPhoneNumber -> DeleteSMSSandboxPhoneNumber -> Bool
Prelude.Eq, ReadPrec [DeleteSMSSandboxPhoneNumber]
ReadPrec DeleteSMSSandboxPhoneNumber
Int -> ReadS DeleteSMSSandboxPhoneNumber
ReadS [DeleteSMSSandboxPhoneNumber]
(Int -> ReadS DeleteSMSSandboxPhoneNumber)
-> ReadS [DeleteSMSSandboxPhoneNumber]
-> ReadPrec DeleteSMSSandboxPhoneNumber
-> ReadPrec [DeleteSMSSandboxPhoneNumber]
-> Read DeleteSMSSandboxPhoneNumber
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSMSSandboxPhoneNumber]
$creadListPrec :: ReadPrec [DeleteSMSSandboxPhoneNumber]
readPrec :: ReadPrec DeleteSMSSandboxPhoneNumber
$creadPrec :: ReadPrec DeleteSMSSandboxPhoneNumber
readList :: ReadS [DeleteSMSSandboxPhoneNumber]
$creadList :: ReadS [DeleteSMSSandboxPhoneNumber]
readsPrec :: Int -> ReadS DeleteSMSSandboxPhoneNumber
$creadsPrec :: Int -> ReadS DeleteSMSSandboxPhoneNumber
Prelude.Read, Int -> DeleteSMSSandboxPhoneNumber -> ShowS
[DeleteSMSSandboxPhoneNumber] -> ShowS
DeleteSMSSandboxPhoneNumber -> String
(Int -> DeleteSMSSandboxPhoneNumber -> ShowS)
-> (DeleteSMSSandboxPhoneNumber -> String)
-> ([DeleteSMSSandboxPhoneNumber] -> ShowS)
-> Show DeleteSMSSandboxPhoneNumber
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSMSSandboxPhoneNumber] -> ShowS
$cshowList :: [DeleteSMSSandboxPhoneNumber] -> ShowS
show :: DeleteSMSSandboxPhoneNumber -> String
$cshow :: DeleteSMSSandboxPhoneNumber -> String
showsPrec :: Int -> DeleteSMSSandboxPhoneNumber -> ShowS
$cshowsPrec :: Int -> DeleteSMSSandboxPhoneNumber -> ShowS
Prelude.Show, (forall x.
DeleteSMSSandboxPhoneNumber -> Rep DeleteSMSSandboxPhoneNumber x)
-> (forall x.
Rep DeleteSMSSandboxPhoneNumber x -> DeleteSMSSandboxPhoneNumber)
-> Generic DeleteSMSSandboxPhoneNumber
forall x.
Rep DeleteSMSSandboxPhoneNumber x -> DeleteSMSSandboxPhoneNumber
forall x.
DeleteSMSSandboxPhoneNumber -> Rep DeleteSMSSandboxPhoneNumber x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSMSSandboxPhoneNumber x -> DeleteSMSSandboxPhoneNumber
$cfrom :: forall x.
DeleteSMSSandboxPhoneNumber -> Rep DeleteSMSSandboxPhoneNumber x
Prelude.Generic)
newDeleteSMSSandboxPhoneNumber ::
Prelude.Text ->
DeleteSMSSandboxPhoneNumber
newDeleteSMSSandboxPhoneNumber :: Text -> DeleteSMSSandboxPhoneNumber
newDeleteSMSSandboxPhoneNumber Text
pPhoneNumber_ =
DeleteSMSSandboxPhoneNumber' :: Text -> DeleteSMSSandboxPhoneNumber
DeleteSMSSandboxPhoneNumber'
{ $sel:phoneNumber:DeleteSMSSandboxPhoneNumber' :: Text
phoneNumber =
Text
pPhoneNumber_
}
deleteSMSSandboxPhoneNumber_phoneNumber :: Lens.Lens' DeleteSMSSandboxPhoneNumber Prelude.Text
deleteSMSSandboxPhoneNumber_phoneNumber :: (Text -> f Text)
-> DeleteSMSSandboxPhoneNumber -> f DeleteSMSSandboxPhoneNumber
deleteSMSSandboxPhoneNumber_phoneNumber = (DeleteSMSSandboxPhoneNumber -> Text)
-> (DeleteSMSSandboxPhoneNumber
-> Text -> DeleteSMSSandboxPhoneNumber)
-> Lens
DeleteSMSSandboxPhoneNumber DeleteSMSSandboxPhoneNumber Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSMSSandboxPhoneNumber' {Text
phoneNumber :: Text
$sel:phoneNumber:DeleteSMSSandboxPhoneNumber' :: DeleteSMSSandboxPhoneNumber -> Text
phoneNumber} -> Text
phoneNumber) (\s :: DeleteSMSSandboxPhoneNumber
s@DeleteSMSSandboxPhoneNumber' {} Text
a -> DeleteSMSSandboxPhoneNumber
s {$sel:phoneNumber:DeleteSMSSandboxPhoneNumber' :: Text
phoneNumber = Text
a} :: DeleteSMSSandboxPhoneNumber)
instance Core.AWSRequest DeleteSMSSandboxPhoneNumber where
type
AWSResponse DeleteSMSSandboxPhoneNumber =
DeleteSMSSandboxPhoneNumberResponse
request :: DeleteSMSSandboxPhoneNumber -> Request DeleteSMSSandboxPhoneNumber
request = Service
-> DeleteSMSSandboxPhoneNumber
-> Request DeleteSMSSandboxPhoneNumber
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteSMSSandboxPhoneNumber
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSMSSandboxPhoneNumber)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeleteSMSSandboxPhoneNumber))
-> Logger
-> Service
-> Proxy DeleteSMSSandboxPhoneNumber
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSMSSandboxPhoneNumber)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DeleteSMSSandboxPhoneNumberResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeleteSMSSandboxPhoneNumberResponse
DeleteSMSSandboxPhoneNumberResponse'
(Int -> DeleteSMSSandboxPhoneNumberResponse)
-> Either String Int
-> Either String DeleteSMSSandboxPhoneNumberResponse
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 DeleteSMSSandboxPhoneNumber
instance Prelude.NFData DeleteSMSSandboxPhoneNumber
instance Core.ToHeaders DeleteSMSSandboxPhoneNumber where
toHeaders :: DeleteSMSSandboxPhoneNumber -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteSMSSandboxPhoneNumber -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteSMSSandboxPhoneNumber where
toPath :: DeleteSMSSandboxPhoneNumber -> ByteString
toPath = ByteString -> DeleteSMSSandboxPhoneNumber -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteSMSSandboxPhoneNumber where
toQuery :: DeleteSMSSandboxPhoneNumber -> QueryString
toQuery DeleteSMSSandboxPhoneNumber' {Text
phoneNumber :: Text
$sel:phoneNumber:DeleteSMSSandboxPhoneNumber' :: DeleteSMSSandboxPhoneNumber -> 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
"DeleteSMSSandboxPhoneNumber" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-03-31" :: Prelude.ByteString),
ByteString
"PhoneNumber" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
phoneNumber
]
data DeleteSMSSandboxPhoneNumberResponse = DeleteSMSSandboxPhoneNumberResponse'
{
DeleteSMSSandboxPhoneNumberResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteSMSSandboxPhoneNumberResponse
-> DeleteSMSSandboxPhoneNumberResponse -> Bool
(DeleteSMSSandboxPhoneNumberResponse
-> DeleteSMSSandboxPhoneNumberResponse -> Bool)
-> (DeleteSMSSandboxPhoneNumberResponse
-> DeleteSMSSandboxPhoneNumberResponse -> Bool)
-> Eq DeleteSMSSandboxPhoneNumberResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSMSSandboxPhoneNumberResponse
-> DeleteSMSSandboxPhoneNumberResponse -> Bool
$c/= :: DeleteSMSSandboxPhoneNumberResponse
-> DeleteSMSSandboxPhoneNumberResponse -> Bool
== :: DeleteSMSSandboxPhoneNumberResponse
-> DeleteSMSSandboxPhoneNumberResponse -> Bool
$c== :: DeleteSMSSandboxPhoneNumberResponse
-> DeleteSMSSandboxPhoneNumberResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSMSSandboxPhoneNumberResponse]
ReadPrec DeleteSMSSandboxPhoneNumberResponse
Int -> ReadS DeleteSMSSandboxPhoneNumberResponse
ReadS [DeleteSMSSandboxPhoneNumberResponse]
(Int -> ReadS DeleteSMSSandboxPhoneNumberResponse)
-> ReadS [DeleteSMSSandboxPhoneNumberResponse]
-> ReadPrec DeleteSMSSandboxPhoneNumberResponse
-> ReadPrec [DeleteSMSSandboxPhoneNumberResponse]
-> Read DeleteSMSSandboxPhoneNumberResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSMSSandboxPhoneNumberResponse]
$creadListPrec :: ReadPrec [DeleteSMSSandboxPhoneNumberResponse]
readPrec :: ReadPrec DeleteSMSSandboxPhoneNumberResponse
$creadPrec :: ReadPrec DeleteSMSSandboxPhoneNumberResponse
readList :: ReadS [DeleteSMSSandboxPhoneNumberResponse]
$creadList :: ReadS [DeleteSMSSandboxPhoneNumberResponse]
readsPrec :: Int -> ReadS DeleteSMSSandboxPhoneNumberResponse
$creadsPrec :: Int -> ReadS DeleteSMSSandboxPhoneNumberResponse
Prelude.Read, Int -> DeleteSMSSandboxPhoneNumberResponse -> ShowS
[DeleteSMSSandboxPhoneNumberResponse] -> ShowS
DeleteSMSSandboxPhoneNumberResponse -> String
(Int -> DeleteSMSSandboxPhoneNumberResponse -> ShowS)
-> (DeleteSMSSandboxPhoneNumberResponse -> String)
-> ([DeleteSMSSandboxPhoneNumberResponse] -> ShowS)
-> Show DeleteSMSSandboxPhoneNumberResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSMSSandboxPhoneNumberResponse] -> ShowS
$cshowList :: [DeleteSMSSandboxPhoneNumberResponse] -> ShowS
show :: DeleteSMSSandboxPhoneNumberResponse -> String
$cshow :: DeleteSMSSandboxPhoneNumberResponse -> String
showsPrec :: Int -> DeleteSMSSandboxPhoneNumberResponse -> ShowS
$cshowsPrec :: Int -> DeleteSMSSandboxPhoneNumberResponse -> ShowS
Prelude.Show, (forall x.
DeleteSMSSandboxPhoneNumberResponse
-> Rep DeleteSMSSandboxPhoneNumberResponse x)
-> (forall x.
Rep DeleteSMSSandboxPhoneNumberResponse x
-> DeleteSMSSandboxPhoneNumberResponse)
-> Generic DeleteSMSSandboxPhoneNumberResponse
forall x.
Rep DeleteSMSSandboxPhoneNumberResponse x
-> DeleteSMSSandboxPhoneNumberResponse
forall x.
DeleteSMSSandboxPhoneNumberResponse
-> Rep DeleteSMSSandboxPhoneNumberResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSMSSandboxPhoneNumberResponse x
-> DeleteSMSSandboxPhoneNumberResponse
$cfrom :: forall x.
DeleteSMSSandboxPhoneNumberResponse
-> Rep DeleteSMSSandboxPhoneNumberResponse x
Prelude.Generic)
newDeleteSMSSandboxPhoneNumberResponse ::
Prelude.Int ->
DeleteSMSSandboxPhoneNumberResponse
newDeleteSMSSandboxPhoneNumberResponse :: Int -> DeleteSMSSandboxPhoneNumberResponse
newDeleteSMSSandboxPhoneNumberResponse Int
pHttpStatus_ =
DeleteSMSSandboxPhoneNumberResponse' :: Int -> DeleteSMSSandboxPhoneNumberResponse
DeleteSMSSandboxPhoneNumberResponse'
{ $sel:httpStatus:DeleteSMSSandboxPhoneNumberResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteSMSSandboxPhoneNumberResponse_httpStatus :: Lens.Lens' DeleteSMSSandboxPhoneNumberResponse Prelude.Int
deleteSMSSandboxPhoneNumberResponse_httpStatus :: (Int -> f Int)
-> DeleteSMSSandboxPhoneNumberResponse
-> f DeleteSMSSandboxPhoneNumberResponse
deleteSMSSandboxPhoneNumberResponse_httpStatus = (DeleteSMSSandboxPhoneNumberResponse -> Int)
-> (DeleteSMSSandboxPhoneNumberResponse
-> Int -> DeleteSMSSandboxPhoneNumberResponse)
-> Lens
DeleteSMSSandboxPhoneNumberResponse
DeleteSMSSandboxPhoneNumberResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSMSSandboxPhoneNumberResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteSMSSandboxPhoneNumberResponse' :: DeleteSMSSandboxPhoneNumberResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteSMSSandboxPhoneNumberResponse
s@DeleteSMSSandboxPhoneNumberResponse' {} Int
a -> DeleteSMSSandboxPhoneNumberResponse
s {$sel:httpStatus:DeleteSMSSandboxPhoneNumberResponse' :: Int
httpStatus = Int
a} :: DeleteSMSSandboxPhoneNumberResponse)
instance
Prelude.NFData
DeleteSMSSandboxPhoneNumberResponse