{-# 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.SetIAMPolicy
(
ProjectsOccurrencesSetIAMPolicyResource
, projectsOccurrencesSetIAMPolicy
, ProjectsOccurrencesSetIAMPolicy
, posipXgafv
, posipUploadProtocol
, posipAccessToken
, posipUploadType
, posipPayload
, posipResource
, posipCallback
) where
import Network.Google.ContainerAnalysis.Types
import Network.Google.Prelude
type ProjectsOccurrencesSetIAMPolicyResource =
"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 ProjectsOccurrencesSetIAMPolicy = ProjectsOccurrencesSetIAMPolicy'
{ _posipXgafv :: !(Maybe Xgafv)
, _posipUploadProtocol :: !(Maybe Text)
, _posipAccessToken :: !(Maybe Text)
, _posipUploadType :: !(Maybe Text)
, _posipPayload :: !SetIAMPolicyRequest
, _posipResource :: !Text
, _posipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsOccurrencesSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsOccurrencesSetIAMPolicy
projectsOccurrencesSetIAMPolicy pPosipPayload_ pPosipResource_ =
ProjectsOccurrencesSetIAMPolicy'
{ _posipXgafv = Nothing
, _posipUploadProtocol = Nothing
, _posipAccessToken = Nothing
, _posipUploadType = Nothing
, _posipPayload = pPosipPayload_
, _posipResource = pPosipResource_
, _posipCallback = Nothing
}
posipXgafv :: Lens' ProjectsOccurrencesSetIAMPolicy (Maybe Xgafv)
posipXgafv
= lens _posipXgafv (\ s a -> s{_posipXgafv = a})
posipUploadProtocol :: Lens' ProjectsOccurrencesSetIAMPolicy (Maybe Text)
posipUploadProtocol
= lens _posipUploadProtocol
(\ s a -> s{_posipUploadProtocol = a})
posipAccessToken :: Lens' ProjectsOccurrencesSetIAMPolicy (Maybe Text)
posipAccessToken
= lens _posipAccessToken
(\ s a -> s{_posipAccessToken = a})
posipUploadType :: Lens' ProjectsOccurrencesSetIAMPolicy (Maybe Text)
posipUploadType
= lens _posipUploadType
(\ s a -> s{_posipUploadType = a})
posipPayload :: Lens' ProjectsOccurrencesSetIAMPolicy SetIAMPolicyRequest
posipPayload
= lens _posipPayload (\ s a -> s{_posipPayload = a})
posipResource :: Lens' ProjectsOccurrencesSetIAMPolicy Text
posipResource
= lens _posipResource
(\ s a -> s{_posipResource = a})
posipCallback :: Lens' ProjectsOccurrencesSetIAMPolicy (Maybe Text)
posipCallback
= lens _posipCallback
(\ s a -> s{_posipCallback = a})
instance GoogleRequest
ProjectsOccurrencesSetIAMPolicy where
type Rs ProjectsOccurrencesSetIAMPolicy = Policy
type Scopes ProjectsOccurrencesSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsOccurrencesSetIAMPolicy'{..}
= go _posipResource _posipXgafv _posipUploadProtocol
_posipAccessToken
_posipUploadType
_posipCallback
(Just AltJSON)
_posipPayload
containerAnalysisService
where go
= buildClient
(Proxy ::
Proxy ProjectsOccurrencesSetIAMPolicyResource)
mempty