{-# 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.Attestors.SetIAMPolicy
(
ProjectsAttestorsSetIAMPolicyResource
, projectsAttestorsSetIAMPolicy
, ProjectsAttestorsSetIAMPolicy
, pasipXgafv
, pasipUploadProtocol
, pasipAccessToken
, pasipUploadType
, pasipPayload
, pasipResource
, pasipCallback
) where
import Network.Google.BinaryAuthorization.Types
import Network.Google.Prelude
type ProjectsAttestorsSetIAMPolicyResource =
"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 ProjectsAttestorsSetIAMPolicy = ProjectsAttestorsSetIAMPolicy'
{ _pasipXgafv :: !(Maybe Xgafv)
, _pasipUploadProtocol :: !(Maybe Text)
, _pasipAccessToken :: !(Maybe Text)
, _pasipUploadType :: !(Maybe Text)
, _pasipPayload :: !SetIAMPolicyRequest
, _pasipResource :: !Text
, _pasipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAttestorsSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsAttestorsSetIAMPolicy
projectsAttestorsSetIAMPolicy pPasipPayload_ pPasipResource_ =
ProjectsAttestorsSetIAMPolicy'
{ _pasipXgafv = Nothing
, _pasipUploadProtocol = Nothing
, _pasipAccessToken = Nothing
, _pasipUploadType = Nothing
, _pasipPayload = pPasipPayload_
, _pasipResource = pPasipResource_
, _pasipCallback = Nothing
}
pasipXgafv :: Lens' ProjectsAttestorsSetIAMPolicy (Maybe Xgafv)
pasipXgafv
= lens _pasipXgafv (\ s a -> s{_pasipXgafv = a})
pasipUploadProtocol :: Lens' ProjectsAttestorsSetIAMPolicy (Maybe Text)
pasipUploadProtocol
= lens _pasipUploadProtocol
(\ s a -> s{_pasipUploadProtocol = a})
pasipAccessToken :: Lens' ProjectsAttestorsSetIAMPolicy (Maybe Text)
pasipAccessToken
= lens _pasipAccessToken
(\ s a -> s{_pasipAccessToken = a})
pasipUploadType :: Lens' ProjectsAttestorsSetIAMPolicy (Maybe Text)
pasipUploadType
= lens _pasipUploadType
(\ s a -> s{_pasipUploadType = a})
pasipPayload :: Lens' ProjectsAttestorsSetIAMPolicy SetIAMPolicyRequest
pasipPayload
= lens _pasipPayload (\ s a -> s{_pasipPayload = a})
pasipResource :: Lens' ProjectsAttestorsSetIAMPolicy Text
pasipResource
= lens _pasipResource
(\ s a -> s{_pasipResource = a})
pasipCallback :: Lens' ProjectsAttestorsSetIAMPolicy (Maybe Text)
pasipCallback
= lens _pasipCallback
(\ s a -> s{_pasipCallback = a})
instance GoogleRequest ProjectsAttestorsSetIAMPolicy
where
type Rs ProjectsAttestorsSetIAMPolicy = IAMPolicy
type Scopes ProjectsAttestorsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsAttestorsSetIAMPolicy'{..}
= go _pasipResource _pasipXgafv _pasipUploadProtocol
_pasipAccessToken
_pasipUploadType
_pasipCallback
(Just AltJSON)
_pasipPayload
binaryAuthorizationService
where go
= buildClient
(Proxy ::
Proxy ProjectsAttestorsSetIAMPolicyResource)
mempty