{-# 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.CloudTasks.Projects.Locations.Queues.SetIAMPolicy
(
ProjectsLocationsQueuesSetIAMPolicyResource
, projectsLocationsQueuesSetIAMPolicy
, ProjectsLocationsQueuesSetIAMPolicy
, plqsipXgafv
, plqsipUploadProtocol
, plqsipAccessToken
, plqsipUploadType
, plqsipPayload
, plqsipResource
, plqsipCallback
) where
import Network.Google.CloudTasks.Types
import Network.Google.Prelude
type ProjectsLocationsQueuesSetIAMPolicyResource =
"v2beta3" :>
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 ProjectsLocationsQueuesSetIAMPolicy = ProjectsLocationsQueuesSetIAMPolicy'
{ _plqsipXgafv :: !(Maybe Xgafv)
, _plqsipUploadProtocol :: !(Maybe Text)
, _plqsipAccessToken :: !(Maybe Text)
, _plqsipUploadType :: !(Maybe Text)
, _plqsipPayload :: !SetIAMPolicyRequest
, _plqsipResource :: !Text
, _plqsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsQueuesSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsLocationsQueuesSetIAMPolicy
projectsLocationsQueuesSetIAMPolicy pPlqsipPayload_ pPlqsipResource_ =
ProjectsLocationsQueuesSetIAMPolicy'
{ _plqsipXgafv = Nothing
, _plqsipUploadProtocol = Nothing
, _plqsipAccessToken = Nothing
, _plqsipUploadType = Nothing
, _plqsipPayload = pPlqsipPayload_
, _plqsipResource = pPlqsipResource_
, _plqsipCallback = Nothing
}
plqsipXgafv :: Lens' ProjectsLocationsQueuesSetIAMPolicy (Maybe Xgafv)
plqsipXgafv
= lens _plqsipXgafv (\ s a -> s{_plqsipXgafv = a})
plqsipUploadProtocol :: Lens' ProjectsLocationsQueuesSetIAMPolicy (Maybe Text)
plqsipUploadProtocol
= lens _plqsipUploadProtocol
(\ s a -> s{_plqsipUploadProtocol = a})
plqsipAccessToken :: Lens' ProjectsLocationsQueuesSetIAMPolicy (Maybe Text)
plqsipAccessToken
= lens _plqsipAccessToken
(\ s a -> s{_plqsipAccessToken = a})
plqsipUploadType :: Lens' ProjectsLocationsQueuesSetIAMPolicy (Maybe Text)
plqsipUploadType
= lens _plqsipUploadType
(\ s a -> s{_plqsipUploadType = a})
plqsipPayload :: Lens' ProjectsLocationsQueuesSetIAMPolicy SetIAMPolicyRequest
plqsipPayload
= lens _plqsipPayload
(\ s a -> s{_plqsipPayload = a})
plqsipResource :: Lens' ProjectsLocationsQueuesSetIAMPolicy Text
plqsipResource
= lens _plqsipResource
(\ s a -> s{_plqsipResource = a})
plqsipCallback :: Lens' ProjectsLocationsQueuesSetIAMPolicy (Maybe Text)
plqsipCallback
= lens _plqsipCallback
(\ s a -> s{_plqsipCallback = a})
instance GoogleRequest
ProjectsLocationsQueuesSetIAMPolicy where
type Rs ProjectsLocationsQueuesSetIAMPolicy = Policy
type Scopes ProjectsLocationsQueuesSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsQueuesSetIAMPolicy'{..}
= go _plqsipResource _plqsipXgafv
_plqsipUploadProtocol
_plqsipAccessToken
_plqsipUploadType
_plqsipCallback
(Just AltJSON)
_plqsipPayload
cloudTasksService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsQueuesSetIAMPolicyResource)
mempty