{-# 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.IAM.Projects.ServiceAccounts.GetIAMPolicy
(
ProjectsServiceAccountsGetIAMPolicyResource
, projectsServiceAccountsGetIAMPolicy
, ProjectsServiceAccountsGetIAMPolicy
, psagipXgafv
, psagipUploadProtocol
, psagipAccessToken
, psagipUploadType
, psagipResource
, psagipCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type ProjectsServiceAccountsGetIAMPolicyResource =
"v1" :>
CaptureMode "resource" "getIamPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] Policy
data ProjectsServiceAccountsGetIAMPolicy = ProjectsServiceAccountsGetIAMPolicy'
{ _psagipXgafv :: !(Maybe Xgafv)
, _psagipUploadProtocol :: !(Maybe Text)
, _psagipAccessToken :: !(Maybe Text)
, _psagipUploadType :: !(Maybe Text)
, _psagipResource :: !Text
, _psagipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsServiceAccountsGetIAMPolicy
:: Text
-> ProjectsServiceAccountsGetIAMPolicy
projectsServiceAccountsGetIAMPolicy pPsagipResource_ =
ProjectsServiceAccountsGetIAMPolicy'
{ _psagipXgafv = Nothing
, _psagipUploadProtocol = Nothing
, _psagipAccessToken = Nothing
, _psagipUploadType = Nothing
, _psagipResource = pPsagipResource_
, _psagipCallback = Nothing
}
psagipXgafv :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Xgafv)
psagipXgafv
= lens _psagipXgafv (\ s a -> s{_psagipXgafv = a})
psagipUploadProtocol :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Text)
psagipUploadProtocol
= lens _psagipUploadProtocol
(\ s a -> s{_psagipUploadProtocol = a})
psagipAccessToken :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Text)
psagipAccessToken
= lens _psagipAccessToken
(\ s a -> s{_psagipAccessToken = a})
psagipUploadType :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Text)
psagipUploadType
= lens _psagipUploadType
(\ s a -> s{_psagipUploadType = a})
psagipResource :: Lens' ProjectsServiceAccountsGetIAMPolicy Text
psagipResource
= lens _psagipResource
(\ s a -> s{_psagipResource = a})
psagipCallback :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Text)
psagipCallback
= lens _psagipCallback
(\ s a -> s{_psagipCallback = a})
instance GoogleRequest
ProjectsServiceAccountsGetIAMPolicy where
type Rs ProjectsServiceAccountsGetIAMPolicy = Policy
type Scopes ProjectsServiceAccountsGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsServiceAccountsGetIAMPolicy'{..}
= go _psagipResource _psagipXgafv
_psagipUploadProtocol
_psagipAccessToken
_psagipUploadType
_psagipCallback
(Just AltJSON)
iAMService
where go
= buildClient
(Proxy ::
Proxy ProjectsServiceAccountsGetIAMPolicyResource)
mempty