{-# 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.GetIAMPolicy
(
FoldersGetIAMPolicyResource
, foldersGetIAMPolicy
, FoldersGetIAMPolicy
, fgipXgafv
, fgipUploadProtocol
, fgipAccessToken
, fgipUploadType
, fgipPayload
, fgipResource
, fgipCallback
) where
import Network.Google.Prelude
import Network.Google.ResourceManager.Types
type FoldersGetIAMPolicyResource =
"v2" :>
CaptureMode "resource" "getIamPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GetIAMPolicyRequest :>
Post '[JSON] Policy
data FoldersGetIAMPolicy = FoldersGetIAMPolicy'
{ _fgipXgafv :: !(Maybe Xgafv)
, _fgipUploadProtocol :: !(Maybe Text)
, _fgipAccessToken :: !(Maybe Text)
, _fgipUploadType :: !(Maybe Text)
, _fgipPayload :: !GetIAMPolicyRequest
, _fgipResource :: !Text
, _fgipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
foldersGetIAMPolicy
:: GetIAMPolicyRequest
-> Text
-> FoldersGetIAMPolicy
foldersGetIAMPolicy pFgipPayload_ pFgipResource_ =
FoldersGetIAMPolicy'
{ _fgipXgafv = Nothing
, _fgipUploadProtocol = Nothing
, _fgipAccessToken = Nothing
, _fgipUploadType = Nothing
, _fgipPayload = pFgipPayload_
, _fgipResource = pFgipResource_
, _fgipCallback = Nothing
}
fgipXgafv :: Lens' FoldersGetIAMPolicy (Maybe Xgafv)
fgipXgafv
= lens _fgipXgafv (\ s a -> s{_fgipXgafv = a})
fgipUploadProtocol :: Lens' FoldersGetIAMPolicy (Maybe Text)
fgipUploadProtocol
= lens _fgipUploadProtocol
(\ s a -> s{_fgipUploadProtocol = a})
fgipAccessToken :: Lens' FoldersGetIAMPolicy (Maybe Text)
fgipAccessToken
= lens _fgipAccessToken
(\ s a -> s{_fgipAccessToken = a})
fgipUploadType :: Lens' FoldersGetIAMPolicy (Maybe Text)
fgipUploadType
= lens _fgipUploadType
(\ s a -> s{_fgipUploadType = a})
fgipPayload :: Lens' FoldersGetIAMPolicy GetIAMPolicyRequest
fgipPayload
= lens _fgipPayload (\ s a -> s{_fgipPayload = a})
fgipResource :: Lens' FoldersGetIAMPolicy Text
fgipResource
= lens _fgipResource (\ s a -> s{_fgipResource = a})
fgipCallback :: Lens' FoldersGetIAMPolicy (Maybe Text)
fgipCallback
= lens _fgipCallback (\ s a -> s{_fgipCallback = a})
instance GoogleRequest FoldersGetIAMPolicy where
type Rs FoldersGetIAMPolicy = Policy
type Scopes FoldersGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient FoldersGetIAMPolicy'{..}
= go _fgipResource _fgipXgafv _fgipUploadProtocol
_fgipAccessToken
_fgipUploadType
_fgipCallback
(Just AltJSON)
_fgipPayload
resourceManagerService
where go
= buildClient
(Proxy :: Proxy FoldersGetIAMPolicyResource)
mempty