{-# 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.IAP.Projects.IapWeb.GetIAMPolicy
(
ProjectsIapWebGetIAMPolicyResource
, projectsIapWebGetIAMPolicy
, ProjectsIapWebGetIAMPolicy
, piwgipXgafv
, piwgipUploadProtocol
, piwgipAccessToken
, piwgipUploadType
, piwgipPayload
, piwgipResource
, piwgipCallback
) where
import Network.Google.IAP.Types
import Network.Google.Prelude
type ProjectsIapWebGetIAMPolicyResource =
"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 :>
ReqBody '[JSON] GetIAMPolicyRequest :>
Post '[JSON] Policy
data ProjectsIapWebGetIAMPolicy = ProjectsIapWebGetIAMPolicy'
{ _piwgipXgafv :: !(Maybe Xgafv)
, _piwgipUploadProtocol :: !(Maybe Text)
, _piwgipAccessToken :: !(Maybe Text)
, _piwgipUploadType :: !(Maybe Text)
, _piwgipPayload :: !GetIAMPolicyRequest
, _piwgipResource :: !Text
, _piwgipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsIapWebGetIAMPolicy
:: GetIAMPolicyRequest
-> Text
-> ProjectsIapWebGetIAMPolicy
projectsIapWebGetIAMPolicy pPiwgipPayload_ pPiwgipResource_ =
ProjectsIapWebGetIAMPolicy'
{ _piwgipXgafv = Nothing
, _piwgipUploadProtocol = Nothing
, _piwgipAccessToken = Nothing
, _piwgipUploadType = Nothing
, _piwgipPayload = pPiwgipPayload_
, _piwgipResource = pPiwgipResource_
, _piwgipCallback = Nothing
}
piwgipXgafv :: Lens' ProjectsIapWebGetIAMPolicy (Maybe Xgafv)
piwgipXgafv
= lens _piwgipXgafv (\ s a -> s{_piwgipXgafv = a})
piwgipUploadProtocol :: Lens' ProjectsIapWebGetIAMPolicy (Maybe Text)
piwgipUploadProtocol
= lens _piwgipUploadProtocol
(\ s a -> s{_piwgipUploadProtocol = a})
piwgipAccessToken :: Lens' ProjectsIapWebGetIAMPolicy (Maybe Text)
piwgipAccessToken
= lens _piwgipAccessToken
(\ s a -> s{_piwgipAccessToken = a})
piwgipUploadType :: Lens' ProjectsIapWebGetIAMPolicy (Maybe Text)
piwgipUploadType
= lens _piwgipUploadType
(\ s a -> s{_piwgipUploadType = a})
piwgipPayload :: Lens' ProjectsIapWebGetIAMPolicy GetIAMPolicyRequest
piwgipPayload
= lens _piwgipPayload
(\ s a -> s{_piwgipPayload = a})
piwgipResource :: Lens' ProjectsIapWebGetIAMPolicy Text
piwgipResource
= lens _piwgipResource
(\ s a -> s{_piwgipResource = a})
piwgipCallback :: Lens' ProjectsIapWebGetIAMPolicy (Maybe Text)
piwgipCallback
= lens _piwgipCallback
(\ s a -> s{_piwgipCallback = a})
instance GoogleRequest ProjectsIapWebGetIAMPolicy
where
type Rs ProjectsIapWebGetIAMPolicy = Policy
type Scopes ProjectsIapWebGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsIapWebGetIAMPolicy'{..}
= go _piwgipResource _piwgipXgafv
_piwgipUploadProtocol
_piwgipAccessToken
_piwgipUploadType
_piwgipCallback
(Just AltJSON)
_piwgipPayload
iAPService
where go
= buildClient
(Proxy :: Proxy ProjectsIapWebGetIAMPolicyResource)
mempty