{-# 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.CloudResourceManager.Folders.TestIAMPermissions
(
FoldersTestIAMPermissionsResource
, foldersTestIAMPermissions
, FoldersTestIAMPermissions
, ftipXgafv
, ftipUploadProtocol
, ftipAccessToken
, ftipUploadType
, ftipPayload
, ftipResource
, ftipCallback
) where
import Network.Google.Prelude
import Network.Google.ResourceManager.Types
type FoldersTestIAMPermissionsResource =
"v2" :>
CaptureMode "resource" "testIamPermissions" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestIAMPermissionsRequest :>
Post '[JSON] TestIAMPermissionsResponse
data FoldersTestIAMPermissions = FoldersTestIAMPermissions'
{ _ftipXgafv :: !(Maybe Xgafv)
, _ftipUploadProtocol :: !(Maybe Text)
, _ftipAccessToken :: !(Maybe Text)
, _ftipUploadType :: !(Maybe Text)
, _ftipPayload :: !TestIAMPermissionsRequest
, _ftipResource :: !Text
, _ftipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
foldersTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> FoldersTestIAMPermissions
foldersTestIAMPermissions pFtipPayload_ pFtipResource_ =
FoldersTestIAMPermissions'
{ _ftipXgafv = Nothing
, _ftipUploadProtocol = Nothing
, _ftipAccessToken = Nothing
, _ftipUploadType = Nothing
, _ftipPayload = pFtipPayload_
, _ftipResource = pFtipResource_
, _ftipCallback = Nothing
}
ftipXgafv :: Lens' FoldersTestIAMPermissions (Maybe Xgafv)
ftipXgafv
= lens _ftipXgafv (\ s a -> s{_ftipXgafv = a})
ftipUploadProtocol :: Lens' FoldersTestIAMPermissions (Maybe Text)
ftipUploadProtocol
= lens _ftipUploadProtocol
(\ s a -> s{_ftipUploadProtocol = a})
ftipAccessToken :: Lens' FoldersTestIAMPermissions (Maybe Text)
ftipAccessToken
= lens _ftipAccessToken
(\ s a -> s{_ftipAccessToken = a})
ftipUploadType :: Lens' FoldersTestIAMPermissions (Maybe Text)
ftipUploadType
= lens _ftipUploadType
(\ s a -> s{_ftipUploadType = a})
ftipPayload :: Lens' FoldersTestIAMPermissions TestIAMPermissionsRequest
ftipPayload
= lens _ftipPayload (\ s a -> s{_ftipPayload = a})
ftipResource :: Lens' FoldersTestIAMPermissions Text
ftipResource
= lens _ftipResource (\ s a -> s{_ftipResource = a})
ftipCallback :: Lens' FoldersTestIAMPermissions (Maybe Text)
ftipCallback
= lens _ftipCallback (\ s a -> s{_ftipCallback = a})
instance GoogleRequest FoldersTestIAMPermissions
where
type Rs FoldersTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes FoldersTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient FoldersTestIAMPermissions'{..}
= go _ftipResource _ftipXgafv _ftipUploadProtocol
_ftipAccessToken
_ftipUploadType
_ftipCallback
(Just AltJSON)
_ftipPayload
resourceManagerService
where go
= buildClient
(Proxy :: Proxy FoldersTestIAMPermissionsResource)
mempty