{-# 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.Dataproc.Projects.Regions.WorkflowTemplates.SetIAMPolicy
(
ProjectsRegionsWorkflowTemplatesSetIAMPolicyResource
, projectsRegionsWorkflowTemplatesSetIAMPolicy
, ProjectsRegionsWorkflowTemplatesSetIAMPolicy
, prwtsipXgafv
, prwtsipUploadProtocol
, prwtsipAccessToken
, prwtsipUploadType
, prwtsipPayload
, prwtsipResource
, prwtsipCallback
) where
import Network.Google.Dataproc.Types
import Network.Google.Prelude
type ProjectsRegionsWorkflowTemplatesSetIAMPolicyResource
=
"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 ProjectsRegionsWorkflowTemplatesSetIAMPolicy = ProjectsRegionsWorkflowTemplatesSetIAMPolicy'
{ _prwtsipXgafv :: !(Maybe Xgafv)
, _prwtsipUploadProtocol :: !(Maybe Text)
, _prwtsipAccessToken :: !(Maybe Text)
, _prwtsipUploadType :: !(Maybe Text)
, _prwtsipPayload :: !SetIAMPolicyRequest
, _prwtsipResource :: !Text
, _prwtsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsRegionsWorkflowTemplatesSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsRegionsWorkflowTemplatesSetIAMPolicy
projectsRegionsWorkflowTemplatesSetIAMPolicy pPrwtsipPayload_ pPrwtsipResource_ =
ProjectsRegionsWorkflowTemplatesSetIAMPolicy'
{ _prwtsipXgafv = Nothing
, _prwtsipUploadProtocol = Nothing
, _prwtsipAccessToken = Nothing
, _prwtsipUploadType = Nothing
, _prwtsipPayload = pPrwtsipPayload_
, _prwtsipResource = pPrwtsipResource_
, _prwtsipCallback = Nothing
}
prwtsipXgafv :: Lens' ProjectsRegionsWorkflowTemplatesSetIAMPolicy (Maybe Xgafv)
prwtsipXgafv
= lens _prwtsipXgafv (\ s a -> s{_prwtsipXgafv = a})
prwtsipUploadProtocol :: Lens' ProjectsRegionsWorkflowTemplatesSetIAMPolicy (Maybe Text)
prwtsipUploadProtocol
= lens _prwtsipUploadProtocol
(\ s a -> s{_prwtsipUploadProtocol = a})
prwtsipAccessToken :: Lens' ProjectsRegionsWorkflowTemplatesSetIAMPolicy (Maybe Text)
prwtsipAccessToken
= lens _prwtsipAccessToken
(\ s a -> s{_prwtsipAccessToken = a})
prwtsipUploadType :: Lens' ProjectsRegionsWorkflowTemplatesSetIAMPolicy (Maybe Text)
prwtsipUploadType
= lens _prwtsipUploadType
(\ s a -> s{_prwtsipUploadType = a})
prwtsipPayload :: Lens' ProjectsRegionsWorkflowTemplatesSetIAMPolicy SetIAMPolicyRequest
prwtsipPayload
= lens _prwtsipPayload
(\ s a -> s{_prwtsipPayload = a})
prwtsipResource :: Lens' ProjectsRegionsWorkflowTemplatesSetIAMPolicy Text
prwtsipResource
= lens _prwtsipResource
(\ s a -> s{_prwtsipResource = a})
prwtsipCallback :: Lens' ProjectsRegionsWorkflowTemplatesSetIAMPolicy (Maybe Text)
prwtsipCallback
= lens _prwtsipCallback
(\ s a -> s{_prwtsipCallback = a})
instance GoogleRequest
ProjectsRegionsWorkflowTemplatesSetIAMPolicy where
type Rs ProjectsRegionsWorkflowTemplatesSetIAMPolicy
= Policy
type Scopes
ProjectsRegionsWorkflowTemplatesSetIAMPolicy
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsRegionsWorkflowTemplatesSetIAMPolicy'{..}
= go _prwtsipResource _prwtsipXgafv
_prwtsipUploadProtocol
_prwtsipAccessToken
_prwtsipUploadType
_prwtsipCallback
(Just AltJSON)
_prwtsipPayload
dataprocService
where go
= buildClient
(Proxy ::
Proxy
ProjectsRegionsWorkflowTemplatesSetIAMPolicyResource)
mempty