module Network.AWS.ElasticBeanstalk.UpdateApplicationVersion
(
UpdateApplicationVersion
, updateApplicationVersion
, uavApplicationName
, uavDescription
, uavVersionLabel
, UpdateApplicationVersionResponse
, updateApplicationVersionResponse
, uavrApplicationVersion
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.ElasticBeanstalk.Types
import qualified GHC.Exts
data UpdateApplicationVersion = UpdateApplicationVersion
{ _uavApplicationName :: Text
, _uavDescription :: Maybe Text
, _uavVersionLabel :: Text
} deriving (Eq, Ord, Read, Show)
updateApplicationVersion :: Text
-> Text
-> UpdateApplicationVersion
updateApplicationVersion p1 p2 = UpdateApplicationVersion
{ _uavApplicationName = p1
, _uavVersionLabel = p2
, _uavDescription = Nothing
}
uavApplicationName :: Lens' UpdateApplicationVersion Text
uavApplicationName =
lens _uavApplicationName (\s a -> s { _uavApplicationName = a })
uavDescription :: Lens' UpdateApplicationVersion (Maybe Text)
uavDescription = lens _uavDescription (\s a -> s { _uavDescription = a })
uavVersionLabel :: Lens' UpdateApplicationVersion Text
uavVersionLabel = lens _uavVersionLabel (\s a -> s { _uavVersionLabel = a })
newtype UpdateApplicationVersionResponse = UpdateApplicationVersionResponse
{ _uavrApplicationVersion :: Maybe ApplicationVersionDescription
} deriving (Eq, Read, Show)
updateApplicationVersionResponse :: UpdateApplicationVersionResponse
updateApplicationVersionResponse = UpdateApplicationVersionResponse
{ _uavrApplicationVersion = Nothing
}
uavrApplicationVersion :: Lens' UpdateApplicationVersionResponse (Maybe ApplicationVersionDescription)
uavrApplicationVersion =
lens _uavrApplicationVersion (\s a -> s { _uavrApplicationVersion = a })
instance ToPath UpdateApplicationVersion where
toPath = const "/"
instance ToQuery UpdateApplicationVersion where
toQuery UpdateApplicationVersion{..} = mconcat
[ "ApplicationName" =? _uavApplicationName
, "Description" =? _uavDescription
, "VersionLabel" =? _uavVersionLabel
]
instance ToHeaders UpdateApplicationVersion
instance AWSRequest UpdateApplicationVersion where
type Sv UpdateApplicationVersion = ElasticBeanstalk
type Rs UpdateApplicationVersion = UpdateApplicationVersionResponse
request = post "UpdateApplicationVersion"
response = xmlResponse
instance FromXML UpdateApplicationVersionResponse where
parseXML = withElement "UpdateApplicationVersionResult" $ \x -> UpdateApplicationVersionResponse
<$> x .@? "ApplicationVersion"