{-# 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.TestIAMPermissions
(
ProjectsPolicyTestIAMPermissionsResource
, projectsPolicyTestIAMPermissions
, ProjectsPolicyTestIAMPermissions
, pptipXgafv
, pptipUploadProtocol
, pptipAccessToken
, pptipUploadType
, pptipPayload
, pptipResource
, pptipCallback
) where
import Network.Google.BinaryAuthorization.Types
import Network.Google.Prelude
type ProjectsPolicyTestIAMPermissionsResource =
"v1beta1" :>
CaptureMode "resource" "testIamPermissions" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestIAMPermissionsRequest :>
Post '[JSON] TestIAMPermissionsResponse
data ProjectsPolicyTestIAMPermissions = ProjectsPolicyTestIAMPermissions'
{ _pptipXgafv :: !(Maybe Xgafv)
, _pptipUploadProtocol :: !(Maybe Text)
, _pptipAccessToken :: !(Maybe Text)
, _pptipUploadType :: !(Maybe Text)
, _pptipPayload :: !TestIAMPermissionsRequest
, _pptipResource :: !Text
, _pptipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsPolicyTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsPolicyTestIAMPermissions
projectsPolicyTestIAMPermissions pPptipPayload_ pPptipResource_ =
ProjectsPolicyTestIAMPermissions'
{ _pptipXgafv = Nothing
, _pptipUploadProtocol = Nothing
, _pptipAccessToken = Nothing
, _pptipUploadType = Nothing
, _pptipPayload = pPptipPayload_
, _pptipResource = pPptipResource_
, _pptipCallback = Nothing
}
pptipXgafv :: Lens' ProjectsPolicyTestIAMPermissions (Maybe Xgafv)
pptipXgafv
= lens _pptipXgafv (\ s a -> s{_pptipXgafv = a})
pptipUploadProtocol :: Lens' ProjectsPolicyTestIAMPermissions (Maybe Text)
pptipUploadProtocol
= lens _pptipUploadProtocol
(\ s a -> s{_pptipUploadProtocol = a})
pptipAccessToken :: Lens' ProjectsPolicyTestIAMPermissions (Maybe Text)
pptipAccessToken
= lens _pptipAccessToken
(\ s a -> s{_pptipAccessToken = a})
pptipUploadType :: Lens' ProjectsPolicyTestIAMPermissions (Maybe Text)
pptipUploadType
= lens _pptipUploadType
(\ s a -> s{_pptipUploadType = a})
pptipPayload :: Lens' ProjectsPolicyTestIAMPermissions TestIAMPermissionsRequest
pptipPayload
= lens _pptipPayload (\ s a -> s{_pptipPayload = a})
pptipResource :: Lens' ProjectsPolicyTestIAMPermissions Text
pptipResource
= lens _pptipResource
(\ s a -> s{_pptipResource = a})
pptipCallback :: Lens' ProjectsPolicyTestIAMPermissions (Maybe Text)
pptipCallback
= lens _pptipCallback
(\ s a -> s{_pptipCallback = a})
instance GoogleRequest
ProjectsPolicyTestIAMPermissions where
type Rs ProjectsPolicyTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes ProjectsPolicyTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsPolicyTestIAMPermissions'{..}
= go _pptipResource _pptipXgafv _pptipUploadProtocol
_pptipAccessToken
_pptipUploadType
_pptipCallback
(Just AltJSON)
_pptipPayload
binaryAuthorizationService
where go
= buildClient
(Proxy ::
Proxy ProjectsPolicyTestIAMPermissionsResource)
mempty