{-# 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.Notes.SetIAMPolicy
(
ProjectsNotesSetIAMPolicyResource
, projectsNotesSetIAMPolicy
, ProjectsNotesSetIAMPolicy
, pnsipXgafv
, pnsipUploadProtocol
, pnsipAccessToken
, pnsipUploadType
, pnsipPayload
, pnsipResource
, pnsipCallback
) where
import Network.Google.ContainerAnalysis.Types
import Network.Google.Prelude
type ProjectsNotesSetIAMPolicyResource =
"v1beta1" :>
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 ProjectsNotesSetIAMPolicy = ProjectsNotesSetIAMPolicy'
{ _pnsipXgafv :: !(Maybe Xgafv)
, _pnsipUploadProtocol :: !(Maybe Text)
, _pnsipAccessToken :: !(Maybe Text)
, _pnsipUploadType :: !(Maybe Text)
, _pnsipPayload :: !SetIAMPolicyRequest
, _pnsipResource :: !Text
, _pnsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsNotesSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsNotesSetIAMPolicy
projectsNotesSetIAMPolicy pPnsipPayload_ pPnsipResource_ =
ProjectsNotesSetIAMPolicy'
{ _pnsipXgafv = Nothing
, _pnsipUploadProtocol = Nothing
, _pnsipAccessToken = Nothing
, _pnsipUploadType = Nothing
, _pnsipPayload = pPnsipPayload_
, _pnsipResource = pPnsipResource_
, _pnsipCallback = Nothing
}
pnsipXgafv :: Lens' ProjectsNotesSetIAMPolicy (Maybe Xgafv)
pnsipXgafv
= lens _pnsipXgafv (\ s a -> s{_pnsipXgafv = a})
pnsipUploadProtocol :: Lens' ProjectsNotesSetIAMPolicy (Maybe Text)
pnsipUploadProtocol
= lens _pnsipUploadProtocol
(\ s a -> s{_pnsipUploadProtocol = a})
pnsipAccessToken :: Lens' ProjectsNotesSetIAMPolicy (Maybe Text)
pnsipAccessToken
= lens _pnsipAccessToken
(\ s a -> s{_pnsipAccessToken = a})
pnsipUploadType :: Lens' ProjectsNotesSetIAMPolicy (Maybe Text)
pnsipUploadType
= lens _pnsipUploadType
(\ s a -> s{_pnsipUploadType = a})
pnsipPayload :: Lens' ProjectsNotesSetIAMPolicy SetIAMPolicyRequest
pnsipPayload
= lens _pnsipPayload (\ s a -> s{_pnsipPayload = a})
pnsipResource :: Lens' ProjectsNotesSetIAMPolicy Text
pnsipResource
= lens _pnsipResource
(\ s a -> s{_pnsipResource = a})
pnsipCallback :: Lens' ProjectsNotesSetIAMPolicy (Maybe Text)
pnsipCallback
= lens _pnsipCallback
(\ s a -> s{_pnsipCallback = a})
instance GoogleRequest ProjectsNotesSetIAMPolicy
where
type Rs ProjectsNotesSetIAMPolicy = Policy
type Scopes ProjectsNotesSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsNotesSetIAMPolicy'{..}
= go _pnsipResource _pnsipXgafv _pnsipUploadProtocol
_pnsipAccessToken
_pnsipUploadType
_pnsipCallback
(Just AltJSON)
_pnsipPayload
containerAnalysisService
where go
= buildClient
(Proxy :: Proxy ProjectsNotesSetIAMPolicyResource)
mempty