{-# 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.TestIAMPermissions
(
NodeTemplatesTestIAMPermissionsResource
, nodeTemplatesTestIAMPermissions
, NodeTemplatesTestIAMPermissions
, nttipProject
, nttipPayload
, nttipResource
, nttipRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NodeTemplatesTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"nodeTemplates" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data NodeTemplatesTestIAMPermissions = NodeTemplatesTestIAMPermissions'
{ _nttipProject :: !Text
, _nttipPayload :: !TestPermissionsRequest
, _nttipResource :: !Text
, _nttipRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
nodeTemplatesTestIAMPermissions
:: Text
-> TestPermissionsRequest
-> Text
-> Text
-> NodeTemplatesTestIAMPermissions
nodeTemplatesTestIAMPermissions pNttipProject_ pNttipPayload_ pNttipResource_ pNttipRegion_ =
NodeTemplatesTestIAMPermissions'
{ _nttipProject = pNttipProject_
, _nttipPayload = pNttipPayload_
, _nttipResource = pNttipResource_
, _nttipRegion = pNttipRegion_
}
nttipProject :: Lens' NodeTemplatesTestIAMPermissions Text
nttipProject
= lens _nttipProject (\ s a -> s{_nttipProject = a})
nttipPayload :: Lens' NodeTemplatesTestIAMPermissions TestPermissionsRequest
nttipPayload
= lens _nttipPayload (\ s a -> s{_nttipPayload = a})
nttipResource :: Lens' NodeTemplatesTestIAMPermissions Text
nttipResource
= lens _nttipResource
(\ s a -> s{_nttipResource = a})
nttipRegion :: Lens' NodeTemplatesTestIAMPermissions Text
nttipRegion
= lens _nttipRegion (\ s a -> s{_nttipRegion = a})
instance GoogleRequest
NodeTemplatesTestIAMPermissions where
type Rs NodeTemplatesTestIAMPermissions =
TestPermissionsResponse
type Scopes NodeTemplatesTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient NodeTemplatesTestIAMPermissions'{..}
= go _nttipProject _nttipRegion _nttipResource
(Just AltJSON)
_nttipPayload
computeService
where go
= buildClient
(Proxy ::
Proxy NodeTemplatesTestIAMPermissionsResource)
mempty