{-# 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.SetIAMPolicy
(
SubnetworksSetIAMPolicyResource
, subnetworksSetIAMPolicy
, SubnetworksSetIAMPolicy
, ssiampProject
, ssiampPayload
, ssiampResource
, ssiampRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SubnetworksSetIAMPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"subnetworks" :>
Capture "resource" Text :>
"setIamPolicy" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RegionSetPolicyRequest :>
Post '[JSON] Policy
data SubnetworksSetIAMPolicy = SubnetworksSetIAMPolicy'
{ _ssiampProject :: !Text
, _ssiampPayload :: !RegionSetPolicyRequest
, _ssiampResource :: !Text
, _ssiampRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subnetworksSetIAMPolicy
:: Text
-> RegionSetPolicyRequest
-> Text
-> Text
-> SubnetworksSetIAMPolicy
subnetworksSetIAMPolicy pSsiampProject_ pSsiampPayload_ pSsiampResource_ pSsiampRegion_ =
SubnetworksSetIAMPolicy'
{ _ssiampProject = pSsiampProject_
, _ssiampPayload = pSsiampPayload_
, _ssiampResource = pSsiampResource_
, _ssiampRegion = pSsiampRegion_
}
ssiampProject :: Lens' SubnetworksSetIAMPolicy Text
ssiampProject
= lens _ssiampProject
(\ s a -> s{_ssiampProject = a})
ssiampPayload :: Lens' SubnetworksSetIAMPolicy RegionSetPolicyRequest
ssiampPayload
= lens _ssiampPayload
(\ s a -> s{_ssiampPayload = a})
ssiampResource :: Lens' SubnetworksSetIAMPolicy Text
ssiampResource
= lens _ssiampResource
(\ s a -> s{_ssiampResource = a})
ssiampRegion :: Lens' SubnetworksSetIAMPolicy Text
ssiampRegion
= lens _ssiampRegion (\ s a -> s{_ssiampRegion = a})
instance GoogleRequest SubnetworksSetIAMPolicy where
type Rs SubnetworksSetIAMPolicy = Policy
type Scopes SubnetworksSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient SubnetworksSetIAMPolicy'{..}
= go _ssiampProject _ssiampRegion _ssiampResource
(Just AltJSON)
_ssiampPayload
computeService
where go
= buildClient
(Proxy :: Proxy SubnetworksSetIAMPolicyResource)
mempty