{-# 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.CloudFunctions.Projects.Locations.Functions.GetIAMPolicy
(
ProjectsLocationsFunctionsGetIAMPolicyResource
, projectsLocationsFunctionsGetIAMPolicy
, ProjectsLocationsFunctionsGetIAMPolicy
, plfgipXgafv
, plfgipUploadProtocol
, plfgipAccessToken
, plfgipUploadType
, plfgipResource
, plfgipCallback
) where
import Network.Google.CloudFunctions.Types
import Network.Google.Prelude
type ProjectsLocationsFunctionsGetIAMPolicyResource =
"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 :> Get '[JSON] Policy
data ProjectsLocationsFunctionsGetIAMPolicy = ProjectsLocationsFunctionsGetIAMPolicy'
{ _plfgipXgafv :: !(Maybe Xgafv)
, _plfgipUploadProtocol :: !(Maybe Text)
, _plfgipAccessToken :: !(Maybe Text)
, _plfgipUploadType :: !(Maybe Text)
, _plfgipResource :: !Text
, _plfgipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsFunctionsGetIAMPolicy
:: Text
-> ProjectsLocationsFunctionsGetIAMPolicy
projectsLocationsFunctionsGetIAMPolicy pPlfgipResource_ =
ProjectsLocationsFunctionsGetIAMPolicy'
{ _plfgipXgafv = Nothing
, _plfgipUploadProtocol = Nothing
, _plfgipAccessToken = Nothing
, _plfgipUploadType = Nothing
, _plfgipResource = pPlfgipResource_
, _plfgipCallback = Nothing
}
plfgipXgafv :: Lens' ProjectsLocationsFunctionsGetIAMPolicy (Maybe Xgafv)
plfgipXgafv
= lens _plfgipXgafv (\ s a -> s{_plfgipXgafv = a})
plfgipUploadProtocol :: Lens' ProjectsLocationsFunctionsGetIAMPolicy (Maybe Text)
plfgipUploadProtocol
= lens _plfgipUploadProtocol
(\ s a -> s{_plfgipUploadProtocol = a})
plfgipAccessToken :: Lens' ProjectsLocationsFunctionsGetIAMPolicy (Maybe Text)
plfgipAccessToken
= lens _plfgipAccessToken
(\ s a -> s{_plfgipAccessToken = a})
plfgipUploadType :: Lens' ProjectsLocationsFunctionsGetIAMPolicy (Maybe Text)
plfgipUploadType
= lens _plfgipUploadType
(\ s a -> s{_plfgipUploadType = a})
plfgipResource :: Lens' ProjectsLocationsFunctionsGetIAMPolicy Text
plfgipResource
= lens _plfgipResource
(\ s a -> s{_plfgipResource = a})
plfgipCallback :: Lens' ProjectsLocationsFunctionsGetIAMPolicy (Maybe Text)
plfgipCallback
= lens _plfgipCallback
(\ s a -> s{_plfgipCallback = a})
instance GoogleRequest
ProjectsLocationsFunctionsGetIAMPolicy where
type Rs ProjectsLocationsFunctionsGetIAMPolicy =
Policy
type Scopes ProjectsLocationsFunctionsGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsFunctionsGetIAMPolicy'{..}
= go _plfgipResource _plfgipXgafv
_plfgipUploadProtocol
_plfgipAccessToken
_plfgipUploadType
_plfgipCallback
(Just AltJSON)
cloudFunctionsService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsFunctionsGetIAMPolicyResource)
mempty