module Network.AWS.ServiceCatalog.DisassociateProductFromPortfolio
    (
    
      disassociateProductFromPortfolio
    , DisassociateProductFromPortfolio
    
    , dpfpAcceptLanguage
    , dpfpProductId
    , dpfpPortfolioId
    
    , disassociateProductFromPortfolioResponse
    , DisassociateProductFromPortfolioResponse
    
    , disrsResponseStatus
    ) 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 DisassociateProductFromPortfolio = DisassociateProductFromPortfolio'
  { _dpfpAcceptLanguage :: !(Maybe Text)
  , _dpfpProductId      :: !Text
  , _dpfpPortfolioId    :: !Text
  } deriving (Eq, Read, Show, Data, Typeable, Generic)
disassociateProductFromPortfolio
    :: Text 
    -> Text 
    -> DisassociateProductFromPortfolio
disassociateProductFromPortfolio pProductId_ pPortfolioId_ =
  DisassociateProductFromPortfolio'
  { _dpfpAcceptLanguage = Nothing
  , _dpfpProductId = pProductId_
  , _dpfpPortfolioId = pPortfolioId_
  }
dpfpAcceptLanguage :: Lens' DisassociateProductFromPortfolio (Maybe Text)
dpfpAcceptLanguage = lens _dpfpAcceptLanguage (\ s a -> s{_dpfpAcceptLanguage = a});
dpfpProductId :: Lens' DisassociateProductFromPortfolio Text
dpfpProductId = lens _dpfpProductId (\ s a -> s{_dpfpProductId = a});
dpfpPortfolioId :: Lens' DisassociateProductFromPortfolio Text
dpfpPortfolioId = lens _dpfpPortfolioId (\ s a -> s{_dpfpPortfolioId = a});
instance AWSRequest DisassociateProductFromPortfolio
         where
        type Rs DisassociateProductFromPortfolio =
             DisassociateProductFromPortfolioResponse
        request = postJSON serviceCatalog
        response
          = receiveEmpty
              (\ s h x ->
                 DisassociateProductFromPortfolioResponse' <$>
                   (pure (fromEnum s)))
instance Hashable DisassociateProductFromPortfolio
         where
instance NFData DisassociateProductFromPortfolio
         where
instance ToHeaders DisassociateProductFromPortfolio
         where
        toHeaders
          = const
              (mconcat
                 ["X-Amz-Target" =#
                    ("AWS242ServiceCatalogService.DisassociateProductFromPortfolio"
                       :: ByteString),
                  "Content-Type" =#
                    ("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DisassociateProductFromPortfolio
         where
        toJSON DisassociateProductFromPortfolio'{..}
          = object
              (catMaybes
                 [("AcceptLanguage" .=) <$> _dpfpAcceptLanguage,
                  Just ("ProductId" .= _dpfpProductId),
                  Just ("PortfolioId" .= _dpfpPortfolioId)])
instance ToPath DisassociateProductFromPortfolio
         where
        toPath = const "/"
instance ToQuery DisassociateProductFromPortfolio
         where
        toQuery = const mempty
newtype DisassociateProductFromPortfolioResponse = DisassociateProductFromPortfolioResponse'
  { _disrsResponseStatus :: Int
  } deriving (Eq, Read, Show, Data, Typeable, Generic)
disassociateProductFromPortfolioResponse
    :: Int 
    -> DisassociateProductFromPortfolioResponse
disassociateProductFromPortfolioResponse pResponseStatus_ =
  DisassociateProductFromPortfolioResponse'
  {_disrsResponseStatus = pResponseStatus_}
disrsResponseStatus :: Lens' DisassociateProductFromPortfolioResponse Int
disrsResponseStatus = lens _disrsResponseStatus (\ s a -> s{_disrsResponseStatus = a});
instance NFData
           DisassociateProductFromPortfolioResponse
         where