{-# 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.TestIAMPermissions
(
ProjectsAttestorsTestIAMPermissionsResource
, projectsAttestorsTestIAMPermissions
, ProjectsAttestorsTestIAMPermissions
, patipXgafv
, patipUploadProtocol
, patipAccessToken
, patipUploadType
, patipPayload
, patipResource
, patipCallback
) where
import Network.Google.BinaryAuthorization.Types
import Network.Google.Prelude
type ProjectsAttestorsTestIAMPermissionsResource =
"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 ProjectsAttestorsTestIAMPermissions = ProjectsAttestorsTestIAMPermissions'
{ _patipXgafv :: !(Maybe Xgafv)
, _patipUploadProtocol :: !(Maybe Text)
, _patipAccessToken :: !(Maybe Text)
, _patipUploadType :: !(Maybe Text)
, _patipPayload :: !TestIAMPermissionsRequest
, _patipResource :: !Text
, _patipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAttestorsTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsAttestorsTestIAMPermissions
projectsAttestorsTestIAMPermissions pPatipPayload_ pPatipResource_ =
ProjectsAttestorsTestIAMPermissions'
{ _patipXgafv = Nothing
, _patipUploadProtocol = Nothing
, _patipAccessToken = Nothing
, _patipUploadType = Nothing
, _patipPayload = pPatipPayload_
, _patipResource = pPatipResource_
, _patipCallback = Nothing
}
patipXgafv :: Lens' ProjectsAttestorsTestIAMPermissions (Maybe Xgafv)
patipXgafv
= lens _patipXgafv (\ s a -> s{_patipXgafv = a})
patipUploadProtocol :: Lens' ProjectsAttestorsTestIAMPermissions (Maybe Text)
patipUploadProtocol
= lens _patipUploadProtocol
(\ s a -> s{_patipUploadProtocol = a})
patipAccessToken :: Lens' ProjectsAttestorsTestIAMPermissions (Maybe Text)
patipAccessToken
= lens _patipAccessToken
(\ s a -> s{_patipAccessToken = a})
patipUploadType :: Lens' ProjectsAttestorsTestIAMPermissions (Maybe Text)
patipUploadType
= lens _patipUploadType
(\ s a -> s{_patipUploadType = a})
patipPayload :: Lens' ProjectsAttestorsTestIAMPermissions TestIAMPermissionsRequest
patipPayload
= lens _patipPayload (\ s a -> s{_patipPayload = a})
patipResource :: Lens' ProjectsAttestorsTestIAMPermissions Text
patipResource
= lens _patipResource
(\ s a -> s{_patipResource = a})
patipCallback :: Lens' ProjectsAttestorsTestIAMPermissions (Maybe Text)
patipCallback
= lens _patipCallback
(\ s a -> s{_patipCallback = a})
instance GoogleRequest
ProjectsAttestorsTestIAMPermissions where
type Rs ProjectsAttestorsTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes ProjectsAttestorsTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsAttestorsTestIAMPermissions'{..}
= go _patipResource _patipXgafv _patipUploadProtocol
_patipAccessToken
_patipUploadType
_patipCallback
(Just AltJSON)
_patipPayload
binaryAuthorizationService
where go
= buildClient
(Proxy ::
Proxy ProjectsAttestorsTestIAMPermissionsResource)
mempty