{-# 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.Operations.SetIAMPolicy
(
ProjectsRegionsOperationsSetIAMPolicyResource
, projectsRegionsOperationsSetIAMPolicy
, ProjectsRegionsOperationsSetIAMPolicy
, prosipXgafv
, prosipUploadProtocol
, prosipAccessToken
, prosipUploadType
, prosipPayload
, prosipResource
, prosipCallback
) where
import Network.Google.Dataproc.Types
import Network.Google.Prelude
type ProjectsRegionsOperationsSetIAMPolicyResource =
"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 ProjectsRegionsOperationsSetIAMPolicy = ProjectsRegionsOperationsSetIAMPolicy'
{ _prosipXgafv :: !(Maybe Xgafv)
, _prosipUploadProtocol :: !(Maybe Text)
, _prosipAccessToken :: !(Maybe Text)
, _prosipUploadType :: !(Maybe Text)
, _prosipPayload :: !SetIAMPolicyRequest
, _prosipResource :: !Text
, _prosipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsRegionsOperationsSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsRegionsOperationsSetIAMPolicy
projectsRegionsOperationsSetIAMPolicy pProsipPayload_ pProsipResource_ =
ProjectsRegionsOperationsSetIAMPolicy'
{ _prosipXgafv = Nothing
, _prosipUploadProtocol = Nothing
, _prosipAccessToken = Nothing
, _prosipUploadType = Nothing
, _prosipPayload = pProsipPayload_
, _prosipResource = pProsipResource_
, _prosipCallback = Nothing
}
prosipXgafv :: Lens' ProjectsRegionsOperationsSetIAMPolicy (Maybe Xgafv)
prosipXgafv
= lens _prosipXgafv (\ s a -> s{_prosipXgafv = a})
prosipUploadProtocol :: Lens' ProjectsRegionsOperationsSetIAMPolicy (Maybe Text)
prosipUploadProtocol
= lens _prosipUploadProtocol
(\ s a -> s{_prosipUploadProtocol = a})
prosipAccessToken :: Lens' ProjectsRegionsOperationsSetIAMPolicy (Maybe Text)
prosipAccessToken
= lens _prosipAccessToken
(\ s a -> s{_prosipAccessToken = a})
prosipUploadType :: Lens' ProjectsRegionsOperationsSetIAMPolicy (Maybe Text)
prosipUploadType
= lens _prosipUploadType
(\ s a -> s{_prosipUploadType = a})
prosipPayload :: Lens' ProjectsRegionsOperationsSetIAMPolicy SetIAMPolicyRequest
prosipPayload
= lens _prosipPayload
(\ s a -> s{_prosipPayload = a})
prosipResource :: Lens' ProjectsRegionsOperationsSetIAMPolicy Text
prosipResource
= lens _prosipResource
(\ s a -> s{_prosipResource = a})
prosipCallback :: Lens' ProjectsRegionsOperationsSetIAMPolicy (Maybe Text)
prosipCallback
= lens _prosipCallback
(\ s a -> s{_prosipCallback = a})
instance GoogleRequest
ProjectsRegionsOperationsSetIAMPolicy where
type Rs ProjectsRegionsOperationsSetIAMPolicy =
Policy
type Scopes ProjectsRegionsOperationsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsRegionsOperationsSetIAMPolicy'{..}
= go _prosipResource _prosipXgafv
_prosipUploadProtocol
_prosipAccessToken
_prosipUploadType
_prosipCallback
(Just AltJSON)
_prosipPayload
dataprocService
where go
= buildClient
(Proxy ::
Proxy ProjectsRegionsOperationsSetIAMPolicyResource)
mempty