{-# 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.Clusters.SetIAMPolicy
(
ProjectsRegionsClustersSetIAMPolicyResource
, projectsRegionsClustersSetIAMPolicy
, ProjectsRegionsClustersSetIAMPolicy
, prcsipXgafv
, prcsipUploadProtocol
, prcsipAccessToken
, prcsipUploadType
, prcsipPayload
, prcsipResource
, prcsipCallback
) where
import Network.Google.Dataproc.Types
import Network.Google.Prelude
type ProjectsRegionsClustersSetIAMPolicyResource =
"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 ProjectsRegionsClustersSetIAMPolicy = ProjectsRegionsClustersSetIAMPolicy'
{ _prcsipXgafv :: !(Maybe Xgafv)
, _prcsipUploadProtocol :: !(Maybe Text)
, _prcsipAccessToken :: !(Maybe Text)
, _prcsipUploadType :: !(Maybe Text)
, _prcsipPayload :: !SetIAMPolicyRequest
, _prcsipResource :: !Text
, _prcsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsRegionsClustersSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsRegionsClustersSetIAMPolicy
projectsRegionsClustersSetIAMPolicy pPrcsipPayload_ pPrcsipResource_ =
ProjectsRegionsClustersSetIAMPolicy'
{ _prcsipXgafv = Nothing
, _prcsipUploadProtocol = Nothing
, _prcsipAccessToken = Nothing
, _prcsipUploadType = Nothing
, _prcsipPayload = pPrcsipPayload_
, _prcsipResource = pPrcsipResource_
, _prcsipCallback = Nothing
}
prcsipXgafv :: Lens' ProjectsRegionsClustersSetIAMPolicy (Maybe Xgafv)
prcsipXgafv
= lens _prcsipXgafv (\ s a -> s{_prcsipXgafv = a})
prcsipUploadProtocol :: Lens' ProjectsRegionsClustersSetIAMPolicy (Maybe Text)
prcsipUploadProtocol
= lens _prcsipUploadProtocol
(\ s a -> s{_prcsipUploadProtocol = a})
prcsipAccessToken :: Lens' ProjectsRegionsClustersSetIAMPolicy (Maybe Text)
prcsipAccessToken
= lens _prcsipAccessToken
(\ s a -> s{_prcsipAccessToken = a})
prcsipUploadType :: Lens' ProjectsRegionsClustersSetIAMPolicy (Maybe Text)
prcsipUploadType
= lens _prcsipUploadType
(\ s a -> s{_prcsipUploadType = a})
prcsipPayload :: Lens' ProjectsRegionsClustersSetIAMPolicy SetIAMPolicyRequest
prcsipPayload
= lens _prcsipPayload
(\ s a -> s{_prcsipPayload = a})
prcsipResource :: Lens' ProjectsRegionsClustersSetIAMPolicy Text
prcsipResource
= lens _prcsipResource
(\ s a -> s{_prcsipResource = a})
prcsipCallback :: Lens' ProjectsRegionsClustersSetIAMPolicy (Maybe Text)
prcsipCallback
= lens _prcsipCallback
(\ s a -> s{_prcsipCallback = a})
instance GoogleRequest
ProjectsRegionsClustersSetIAMPolicy where
type Rs ProjectsRegionsClustersSetIAMPolicy = Policy
type Scopes ProjectsRegionsClustersSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsRegionsClustersSetIAMPolicy'{..}
= go _prcsipResource _prcsipXgafv
_prcsipUploadProtocol
_prcsipAccessToken
_prcsipUploadType
_prcsipCallback
(Just AltJSON)
_prcsipPayload
dataprocService
where go
= buildClient
(Proxy ::
Proxy ProjectsRegionsClustersSetIAMPolicyResource)
mempty