{-# 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.ContainerAnalysis.Projects.Occurrences.GetIAMPolicy
(
ProjectsOccurrencesGetIAMPolicyResource
, projectsOccurrencesGetIAMPolicy
, ProjectsOccurrencesGetIAMPolicy
, pogipXgafv
, pogipUploadProtocol
, pogipAccessToken
, pogipUploadType
, pogipPayload
, pogipResource
, pogipCallback
) where
import Network.Google.ContainerAnalysis.Types
import Network.Google.Prelude
type ProjectsOccurrencesGetIAMPolicyResource =
"v1beta1" :>
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 ProjectsOccurrencesGetIAMPolicy = ProjectsOccurrencesGetIAMPolicy'
{ _pogipXgafv :: !(Maybe Xgafv)
, _pogipUploadProtocol :: !(Maybe Text)
, _pogipAccessToken :: !(Maybe Text)
, _pogipUploadType :: !(Maybe Text)
, _pogipPayload :: !GetIAMPolicyRequest
, _pogipResource :: !Text
, _pogipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsOccurrencesGetIAMPolicy
:: GetIAMPolicyRequest
-> Text
-> ProjectsOccurrencesGetIAMPolicy
projectsOccurrencesGetIAMPolicy pPogipPayload_ pPogipResource_ =
ProjectsOccurrencesGetIAMPolicy'
{ _pogipXgafv = Nothing
, _pogipUploadProtocol = Nothing
, _pogipAccessToken = Nothing
, _pogipUploadType = Nothing
, _pogipPayload = pPogipPayload_
, _pogipResource = pPogipResource_
, _pogipCallback = Nothing
}
pogipXgafv :: Lens' ProjectsOccurrencesGetIAMPolicy (Maybe Xgafv)
pogipXgafv
= lens _pogipXgafv (\ s a -> s{_pogipXgafv = a})
pogipUploadProtocol :: Lens' ProjectsOccurrencesGetIAMPolicy (Maybe Text)
pogipUploadProtocol
= lens _pogipUploadProtocol
(\ s a -> s{_pogipUploadProtocol = a})
pogipAccessToken :: Lens' ProjectsOccurrencesGetIAMPolicy (Maybe Text)
pogipAccessToken
= lens _pogipAccessToken
(\ s a -> s{_pogipAccessToken = a})
pogipUploadType :: Lens' ProjectsOccurrencesGetIAMPolicy (Maybe Text)
pogipUploadType
= lens _pogipUploadType
(\ s a -> s{_pogipUploadType = a})
pogipPayload :: Lens' ProjectsOccurrencesGetIAMPolicy GetIAMPolicyRequest
pogipPayload
= lens _pogipPayload (\ s a -> s{_pogipPayload = a})
pogipResource :: Lens' ProjectsOccurrencesGetIAMPolicy Text
pogipResource
= lens _pogipResource
(\ s a -> s{_pogipResource = a})
pogipCallback :: Lens' ProjectsOccurrencesGetIAMPolicy (Maybe Text)
pogipCallback
= lens _pogipCallback
(\ s a -> s{_pogipCallback = a})
instance GoogleRequest
ProjectsOccurrencesGetIAMPolicy where
type Rs ProjectsOccurrencesGetIAMPolicy = Policy
type Scopes ProjectsOccurrencesGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsOccurrencesGetIAMPolicy'{..}
= go _pogipResource _pogipXgafv _pogipUploadProtocol
_pogipAccessToken
_pogipUploadType
_pogipCallback
(Just AltJSON)
_pogipPayload
containerAnalysisService
where go
= buildClient
(Proxy ::
Proxy ProjectsOccurrencesGetIAMPolicyResource)
mempty