{-# 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.SetIAMPolicy
(
ProjectsReposSetIAMPolicyResource
, projectsReposSetIAMPolicy
, ProjectsReposSetIAMPolicy
, prsipXgafv
, prsipUploadProtocol
, prsipAccessToken
, prsipUploadType
, prsipPayload
, prsipResource
, prsipCallback
) where
import Network.Google.Prelude
import Network.Google.SourceRepo.Types
type ProjectsReposSetIAMPolicyResource =
"v1" :>
CaptureMode "resource" "setIamPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SetIAMPolicyRequest :>
Post '[JSON] Policy
data ProjectsReposSetIAMPolicy = ProjectsReposSetIAMPolicy'
{ _prsipXgafv :: !(Maybe Xgafv)
, _prsipUploadProtocol :: !(Maybe Text)
, _prsipAccessToken :: !(Maybe Text)
, _prsipUploadType :: !(Maybe Text)
, _prsipPayload :: !SetIAMPolicyRequest
, _prsipResource :: !Text
, _prsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsReposSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsReposSetIAMPolicy
projectsReposSetIAMPolicy pPrsipPayload_ pPrsipResource_ =
ProjectsReposSetIAMPolicy'
{ _prsipXgafv = Nothing
, _prsipUploadProtocol = Nothing
, _prsipAccessToken = Nothing
, _prsipUploadType = Nothing
, _prsipPayload = pPrsipPayload_
, _prsipResource = pPrsipResource_
, _prsipCallback = Nothing
}
prsipXgafv :: Lens' ProjectsReposSetIAMPolicy (Maybe Xgafv)
prsipXgafv
= lens _prsipXgafv (\ s a -> s{_prsipXgafv = a})
prsipUploadProtocol :: Lens' ProjectsReposSetIAMPolicy (Maybe Text)
prsipUploadProtocol
= lens _prsipUploadProtocol
(\ s a -> s{_prsipUploadProtocol = a})
prsipAccessToken :: Lens' ProjectsReposSetIAMPolicy (Maybe Text)
prsipAccessToken
= lens _prsipAccessToken
(\ s a -> s{_prsipAccessToken = a})
prsipUploadType :: Lens' ProjectsReposSetIAMPolicy (Maybe Text)
prsipUploadType
= lens _prsipUploadType
(\ s a -> s{_prsipUploadType = a})
prsipPayload :: Lens' ProjectsReposSetIAMPolicy SetIAMPolicyRequest
prsipPayload
= lens _prsipPayload (\ s a -> s{_prsipPayload = a})
prsipResource :: Lens' ProjectsReposSetIAMPolicy Text
prsipResource
= lens _prsipResource
(\ s a -> s{_prsipResource = a})
prsipCallback :: Lens' ProjectsReposSetIAMPolicy (Maybe Text)
prsipCallback
= lens _prsipCallback
(\ s a -> s{_prsipCallback = a})
instance GoogleRequest ProjectsReposSetIAMPolicy
where
type Rs ProjectsReposSetIAMPolicy = Policy
type Scopes ProjectsReposSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/source.full_control"]
requestClient ProjectsReposSetIAMPolicy'{..}
= go _prsipResource _prsipXgafv _prsipUploadProtocol
_prsipAccessToken
_prsipUploadType
_prsipCallback
(Just AltJSON)
_prsipPayload
sourceRepoService
where go
= buildClient
(Proxy :: Proxy ProjectsReposSetIAMPolicyResource)
mempty