{-# 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.DeleteProvisioningArtifact
(
deleteProvisioningArtifact
, DeleteProvisioningArtifact
, dpapAcceptLanguage
, dpapProductId
, dpapProvisioningArtifactId
, deleteProvisioningArtifactResponse
, DeleteProvisioningArtifactResponse
, dparsResponseStatus
) 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 DeleteProvisioningArtifact = DeleteProvisioningArtifact'
{ _dpapAcceptLanguage :: !(Maybe Text)
, _dpapProductId :: !Text
, _dpapProvisioningArtifactId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteProvisioningArtifact
:: Text
-> Text
-> DeleteProvisioningArtifact
deleteProvisioningArtifact pProductId_ pProvisioningArtifactId_ =
DeleteProvisioningArtifact'
{ _dpapAcceptLanguage = Nothing
, _dpapProductId = pProductId_
, _dpapProvisioningArtifactId = pProvisioningArtifactId_
}
dpapAcceptLanguage :: Lens' DeleteProvisioningArtifact (Maybe Text)
dpapAcceptLanguage = lens _dpapAcceptLanguage (\ s a -> s{_dpapAcceptLanguage = a});
dpapProductId :: Lens' DeleteProvisioningArtifact Text
dpapProductId = lens _dpapProductId (\ s a -> s{_dpapProductId = a});
dpapProvisioningArtifactId :: Lens' DeleteProvisioningArtifact Text
dpapProvisioningArtifactId = lens _dpapProvisioningArtifactId (\ s a -> s{_dpapProvisioningArtifactId = a});
instance AWSRequest DeleteProvisioningArtifact where
type Rs DeleteProvisioningArtifact =
DeleteProvisioningArtifactResponse
request = postJSON serviceCatalog
response
= receiveEmpty
(\ s h x ->
DeleteProvisioningArtifactResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteProvisioningArtifact
instance NFData DeleteProvisioningArtifact
instance ToHeaders DeleteProvisioningArtifact where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWS242ServiceCatalogService.DeleteProvisioningArtifact"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteProvisioningArtifact where
toJSON DeleteProvisioningArtifact'{..}
= object
(catMaybes
[("AcceptLanguage" .=) <$> _dpapAcceptLanguage,
Just ("ProductId" .= _dpapProductId),
Just
("ProvisioningArtifactId" .=
_dpapProvisioningArtifactId)])
instance ToPath DeleteProvisioningArtifact where
toPath = const "/"
instance ToQuery DeleteProvisioningArtifact where
toQuery = const mempty
newtype DeleteProvisioningArtifactResponse = DeleteProvisioningArtifactResponse'
{ _dparsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteProvisioningArtifactResponse
:: Int
-> DeleteProvisioningArtifactResponse
deleteProvisioningArtifactResponse pResponseStatus_ =
DeleteProvisioningArtifactResponse'
{ _dparsResponseStatus = pResponseStatus_
}
dparsResponseStatus :: Lens' DeleteProvisioningArtifactResponse Int
dparsResponseStatus = lens _dparsResponseStatus (\ s a -> s{_dparsResponseStatus = a});
instance NFData DeleteProvisioningArtifactResponse