{-# 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.Greengrass.DeleteFunctionDefinition
(
deleteFunctionDefinition
, DeleteFunctionDefinition
, dfdFunctionDefinitionId
, deleteFunctionDefinitionResponse
, DeleteFunctionDefinitionResponse
, dfdrsResponseStatus
) where
import Network.AWS.Greengrass.Types
import Network.AWS.Greengrass.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteFunctionDefinition = DeleteFunctionDefinition'
{ _dfdFunctionDefinitionId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteFunctionDefinition
:: Text
-> DeleteFunctionDefinition
deleteFunctionDefinition pFunctionDefinitionId_ =
DeleteFunctionDefinition' {_dfdFunctionDefinitionId = pFunctionDefinitionId_}
dfdFunctionDefinitionId :: Lens' DeleteFunctionDefinition Text
dfdFunctionDefinitionId = lens _dfdFunctionDefinitionId (\ s a -> s{_dfdFunctionDefinitionId = a})
instance AWSRequest DeleteFunctionDefinition where
type Rs DeleteFunctionDefinition =
DeleteFunctionDefinitionResponse
request = delete greengrass
response
= receiveEmpty
(\ s h x ->
DeleteFunctionDefinitionResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteFunctionDefinition where
instance NFData DeleteFunctionDefinition where
instance ToHeaders DeleteFunctionDefinition where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteFunctionDefinition where
toPath DeleteFunctionDefinition'{..}
= mconcat
["/greengrass/definition/functions/",
toBS _dfdFunctionDefinitionId]
instance ToQuery DeleteFunctionDefinition where
toQuery = const mempty
newtype DeleteFunctionDefinitionResponse = DeleteFunctionDefinitionResponse'
{ _dfdrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteFunctionDefinitionResponse
:: Int
-> DeleteFunctionDefinitionResponse
deleteFunctionDefinitionResponse pResponseStatus_ =
DeleteFunctionDefinitionResponse' {_dfdrsResponseStatus = pResponseStatus_}
dfdrsResponseStatus :: Lens' DeleteFunctionDefinitionResponse Int
dfdrsResponseStatus = lens _dfdrsResponseStatus (\ s a -> s{_dfdrsResponseStatus = a})
instance NFData DeleteFunctionDefinitionResponse
where