{-# 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.CodeDeploy.DeleteApplication
(
deleteApplication
, DeleteApplication
, daApplicationName
, deleteApplicationResponse
, DeleteApplicationResponse
) where
import Network.AWS.CodeDeploy.Types
import Network.AWS.CodeDeploy.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteApplication = DeleteApplication'
{ _daApplicationName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteApplication
:: Text
-> DeleteApplication
deleteApplication pApplicationName_ =
DeleteApplication' {_daApplicationName = pApplicationName_}
daApplicationName :: Lens' DeleteApplication Text
daApplicationName = lens _daApplicationName (\ s a -> s{_daApplicationName = a})
instance AWSRequest DeleteApplication where
type Rs DeleteApplication = DeleteApplicationResponse
request = postJSON codeDeploy
response = receiveNull DeleteApplicationResponse'
instance Hashable DeleteApplication where
instance NFData DeleteApplication where
instance ToHeaders DeleteApplication where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodeDeploy_20141006.DeleteApplication" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteApplication where
toJSON DeleteApplication'{..}
= object
(catMaybes
[Just ("applicationName" .= _daApplicationName)])
instance ToPath DeleteApplication where
toPath = const "/"
instance ToQuery DeleteApplication where
toQuery = const mempty
data DeleteApplicationResponse =
DeleteApplicationResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteApplicationResponse
:: DeleteApplicationResponse
deleteApplicationResponse = DeleteApplicationResponse'
instance NFData DeleteApplicationResponse where