{-# 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
, dppAcceptLanguage
, dppId
, 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'
{ _dppAcceptLanguage :: !(Maybe Text)
, _dppId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deletePortfolio
:: Text
-> DeletePortfolio
deletePortfolio pId_ =
DeletePortfolio'
{ _dppAcceptLanguage = Nothing
, _dppId = pId_
}
dppAcceptLanguage :: Lens' DeletePortfolio (Maybe Text)
dppAcceptLanguage = lens _dppAcceptLanguage (\ s a -> s{_dppAcceptLanguage = a});
dppId :: Lens' DeletePortfolio Text
dppId = lens _dppId (\ s a -> s{_dppId = a});
instance AWSRequest DeletePortfolio where
type Rs DeletePortfolio = DeletePortfolioResponse
request = postJSON serviceCatalog
response
= receiveEmpty
(\ s h x ->
DeletePortfolioResponse' <$> (pure (fromEnum s)))
instance Hashable DeletePortfolio
instance NFData DeletePortfolio
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" .=) <$> _dppAcceptLanguage,
Just ("Id" .= _dppId)])
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