{-# 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.Patch
(
NetworksPatchResource
, networksPatch
, NetworksPatch
, npRequestId
, npProject
, npNetwork
, npPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NetworksPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"networks" :>
Capture "network" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Network :> Patch '[JSON] Operation
data NetworksPatch = NetworksPatch'
{ _npRequestId :: !(Maybe Text)
, _npProject :: !Text
, _npNetwork :: !Text
, _npPayload :: !Network
} deriving (Eq,Show,Data,Typeable,Generic)
networksPatch
:: Text
-> Text
-> Network
-> NetworksPatch
networksPatch pNpProject_ pNpNetwork_ pNpPayload_ =
NetworksPatch'
{ _npRequestId = Nothing
, _npProject = pNpProject_
, _npNetwork = pNpNetwork_
, _npPayload = pNpPayload_
}
npRequestId :: Lens' NetworksPatch (Maybe Text)
npRequestId
= lens _npRequestId (\ s a -> s{_npRequestId = a})
npProject :: Lens' NetworksPatch Text
npProject
= lens _npProject (\ s a -> s{_npProject = a})
npNetwork :: Lens' NetworksPatch Text
npNetwork
= lens _npNetwork (\ s a -> s{_npNetwork = a})
npPayload :: Lens' NetworksPatch Network
npPayload
= lens _npPayload (\ s a -> s{_npPayload = a})
instance GoogleRequest NetworksPatch where
type Rs NetworksPatch = Operation
type Scopes NetworksPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient NetworksPatch'{..}
= go _npProject _npNetwork _npRequestId
(Just AltJSON)
_npPayload
computeService
where go
= buildClient (Proxy :: Proxy NetworksPatchResource)
mempty