{-# 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.Pinpoint.DeleteApnsVoipSandboxChannel
(
DeleteApnsVoipSandboxChannel (..),
newDeleteApnsVoipSandboxChannel,
deleteApnsVoipSandboxChannel_applicationId,
DeleteApnsVoipSandboxChannelResponse (..),
newDeleteApnsVoipSandboxChannelResponse,
deleteApnsVoipSandboxChannelResponse_httpStatus,
deleteApnsVoipSandboxChannelResponse_aPNSVoipSandboxChannelResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteApnsVoipSandboxChannel = DeleteApnsVoipSandboxChannel'
{
DeleteApnsVoipSandboxChannel -> Text
applicationId :: Prelude.Text
}
deriving (DeleteApnsVoipSandboxChannel
-> DeleteApnsVoipSandboxChannel -> Bool
(DeleteApnsVoipSandboxChannel
-> DeleteApnsVoipSandboxChannel -> Bool)
-> (DeleteApnsVoipSandboxChannel
-> DeleteApnsVoipSandboxChannel -> Bool)
-> Eq DeleteApnsVoipSandboxChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApnsVoipSandboxChannel
-> DeleteApnsVoipSandboxChannel -> Bool
$c/= :: DeleteApnsVoipSandboxChannel
-> DeleteApnsVoipSandboxChannel -> Bool
== :: DeleteApnsVoipSandboxChannel
-> DeleteApnsVoipSandboxChannel -> Bool
$c== :: DeleteApnsVoipSandboxChannel
-> DeleteApnsVoipSandboxChannel -> Bool
Prelude.Eq, ReadPrec [DeleteApnsVoipSandboxChannel]
ReadPrec DeleteApnsVoipSandboxChannel
Int -> ReadS DeleteApnsVoipSandboxChannel
ReadS [DeleteApnsVoipSandboxChannel]
(Int -> ReadS DeleteApnsVoipSandboxChannel)
-> ReadS [DeleteApnsVoipSandboxChannel]
-> ReadPrec DeleteApnsVoipSandboxChannel
-> ReadPrec [DeleteApnsVoipSandboxChannel]
-> Read DeleteApnsVoipSandboxChannel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApnsVoipSandboxChannel]
$creadListPrec :: ReadPrec [DeleteApnsVoipSandboxChannel]
readPrec :: ReadPrec DeleteApnsVoipSandboxChannel
$creadPrec :: ReadPrec DeleteApnsVoipSandboxChannel
readList :: ReadS [DeleteApnsVoipSandboxChannel]
$creadList :: ReadS [DeleteApnsVoipSandboxChannel]
readsPrec :: Int -> ReadS DeleteApnsVoipSandboxChannel
$creadsPrec :: Int -> ReadS DeleteApnsVoipSandboxChannel
Prelude.Read, Int -> DeleteApnsVoipSandboxChannel -> ShowS
[DeleteApnsVoipSandboxChannel] -> ShowS
DeleteApnsVoipSandboxChannel -> String
(Int -> DeleteApnsVoipSandboxChannel -> ShowS)
-> (DeleteApnsVoipSandboxChannel -> String)
-> ([DeleteApnsVoipSandboxChannel] -> ShowS)
-> Show DeleteApnsVoipSandboxChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApnsVoipSandboxChannel] -> ShowS
$cshowList :: [DeleteApnsVoipSandboxChannel] -> ShowS
show :: DeleteApnsVoipSandboxChannel -> String
$cshow :: DeleteApnsVoipSandboxChannel -> String
showsPrec :: Int -> DeleteApnsVoipSandboxChannel -> ShowS
$cshowsPrec :: Int -> DeleteApnsVoipSandboxChannel -> ShowS
Prelude.Show, (forall x.
DeleteApnsVoipSandboxChannel -> Rep DeleteApnsVoipSandboxChannel x)
-> (forall x.
Rep DeleteApnsVoipSandboxChannel x -> DeleteApnsVoipSandboxChannel)
-> Generic DeleteApnsVoipSandboxChannel
forall x.
Rep DeleteApnsVoipSandboxChannel x -> DeleteApnsVoipSandboxChannel
forall x.
DeleteApnsVoipSandboxChannel -> Rep DeleteApnsVoipSandboxChannel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteApnsVoipSandboxChannel x -> DeleteApnsVoipSandboxChannel
$cfrom :: forall x.
DeleteApnsVoipSandboxChannel -> Rep DeleteApnsVoipSandboxChannel x
Prelude.Generic)
newDeleteApnsVoipSandboxChannel ::
Prelude.Text ->
DeleteApnsVoipSandboxChannel
newDeleteApnsVoipSandboxChannel :: Text -> DeleteApnsVoipSandboxChannel
newDeleteApnsVoipSandboxChannel Text
pApplicationId_ =
DeleteApnsVoipSandboxChannel' :: Text -> DeleteApnsVoipSandboxChannel
DeleteApnsVoipSandboxChannel'
{ $sel:applicationId:DeleteApnsVoipSandboxChannel' :: Text
applicationId =
Text
pApplicationId_
}
deleteApnsVoipSandboxChannel_applicationId :: Lens.Lens' DeleteApnsVoipSandboxChannel Prelude.Text
deleteApnsVoipSandboxChannel_applicationId :: (Text -> f Text)
-> DeleteApnsVoipSandboxChannel -> f DeleteApnsVoipSandboxChannel
deleteApnsVoipSandboxChannel_applicationId = (DeleteApnsVoipSandboxChannel -> Text)
-> (DeleteApnsVoipSandboxChannel
-> Text -> DeleteApnsVoipSandboxChannel)
-> Lens
DeleteApnsVoipSandboxChannel DeleteApnsVoipSandboxChannel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApnsVoipSandboxChannel' {Text
applicationId :: Text
$sel:applicationId:DeleteApnsVoipSandboxChannel' :: DeleteApnsVoipSandboxChannel -> Text
applicationId} -> Text
applicationId) (\s :: DeleteApnsVoipSandboxChannel
s@DeleteApnsVoipSandboxChannel' {} Text
a -> DeleteApnsVoipSandboxChannel
s {$sel:applicationId:DeleteApnsVoipSandboxChannel' :: Text
applicationId = Text
a} :: DeleteApnsVoipSandboxChannel)
instance Core.AWSRequest DeleteApnsVoipSandboxChannel where
type
AWSResponse DeleteApnsVoipSandboxChannel =
DeleteApnsVoipSandboxChannelResponse
request :: DeleteApnsVoipSandboxChannel
-> Request DeleteApnsVoipSandboxChannel
request = Service
-> DeleteApnsVoipSandboxChannel
-> Request DeleteApnsVoipSandboxChannel
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteApnsVoipSandboxChannel
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteApnsVoipSandboxChannel)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteApnsVoipSandboxChannel))
-> Logger
-> Service
-> Proxy DeleteApnsVoipSandboxChannel
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteApnsVoipSandboxChannel)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int
-> APNSVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse
DeleteApnsVoipSandboxChannelResponse'
(Int
-> APNSVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse)
-> Either String Int
-> Either
String
(APNSVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse)
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
(APNSVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse)
-> Either String APNSVoipSandboxChannelResponse
-> Either String DeleteApnsVoipSandboxChannelResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object -> Either String APNSVoipSandboxChannelResponse
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
)
instance
Prelude.Hashable
DeleteApnsVoipSandboxChannel
instance Prelude.NFData DeleteApnsVoipSandboxChannel
instance Core.ToHeaders DeleteApnsVoipSandboxChannel where
toHeaders :: DeleteApnsVoipSandboxChannel -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteApnsVoipSandboxChannel -> 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 DeleteApnsVoipSandboxChannel where
toPath :: DeleteApnsVoipSandboxChannel -> ByteString
toPath DeleteApnsVoipSandboxChannel' {Text
applicationId :: Text
$sel:applicationId:DeleteApnsVoipSandboxChannel' :: DeleteApnsVoipSandboxChannel -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v1/apps/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
applicationId,
ByteString
"/channels/apns_voip_sandbox"
]
instance Core.ToQuery DeleteApnsVoipSandboxChannel where
toQuery :: DeleteApnsVoipSandboxChannel -> QueryString
toQuery = QueryString -> DeleteApnsVoipSandboxChannel -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteApnsVoipSandboxChannelResponse = DeleteApnsVoipSandboxChannelResponse'
{
DeleteApnsVoipSandboxChannelResponse -> Int
httpStatus :: Prelude.Int,
DeleteApnsVoipSandboxChannelResponse
-> APNSVoipSandboxChannelResponse
aPNSVoipSandboxChannelResponse :: APNSVoipSandboxChannelResponse
}
deriving (DeleteApnsVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse -> Bool
(DeleteApnsVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse -> Bool)
-> (DeleteApnsVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse -> Bool)
-> Eq DeleteApnsVoipSandboxChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApnsVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse -> Bool
$c/= :: DeleteApnsVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse -> Bool
== :: DeleteApnsVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse -> Bool
$c== :: DeleteApnsVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse -> Bool
Prelude.Eq, ReadPrec [DeleteApnsVoipSandboxChannelResponse]
ReadPrec DeleteApnsVoipSandboxChannelResponse
Int -> ReadS DeleteApnsVoipSandboxChannelResponse
ReadS [DeleteApnsVoipSandboxChannelResponse]
(Int -> ReadS DeleteApnsVoipSandboxChannelResponse)
-> ReadS [DeleteApnsVoipSandboxChannelResponse]
-> ReadPrec DeleteApnsVoipSandboxChannelResponse
-> ReadPrec [DeleteApnsVoipSandboxChannelResponse]
-> Read DeleteApnsVoipSandboxChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApnsVoipSandboxChannelResponse]
$creadListPrec :: ReadPrec [DeleteApnsVoipSandboxChannelResponse]
readPrec :: ReadPrec DeleteApnsVoipSandboxChannelResponse
$creadPrec :: ReadPrec DeleteApnsVoipSandboxChannelResponse
readList :: ReadS [DeleteApnsVoipSandboxChannelResponse]
$creadList :: ReadS [DeleteApnsVoipSandboxChannelResponse]
readsPrec :: Int -> ReadS DeleteApnsVoipSandboxChannelResponse
$creadsPrec :: Int -> ReadS DeleteApnsVoipSandboxChannelResponse
Prelude.Read, Int -> DeleteApnsVoipSandboxChannelResponse -> ShowS
[DeleteApnsVoipSandboxChannelResponse] -> ShowS
DeleteApnsVoipSandboxChannelResponse -> String
(Int -> DeleteApnsVoipSandboxChannelResponse -> ShowS)
-> (DeleteApnsVoipSandboxChannelResponse -> String)
-> ([DeleteApnsVoipSandboxChannelResponse] -> ShowS)
-> Show DeleteApnsVoipSandboxChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApnsVoipSandboxChannelResponse] -> ShowS
$cshowList :: [DeleteApnsVoipSandboxChannelResponse] -> ShowS
show :: DeleteApnsVoipSandboxChannelResponse -> String
$cshow :: DeleteApnsVoipSandboxChannelResponse -> String
showsPrec :: Int -> DeleteApnsVoipSandboxChannelResponse -> ShowS
$cshowsPrec :: Int -> DeleteApnsVoipSandboxChannelResponse -> ShowS
Prelude.Show, (forall x.
DeleteApnsVoipSandboxChannelResponse
-> Rep DeleteApnsVoipSandboxChannelResponse x)
-> (forall x.
Rep DeleteApnsVoipSandboxChannelResponse x
-> DeleteApnsVoipSandboxChannelResponse)
-> Generic DeleteApnsVoipSandboxChannelResponse
forall x.
Rep DeleteApnsVoipSandboxChannelResponse x
-> DeleteApnsVoipSandboxChannelResponse
forall x.
DeleteApnsVoipSandboxChannelResponse
-> Rep DeleteApnsVoipSandboxChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteApnsVoipSandboxChannelResponse x
-> DeleteApnsVoipSandboxChannelResponse
$cfrom :: forall x.
DeleteApnsVoipSandboxChannelResponse
-> Rep DeleteApnsVoipSandboxChannelResponse x
Prelude.Generic)
newDeleteApnsVoipSandboxChannelResponse ::
Prelude.Int ->
APNSVoipSandboxChannelResponse ->
DeleteApnsVoipSandboxChannelResponse
newDeleteApnsVoipSandboxChannelResponse :: Int
-> APNSVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse
newDeleteApnsVoipSandboxChannelResponse
Int
pHttpStatus_
APNSVoipSandboxChannelResponse
pAPNSVoipSandboxChannelResponse_ =
DeleteApnsVoipSandboxChannelResponse' :: Int
-> APNSVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse
DeleteApnsVoipSandboxChannelResponse'
{ $sel:httpStatus:DeleteApnsVoipSandboxChannelResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:aPNSVoipSandboxChannelResponse:DeleteApnsVoipSandboxChannelResponse' :: APNSVoipSandboxChannelResponse
aPNSVoipSandboxChannelResponse =
APNSVoipSandboxChannelResponse
pAPNSVoipSandboxChannelResponse_
}
deleteApnsVoipSandboxChannelResponse_httpStatus :: Lens.Lens' DeleteApnsVoipSandboxChannelResponse Prelude.Int
deleteApnsVoipSandboxChannelResponse_httpStatus :: (Int -> f Int)
-> DeleteApnsVoipSandboxChannelResponse
-> f DeleteApnsVoipSandboxChannelResponse
deleteApnsVoipSandboxChannelResponse_httpStatus = (DeleteApnsVoipSandboxChannelResponse -> Int)
-> (DeleteApnsVoipSandboxChannelResponse
-> Int -> DeleteApnsVoipSandboxChannelResponse)
-> Lens
DeleteApnsVoipSandboxChannelResponse
DeleteApnsVoipSandboxChannelResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApnsVoipSandboxChannelResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteApnsVoipSandboxChannelResponse' :: DeleteApnsVoipSandboxChannelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteApnsVoipSandboxChannelResponse
s@DeleteApnsVoipSandboxChannelResponse' {} Int
a -> DeleteApnsVoipSandboxChannelResponse
s {$sel:httpStatus:DeleteApnsVoipSandboxChannelResponse' :: Int
httpStatus = Int
a} :: DeleteApnsVoipSandboxChannelResponse)
deleteApnsVoipSandboxChannelResponse_aPNSVoipSandboxChannelResponse :: Lens.Lens' DeleteApnsVoipSandboxChannelResponse APNSVoipSandboxChannelResponse
deleteApnsVoipSandboxChannelResponse_aPNSVoipSandboxChannelResponse :: (APNSVoipSandboxChannelResponse
-> f APNSVoipSandboxChannelResponse)
-> DeleteApnsVoipSandboxChannelResponse
-> f DeleteApnsVoipSandboxChannelResponse
deleteApnsVoipSandboxChannelResponse_aPNSVoipSandboxChannelResponse = (DeleteApnsVoipSandboxChannelResponse
-> APNSVoipSandboxChannelResponse)
-> (DeleteApnsVoipSandboxChannelResponse
-> APNSVoipSandboxChannelResponse
-> DeleteApnsVoipSandboxChannelResponse)
-> Lens
DeleteApnsVoipSandboxChannelResponse
DeleteApnsVoipSandboxChannelResponse
APNSVoipSandboxChannelResponse
APNSVoipSandboxChannelResponse
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApnsVoipSandboxChannelResponse' {APNSVoipSandboxChannelResponse
aPNSVoipSandboxChannelResponse :: APNSVoipSandboxChannelResponse
$sel:aPNSVoipSandboxChannelResponse:DeleteApnsVoipSandboxChannelResponse' :: DeleteApnsVoipSandboxChannelResponse
-> APNSVoipSandboxChannelResponse
aPNSVoipSandboxChannelResponse} -> APNSVoipSandboxChannelResponse
aPNSVoipSandboxChannelResponse) (\s :: DeleteApnsVoipSandboxChannelResponse
s@DeleteApnsVoipSandboxChannelResponse' {} APNSVoipSandboxChannelResponse
a -> DeleteApnsVoipSandboxChannelResponse
s {$sel:aPNSVoipSandboxChannelResponse:DeleteApnsVoipSandboxChannelResponse' :: APNSVoipSandboxChannelResponse
aPNSVoipSandboxChannelResponse = APNSVoipSandboxChannelResponse
a} :: DeleteApnsVoipSandboxChannelResponse)
instance
Prelude.NFData
DeleteApnsVoipSandboxChannelResponse