{-# 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.MediaStore.DeleteContainerPolicy
(
deleteContainerPolicy
, DeleteContainerPolicy
, delContainerName
, deleteContainerPolicyResponse
, DeleteContainerPolicyResponse
, dcprsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.MediaStore.Types
import Network.AWS.MediaStore.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteContainerPolicy = DeleteContainerPolicy'
{ _delContainerName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteContainerPolicy
:: Text
-> DeleteContainerPolicy
deleteContainerPolicy pContainerName_ =
DeleteContainerPolicy' {_delContainerName = pContainerName_}
delContainerName :: Lens' DeleteContainerPolicy Text
delContainerName = lens _delContainerName (\ s a -> s{_delContainerName = a})
instance AWSRequest DeleteContainerPolicy where
type Rs DeleteContainerPolicy =
DeleteContainerPolicyResponse
request = postJSON mediaStore
response
= receiveEmpty
(\ s h x ->
DeleteContainerPolicyResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteContainerPolicy where
instance NFData DeleteContainerPolicy where
instance ToHeaders DeleteContainerPolicy where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("MediaStore_20170901.DeleteContainerPolicy" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteContainerPolicy where
toJSON DeleteContainerPolicy'{..}
= object
(catMaybes
[Just ("ContainerName" .= _delContainerName)])
instance ToPath DeleteContainerPolicy where
toPath = const "/"
instance ToQuery DeleteContainerPolicy where
toQuery = const mempty
newtype DeleteContainerPolicyResponse = DeleteContainerPolicyResponse'
{ _dcprsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteContainerPolicyResponse
:: Int
-> DeleteContainerPolicyResponse
deleteContainerPolicyResponse pResponseStatus_ =
DeleteContainerPolicyResponse' {_dcprsResponseStatus = pResponseStatus_}
dcprsResponseStatus :: Lens' DeleteContainerPolicyResponse Int
dcprsResponseStatus = lens _dcprsResponseStatus (\ s a -> s{_dcprsResponseStatus = a})
instance NFData DeleteContainerPolicyResponse where