module Network.AWS.ElasticBeanstalk.DeleteApplication
(
DeleteApplication
, deleteApplication
, daApplicationName
, daTerminateEnvByForce
, DeleteApplicationResponse
, deleteApplicationResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.ElasticBeanstalk.Types
import qualified GHC.Exts
data DeleteApplication = DeleteApplication
{ _daApplicationName :: Text
, _daTerminateEnvByForce :: Maybe Bool
} deriving (Eq, Ord, Show)
deleteApplication :: Text
-> DeleteApplication
deleteApplication p1 = DeleteApplication
{ _daApplicationName = p1
, _daTerminateEnvByForce = Nothing
}
daApplicationName :: Lens' DeleteApplication Text
daApplicationName =
lens _daApplicationName (\s a -> s { _daApplicationName = a })
daTerminateEnvByForce :: Lens' DeleteApplication (Maybe Bool)
daTerminateEnvByForce =
lens _daTerminateEnvByForce (\s a -> s { _daTerminateEnvByForce = a })
data DeleteApplicationResponse = DeleteApplicationResponse
deriving (Eq, Ord, Show, Generic)
deleteApplicationResponse :: DeleteApplicationResponse
deleteApplicationResponse = DeleteApplicationResponse
instance ToPath DeleteApplication where
toPath = const "/"
instance ToQuery DeleteApplication where
toQuery DeleteApplication{..} = mconcat
[ "ApplicationName" =? _daApplicationName
, "TerminateEnvByForce" =? _daTerminateEnvByForce
]
instance ToHeaders DeleteApplication
instance AWSRequest DeleteApplication where
type Sv DeleteApplication = ElasticBeanstalk
type Rs DeleteApplication = DeleteApplicationResponse
request = post "DeleteApplication"
response = nullResponse DeleteApplicationResponse