{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.DeploymentManager.Deployments.Delete
(
DeploymentsDeleteResource
, deploymentsDelete
, DeploymentsDelete
, ddProject
, ddDeletePolicy
, ddDeployment
) where
import Network.Google.DeploymentManager.Types
import Network.Google.Prelude
type DeploymentsDeleteResource =
"deploymentmanager" :>
"v2" :>
"projects" :>
Capture "project" Text :>
"global" :>
"deployments" :>
Capture "deployment" Text :>
QueryParam "deletePolicy"
DeploymentsDeleteDeletePolicy
:>
QueryParam "alt" AltJSON :> Delete '[JSON] Operation
data DeploymentsDelete = DeploymentsDelete'
{ _ddProject :: !Text
, _ddDeletePolicy :: !DeploymentsDeleteDeletePolicy
, _ddDeployment :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentsDelete
:: Text
-> Text
-> DeploymentsDelete
deploymentsDelete pDdProject_ pDdDeployment_ =
DeploymentsDelete'
{ _ddProject = pDdProject_
, _ddDeletePolicy = Delete'
, _ddDeployment = pDdDeployment_
}
ddProject :: Lens' DeploymentsDelete Text
ddProject
= lens _ddProject (\ s a -> s{_ddProject = a})
ddDeletePolicy :: Lens' DeploymentsDelete DeploymentsDeleteDeletePolicy
ddDeletePolicy
= lens _ddDeletePolicy
(\ s a -> s{_ddDeletePolicy = a})
ddDeployment :: Lens' DeploymentsDelete Text
ddDeployment
= lens _ddDeployment (\ s a -> s{_ddDeployment = a})
instance GoogleRequest DeploymentsDelete where
type Rs DeploymentsDelete = Operation
type Scopes DeploymentsDelete =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman"]
requestClient DeploymentsDelete'{..}
= go _ddProject _ddDeployment (Just _ddDeletePolicy)
(Just AltJSON)
deploymentManagerService
where go
= buildClient
(Proxy :: Proxy DeploymentsDeleteResource)
mempty