{-# 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.TestIAMPermissions
(
ProjectsReposTestIAMPermissionsResource
, projectsReposTestIAMPermissions
, ProjectsReposTestIAMPermissions
, prtipXgafv
, prtipUploadProtocol
, prtipAccessToken
, prtipUploadType
, prtipPayload
, prtipResource
, prtipCallback
) where
import Network.Google.Prelude
import Network.Google.SourceRepo.Types
type ProjectsReposTestIAMPermissionsResource =
"v1" :>
CaptureMode "resource" "testIamPermissions" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestIAMPermissionsRequest :>
Post '[JSON] TestIAMPermissionsResponse
data ProjectsReposTestIAMPermissions = ProjectsReposTestIAMPermissions'
{ _prtipXgafv :: !(Maybe Xgafv)
, _prtipUploadProtocol :: !(Maybe Text)
, _prtipAccessToken :: !(Maybe Text)
, _prtipUploadType :: !(Maybe Text)
, _prtipPayload :: !TestIAMPermissionsRequest
, _prtipResource :: !Text
, _prtipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsReposTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsReposTestIAMPermissions
projectsReposTestIAMPermissions pPrtipPayload_ pPrtipResource_ =
ProjectsReposTestIAMPermissions'
{ _prtipXgafv = Nothing
, _prtipUploadProtocol = Nothing
, _prtipAccessToken = Nothing
, _prtipUploadType = Nothing
, _prtipPayload = pPrtipPayload_
, _prtipResource = pPrtipResource_
, _prtipCallback = Nothing
}
prtipXgafv :: Lens' ProjectsReposTestIAMPermissions (Maybe Xgafv)
prtipXgafv
= lens _prtipXgafv (\ s a -> s{_prtipXgafv = a})
prtipUploadProtocol :: Lens' ProjectsReposTestIAMPermissions (Maybe Text)
prtipUploadProtocol
= lens _prtipUploadProtocol
(\ s a -> s{_prtipUploadProtocol = a})
prtipAccessToken :: Lens' ProjectsReposTestIAMPermissions (Maybe Text)
prtipAccessToken
= lens _prtipAccessToken
(\ s a -> s{_prtipAccessToken = a})
prtipUploadType :: Lens' ProjectsReposTestIAMPermissions (Maybe Text)
prtipUploadType
= lens _prtipUploadType
(\ s a -> s{_prtipUploadType = a})
prtipPayload :: Lens' ProjectsReposTestIAMPermissions TestIAMPermissionsRequest
prtipPayload
= lens _prtipPayload (\ s a -> s{_prtipPayload = a})
prtipResource :: Lens' ProjectsReposTestIAMPermissions Text
prtipResource
= lens _prtipResource
(\ s a -> s{_prtipResource = a})
prtipCallback :: Lens' ProjectsReposTestIAMPermissions (Maybe Text)
prtipCallback
= lens _prtipCallback
(\ s a -> s{_prtipCallback = a})
instance GoogleRequest
ProjectsReposTestIAMPermissions where
type Rs ProjectsReposTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes ProjectsReposTestIAMPermissions =
'["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 ProjectsReposTestIAMPermissions'{..}
= go _prtipResource _prtipXgafv _prtipUploadProtocol
_prtipAccessToken
_prtipUploadType
_prtipCallback
(Just AltJSON)
_prtipPayload
sourceRepoService
where go
= buildClient
(Proxy ::
Proxy ProjectsReposTestIAMPermissionsResource)
mempty