{-# 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.ReplicaPool.Pools.Delete
(
PoolsDeleteResource
, poolsDelete
, PoolsDelete
, pdPoolName
, pdZone
, pdPayload
, pdProjectName
) where
import Network.Google.Prelude
import Network.Google.ReplicaPool.Types
type PoolsDeleteResource =
"replicapool" :>
"v1beta1" :>
"projects" :>
Capture "projectName" Text :>
"zones" :>
Capture "zone" Text :>
"pools" :>
Capture "poolName" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PoolsDeleteRequest :> Post '[JSON] ()
data PoolsDelete = PoolsDelete'
{ _pdPoolName :: !Text
, _pdZone :: !Text
, _pdPayload :: !PoolsDeleteRequest
, _pdProjectName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
poolsDelete
:: Text
-> Text
-> PoolsDeleteRequest
-> Text
-> PoolsDelete
poolsDelete pPdPoolName_ pPdZone_ pPdPayload_ pPdProjectName_ =
PoolsDelete'
{ _pdPoolName = pPdPoolName_
, _pdZone = pPdZone_
, _pdPayload = pPdPayload_
, _pdProjectName = pPdProjectName_
}
pdPoolName :: Lens' PoolsDelete Text
pdPoolName
= lens _pdPoolName (\ s a -> s{_pdPoolName = a})
pdZone :: Lens' PoolsDelete Text
pdZone = lens _pdZone (\ s a -> s{_pdZone = a})
pdPayload :: Lens' PoolsDelete PoolsDeleteRequest
pdPayload
= lens _pdPayload (\ s a -> s{_pdPayload = a})
pdProjectName :: Lens' PoolsDelete Text
pdProjectName
= lens _pdProjectName
(\ s a -> s{_pdProjectName = a})
instance GoogleRequest PoolsDelete where
type Rs PoolsDelete = ()
type Scopes PoolsDelete =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman",
"https://www.googleapis.com/auth/replicapool"]
requestClient PoolsDelete'{..}
= go _pdProjectName _pdZone _pdPoolName
(Just AltJSON)
_pdPayload
replicaPoolService
where go
= buildClient (Proxy :: Proxy PoolsDeleteResource)
mempty