{-# 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.VerifySMSSandboxPhoneNumber
(
VerifySMSSandboxPhoneNumber (..),
newVerifySMSSandboxPhoneNumber,
verifySMSSandboxPhoneNumber_phoneNumber,
verifySMSSandboxPhoneNumber_oneTimePassword,
VerifySMSSandboxPhoneNumberResponse (..),
newVerifySMSSandboxPhoneNumberResponse,
verifySMSSandboxPhoneNumberResponse_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 VerifySMSSandboxPhoneNumber = VerifySMSSandboxPhoneNumber'
{
VerifySMSSandboxPhoneNumber -> Text
phoneNumber :: Prelude.Text,
VerifySMSSandboxPhoneNumber -> Text
oneTimePassword :: Prelude.Text
}
deriving (VerifySMSSandboxPhoneNumber -> VerifySMSSandboxPhoneNumber -> Bool
(VerifySMSSandboxPhoneNumber
-> VerifySMSSandboxPhoneNumber -> Bool)
-> (VerifySMSSandboxPhoneNumber
-> VerifySMSSandboxPhoneNumber -> Bool)
-> Eq VerifySMSSandboxPhoneNumber
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VerifySMSSandboxPhoneNumber -> VerifySMSSandboxPhoneNumber -> Bool
$c/= :: VerifySMSSandboxPhoneNumber -> VerifySMSSandboxPhoneNumber -> Bool
== :: VerifySMSSandboxPhoneNumber -> VerifySMSSandboxPhoneNumber -> Bool
$c== :: VerifySMSSandboxPhoneNumber -> VerifySMSSandboxPhoneNumber -> Bool
Prelude.Eq, ReadPrec [VerifySMSSandboxPhoneNumber]
ReadPrec VerifySMSSandboxPhoneNumber
Int -> ReadS VerifySMSSandboxPhoneNumber
ReadS [VerifySMSSandboxPhoneNumber]
(Int -> ReadS VerifySMSSandboxPhoneNumber)
-> ReadS [VerifySMSSandboxPhoneNumber]
-> ReadPrec VerifySMSSandboxPhoneNumber
-> ReadPrec [VerifySMSSandboxPhoneNumber]
-> Read VerifySMSSandboxPhoneNumber
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VerifySMSSandboxPhoneNumber]
$creadListPrec :: ReadPrec [VerifySMSSandboxPhoneNumber]
readPrec :: ReadPrec VerifySMSSandboxPhoneNumber
$creadPrec :: ReadPrec VerifySMSSandboxPhoneNumber
readList :: ReadS [VerifySMSSandboxPhoneNumber]
$creadList :: ReadS [VerifySMSSandboxPhoneNumber]
readsPrec :: Int -> ReadS VerifySMSSandboxPhoneNumber
$creadsPrec :: Int -> ReadS VerifySMSSandboxPhoneNumber
Prelude.Read, Int -> VerifySMSSandboxPhoneNumber -> ShowS
[VerifySMSSandboxPhoneNumber] -> ShowS
VerifySMSSandboxPhoneNumber -> String
(Int -> VerifySMSSandboxPhoneNumber -> ShowS)
-> (VerifySMSSandboxPhoneNumber -> String)
-> ([VerifySMSSandboxPhoneNumber] -> ShowS)
-> Show VerifySMSSandboxPhoneNumber
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VerifySMSSandboxPhoneNumber] -> ShowS
$cshowList :: [VerifySMSSandboxPhoneNumber] -> ShowS
show :: VerifySMSSandboxPhoneNumber -> String
$cshow :: VerifySMSSandboxPhoneNumber -> String
showsPrec :: Int -> VerifySMSSandboxPhoneNumber -> ShowS
$cshowsPrec :: Int -> VerifySMSSandboxPhoneNumber -> ShowS
Prelude.Show, (forall x.
VerifySMSSandboxPhoneNumber -> Rep VerifySMSSandboxPhoneNumber x)
-> (forall x.
Rep VerifySMSSandboxPhoneNumber x -> VerifySMSSandboxPhoneNumber)
-> Generic VerifySMSSandboxPhoneNumber
forall x.
Rep VerifySMSSandboxPhoneNumber x -> VerifySMSSandboxPhoneNumber
forall x.
VerifySMSSandboxPhoneNumber -> Rep VerifySMSSandboxPhoneNumber x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VerifySMSSandboxPhoneNumber x -> VerifySMSSandboxPhoneNumber
$cfrom :: forall x.
VerifySMSSandboxPhoneNumber -> Rep VerifySMSSandboxPhoneNumber x
Prelude.Generic)
newVerifySMSSandboxPhoneNumber ::
Prelude.Text ->
Prelude.Text ->
VerifySMSSandboxPhoneNumber
newVerifySMSSandboxPhoneNumber :: Text -> Text -> VerifySMSSandboxPhoneNumber
newVerifySMSSandboxPhoneNumber
Text
pPhoneNumber_
Text
pOneTimePassword_ =
VerifySMSSandboxPhoneNumber' :: Text -> Text -> VerifySMSSandboxPhoneNumber
VerifySMSSandboxPhoneNumber'
{ $sel:phoneNumber:VerifySMSSandboxPhoneNumber' :: Text
phoneNumber =
Text
pPhoneNumber_,
$sel:oneTimePassword:VerifySMSSandboxPhoneNumber' :: Text
oneTimePassword = Text
pOneTimePassword_
}
verifySMSSandboxPhoneNumber_phoneNumber :: Lens.Lens' VerifySMSSandboxPhoneNumber Prelude.Text
verifySMSSandboxPhoneNumber_phoneNumber :: (Text -> f Text)
-> VerifySMSSandboxPhoneNumber -> f VerifySMSSandboxPhoneNumber
verifySMSSandboxPhoneNumber_phoneNumber = (VerifySMSSandboxPhoneNumber -> Text)
-> (VerifySMSSandboxPhoneNumber
-> Text -> VerifySMSSandboxPhoneNumber)
-> Lens
VerifySMSSandboxPhoneNumber VerifySMSSandboxPhoneNumber Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerifySMSSandboxPhoneNumber' {Text
phoneNumber :: Text
$sel:phoneNumber:VerifySMSSandboxPhoneNumber' :: VerifySMSSandboxPhoneNumber -> Text
phoneNumber} -> Text
phoneNumber) (\s :: VerifySMSSandboxPhoneNumber
s@VerifySMSSandboxPhoneNumber' {} Text
a -> VerifySMSSandboxPhoneNumber
s {$sel:phoneNumber:VerifySMSSandboxPhoneNumber' :: Text
phoneNumber = Text
a} :: VerifySMSSandboxPhoneNumber)
verifySMSSandboxPhoneNumber_oneTimePassword :: Lens.Lens' VerifySMSSandboxPhoneNumber Prelude.Text
verifySMSSandboxPhoneNumber_oneTimePassword :: (Text -> f Text)
-> VerifySMSSandboxPhoneNumber -> f VerifySMSSandboxPhoneNumber
verifySMSSandboxPhoneNumber_oneTimePassword = (VerifySMSSandboxPhoneNumber -> Text)
-> (VerifySMSSandboxPhoneNumber
-> Text -> VerifySMSSandboxPhoneNumber)
-> Lens
VerifySMSSandboxPhoneNumber VerifySMSSandboxPhoneNumber Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerifySMSSandboxPhoneNumber' {Text
oneTimePassword :: Text
$sel:oneTimePassword:VerifySMSSandboxPhoneNumber' :: VerifySMSSandboxPhoneNumber -> Text
oneTimePassword} -> Text
oneTimePassword) (\s :: VerifySMSSandboxPhoneNumber
s@VerifySMSSandboxPhoneNumber' {} Text
a -> VerifySMSSandboxPhoneNumber
s {$sel:oneTimePassword:VerifySMSSandboxPhoneNumber' :: Text
oneTimePassword = Text
a} :: VerifySMSSandboxPhoneNumber)
instance Core.AWSRequest VerifySMSSandboxPhoneNumber where
type
AWSResponse VerifySMSSandboxPhoneNumber =
VerifySMSSandboxPhoneNumberResponse
request :: VerifySMSSandboxPhoneNumber -> Request VerifySMSSandboxPhoneNumber
request = Service
-> VerifySMSSandboxPhoneNumber
-> Request VerifySMSSandboxPhoneNumber
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy VerifySMSSandboxPhoneNumber
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse VerifySMSSandboxPhoneNumber)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse VerifySMSSandboxPhoneNumber))
-> Logger
-> Service
-> Proxy VerifySMSSandboxPhoneNumber
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse VerifySMSSandboxPhoneNumber)))
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
"VerifySMSSandboxPhoneNumberResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> VerifySMSSandboxPhoneNumberResponse
VerifySMSSandboxPhoneNumberResponse'
(Int -> VerifySMSSandboxPhoneNumberResponse)
-> Either String Int
-> Either String VerifySMSSandboxPhoneNumberResponse
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 VerifySMSSandboxPhoneNumber
instance Prelude.NFData VerifySMSSandboxPhoneNumber
instance Core.ToHeaders VerifySMSSandboxPhoneNumber where
toHeaders :: VerifySMSSandboxPhoneNumber -> ResponseHeaders
toHeaders = ResponseHeaders -> VerifySMSSandboxPhoneNumber -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath VerifySMSSandboxPhoneNumber where
toPath :: VerifySMSSandboxPhoneNumber -> ByteString
toPath = ByteString -> VerifySMSSandboxPhoneNumber -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery VerifySMSSandboxPhoneNumber where
toQuery :: VerifySMSSandboxPhoneNumber -> QueryString
toQuery VerifySMSSandboxPhoneNumber' {Text
oneTimePassword :: Text
phoneNumber :: Text
$sel:oneTimePassword:VerifySMSSandboxPhoneNumber' :: VerifySMSSandboxPhoneNumber -> Text
$sel:phoneNumber:VerifySMSSandboxPhoneNumber' :: VerifySMSSandboxPhoneNumber -> 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
"VerifySMSSandboxPhoneNumber" ::
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,
ByteString
"OneTimePassword" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
oneTimePassword
]
data VerifySMSSandboxPhoneNumberResponse = VerifySMSSandboxPhoneNumberResponse'
{
VerifySMSSandboxPhoneNumberResponse -> Int
httpStatus :: Prelude.Int
}
deriving (VerifySMSSandboxPhoneNumberResponse
-> VerifySMSSandboxPhoneNumberResponse -> Bool
(VerifySMSSandboxPhoneNumberResponse
-> VerifySMSSandboxPhoneNumberResponse -> Bool)
-> (VerifySMSSandboxPhoneNumberResponse
-> VerifySMSSandboxPhoneNumberResponse -> Bool)
-> Eq VerifySMSSandboxPhoneNumberResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VerifySMSSandboxPhoneNumberResponse
-> VerifySMSSandboxPhoneNumberResponse -> Bool
$c/= :: VerifySMSSandboxPhoneNumberResponse
-> VerifySMSSandboxPhoneNumberResponse -> Bool
== :: VerifySMSSandboxPhoneNumberResponse
-> VerifySMSSandboxPhoneNumberResponse -> Bool
$c== :: VerifySMSSandboxPhoneNumberResponse
-> VerifySMSSandboxPhoneNumberResponse -> Bool
Prelude.Eq, ReadPrec [VerifySMSSandboxPhoneNumberResponse]
ReadPrec VerifySMSSandboxPhoneNumberResponse
Int -> ReadS VerifySMSSandboxPhoneNumberResponse
ReadS [VerifySMSSandboxPhoneNumberResponse]
(Int -> ReadS VerifySMSSandboxPhoneNumberResponse)
-> ReadS [VerifySMSSandboxPhoneNumberResponse]
-> ReadPrec VerifySMSSandboxPhoneNumberResponse
-> ReadPrec [VerifySMSSandboxPhoneNumberResponse]
-> Read VerifySMSSandboxPhoneNumberResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VerifySMSSandboxPhoneNumberResponse]
$creadListPrec :: ReadPrec [VerifySMSSandboxPhoneNumberResponse]
readPrec :: ReadPrec VerifySMSSandboxPhoneNumberResponse
$creadPrec :: ReadPrec VerifySMSSandboxPhoneNumberResponse
readList :: ReadS [VerifySMSSandboxPhoneNumberResponse]
$creadList :: ReadS [VerifySMSSandboxPhoneNumberResponse]
readsPrec :: Int -> ReadS VerifySMSSandboxPhoneNumberResponse
$creadsPrec :: Int -> ReadS VerifySMSSandboxPhoneNumberResponse
Prelude.Read, Int -> VerifySMSSandboxPhoneNumberResponse -> ShowS
[VerifySMSSandboxPhoneNumberResponse] -> ShowS
VerifySMSSandboxPhoneNumberResponse -> String
(Int -> VerifySMSSandboxPhoneNumberResponse -> ShowS)
-> (VerifySMSSandboxPhoneNumberResponse -> String)
-> ([VerifySMSSandboxPhoneNumberResponse] -> ShowS)
-> Show VerifySMSSandboxPhoneNumberResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VerifySMSSandboxPhoneNumberResponse] -> ShowS
$cshowList :: [VerifySMSSandboxPhoneNumberResponse] -> ShowS
show :: VerifySMSSandboxPhoneNumberResponse -> String
$cshow :: VerifySMSSandboxPhoneNumberResponse -> String
showsPrec :: Int -> VerifySMSSandboxPhoneNumberResponse -> ShowS
$cshowsPrec :: Int -> VerifySMSSandboxPhoneNumberResponse -> ShowS
Prelude.Show, (forall x.
VerifySMSSandboxPhoneNumberResponse
-> Rep VerifySMSSandboxPhoneNumberResponse x)
-> (forall x.
Rep VerifySMSSandboxPhoneNumberResponse x
-> VerifySMSSandboxPhoneNumberResponse)
-> Generic VerifySMSSandboxPhoneNumberResponse
forall x.
Rep VerifySMSSandboxPhoneNumberResponse x
-> VerifySMSSandboxPhoneNumberResponse
forall x.
VerifySMSSandboxPhoneNumberResponse
-> Rep VerifySMSSandboxPhoneNumberResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VerifySMSSandboxPhoneNumberResponse x
-> VerifySMSSandboxPhoneNumberResponse
$cfrom :: forall x.
VerifySMSSandboxPhoneNumberResponse
-> Rep VerifySMSSandboxPhoneNumberResponse x
Prelude.Generic)
newVerifySMSSandboxPhoneNumberResponse ::
Prelude.Int ->
VerifySMSSandboxPhoneNumberResponse
newVerifySMSSandboxPhoneNumberResponse :: Int -> VerifySMSSandboxPhoneNumberResponse
newVerifySMSSandboxPhoneNumberResponse Int
pHttpStatus_ =
VerifySMSSandboxPhoneNumberResponse' :: Int -> VerifySMSSandboxPhoneNumberResponse
VerifySMSSandboxPhoneNumberResponse'
{ $sel:httpStatus:VerifySMSSandboxPhoneNumberResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
verifySMSSandboxPhoneNumberResponse_httpStatus :: Lens.Lens' VerifySMSSandboxPhoneNumberResponse Prelude.Int
verifySMSSandboxPhoneNumberResponse_httpStatus :: (Int -> f Int)
-> VerifySMSSandboxPhoneNumberResponse
-> f VerifySMSSandboxPhoneNumberResponse
verifySMSSandboxPhoneNumberResponse_httpStatus = (VerifySMSSandboxPhoneNumberResponse -> Int)
-> (VerifySMSSandboxPhoneNumberResponse
-> Int -> VerifySMSSandboxPhoneNumberResponse)
-> Lens
VerifySMSSandboxPhoneNumberResponse
VerifySMSSandboxPhoneNumberResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerifySMSSandboxPhoneNumberResponse' {Int
httpStatus :: Int
$sel:httpStatus:VerifySMSSandboxPhoneNumberResponse' :: VerifySMSSandboxPhoneNumberResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: VerifySMSSandboxPhoneNumberResponse
s@VerifySMSSandboxPhoneNumberResponse' {} Int
a -> VerifySMSSandboxPhoneNumberResponse
s {$sel:httpStatus:VerifySMSSandboxPhoneNumberResponse' :: Int
httpStatus = Int
a} :: VerifySMSSandboxPhoneNumberResponse)
instance
Prelude.NFData
VerifySMSSandboxPhoneNumberResponse