{-# 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.ServiceCatalog.DeletePortfolio
(
deletePortfolio
, DeletePortfolio
, ddAcceptLanguage
, ddId
, deletePortfolioResponse
, DeletePortfolioResponse
, delrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.ServiceCatalog.Types
import Network.AWS.ServiceCatalog.Types.Product
data DeletePortfolio = DeletePortfolio'
{ _ddAcceptLanguage :: !(Maybe Text)
, _ddId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deletePortfolio
:: Text
-> DeletePortfolio
deletePortfolio pId_ =
DeletePortfolio' {_ddAcceptLanguage = Nothing, _ddId = pId_}
ddAcceptLanguage :: Lens' DeletePortfolio (Maybe Text)
ddAcceptLanguage = lens _ddAcceptLanguage (\ s a -> s{_ddAcceptLanguage = a})
ddId :: Lens' DeletePortfolio Text
ddId = lens _ddId (\ s a -> s{_ddId = a})
instance AWSRequest DeletePortfolio where
type Rs DeletePortfolio = DeletePortfolioResponse
request = postJSON serviceCatalog
response
= receiveEmpty
(\ s h x ->
DeletePortfolioResponse' <$> (pure (fromEnum s)))
instance Hashable DeletePortfolio where
instance NFData DeletePortfolio where
instance ToHeaders DeletePortfolio where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWS242ServiceCatalogService.DeletePortfolio" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeletePortfolio where
toJSON DeletePortfolio'{..}
= object
(catMaybes
[("AcceptLanguage" .=) <$> _ddAcceptLanguage,
Just ("Id" .= _ddId)])
instance ToPath DeletePortfolio where
toPath = const "/"
instance ToQuery DeletePortfolio where
toQuery = const mempty
newtype DeletePortfolioResponse = DeletePortfolioResponse'
{ _delrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deletePortfolioResponse
:: Int
-> DeletePortfolioResponse
deletePortfolioResponse pResponseStatus_ =
DeletePortfolioResponse' {_delrsResponseStatus = pResponseStatus_}
delrsResponseStatus :: Lens' DeletePortfolioResponse Int
delrsResponseStatus = lens _delrsResponseStatus (\ s a -> s{_delrsResponseStatus = a})
instance NFData DeletePortfolioResponse where