{-# 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.Subnetworks.Patch
(
SubnetworksPatchResource
, subnetworksPatch
, SubnetworksPatch
, spRequestId
, spProject
, spPayload
, spSubnetwork
, spRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SubnetworksPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"subnetworks" :>
Capture "subnetwork" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Subnetwork :> Patch '[JSON] Operation
data SubnetworksPatch = SubnetworksPatch'
{ _spRequestId :: !(Maybe Text)
, _spProject :: !Text
, _spPayload :: !Subnetwork
, _spSubnetwork :: !Text
, _spRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subnetworksPatch
:: Text
-> Subnetwork
-> Text
-> Text
-> SubnetworksPatch
subnetworksPatch pSpProject_ pSpPayload_ pSpSubnetwork_ pSpRegion_ =
SubnetworksPatch'
{ _spRequestId = Nothing
, _spProject = pSpProject_
, _spPayload = pSpPayload_
, _spSubnetwork = pSpSubnetwork_
, _spRegion = pSpRegion_
}
spRequestId :: Lens' SubnetworksPatch (Maybe Text)
spRequestId
= lens _spRequestId (\ s a -> s{_spRequestId = a})
spProject :: Lens' SubnetworksPatch Text
spProject
= lens _spProject (\ s a -> s{_spProject = a})
spPayload :: Lens' SubnetworksPatch Subnetwork
spPayload
= lens _spPayload (\ s a -> s{_spPayload = a})
spSubnetwork :: Lens' SubnetworksPatch Text
spSubnetwork
= lens _spSubnetwork (\ s a -> s{_spSubnetwork = a})
spRegion :: Lens' SubnetworksPatch Text
spRegion = lens _spRegion (\ s a -> s{_spRegion = a})
instance GoogleRequest SubnetworksPatch where
type Rs SubnetworksPatch = Operation
type Scopes SubnetworksPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient SubnetworksPatch'{..}
= go _spProject _spRegion _spSubnetwork _spRequestId
(Just AltJSON)
_spPayload
computeService
where go
= buildClient
(Proxy :: Proxy SubnetworksPatchResource)
mempty