{-# 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.CloudFunctions.Projects.Locations.Functions.SetIAMPolicy
(
ProjectsLocationsFunctionsSetIAMPolicyResource
, projectsLocationsFunctionsSetIAMPolicy
, ProjectsLocationsFunctionsSetIAMPolicy
, plfsipXgafv
, plfsipUploadProtocol
, plfsipAccessToken
, plfsipUploadType
, plfsipPayload
, plfsipResource
, plfsipCallback
) where
import Network.Google.CloudFunctions.Types
import Network.Google.Prelude
type ProjectsLocationsFunctionsSetIAMPolicyResource =
"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 ProjectsLocationsFunctionsSetIAMPolicy = ProjectsLocationsFunctionsSetIAMPolicy'
{ _plfsipXgafv :: !(Maybe Xgafv)
, _plfsipUploadProtocol :: !(Maybe Text)
, _plfsipAccessToken :: !(Maybe Text)
, _plfsipUploadType :: !(Maybe Text)
, _plfsipPayload :: !SetIAMPolicyRequest
, _plfsipResource :: !Text
, _plfsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsFunctionsSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsLocationsFunctionsSetIAMPolicy
projectsLocationsFunctionsSetIAMPolicy pPlfsipPayload_ pPlfsipResource_ =
ProjectsLocationsFunctionsSetIAMPolicy'
{ _plfsipXgafv = Nothing
, _plfsipUploadProtocol = Nothing
, _plfsipAccessToken = Nothing
, _plfsipUploadType = Nothing
, _plfsipPayload = pPlfsipPayload_
, _plfsipResource = pPlfsipResource_
, _plfsipCallback = Nothing
}
plfsipXgafv :: Lens' ProjectsLocationsFunctionsSetIAMPolicy (Maybe Xgafv)
plfsipXgafv
= lens _plfsipXgafv (\ s a -> s{_plfsipXgafv = a})
plfsipUploadProtocol :: Lens' ProjectsLocationsFunctionsSetIAMPolicy (Maybe Text)
plfsipUploadProtocol
= lens _plfsipUploadProtocol
(\ s a -> s{_plfsipUploadProtocol = a})
plfsipAccessToken :: Lens' ProjectsLocationsFunctionsSetIAMPolicy (Maybe Text)
plfsipAccessToken
= lens _plfsipAccessToken
(\ s a -> s{_plfsipAccessToken = a})
plfsipUploadType :: Lens' ProjectsLocationsFunctionsSetIAMPolicy (Maybe Text)
plfsipUploadType
= lens _plfsipUploadType
(\ s a -> s{_plfsipUploadType = a})
plfsipPayload :: Lens' ProjectsLocationsFunctionsSetIAMPolicy SetIAMPolicyRequest
plfsipPayload
= lens _plfsipPayload
(\ s a -> s{_plfsipPayload = a})
plfsipResource :: Lens' ProjectsLocationsFunctionsSetIAMPolicy Text
plfsipResource
= lens _plfsipResource
(\ s a -> s{_plfsipResource = a})
plfsipCallback :: Lens' ProjectsLocationsFunctionsSetIAMPolicy (Maybe Text)
plfsipCallback
= lens _plfsipCallback
(\ s a -> s{_plfsipCallback = a})
instance GoogleRequest
ProjectsLocationsFunctionsSetIAMPolicy where
type Rs ProjectsLocationsFunctionsSetIAMPolicy =
Policy
type Scopes ProjectsLocationsFunctionsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsFunctionsSetIAMPolicy'{..}
= go _plfsipResource _plfsipXgafv
_plfsipUploadProtocol
_plfsipAccessToken
_plfsipUploadType
_plfsipCallback
(Just AltJSON)
_plfsipPayload
cloudFunctionsService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsFunctionsSetIAMPolicyResource)
mempty