{-# 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.IAM.Projects.ServiceAccounts.TestIAMPermissions
(
ProjectsServiceAccountsTestIAMPermissionsResource
, projectsServiceAccountsTestIAMPermissions
, ProjectsServiceAccountsTestIAMPermissions
, psatipXgafv
, psatipUploadProtocol
, psatipAccessToken
, psatipUploadType
, psatipPayload
, psatipResource
, psatipCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type ProjectsServiceAccountsTestIAMPermissionsResource
=
"v1" :>
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 ProjectsServiceAccountsTestIAMPermissions = ProjectsServiceAccountsTestIAMPermissions'
{ _psatipXgafv :: !(Maybe Xgafv)
, _psatipUploadProtocol :: !(Maybe Text)
, _psatipAccessToken :: !(Maybe Text)
, _psatipUploadType :: !(Maybe Text)
, _psatipPayload :: !TestIAMPermissionsRequest
, _psatipResource :: !Text
, _psatipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsServiceAccountsTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsServiceAccountsTestIAMPermissions
projectsServiceAccountsTestIAMPermissions pPsatipPayload_ pPsatipResource_ =
ProjectsServiceAccountsTestIAMPermissions'
{ _psatipXgafv = Nothing
, _psatipUploadProtocol = Nothing
, _psatipAccessToken = Nothing
, _psatipUploadType = Nothing
, _psatipPayload = pPsatipPayload_
, _psatipResource = pPsatipResource_
, _psatipCallback = Nothing
}
psatipXgafv :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Xgafv)
psatipXgafv
= lens _psatipXgafv (\ s a -> s{_psatipXgafv = a})
psatipUploadProtocol :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Text)
psatipUploadProtocol
= lens _psatipUploadProtocol
(\ s a -> s{_psatipUploadProtocol = a})
psatipAccessToken :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Text)
psatipAccessToken
= lens _psatipAccessToken
(\ s a -> s{_psatipAccessToken = a})
psatipUploadType :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Text)
psatipUploadType
= lens _psatipUploadType
(\ s a -> s{_psatipUploadType = a})
psatipPayload :: Lens' ProjectsServiceAccountsTestIAMPermissions TestIAMPermissionsRequest
psatipPayload
= lens _psatipPayload
(\ s a -> s{_psatipPayload = a})
psatipResource :: Lens' ProjectsServiceAccountsTestIAMPermissions Text
psatipResource
= lens _psatipResource
(\ s a -> s{_psatipResource = a})
psatipCallback :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Text)
psatipCallback
= lens _psatipCallback
(\ s a -> s{_psatipCallback = a})
instance GoogleRequest
ProjectsServiceAccountsTestIAMPermissions where
type Rs ProjectsServiceAccountsTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes ProjectsServiceAccountsTestIAMPermissions
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsServiceAccountsTestIAMPermissions'{..}
= go _psatipResource _psatipXgafv
_psatipUploadProtocol
_psatipAccessToken
_psatipUploadType
_psatipCallback
(Just AltJSON)
_psatipPayload
iAMService
where go
= buildClient
(Proxy ::
Proxy
ProjectsServiceAccountsTestIAMPermissionsResource)
mempty