{-# 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.BinaryAuthorization.Projects.Policy.SetIAMPolicy
(
ProjectsPolicySetIAMPolicyResource
, projectsPolicySetIAMPolicy
, ProjectsPolicySetIAMPolicy
, ppsipXgafv
, ppsipUploadProtocol
, ppsipAccessToken
, ppsipUploadType
, ppsipPayload
, ppsipResource
, ppsipCallback
) where
import Network.Google.BinaryAuthorization.Types
import Network.Google.Prelude
type ProjectsPolicySetIAMPolicyResource =
"v1beta1" :>
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] IAMPolicy
data ProjectsPolicySetIAMPolicy = ProjectsPolicySetIAMPolicy'
{ _ppsipXgafv :: !(Maybe Xgafv)
, _ppsipUploadProtocol :: !(Maybe Text)
, _ppsipAccessToken :: !(Maybe Text)
, _ppsipUploadType :: !(Maybe Text)
, _ppsipPayload :: !SetIAMPolicyRequest
, _ppsipResource :: !Text
, _ppsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsPolicySetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsPolicySetIAMPolicy
projectsPolicySetIAMPolicy pPpsipPayload_ pPpsipResource_ =
ProjectsPolicySetIAMPolicy'
{ _ppsipXgafv = Nothing
, _ppsipUploadProtocol = Nothing
, _ppsipAccessToken = Nothing
, _ppsipUploadType = Nothing
, _ppsipPayload = pPpsipPayload_
, _ppsipResource = pPpsipResource_
, _ppsipCallback = Nothing
}
ppsipXgafv :: Lens' ProjectsPolicySetIAMPolicy (Maybe Xgafv)
ppsipXgafv
= lens _ppsipXgafv (\ s a -> s{_ppsipXgafv = a})
ppsipUploadProtocol :: Lens' ProjectsPolicySetIAMPolicy (Maybe Text)
ppsipUploadProtocol
= lens _ppsipUploadProtocol
(\ s a -> s{_ppsipUploadProtocol = a})
ppsipAccessToken :: Lens' ProjectsPolicySetIAMPolicy (Maybe Text)
ppsipAccessToken
= lens _ppsipAccessToken
(\ s a -> s{_ppsipAccessToken = a})
ppsipUploadType :: Lens' ProjectsPolicySetIAMPolicy (Maybe Text)
ppsipUploadType
= lens _ppsipUploadType
(\ s a -> s{_ppsipUploadType = a})
ppsipPayload :: Lens' ProjectsPolicySetIAMPolicy SetIAMPolicyRequest
ppsipPayload
= lens _ppsipPayload (\ s a -> s{_ppsipPayload = a})
ppsipResource :: Lens' ProjectsPolicySetIAMPolicy Text
ppsipResource
= lens _ppsipResource
(\ s a -> s{_ppsipResource = a})
ppsipCallback :: Lens' ProjectsPolicySetIAMPolicy (Maybe Text)
ppsipCallback
= lens _ppsipCallback
(\ s a -> s{_ppsipCallback = a})
instance GoogleRequest ProjectsPolicySetIAMPolicy
where
type Rs ProjectsPolicySetIAMPolicy = IAMPolicy
type Scopes ProjectsPolicySetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsPolicySetIAMPolicy'{..}
= go _ppsipResource _ppsipXgafv _ppsipUploadProtocol
_ppsipAccessToken
_ppsipUploadType
_ppsipCallback
(Just AltJSON)
_ppsipPayload
binaryAuthorizationService
where go
= buildClient
(Proxy :: Proxy ProjectsPolicySetIAMPolicyResource)
mempty