{-# 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.ContinueDeployment
(
continueDeployment
, ContinueDeployment
, cdDeploymentId
, continueDeploymentResponse
, ContinueDeploymentResponse
) 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 ContinueDeployment = ContinueDeployment'
{ _cdDeploymentId :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
continueDeployment
:: ContinueDeployment
continueDeployment = ContinueDeployment' {_cdDeploymentId = Nothing}
cdDeploymentId :: Lens' ContinueDeployment (Maybe Text)
cdDeploymentId = lens _cdDeploymentId (\ s a -> s{_cdDeploymentId = a})
instance AWSRequest ContinueDeployment where
type Rs ContinueDeployment =
ContinueDeploymentResponse
request = postJSON codeDeploy
response = receiveNull ContinueDeploymentResponse'
instance Hashable ContinueDeployment where
instance NFData ContinueDeployment where
instance ToHeaders ContinueDeployment where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodeDeploy_20141006.ContinueDeployment" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON ContinueDeployment where
toJSON ContinueDeployment'{..}
= object
(catMaybes [("deploymentId" .=) <$> _cdDeploymentId])
instance ToPath ContinueDeployment where
toPath = const "/"
instance ToQuery ContinueDeployment where
toQuery = const mempty
data ContinueDeploymentResponse =
ContinueDeploymentResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
continueDeploymentResponse
:: ContinueDeploymentResponse
continueDeploymentResponse = ContinueDeploymentResponse'
instance NFData ContinueDeploymentResponse where