{-# 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.DeleteProvisionedProductPlan
(
deleteProvisionedProductPlan
, DeleteProvisionedProductPlan
, delAcceptLanguage
, delIgnoreErrors
, delPlanId
, deleteProvisionedProductPlanResponse
, DeleteProvisionedProductPlanResponse
, dppprsResponseStatus
) 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 DeleteProvisionedProductPlan = DeleteProvisionedProductPlan'
{ _delAcceptLanguage :: !(Maybe Text)
, _delIgnoreErrors :: !(Maybe Bool)
, _delPlanId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteProvisionedProductPlan
:: Text
-> DeleteProvisionedProductPlan
deleteProvisionedProductPlan pPlanId_ =
DeleteProvisionedProductPlan'
{ _delAcceptLanguage = Nothing
, _delIgnoreErrors = Nothing
, _delPlanId = pPlanId_
}
delAcceptLanguage :: Lens' DeleteProvisionedProductPlan (Maybe Text)
delAcceptLanguage = lens _delAcceptLanguage (\ s a -> s{_delAcceptLanguage = a})
delIgnoreErrors :: Lens' DeleteProvisionedProductPlan (Maybe Bool)
delIgnoreErrors = lens _delIgnoreErrors (\ s a -> s{_delIgnoreErrors = a})
delPlanId :: Lens' DeleteProvisionedProductPlan Text
delPlanId = lens _delPlanId (\ s a -> s{_delPlanId = a})
instance AWSRequest DeleteProvisionedProductPlan
where
type Rs DeleteProvisionedProductPlan =
DeleteProvisionedProductPlanResponse
request = postJSON serviceCatalog
response
= receiveEmpty
(\ s h x ->
DeleteProvisionedProductPlanResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteProvisionedProductPlan where
instance NFData DeleteProvisionedProductPlan where
instance ToHeaders DeleteProvisionedProductPlan where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWS242ServiceCatalogService.DeleteProvisionedProductPlan"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteProvisionedProductPlan where
toJSON DeleteProvisionedProductPlan'{..}
= object
(catMaybes
[("AcceptLanguage" .=) <$> _delAcceptLanguage,
("IgnoreErrors" .=) <$> _delIgnoreErrors,
Just ("PlanId" .= _delPlanId)])
instance ToPath DeleteProvisionedProductPlan where
toPath = const "/"
instance ToQuery DeleteProvisionedProductPlan where
toQuery = const mempty
newtype DeleteProvisionedProductPlanResponse = DeleteProvisionedProductPlanResponse'
{ _dppprsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteProvisionedProductPlanResponse
:: Int
-> DeleteProvisionedProductPlanResponse
deleteProvisionedProductPlanResponse pResponseStatus_ =
DeleteProvisionedProductPlanResponse'
{_dppprsResponseStatus = pResponseStatus_}
dppprsResponseStatus :: Lens' DeleteProvisionedProductPlanResponse Int
dppprsResponseStatus = lens _dppprsResponseStatus (\ s a -> s{_dppprsResponseStatus = a})
instance NFData DeleteProvisionedProductPlanResponse
where