{-# 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.SetIAMPolicy
(
FoldersSetIAMPolicyResource
, foldersSetIAMPolicy
, FoldersSetIAMPolicy
, fsipXgafv
, fsipUploadProtocol
, fsipAccessToken
, fsipUploadType
, fsipPayload
, fsipResource
, fsipCallback
) where
import Network.Google.Prelude
import Network.Google.ResourceManager.Types
type FoldersSetIAMPolicyResource =
"v2" :>
CaptureMode "resource" "setIamPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SetIAMPolicyRequest :>
Post '[JSON] Policy
data FoldersSetIAMPolicy = FoldersSetIAMPolicy'
{ _fsipXgafv :: !(Maybe Xgafv)
, _fsipUploadProtocol :: !(Maybe Text)
, _fsipAccessToken :: !(Maybe Text)
, _fsipUploadType :: !(Maybe Text)
, _fsipPayload :: !SetIAMPolicyRequest
, _fsipResource :: !Text
, _fsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
foldersSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> FoldersSetIAMPolicy
foldersSetIAMPolicy pFsipPayload_ pFsipResource_ =
FoldersSetIAMPolicy'
{ _fsipXgafv = Nothing
, _fsipUploadProtocol = Nothing
, _fsipAccessToken = Nothing
, _fsipUploadType = Nothing
, _fsipPayload = pFsipPayload_
, _fsipResource = pFsipResource_
, _fsipCallback = Nothing
}
fsipXgafv :: Lens' FoldersSetIAMPolicy (Maybe Xgafv)
fsipXgafv
= lens _fsipXgafv (\ s a -> s{_fsipXgafv = a})
fsipUploadProtocol :: Lens' FoldersSetIAMPolicy (Maybe Text)
fsipUploadProtocol
= lens _fsipUploadProtocol
(\ s a -> s{_fsipUploadProtocol = a})
fsipAccessToken :: Lens' FoldersSetIAMPolicy (Maybe Text)
fsipAccessToken
= lens _fsipAccessToken
(\ s a -> s{_fsipAccessToken = a})
fsipUploadType :: Lens' FoldersSetIAMPolicy (Maybe Text)
fsipUploadType
= lens _fsipUploadType
(\ s a -> s{_fsipUploadType = a})
fsipPayload :: Lens' FoldersSetIAMPolicy SetIAMPolicyRequest
fsipPayload
= lens _fsipPayload (\ s a -> s{_fsipPayload = a})
fsipResource :: Lens' FoldersSetIAMPolicy Text
fsipResource
= lens _fsipResource (\ s a -> s{_fsipResource = a})
fsipCallback :: Lens' FoldersSetIAMPolicy (Maybe Text)
fsipCallback
= lens _fsipCallback (\ s a -> s{_fsipCallback = a})
instance GoogleRequest FoldersSetIAMPolicy where
type Rs FoldersSetIAMPolicy = Policy
type Scopes FoldersSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient FoldersSetIAMPolicy'{..}
= go _fsipResource _fsipXgafv _fsipUploadProtocol
_fsipAccessToken
_fsipUploadType
_fsipCallback
(Just AltJSON)
_fsipPayload
resourceManagerService
where go
= buildClient
(Proxy :: Proxy FoldersSetIAMPolicyResource)
mempty