module Network.AWS.CodeDeploy.UpdateApplication
(
updateApplication
, UpdateApplication
, uaNewApplicationName
, uaApplicationName
, updateApplicationResponse
, UpdateApplicationResponse
) where
import Network.AWS.CodeDeploy.Types
import Network.AWS.CodeDeploy.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateApplication = UpdateApplication'
{ _uaNewApplicationName :: !(Maybe Text)
, _uaApplicationName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateApplication
:: UpdateApplication
updateApplication =
UpdateApplication'
{ _uaNewApplicationName = Nothing
, _uaApplicationName = Nothing
}
uaNewApplicationName :: Lens' UpdateApplication (Maybe Text)
uaNewApplicationName = lens _uaNewApplicationName (\ s a -> s{_uaNewApplicationName = a});
uaApplicationName :: Lens' UpdateApplication (Maybe Text)
uaApplicationName = lens _uaApplicationName (\ s a -> s{_uaApplicationName = a});
instance AWSRequest UpdateApplication where
type Rs UpdateApplication = UpdateApplicationResponse
request = postJSON codeDeploy
response = receiveNull UpdateApplicationResponse'
instance ToHeaders UpdateApplication where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodeDeploy_20141006.UpdateApplication" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateApplication where
toJSON UpdateApplication'{..}
= object
(catMaybes
[("newApplicationName" .=) <$> _uaNewApplicationName,
("applicationName" .=) <$> _uaApplicationName])
instance ToPath UpdateApplication where
toPath = const "/"
instance ToQuery UpdateApplication where
toQuery = const mempty
data UpdateApplicationResponse =
UpdateApplicationResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
updateApplicationResponse
:: UpdateApplicationResponse
updateApplicationResponse = UpdateApplicationResponse'