{-# 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.Disks.TestIAMPermissions
(
DisksTestIAMPermissionsResource
, disksTestIAMPermissions
, DisksTestIAMPermissions
, dtipProject
, dtipZone
, dtipPayload
, dtipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type DisksTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"disks" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data DisksTestIAMPermissions = DisksTestIAMPermissions'
{ _dtipProject :: !Text
, _dtipZone :: !Text
, _dtipPayload :: !TestPermissionsRequest
, _dtipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
disksTestIAMPermissions
:: Text
-> Text
-> TestPermissionsRequest
-> Text
-> DisksTestIAMPermissions
disksTestIAMPermissions pDtipProject_ pDtipZone_ pDtipPayload_ pDtipResource_ =
DisksTestIAMPermissions'
{ _dtipProject = pDtipProject_
, _dtipZone = pDtipZone_
, _dtipPayload = pDtipPayload_
, _dtipResource = pDtipResource_
}
dtipProject :: Lens' DisksTestIAMPermissions Text
dtipProject
= lens _dtipProject (\ s a -> s{_dtipProject = a})
dtipZone :: Lens' DisksTestIAMPermissions Text
dtipZone = lens _dtipZone (\ s a -> s{_dtipZone = a})
dtipPayload :: Lens' DisksTestIAMPermissions TestPermissionsRequest
dtipPayload
= lens _dtipPayload (\ s a -> s{_dtipPayload = a})
dtipResource :: Lens' DisksTestIAMPermissions Text
dtipResource
= lens _dtipResource (\ s a -> s{_dtipResource = a})
instance GoogleRequest DisksTestIAMPermissions where
type Rs DisksTestIAMPermissions =
TestPermissionsResponse
type Scopes DisksTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient DisksTestIAMPermissions'{..}
= go _dtipProject _dtipZone _dtipResource
(Just AltJSON)
_dtipPayload
computeService
where go
= buildClient
(Proxy :: Proxy DisksTestIAMPermissionsResource)
mempty