{-# 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.Jobs.SetIAMPolicy
(
ProjectsRegionsJobsSetIAMPolicyResource
, projectsRegionsJobsSetIAMPolicy
, ProjectsRegionsJobsSetIAMPolicy
, prjsipXgafv
, prjsipUploadProtocol
, prjsipAccessToken
, prjsipUploadType
, prjsipPayload
, prjsipResource
, prjsipCallback
) where
import Network.Google.Dataproc.Types
import Network.Google.Prelude
type ProjectsRegionsJobsSetIAMPolicyResource =
"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 ProjectsRegionsJobsSetIAMPolicy = ProjectsRegionsJobsSetIAMPolicy'
{ _prjsipXgafv :: !(Maybe Xgafv)
, _prjsipUploadProtocol :: !(Maybe Text)
, _prjsipAccessToken :: !(Maybe Text)
, _prjsipUploadType :: !(Maybe Text)
, _prjsipPayload :: !SetIAMPolicyRequest
, _prjsipResource :: !Text
, _prjsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsRegionsJobsSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsRegionsJobsSetIAMPolicy
projectsRegionsJobsSetIAMPolicy pPrjsipPayload_ pPrjsipResource_ =
ProjectsRegionsJobsSetIAMPolicy'
{ _prjsipXgafv = Nothing
, _prjsipUploadProtocol = Nothing
, _prjsipAccessToken = Nothing
, _prjsipUploadType = Nothing
, _prjsipPayload = pPrjsipPayload_
, _prjsipResource = pPrjsipResource_
, _prjsipCallback = Nothing
}
prjsipXgafv :: Lens' ProjectsRegionsJobsSetIAMPolicy (Maybe Xgafv)
prjsipXgafv
= lens _prjsipXgafv (\ s a -> s{_prjsipXgafv = a})
prjsipUploadProtocol :: Lens' ProjectsRegionsJobsSetIAMPolicy (Maybe Text)
prjsipUploadProtocol
= lens _prjsipUploadProtocol
(\ s a -> s{_prjsipUploadProtocol = a})
prjsipAccessToken :: Lens' ProjectsRegionsJobsSetIAMPolicy (Maybe Text)
prjsipAccessToken
= lens _prjsipAccessToken
(\ s a -> s{_prjsipAccessToken = a})
prjsipUploadType :: Lens' ProjectsRegionsJobsSetIAMPolicy (Maybe Text)
prjsipUploadType
= lens _prjsipUploadType
(\ s a -> s{_prjsipUploadType = a})
prjsipPayload :: Lens' ProjectsRegionsJobsSetIAMPolicy SetIAMPolicyRequest
prjsipPayload
= lens _prjsipPayload
(\ s a -> s{_prjsipPayload = a})
prjsipResource :: Lens' ProjectsRegionsJobsSetIAMPolicy Text
prjsipResource
= lens _prjsipResource
(\ s a -> s{_prjsipResource = a})
prjsipCallback :: Lens' ProjectsRegionsJobsSetIAMPolicy (Maybe Text)
prjsipCallback
= lens _prjsipCallback
(\ s a -> s{_prjsipCallback = a})
instance GoogleRequest
ProjectsRegionsJobsSetIAMPolicy where
type Rs ProjectsRegionsJobsSetIAMPolicy = Policy
type Scopes ProjectsRegionsJobsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsRegionsJobsSetIAMPolicy'{..}
= go _prjsipResource _prjsipXgafv
_prjsipUploadProtocol
_prjsipAccessToken
_prjsipUploadType
_prjsipCallback
(Just AltJSON)
_prjsipPayload
dataprocService
where go
= buildClient
(Proxy ::
Proxy ProjectsRegionsJobsSetIAMPolicyResource)
mempty