{-# 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.GetSMSSandboxAccountStatus
(
GetSMSSandboxAccountStatus (..),
newGetSMSSandboxAccountStatus,
GetSMSSandboxAccountStatusResponse (..),
newGetSMSSandboxAccountStatusResponse,
getSMSSandboxAccountStatusResponse_httpStatus,
getSMSSandboxAccountStatusResponse_isInSandbox,
)
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 GetSMSSandboxAccountStatus = GetSMSSandboxAccountStatus'
{
}
deriving (GetSMSSandboxAccountStatus -> GetSMSSandboxAccountStatus -> Bool
(GetSMSSandboxAccountStatus -> GetSMSSandboxAccountStatus -> Bool)
-> (GetSMSSandboxAccountStatus
-> GetSMSSandboxAccountStatus -> Bool)
-> Eq GetSMSSandboxAccountStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSMSSandboxAccountStatus -> GetSMSSandboxAccountStatus -> Bool
$c/= :: GetSMSSandboxAccountStatus -> GetSMSSandboxAccountStatus -> Bool
== :: GetSMSSandboxAccountStatus -> GetSMSSandboxAccountStatus -> Bool
$c== :: GetSMSSandboxAccountStatus -> GetSMSSandboxAccountStatus -> Bool
Prelude.Eq, ReadPrec [GetSMSSandboxAccountStatus]
ReadPrec GetSMSSandboxAccountStatus
Int -> ReadS GetSMSSandboxAccountStatus
ReadS [GetSMSSandboxAccountStatus]
(Int -> ReadS GetSMSSandboxAccountStatus)
-> ReadS [GetSMSSandboxAccountStatus]
-> ReadPrec GetSMSSandboxAccountStatus
-> ReadPrec [GetSMSSandboxAccountStatus]
-> Read GetSMSSandboxAccountStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSMSSandboxAccountStatus]
$creadListPrec :: ReadPrec [GetSMSSandboxAccountStatus]
readPrec :: ReadPrec GetSMSSandboxAccountStatus
$creadPrec :: ReadPrec GetSMSSandboxAccountStatus
readList :: ReadS [GetSMSSandboxAccountStatus]
$creadList :: ReadS [GetSMSSandboxAccountStatus]
readsPrec :: Int -> ReadS GetSMSSandboxAccountStatus
$creadsPrec :: Int -> ReadS GetSMSSandboxAccountStatus
Prelude.Read, Int -> GetSMSSandboxAccountStatus -> ShowS
[GetSMSSandboxAccountStatus] -> ShowS
GetSMSSandboxAccountStatus -> String
(Int -> GetSMSSandboxAccountStatus -> ShowS)
-> (GetSMSSandboxAccountStatus -> String)
-> ([GetSMSSandboxAccountStatus] -> ShowS)
-> Show GetSMSSandboxAccountStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSMSSandboxAccountStatus] -> ShowS
$cshowList :: [GetSMSSandboxAccountStatus] -> ShowS
show :: GetSMSSandboxAccountStatus -> String
$cshow :: GetSMSSandboxAccountStatus -> String
showsPrec :: Int -> GetSMSSandboxAccountStatus -> ShowS
$cshowsPrec :: Int -> GetSMSSandboxAccountStatus -> ShowS
Prelude.Show, (forall x.
GetSMSSandboxAccountStatus -> Rep GetSMSSandboxAccountStatus x)
-> (forall x.
Rep GetSMSSandboxAccountStatus x -> GetSMSSandboxAccountStatus)
-> Generic GetSMSSandboxAccountStatus
forall x.
Rep GetSMSSandboxAccountStatus x -> GetSMSSandboxAccountStatus
forall x.
GetSMSSandboxAccountStatus -> Rep GetSMSSandboxAccountStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetSMSSandboxAccountStatus x -> GetSMSSandboxAccountStatus
$cfrom :: forall x.
GetSMSSandboxAccountStatus -> Rep GetSMSSandboxAccountStatus x
Prelude.Generic)
newGetSMSSandboxAccountStatus ::
GetSMSSandboxAccountStatus
newGetSMSSandboxAccountStatus :: GetSMSSandboxAccountStatus
newGetSMSSandboxAccountStatus =
GetSMSSandboxAccountStatus
GetSMSSandboxAccountStatus'
instance Core.AWSRequest GetSMSSandboxAccountStatus where
type
AWSResponse GetSMSSandboxAccountStatus =
GetSMSSandboxAccountStatusResponse
request :: GetSMSSandboxAccountStatus -> Request GetSMSSandboxAccountStatus
request = Service
-> GetSMSSandboxAccountStatus -> Request GetSMSSandboxAccountStatus
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy GetSMSSandboxAccountStatus
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetSMSSandboxAccountStatus)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse GetSMSSandboxAccountStatus))
-> Logger
-> Service
-> Proxy GetSMSSandboxAccountStatus
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetSMSSandboxAccountStatus)))
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
"GetSMSSandboxAccountStatusResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> Bool -> GetSMSSandboxAccountStatusResponse
GetSMSSandboxAccountStatusResponse'
(Int -> Bool -> GetSMSSandboxAccountStatusResponse)
-> Either String Int
-> Either String (Bool -> GetSMSSandboxAccountStatusResponse)
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))
Either String (Bool -> GetSMSSandboxAccountStatusResponse)
-> Either String Bool
-> Either String GetSMSSandboxAccountStatusResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Bool
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"IsInSandbox")
)
instance Prelude.Hashable GetSMSSandboxAccountStatus
instance Prelude.NFData GetSMSSandboxAccountStatus
instance Core.ToHeaders GetSMSSandboxAccountStatus where
toHeaders :: GetSMSSandboxAccountStatus -> ResponseHeaders
toHeaders = ResponseHeaders -> GetSMSSandboxAccountStatus -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath GetSMSSandboxAccountStatus where
toPath :: GetSMSSandboxAccountStatus -> ByteString
toPath = ByteString -> GetSMSSandboxAccountStatus -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetSMSSandboxAccountStatus where
toQuery :: GetSMSSandboxAccountStatus -> QueryString
toQuery =
QueryString -> GetSMSSandboxAccountStatus -> QueryString
forall a b. a -> b -> a
Prelude.const
( [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"GetSMSSandboxAccountStatus" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-03-31" :: Prelude.ByteString)
]
)
data GetSMSSandboxAccountStatusResponse = GetSMSSandboxAccountStatusResponse'
{
GetSMSSandboxAccountStatusResponse -> Int
httpStatus :: Prelude.Int,
GetSMSSandboxAccountStatusResponse -> Bool
isInSandbox :: Prelude.Bool
}
deriving (GetSMSSandboxAccountStatusResponse
-> GetSMSSandboxAccountStatusResponse -> Bool
(GetSMSSandboxAccountStatusResponse
-> GetSMSSandboxAccountStatusResponse -> Bool)
-> (GetSMSSandboxAccountStatusResponse
-> GetSMSSandboxAccountStatusResponse -> Bool)
-> Eq GetSMSSandboxAccountStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSMSSandboxAccountStatusResponse
-> GetSMSSandboxAccountStatusResponse -> Bool
$c/= :: GetSMSSandboxAccountStatusResponse
-> GetSMSSandboxAccountStatusResponse -> Bool
== :: GetSMSSandboxAccountStatusResponse
-> GetSMSSandboxAccountStatusResponse -> Bool
$c== :: GetSMSSandboxAccountStatusResponse
-> GetSMSSandboxAccountStatusResponse -> Bool
Prelude.Eq, ReadPrec [GetSMSSandboxAccountStatusResponse]
ReadPrec GetSMSSandboxAccountStatusResponse
Int -> ReadS GetSMSSandboxAccountStatusResponse
ReadS [GetSMSSandboxAccountStatusResponse]
(Int -> ReadS GetSMSSandboxAccountStatusResponse)
-> ReadS [GetSMSSandboxAccountStatusResponse]
-> ReadPrec GetSMSSandboxAccountStatusResponse
-> ReadPrec [GetSMSSandboxAccountStatusResponse]
-> Read GetSMSSandboxAccountStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSMSSandboxAccountStatusResponse]
$creadListPrec :: ReadPrec [GetSMSSandboxAccountStatusResponse]
readPrec :: ReadPrec GetSMSSandboxAccountStatusResponse
$creadPrec :: ReadPrec GetSMSSandboxAccountStatusResponse
readList :: ReadS [GetSMSSandboxAccountStatusResponse]
$creadList :: ReadS [GetSMSSandboxAccountStatusResponse]
readsPrec :: Int -> ReadS GetSMSSandboxAccountStatusResponse
$creadsPrec :: Int -> ReadS GetSMSSandboxAccountStatusResponse
Prelude.Read, Int -> GetSMSSandboxAccountStatusResponse -> ShowS
[GetSMSSandboxAccountStatusResponse] -> ShowS
GetSMSSandboxAccountStatusResponse -> String
(Int -> GetSMSSandboxAccountStatusResponse -> ShowS)
-> (GetSMSSandboxAccountStatusResponse -> String)
-> ([GetSMSSandboxAccountStatusResponse] -> ShowS)
-> Show GetSMSSandboxAccountStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSMSSandboxAccountStatusResponse] -> ShowS
$cshowList :: [GetSMSSandboxAccountStatusResponse] -> ShowS
show :: GetSMSSandboxAccountStatusResponse -> String
$cshow :: GetSMSSandboxAccountStatusResponse -> String
showsPrec :: Int -> GetSMSSandboxAccountStatusResponse -> ShowS
$cshowsPrec :: Int -> GetSMSSandboxAccountStatusResponse -> ShowS
Prelude.Show, (forall x.
GetSMSSandboxAccountStatusResponse
-> Rep GetSMSSandboxAccountStatusResponse x)
-> (forall x.
Rep GetSMSSandboxAccountStatusResponse x
-> GetSMSSandboxAccountStatusResponse)
-> Generic GetSMSSandboxAccountStatusResponse
forall x.
Rep GetSMSSandboxAccountStatusResponse x
-> GetSMSSandboxAccountStatusResponse
forall x.
GetSMSSandboxAccountStatusResponse
-> Rep GetSMSSandboxAccountStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetSMSSandboxAccountStatusResponse x
-> GetSMSSandboxAccountStatusResponse
$cfrom :: forall x.
GetSMSSandboxAccountStatusResponse
-> Rep GetSMSSandboxAccountStatusResponse x
Prelude.Generic)
newGetSMSSandboxAccountStatusResponse ::
Prelude.Int ->
Prelude.Bool ->
GetSMSSandboxAccountStatusResponse
newGetSMSSandboxAccountStatusResponse :: Int -> Bool -> GetSMSSandboxAccountStatusResponse
newGetSMSSandboxAccountStatusResponse
Int
pHttpStatus_
Bool
pIsInSandbox_ =
GetSMSSandboxAccountStatusResponse' :: Int -> Bool -> GetSMSSandboxAccountStatusResponse
GetSMSSandboxAccountStatusResponse'
{ $sel:httpStatus:GetSMSSandboxAccountStatusResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:isInSandbox:GetSMSSandboxAccountStatusResponse' :: Bool
isInSandbox = Bool
pIsInSandbox_
}
getSMSSandboxAccountStatusResponse_httpStatus :: Lens.Lens' GetSMSSandboxAccountStatusResponse Prelude.Int
getSMSSandboxAccountStatusResponse_httpStatus :: (Int -> f Int)
-> GetSMSSandboxAccountStatusResponse
-> f GetSMSSandboxAccountStatusResponse
getSMSSandboxAccountStatusResponse_httpStatus = (GetSMSSandboxAccountStatusResponse -> Int)
-> (GetSMSSandboxAccountStatusResponse
-> Int -> GetSMSSandboxAccountStatusResponse)
-> Lens
GetSMSSandboxAccountStatusResponse
GetSMSSandboxAccountStatusResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSMSSandboxAccountStatusResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetSMSSandboxAccountStatusResponse' :: GetSMSSandboxAccountStatusResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetSMSSandboxAccountStatusResponse
s@GetSMSSandboxAccountStatusResponse' {} Int
a -> GetSMSSandboxAccountStatusResponse
s {$sel:httpStatus:GetSMSSandboxAccountStatusResponse' :: Int
httpStatus = Int
a} :: GetSMSSandboxAccountStatusResponse)
getSMSSandboxAccountStatusResponse_isInSandbox :: Lens.Lens' GetSMSSandboxAccountStatusResponse Prelude.Bool
getSMSSandboxAccountStatusResponse_isInSandbox :: (Bool -> f Bool)
-> GetSMSSandboxAccountStatusResponse
-> f GetSMSSandboxAccountStatusResponse
getSMSSandboxAccountStatusResponse_isInSandbox = (GetSMSSandboxAccountStatusResponse -> Bool)
-> (GetSMSSandboxAccountStatusResponse
-> Bool -> GetSMSSandboxAccountStatusResponse)
-> Lens
GetSMSSandboxAccountStatusResponse
GetSMSSandboxAccountStatusResponse
Bool
Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSMSSandboxAccountStatusResponse' {Bool
isInSandbox :: Bool
$sel:isInSandbox:GetSMSSandboxAccountStatusResponse' :: GetSMSSandboxAccountStatusResponse -> Bool
isInSandbox} -> Bool
isInSandbox) (\s :: GetSMSSandboxAccountStatusResponse
s@GetSMSSandboxAccountStatusResponse' {} Bool
a -> GetSMSSandboxAccountStatusResponse
s {$sel:isInSandbox:GetSMSSandboxAccountStatusResponse' :: Bool
isInSandbox = Bool
a} :: GetSMSSandboxAccountStatusResponse)
instance
Prelude.NFData
GetSMSSandboxAccountStatusResponse