{-# 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.SourceRepo.Projects.Repos.GetIAMPolicy
(
ProjectsReposGetIAMPolicyResource
, projectsReposGetIAMPolicy
, ProjectsReposGetIAMPolicy
, prgipXgafv
, prgipUploadProtocol
, prgipAccessToken
, prgipUploadType
, prgipResource
, prgipCallback
) where
import Network.Google.Prelude
import Network.Google.SourceRepo.Types
type ProjectsReposGetIAMPolicyResource =
"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 ProjectsReposGetIAMPolicy = ProjectsReposGetIAMPolicy'
{ _prgipXgafv :: !(Maybe Xgafv)
, _prgipUploadProtocol :: !(Maybe Text)
, _prgipAccessToken :: !(Maybe Text)
, _prgipUploadType :: !(Maybe Text)
, _prgipResource :: !Text
, _prgipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsReposGetIAMPolicy
:: Text
-> ProjectsReposGetIAMPolicy
projectsReposGetIAMPolicy pPrgipResource_ =
ProjectsReposGetIAMPolicy'
{ _prgipXgafv = Nothing
, _prgipUploadProtocol = Nothing
, _prgipAccessToken = Nothing
, _prgipUploadType = Nothing
, _prgipResource = pPrgipResource_
, _prgipCallback = Nothing
}
prgipXgafv :: Lens' ProjectsReposGetIAMPolicy (Maybe Xgafv)
prgipXgafv
= lens _prgipXgafv (\ s a -> s{_prgipXgafv = a})
prgipUploadProtocol :: Lens' ProjectsReposGetIAMPolicy (Maybe Text)
prgipUploadProtocol
= lens _prgipUploadProtocol
(\ s a -> s{_prgipUploadProtocol = a})
prgipAccessToken :: Lens' ProjectsReposGetIAMPolicy (Maybe Text)
prgipAccessToken
= lens _prgipAccessToken
(\ s a -> s{_prgipAccessToken = a})
prgipUploadType :: Lens' ProjectsReposGetIAMPolicy (Maybe Text)
prgipUploadType
= lens _prgipUploadType
(\ s a -> s{_prgipUploadType = a})
prgipResource :: Lens' ProjectsReposGetIAMPolicy Text
prgipResource
= lens _prgipResource
(\ s a -> s{_prgipResource = a})
prgipCallback :: Lens' ProjectsReposGetIAMPolicy (Maybe Text)
prgipCallback
= lens _prgipCallback
(\ s a -> s{_prgipCallback = a})
instance GoogleRequest ProjectsReposGetIAMPolicy
where
type Rs ProjectsReposGetIAMPolicy = Policy
type Scopes ProjectsReposGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/source.full_control",
"https://www.googleapis.com/auth/source.read_only",
"https://www.googleapis.com/auth/source.read_write"]
requestClient ProjectsReposGetIAMPolicy'{..}
= go _prgipResource _prgipXgafv _prgipUploadProtocol
_prgipAccessToken
_prgipUploadType
_prgipCallback
(Just AltJSON)
sourceRepoService
where go
= buildClient
(Proxy :: Proxy ProjectsReposGetIAMPolicyResource)
mempty