{-# 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.DeletePortfolioShare
(
deletePortfolioShare
, DeletePortfolioShare
, dpsAcceptLanguage
, dpsPortfolioId
, dpsAccountId
, deletePortfolioShareResponse
, DeletePortfolioShareResponse
, dpsrsResponseStatus
) 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 DeletePortfolioShare = DeletePortfolioShare'
{ _dpsAcceptLanguage :: !(Maybe Text)
, _dpsPortfolioId :: !Text
, _dpsAccountId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deletePortfolioShare
:: Text
-> Text
-> DeletePortfolioShare
deletePortfolioShare pPortfolioId_ pAccountId_ =
DeletePortfolioShare'
{ _dpsAcceptLanguage = Nothing
, _dpsPortfolioId = pPortfolioId_
, _dpsAccountId = pAccountId_
}
dpsAcceptLanguage :: Lens' DeletePortfolioShare (Maybe Text)
dpsAcceptLanguage = lens _dpsAcceptLanguage (\ s a -> s{_dpsAcceptLanguage = a});
dpsPortfolioId :: Lens' DeletePortfolioShare Text
dpsPortfolioId = lens _dpsPortfolioId (\ s a -> s{_dpsPortfolioId = a});
dpsAccountId :: Lens' DeletePortfolioShare Text
dpsAccountId = lens _dpsAccountId (\ s a -> s{_dpsAccountId = a});
instance AWSRequest DeletePortfolioShare where
type Rs DeletePortfolioShare =
DeletePortfolioShareResponse
request = postJSON serviceCatalog
response
= receiveEmpty
(\ s h x ->
DeletePortfolioShareResponse' <$>
(pure (fromEnum s)))
instance Hashable DeletePortfolioShare
instance NFData DeletePortfolioShare
instance ToHeaders DeletePortfolioShare where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWS242ServiceCatalogService.DeletePortfolioShare"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeletePortfolioShare where
toJSON DeletePortfolioShare'{..}
= object
(catMaybes
[("AcceptLanguage" .=) <$> _dpsAcceptLanguage,
Just ("PortfolioId" .= _dpsPortfolioId),
Just ("AccountId" .= _dpsAccountId)])
instance ToPath DeletePortfolioShare where
toPath = const "/"
instance ToQuery DeletePortfolioShare where
toQuery = const mempty
newtype DeletePortfolioShareResponse = DeletePortfolioShareResponse'
{ _dpsrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deletePortfolioShareResponse
:: Int
-> DeletePortfolioShareResponse
deletePortfolioShareResponse pResponseStatus_ =
DeletePortfolioShareResponse'
{ _dpsrsResponseStatus = pResponseStatus_
}
dpsrsResponseStatus :: Lens' DeletePortfolioShareResponse Int
dpsrsResponseStatus = lens _dpsrsResponseStatus (\ s a -> s{_dpsrsResponseStatus = a});
instance NFData DeletePortfolioShareResponse