{-# 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.CloudFunctions.Projects.Locations.Functions.TestIAMPermissions
(
ProjectsLocationsFunctionsTestIAMPermissionsResource
, projectsLocationsFunctionsTestIAMPermissions
, ProjectsLocationsFunctionsTestIAMPermissions
, plftipXgafv
, plftipUploadProtocol
, plftipAccessToken
, plftipUploadType
, plftipPayload
, plftipResource
, plftipCallback
) where
import Network.Google.CloudFunctions.Types
import Network.Google.Prelude
type ProjectsLocationsFunctionsTestIAMPermissionsResource
=
"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 ProjectsLocationsFunctionsTestIAMPermissions = ProjectsLocationsFunctionsTestIAMPermissions'
{ _plftipXgafv :: !(Maybe Xgafv)
, _plftipUploadProtocol :: !(Maybe Text)
, _plftipAccessToken :: !(Maybe Text)
, _plftipUploadType :: !(Maybe Text)
, _plftipPayload :: !TestIAMPermissionsRequest
, _plftipResource :: !Text
, _plftipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsFunctionsTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsLocationsFunctionsTestIAMPermissions
projectsLocationsFunctionsTestIAMPermissions pPlftipPayload_ pPlftipResource_ =
ProjectsLocationsFunctionsTestIAMPermissions'
{ _plftipXgafv = Nothing
, _plftipUploadProtocol = Nothing
, _plftipAccessToken = Nothing
, _plftipUploadType = Nothing
, _plftipPayload = pPlftipPayload_
, _plftipResource = pPlftipResource_
, _plftipCallback = Nothing
}
plftipXgafv :: Lens' ProjectsLocationsFunctionsTestIAMPermissions (Maybe Xgafv)
plftipXgafv
= lens _plftipXgafv (\ s a -> s{_plftipXgafv = a})
plftipUploadProtocol :: Lens' ProjectsLocationsFunctionsTestIAMPermissions (Maybe Text)
plftipUploadProtocol
= lens _plftipUploadProtocol
(\ s a -> s{_plftipUploadProtocol = a})
plftipAccessToken :: Lens' ProjectsLocationsFunctionsTestIAMPermissions (Maybe Text)
plftipAccessToken
= lens _plftipAccessToken
(\ s a -> s{_plftipAccessToken = a})
plftipUploadType :: Lens' ProjectsLocationsFunctionsTestIAMPermissions (Maybe Text)
plftipUploadType
= lens _plftipUploadType
(\ s a -> s{_plftipUploadType = a})
plftipPayload :: Lens' ProjectsLocationsFunctionsTestIAMPermissions TestIAMPermissionsRequest
plftipPayload
= lens _plftipPayload
(\ s a -> s{_plftipPayload = a})
plftipResource :: Lens' ProjectsLocationsFunctionsTestIAMPermissions Text
plftipResource
= lens _plftipResource
(\ s a -> s{_plftipResource = a})
plftipCallback :: Lens' ProjectsLocationsFunctionsTestIAMPermissions (Maybe Text)
plftipCallback
= lens _plftipCallback
(\ s a -> s{_plftipCallback = a})
instance GoogleRequest
ProjectsLocationsFunctionsTestIAMPermissions where
type Rs ProjectsLocationsFunctionsTestIAMPermissions
= TestIAMPermissionsResponse
type Scopes
ProjectsLocationsFunctionsTestIAMPermissions
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsFunctionsTestIAMPermissions'{..}
= go _plftipResource _plftipXgafv
_plftipUploadProtocol
_plftipAccessToken
_plftipUploadType
_plftipCallback
(Just AltJSON)
_plftipPayload
cloudFunctionsService
where go
= buildClient
(Proxy ::
Proxy
ProjectsLocationsFunctionsTestIAMPermissionsResource)
mempty