{-# 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.NodeGroups.TestIAMPermissions
(
NodeGroupsTestIAMPermissionsResource
, nodeGroupsTestIAMPermissions
, NodeGroupsTestIAMPermissions
, ngtipProject
, ngtipZone
, ngtipPayload
, ngtipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NodeGroupsTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"nodeGroups" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data NodeGroupsTestIAMPermissions = NodeGroupsTestIAMPermissions'
{ _ngtipProject :: !Text
, _ngtipZone :: !Text
, _ngtipPayload :: !TestPermissionsRequest
, _ngtipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
nodeGroupsTestIAMPermissions
:: Text
-> Text
-> TestPermissionsRequest
-> Text
-> NodeGroupsTestIAMPermissions
nodeGroupsTestIAMPermissions pNgtipProject_ pNgtipZone_ pNgtipPayload_ pNgtipResource_ =
NodeGroupsTestIAMPermissions'
{ _ngtipProject = pNgtipProject_
, _ngtipZone = pNgtipZone_
, _ngtipPayload = pNgtipPayload_
, _ngtipResource = pNgtipResource_
}
ngtipProject :: Lens' NodeGroupsTestIAMPermissions Text
ngtipProject
= lens _ngtipProject (\ s a -> s{_ngtipProject = a})
ngtipZone :: Lens' NodeGroupsTestIAMPermissions Text
ngtipZone
= lens _ngtipZone (\ s a -> s{_ngtipZone = a})
ngtipPayload :: Lens' NodeGroupsTestIAMPermissions TestPermissionsRequest
ngtipPayload
= lens _ngtipPayload (\ s a -> s{_ngtipPayload = a})
ngtipResource :: Lens' NodeGroupsTestIAMPermissions Text
ngtipResource
= lens _ngtipResource
(\ s a -> s{_ngtipResource = a})
instance GoogleRequest NodeGroupsTestIAMPermissions
where
type Rs NodeGroupsTestIAMPermissions =
TestPermissionsResponse
type Scopes NodeGroupsTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient NodeGroupsTestIAMPermissions'{..}
= go _ngtipProject _ngtipZone _ngtipResource
(Just AltJSON)
_ngtipPayload
computeService
where go
= buildClient
(Proxy :: Proxy NodeGroupsTestIAMPermissionsResource)
mempty