{-# 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.RegionDisks.TestIAMPermissions
(
RegionDisksTestIAMPermissionsResource
, regionDisksTestIAMPermissions
, RegionDisksTestIAMPermissions
, rdtipProject
, rdtipPayload
, rdtipResource
, rdtipRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionDisksTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"disks" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data RegionDisksTestIAMPermissions = RegionDisksTestIAMPermissions'
{ _rdtipProject :: !Text
, _rdtipPayload :: !TestPermissionsRequest
, _rdtipResource :: !Text
, _rdtipRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionDisksTestIAMPermissions
:: Text
-> TestPermissionsRequest
-> Text
-> Text
-> RegionDisksTestIAMPermissions
regionDisksTestIAMPermissions pRdtipProject_ pRdtipPayload_ pRdtipResource_ pRdtipRegion_ =
RegionDisksTestIAMPermissions'
{ _rdtipProject = pRdtipProject_
, _rdtipPayload = pRdtipPayload_
, _rdtipResource = pRdtipResource_
, _rdtipRegion = pRdtipRegion_
}
rdtipProject :: Lens' RegionDisksTestIAMPermissions Text
rdtipProject
= lens _rdtipProject (\ s a -> s{_rdtipProject = a})
rdtipPayload :: Lens' RegionDisksTestIAMPermissions TestPermissionsRequest
rdtipPayload
= lens _rdtipPayload (\ s a -> s{_rdtipPayload = a})
rdtipResource :: Lens' RegionDisksTestIAMPermissions Text
rdtipResource
= lens _rdtipResource
(\ s a -> s{_rdtipResource = a})
rdtipRegion :: Lens' RegionDisksTestIAMPermissions Text
rdtipRegion
= lens _rdtipRegion (\ s a -> s{_rdtipRegion = a})
instance GoogleRequest RegionDisksTestIAMPermissions
where
type Rs RegionDisksTestIAMPermissions =
TestPermissionsResponse
type Scopes RegionDisksTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient RegionDisksTestIAMPermissions'{..}
= go _rdtipProject _rdtipRegion _rdtipResource
(Just AltJSON)
_rdtipPayload
computeService
where go
= buildClient
(Proxy ::
Proxy RegionDisksTestIAMPermissionsResource)
mempty