{-# 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.NodeTemplates.SetIAMPolicy
(
NodeTemplatesSetIAMPolicyResource
, nodeTemplatesSetIAMPolicy
, NodeTemplatesSetIAMPolicy
, ntsipProject
, ntsipPayload
, ntsipResource
, ntsipRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NodeTemplatesSetIAMPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"nodeTemplates" :>
Capture "resource" Text :>
"setIamPolicy" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RegionSetPolicyRequest :>
Post '[JSON] Policy
data NodeTemplatesSetIAMPolicy = NodeTemplatesSetIAMPolicy'
{ _ntsipProject :: !Text
, _ntsipPayload :: !RegionSetPolicyRequest
, _ntsipResource :: !Text
, _ntsipRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
nodeTemplatesSetIAMPolicy
:: Text
-> RegionSetPolicyRequest
-> Text
-> Text
-> NodeTemplatesSetIAMPolicy
nodeTemplatesSetIAMPolicy pNtsipProject_ pNtsipPayload_ pNtsipResource_ pNtsipRegion_ =
NodeTemplatesSetIAMPolicy'
{ _ntsipProject = pNtsipProject_
, _ntsipPayload = pNtsipPayload_
, _ntsipResource = pNtsipResource_
, _ntsipRegion = pNtsipRegion_
}
ntsipProject :: Lens' NodeTemplatesSetIAMPolicy Text
ntsipProject
= lens _ntsipProject (\ s a -> s{_ntsipProject = a})
ntsipPayload :: Lens' NodeTemplatesSetIAMPolicy RegionSetPolicyRequest
ntsipPayload
= lens _ntsipPayload (\ s a -> s{_ntsipPayload = a})
ntsipResource :: Lens' NodeTemplatesSetIAMPolicy Text
ntsipResource
= lens _ntsipResource
(\ s a -> s{_ntsipResource = a})
ntsipRegion :: Lens' NodeTemplatesSetIAMPolicy Text
ntsipRegion
= lens _ntsipRegion (\ s a -> s{_ntsipRegion = a})
instance GoogleRequest NodeTemplatesSetIAMPolicy
where
type Rs NodeTemplatesSetIAMPolicy = Policy
type Scopes NodeTemplatesSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient NodeTemplatesSetIAMPolicy'{..}
= go _ntsipProject _ntsipRegion _ntsipResource
(Just AltJSON)
_ntsipPayload
computeService
where go
= buildClient
(Proxy :: Proxy NodeTemplatesSetIAMPolicyResource)
mempty