{-# 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.Compute.Networks.RemovePeering
(
NetworksRemovePeeringResource
, networksRemovePeering
, NetworksRemovePeering
, nrpRequestId
, nrpProject
, nrpNetwork
, nrpPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NetworksRemovePeeringResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"networks" :>
Capture "network" Text :>
"removePeering" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] NetworksRemovePeeringRequest :>
Post '[JSON] Operation
data NetworksRemovePeering = NetworksRemovePeering'
{ _nrpRequestId :: !(Maybe Text)
, _nrpProject :: !Text
, _nrpNetwork :: !Text
, _nrpPayload :: !NetworksRemovePeeringRequest
} deriving (Eq,Show,Data,Typeable,Generic)
networksRemovePeering
:: Text
-> Text
-> NetworksRemovePeeringRequest
-> NetworksRemovePeering
networksRemovePeering pNrpProject_ pNrpNetwork_ pNrpPayload_ =
NetworksRemovePeering'
{ _nrpRequestId = Nothing
, _nrpProject = pNrpProject_
, _nrpNetwork = pNrpNetwork_
, _nrpPayload = pNrpPayload_
}
nrpRequestId :: Lens' NetworksRemovePeering (Maybe Text)
nrpRequestId
= lens _nrpRequestId (\ s a -> s{_nrpRequestId = a})
nrpProject :: Lens' NetworksRemovePeering Text
nrpProject
= lens _nrpProject (\ s a -> s{_nrpProject = a})
nrpNetwork :: Lens' NetworksRemovePeering Text
nrpNetwork
= lens _nrpNetwork (\ s a -> s{_nrpNetwork = a})
nrpPayload :: Lens' NetworksRemovePeering NetworksRemovePeeringRequest
nrpPayload
= lens _nrpPayload (\ s a -> s{_nrpPayload = a})
instance GoogleRequest NetworksRemovePeering where
type Rs NetworksRemovePeering = Operation
type Scopes NetworksRemovePeering =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient NetworksRemovePeering'{..}
= go _nrpProject _nrpNetwork _nrpRequestId
(Just AltJSON)
_nrpPayload
computeService
where go
= buildClient
(Proxy :: Proxy NetworksRemovePeeringResource)
mempty