{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.Pinpoint.DeleteEventStream
(
deleteEventStream
, DeleteEventStream
, desApplicationId
, deleteEventStreamResponse
, DeleteEventStreamResponse
, desrsResponseStatus
, desrsEventStream
) where
import Network.AWS.Lens
import Network.AWS.Pinpoint.Types
import Network.AWS.Pinpoint.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteEventStream = DeleteEventStream'
{ _desApplicationId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteEventStream
:: Text
-> DeleteEventStream
deleteEventStream pApplicationId_ =
DeleteEventStream' {_desApplicationId = pApplicationId_}
desApplicationId :: Lens' DeleteEventStream Text
desApplicationId = lens _desApplicationId (\ s a -> s{_desApplicationId = a})
instance AWSRequest DeleteEventStream where
type Rs DeleteEventStream = DeleteEventStreamResponse
request = delete pinpoint
response
= receiveJSON
(\ s h x ->
DeleteEventStreamResponse' <$>
(pure (fromEnum s)) <*> (eitherParseJSON x))
instance Hashable DeleteEventStream where
instance NFData DeleteEventStream where
instance ToHeaders DeleteEventStream where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteEventStream where
toPath DeleteEventStream'{..}
= mconcat
["/v1/apps/", toBS _desApplicationId, "/eventstream"]
instance ToQuery DeleteEventStream where
toQuery = const mempty
data DeleteEventStreamResponse = DeleteEventStreamResponse'
{ _desrsResponseStatus :: !Int
, _desrsEventStream :: !EventStream
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteEventStreamResponse
:: Int
-> EventStream
-> DeleteEventStreamResponse
deleteEventStreamResponse pResponseStatus_ pEventStream_ =
DeleteEventStreamResponse'
{_desrsResponseStatus = pResponseStatus_, _desrsEventStream = pEventStream_}
desrsResponseStatus :: Lens' DeleteEventStreamResponse Int
desrsResponseStatus = lens _desrsResponseStatus (\ s a -> s{_desrsResponseStatus = a})
desrsEventStream :: Lens' DeleteEventStreamResponse EventStream
desrsEventStream = lens _desrsEventStream (\ s a -> s{_desrsEventStream = a})
instance NFData DeleteEventStreamResponse where