{-# 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.AppStream.DeleteStack
(
deleteStack
, DeleteStack
, dsName
, deleteStackResponse
, DeleteStackResponse
, dsrsResponseStatus
) where
import Network.AWS.AppStream.Types
import Network.AWS.AppStream.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteStack = DeleteStack'
{ _dsName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteStack
:: Text
-> DeleteStack
deleteStack pName_ = DeleteStack' {_dsName = pName_}
dsName :: Lens' DeleteStack Text
dsName = lens _dsName (\ s a -> s{_dsName = a})
instance AWSRequest DeleteStack where
type Rs DeleteStack = DeleteStackResponse
request = postJSON appStream
response
= receiveEmpty
(\ s h x ->
DeleteStackResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteStack where
instance NFData DeleteStack where
instance ToHeaders DeleteStack where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("PhotonAdminProxyService.DeleteStack" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteStack where
toJSON DeleteStack'{..}
= object (catMaybes [Just ("Name" .= _dsName)])
instance ToPath DeleteStack where
toPath = const "/"
instance ToQuery DeleteStack where
toQuery = const mempty
newtype DeleteStackResponse = DeleteStackResponse'
{ _dsrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteStackResponse
:: Int
-> DeleteStackResponse
deleteStackResponse pResponseStatus_ =
DeleteStackResponse' {_dsrsResponseStatus = pResponseStatus_}
dsrsResponseStatus :: Lens' DeleteStackResponse Int
dsrsResponseStatus = lens _dsrsResponseStatus (\ s a -> s{_dsrsResponseStatus = a})
instance NFData DeleteStackResponse where