module Network.AWS.CodeDeploy.UpdateApplication
(
UpdateApplication
, updateApplication
, uaApplicationName
, uaNewApplicationName
, UpdateApplicationResponse
, updateApplicationResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.CodeDeploy.Types
import qualified GHC.Exts
data UpdateApplication = UpdateApplication
{ _uaApplicationName :: Maybe Text
, _uaNewApplicationName :: Maybe Text
} deriving (Eq, Ord, Show)
updateApplication :: UpdateApplication
updateApplication = UpdateApplication
{ _uaApplicationName = Nothing
, _uaNewApplicationName = Nothing
}
uaApplicationName :: Lens' UpdateApplication (Maybe Text)
uaApplicationName =
lens _uaApplicationName (\s a -> s { _uaApplicationName = a })
uaNewApplicationName :: Lens' UpdateApplication (Maybe Text)
uaNewApplicationName =
lens _uaNewApplicationName (\s a -> s { _uaNewApplicationName = a })
data UpdateApplicationResponse = UpdateApplicationResponse
deriving (Eq, Ord, Show, Generic)
updateApplicationResponse :: UpdateApplicationResponse
updateApplicationResponse = UpdateApplicationResponse
instance ToPath UpdateApplication where
toPath = const "/"
instance ToQuery UpdateApplication where
toQuery = const mempty
instance ToHeaders UpdateApplication
instance ToJSON UpdateApplication where
toJSON UpdateApplication{..} = object
[ "applicationName" .= _uaApplicationName
, "newApplicationName" .= _uaNewApplicationName
]
instance AWSRequest UpdateApplication where
type Sv UpdateApplication = CodeDeploy
type Rs UpdateApplication = UpdateApplicationResponse
request = post "UpdateApplication"
response = nullResponse UpdateApplicationResponse