{-# 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.Replicas.Delete
(
ReplicasDeleteResource
, replicasDelete
, ReplicasDelete
, rdPoolName
, rdZone
, rdPayload
, rdReplicaName
, rdProjectName
) where
import Network.Google.Prelude
import Network.Google.ReplicaPool.Types
type ReplicasDeleteResource =
"replicapool" :>
"v1beta1" :>
"projects" :>
Capture "projectName" Text :>
"zones" :>
Capture "zone" Text :>
"pools" :>
Capture "poolName" Text :>
"replicas" :>
Capture "replicaName" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ReplicasDeleteRequest :>
Post '[JSON] Replica
data ReplicasDelete = ReplicasDelete'
{ _rdPoolName :: !Text
, _rdZone :: !Text
, _rdPayload :: !ReplicasDeleteRequest
, _rdReplicaName :: !Text
, _rdProjectName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
replicasDelete
:: Text
-> Text
-> ReplicasDeleteRequest
-> Text
-> Text
-> ReplicasDelete
replicasDelete pRdPoolName_ pRdZone_ pRdPayload_ pRdReplicaName_ pRdProjectName_ =
ReplicasDelete'
{ _rdPoolName = pRdPoolName_
, _rdZone = pRdZone_
, _rdPayload = pRdPayload_
, _rdReplicaName = pRdReplicaName_
, _rdProjectName = pRdProjectName_
}
rdPoolName :: Lens' ReplicasDelete Text
rdPoolName
= lens _rdPoolName (\ s a -> s{_rdPoolName = a})
rdZone :: Lens' ReplicasDelete Text
rdZone = lens _rdZone (\ s a -> s{_rdZone = a})
rdPayload :: Lens' ReplicasDelete ReplicasDeleteRequest
rdPayload
= lens _rdPayload (\ s a -> s{_rdPayload = a})
rdReplicaName :: Lens' ReplicasDelete Text
rdReplicaName
= lens _rdReplicaName
(\ s a -> s{_rdReplicaName = a})
rdProjectName :: Lens' ReplicasDelete Text
rdProjectName
= lens _rdProjectName
(\ s a -> s{_rdProjectName = a})
instance GoogleRequest ReplicasDelete where
type Rs ReplicasDelete = Replica
type Scopes ReplicasDelete =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman",
"https://www.googleapis.com/auth/replicapool"]
requestClient ReplicasDelete'{..}
= go _rdProjectName _rdZone _rdPoolName
_rdReplicaName
(Just AltJSON)
_rdPayload
replicaPoolService
where go
= buildClient (Proxy :: Proxy ReplicasDeleteResource)
mempty