{-# 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.DeleteApnsSandboxChannel
(
DeleteApnsSandboxChannel (..),
newDeleteApnsSandboxChannel,
deleteApnsSandboxChannel_applicationId,
DeleteApnsSandboxChannelResponse (..),
newDeleteApnsSandboxChannelResponse,
deleteApnsSandboxChannelResponse_httpStatus,
deleteApnsSandboxChannelResponse_aPNSSandboxChannelResponse,
)
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 DeleteApnsSandboxChannel = DeleteApnsSandboxChannel'
{
DeleteApnsSandboxChannel -> Text
applicationId :: Prelude.Text
}
deriving (DeleteApnsSandboxChannel -> DeleteApnsSandboxChannel -> Bool
(DeleteApnsSandboxChannel -> DeleteApnsSandboxChannel -> Bool)
-> (DeleteApnsSandboxChannel -> DeleteApnsSandboxChannel -> Bool)
-> Eq DeleteApnsSandboxChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApnsSandboxChannel -> DeleteApnsSandboxChannel -> Bool
$c/= :: DeleteApnsSandboxChannel -> DeleteApnsSandboxChannel -> Bool
== :: DeleteApnsSandboxChannel -> DeleteApnsSandboxChannel -> Bool
$c== :: DeleteApnsSandboxChannel -> DeleteApnsSandboxChannel -> Bool
Prelude.Eq, ReadPrec [DeleteApnsSandboxChannel]
ReadPrec DeleteApnsSandboxChannel
Int -> ReadS DeleteApnsSandboxChannel
ReadS [DeleteApnsSandboxChannel]
(Int -> ReadS DeleteApnsSandboxChannel)
-> ReadS [DeleteApnsSandboxChannel]
-> ReadPrec DeleteApnsSandboxChannel
-> ReadPrec [DeleteApnsSandboxChannel]
-> Read DeleteApnsSandboxChannel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApnsSandboxChannel]
$creadListPrec :: ReadPrec [DeleteApnsSandboxChannel]
readPrec :: ReadPrec DeleteApnsSandboxChannel
$creadPrec :: ReadPrec DeleteApnsSandboxChannel
readList :: ReadS [DeleteApnsSandboxChannel]
$creadList :: ReadS [DeleteApnsSandboxChannel]
readsPrec :: Int -> ReadS DeleteApnsSandboxChannel
$creadsPrec :: Int -> ReadS DeleteApnsSandboxChannel
Prelude.Read, Int -> DeleteApnsSandboxChannel -> ShowS
[DeleteApnsSandboxChannel] -> ShowS
DeleteApnsSandboxChannel -> String
(Int -> DeleteApnsSandboxChannel -> ShowS)
-> (DeleteApnsSandboxChannel -> String)
-> ([DeleteApnsSandboxChannel] -> ShowS)
-> Show DeleteApnsSandboxChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApnsSandboxChannel] -> ShowS
$cshowList :: [DeleteApnsSandboxChannel] -> ShowS
show :: DeleteApnsSandboxChannel -> String
$cshow :: DeleteApnsSandboxChannel -> String
showsPrec :: Int -> DeleteApnsSandboxChannel -> ShowS
$cshowsPrec :: Int -> DeleteApnsSandboxChannel -> ShowS
Prelude.Show, (forall x.
DeleteApnsSandboxChannel -> Rep DeleteApnsSandboxChannel x)
-> (forall x.
Rep DeleteApnsSandboxChannel x -> DeleteApnsSandboxChannel)
-> Generic DeleteApnsSandboxChannel
forall x.
Rep DeleteApnsSandboxChannel x -> DeleteApnsSandboxChannel
forall x.
DeleteApnsSandboxChannel -> Rep DeleteApnsSandboxChannel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteApnsSandboxChannel x -> DeleteApnsSandboxChannel
$cfrom :: forall x.
DeleteApnsSandboxChannel -> Rep DeleteApnsSandboxChannel x
Prelude.Generic)
newDeleteApnsSandboxChannel ::
Prelude.Text ->
DeleteApnsSandboxChannel
newDeleteApnsSandboxChannel :: Text -> DeleteApnsSandboxChannel
newDeleteApnsSandboxChannel Text
pApplicationId_ =
DeleteApnsSandboxChannel' :: Text -> DeleteApnsSandboxChannel
DeleteApnsSandboxChannel'
{ $sel:applicationId:DeleteApnsSandboxChannel' :: Text
applicationId =
Text
pApplicationId_
}
deleteApnsSandboxChannel_applicationId :: Lens.Lens' DeleteApnsSandboxChannel Prelude.Text
deleteApnsSandboxChannel_applicationId :: (Text -> f Text)
-> DeleteApnsSandboxChannel -> f DeleteApnsSandboxChannel
deleteApnsSandboxChannel_applicationId = (DeleteApnsSandboxChannel -> Text)
-> (DeleteApnsSandboxChannel -> Text -> DeleteApnsSandboxChannel)
-> Lens DeleteApnsSandboxChannel DeleteApnsSandboxChannel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApnsSandboxChannel' {Text
applicationId :: Text
$sel:applicationId:DeleteApnsSandboxChannel' :: DeleteApnsSandboxChannel -> Text
applicationId} -> Text
applicationId) (\s :: DeleteApnsSandboxChannel
s@DeleteApnsSandboxChannel' {} Text
a -> DeleteApnsSandboxChannel
s {$sel:applicationId:DeleteApnsSandboxChannel' :: Text
applicationId = Text
a} :: DeleteApnsSandboxChannel)
instance Core.AWSRequest DeleteApnsSandboxChannel where
type
AWSResponse DeleteApnsSandboxChannel =
DeleteApnsSandboxChannelResponse
request :: DeleteApnsSandboxChannel -> Request DeleteApnsSandboxChannel
request = Service
-> DeleteApnsSandboxChannel -> Request DeleteApnsSandboxChannel
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteApnsSandboxChannel
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteApnsSandboxChannel)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteApnsSandboxChannel))
-> Logger
-> Service
-> Proxy DeleteApnsSandboxChannel
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteApnsSandboxChannel)))
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
-> APNSSandboxChannelResponse -> DeleteApnsSandboxChannelResponse
DeleteApnsSandboxChannelResponse'
(Int
-> APNSSandboxChannelResponse -> DeleteApnsSandboxChannelResponse)
-> Either String Int
-> Either
String
(APNSSandboxChannelResponse -> DeleteApnsSandboxChannelResponse)
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
(APNSSandboxChannelResponse -> DeleteApnsSandboxChannelResponse)
-> Either String APNSSandboxChannelResponse
-> Either String DeleteApnsSandboxChannelResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object -> Either String APNSSandboxChannelResponse
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
)
instance Prelude.Hashable DeleteApnsSandboxChannel
instance Prelude.NFData DeleteApnsSandboxChannel
instance Core.ToHeaders DeleteApnsSandboxChannel where
toHeaders :: DeleteApnsSandboxChannel -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteApnsSandboxChannel -> 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 DeleteApnsSandboxChannel where
toPath :: DeleteApnsSandboxChannel -> ByteString
toPath DeleteApnsSandboxChannel' {Text
applicationId :: Text
$sel:applicationId:DeleteApnsSandboxChannel' :: DeleteApnsSandboxChannel -> 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_sandbox"
]
instance Core.ToQuery DeleteApnsSandboxChannel where
toQuery :: DeleteApnsSandboxChannel -> QueryString
toQuery = QueryString -> DeleteApnsSandboxChannel -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteApnsSandboxChannelResponse = DeleteApnsSandboxChannelResponse'
{
DeleteApnsSandboxChannelResponse -> Int
httpStatus :: Prelude.Int,
DeleteApnsSandboxChannelResponse -> APNSSandboxChannelResponse
aPNSSandboxChannelResponse :: APNSSandboxChannelResponse
}
deriving (DeleteApnsSandboxChannelResponse
-> DeleteApnsSandboxChannelResponse -> Bool
(DeleteApnsSandboxChannelResponse
-> DeleteApnsSandboxChannelResponse -> Bool)
-> (DeleteApnsSandboxChannelResponse
-> DeleteApnsSandboxChannelResponse -> Bool)
-> Eq DeleteApnsSandboxChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApnsSandboxChannelResponse
-> DeleteApnsSandboxChannelResponse -> Bool
$c/= :: DeleteApnsSandboxChannelResponse
-> DeleteApnsSandboxChannelResponse -> Bool
== :: DeleteApnsSandboxChannelResponse
-> DeleteApnsSandboxChannelResponse -> Bool
$c== :: DeleteApnsSandboxChannelResponse
-> DeleteApnsSandboxChannelResponse -> Bool
Prelude.Eq, ReadPrec [DeleteApnsSandboxChannelResponse]
ReadPrec DeleteApnsSandboxChannelResponse
Int -> ReadS DeleteApnsSandboxChannelResponse
ReadS [DeleteApnsSandboxChannelResponse]
(Int -> ReadS DeleteApnsSandboxChannelResponse)
-> ReadS [DeleteApnsSandboxChannelResponse]
-> ReadPrec DeleteApnsSandboxChannelResponse
-> ReadPrec [DeleteApnsSandboxChannelResponse]
-> Read DeleteApnsSandboxChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApnsSandboxChannelResponse]
$creadListPrec :: ReadPrec [DeleteApnsSandboxChannelResponse]
readPrec :: ReadPrec DeleteApnsSandboxChannelResponse
$creadPrec :: ReadPrec DeleteApnsSandboxChannelResponse
readList :: ReadS [DeleteApnsSandboxChannelResponse]
$creadList :: ReadS [DeleteApnsSandboxChannelResponse]
readsPrec :: Int -> ReadS DeleteApnsSandboxChannelResponse
$creadsPrec :: Int -> ReadS DeleteApnsSandboxChannelResponse
Prelude.Read, Int -> DeleteApnsSandboxChannelResponse -> ShowS
[DeleteApnsSandboxChannelResponse] -> ShowS
DeleteApnsSandboxChannelResponse -> String
(Int -> DeleteApnsSandboxChannelResponse -> ShowS)
-> (DeleteApnsSandboxChannelResponse -> String)
-> ([DeleteApnsSandboxChannelResponse] -> ShowS)
-> Show DeleteApnsSandboxChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApnsSandboxChannelResponse] -> ShowS
$cshowList :: [DeleteApnsSandboxChannelResponse] -> ShowS
show :: DeleteApnsSandboxChannelResponse -> String
$cshow :: DeleteApnsSandboxChannelResponse -> String
showsPrec :: Int -> DeleteApnsSandboxChannelResponse -> ShowS
$cshowsPrec :: Int -> DeleteApnsSandboxChannelResponse -> ShowS
Prelude.Show, (forall x.
DeleteApnsSandboxChannelResponse
-> Rep DeleteApnsSandboxChannelResponse x)
-> (forall x.
Rep DeleteApnsSandboxChannelResponse x
-> DeleteApnsSandboxChannelResponse)
-> Generic DeleteApnsSandboxChannelResponse
forall x.
Rep DeleteApnsSandboxChannelResponse x
-> DeleteApnsSandboxChannelResponse
forall x.
DeleteApnsSandboxChannelResponse
-> Rep DeleteApnsSandboxChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteApnsSandboxChannelResponse x
-> DeleteApnsSandboxChannelResponse
$cfrom :: forall x.
DeleteApnsSandboxChannelResponse
-> Rep DeleteApnsSandboxChannelResponse x
Prelude.Generic)
newDeleteApnsSandboxChannelResponse ::
Prelude.Int ->
APNSSandboxChannelResponse ->
DeleteApnsSandboxChannelResponse
newDeleteApnsSandboxChannelResponse :: Int
-> APNSSandboxChannelResponse -> DeleteApnsSandboxChannelResponse
newDeleteApnsSandboxChannelResponse
Int
pHttpStatus_
APNSSandboxChannelResponse
pAPNSSandboxChannelResponse_ =
DeleteApnsSandboxChannelResponse' :: Int
-> APNSSandboxChannelResponse -> DeleteApnsSandboxChannelResponse
DeleteApnsSandboxChannelResponse'
{ $sel:httpStatus:DeleteApnsSandboxChannelResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:aPNSSandboxChannelResponse:DeleteApnsSandboxChannelResponse' :: APNSSandboxChannelResponse
aPNSSandboxChannelResponse =
APNSSandboxChannelResponse
pAPNSSandboxChannelResponse_
}
deleteApnsSandboxChannelResponse_httpStatus :: Lens.Lens' DeleteApnsSandboxChannelResponse Prelude.Int
deleteApnsSandboxChannelResponse_httpStatus :: (Int -> f Int)
-> DeleteApnsSandboxChannelResponse
-> f DeleteApnsSandboxChannelResponse
deleteApnsSandboxChannelResponse_httpStatus = (DeleteApnsSandboxChannelResponse -> Int)
-> (DeleteApnsSandboxChannelResponse
-> Int -> DeleteApnsSandboxChannelResponse)
-> Lens
DeleteApnsSandboxChannelResponse
DeleteApnsSandboxChannelResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApnsSandboxChannelResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteApnsSandboxChannelResponse' :: DeleteApnsSandboxChannelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteApnsSandboxChannelResponse
s@DeleteApnsSandboxChannelResponse' {} Int
a -> DeleteApnsSandboxChannelResponse
s {$sel:httpStatus:DeleteApnsSandboxChannelResponse' :: Int
httpStatus = Int
a} :: DeleteApnsSandboxChannelResponse)
deleteApnsSandboxChannelResponse_aPNSSandboxChannelResponse :: Lens.Lens' DeleteApnsSandboxChannelResponse APNSSandboxChannelResponse
deleteApnsSandboxChannelResponse_aPNSSandboxChannelResponse :: (APNSSandboxChannelResponse -> f APNSSandboxChannelResponse)
-> DeleteApnsSandboxChannelResponse
-> f DeleteApnsSandboxChannelResponse
deleteApnsSandboxChannelResponse_aPNSSandboxChannelResponse = (DeleteApnsSandboxChannelResponse -> APNSSandboxChannelResponse)
-> (DeleteApnsSandboxChannelResponse
-> APNSSandboxChannelResponse -> DeleteApnsSandboxChannelResponse)
-> Lens
DeleteApnsSandboxChannelResponse
DeleteApnsSandboxChannelResponse
APNSSandboxChannelResponse
APNSSandboxChannelResponse
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApnsSandboxChannelResponse' {APNSSandboxChannelResponse
aPNSSandboxChannelResponse :: APNSSandboxChannelResponse
$sel:aPNSSandboxChannelResponse:DeleteApnsSandboxChannelResponse' :: DeleteApnsSandboxChannelResponse -> APNSSandboxChannelResponse
aPNSSandboxChannelResponse} -> APNSSandboxChannelResponse
aPNSSandboxChannelResponse) (\s :: DeleteApnsSandboxChannelResponse
s@DeleteApnsSandboxChannelResponse' {} APNSSandboxChannelResponse
a -> DeleteApnsSandboxChannelResponse
s {$sel:aPNSSandboxChannelResponse:DeleteApnsSandboxChannelResponse' :: APNSSandboxChannelResponse
aPNSSandboxChannelResponse = APNSSandboxChannelResponse
a} :: DeleteApnsSandboxChannelResponse)
instance
Prelude.NFData
DeleteApnsSandboxChannelResponse