{-# 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.InstanceTemplates.TestIAMPermissions
(
InstanceTemplatesTestIAMPermissionsResource
, instanceTemplatesTestIAMPermissions
, InstanceTemplatesTestIAMPermissions
, ittipProject
, ittipPayload
, ittipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstanceTemplatesTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"instanceTemplates" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data InstanceTemplatesTestIAMPermissions = InstanceTemplatesTestIAMPermissions'
{ _ittipProject :: !Text
, _ittipPayload :: !TestPermissionsRequest
, _ittipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instanceTemplatesTestIAMPermissions
:: Text
-> TestPermissionsRequest
-> Text
-> InstanceTemplatesTestIAMPermissions
instanceTemplatesTestIAMPermissions pIttipProject_ pIttipPayload_ pIttipResource_ =
InstanceTemplatesTestIAMPermissions'
{ _ittipProject = pIttipProject_
, _ittipPayload = pIttipPayload_
, _ittipResource = pIttipResource_
}
ittipProject :: Lens' InstanceTemplatesTestIAMPermissions Text
ittipProject
= lens _ittipProject (\ s a -> s{_ittipProject = a})
ittipPayload :: Lens' InstanceTemplatesTestIAMPermissions TestPermissionsRequest
ittipPayload
= lens _ittipPayload (\ s a -> s{_ittipPayload = a})
ittipResource :: Lens' InstanceTemplatesTestIAMPermissions Text
ittipResource
= lens _ittipResource
(\ s a -> s{_ittipResource = a})
instance GoogleRequest
InstanceTemplatesTestIAMPermissions where
type Rs InstanceTemplatesTestIAMPermissions =
TestPermissionsResponse
type Scopes InstanceTemplatesTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient
InstanceTemplatesTestIAMPermissions'{..}
= go _ittipProject _ittipResource (Just AltJSON)
_ittipPayload
computeService
where go
= buildClient
(Proxy ::
Proxy InstanceTemplatesTestIAMPermissionsResource)
mempty