{-# 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.ContainerAnalysis.Projects.Occurrences.TestIAMPermissions
(
ProjectsOccurrencesTestIAMPermissionsResource
, projectsOccurrencesTestIAMPermissions
, ProjectsOccurrencesTestIAMPermissions
, potipXgafv
, potipUploadProtocol
, potipAccessToken
, potipUploadType
, potipPayload
, potipResource
, potipCallback
) where
import Network.Google.ContainerAnalysis.Types
import Network.Google.Prelude
type ProjectsOccurrencesTestIAMPermissionsResource =
"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 ProjectsOccurrencesTestIAMPermissions = ProjectsOccurrencesTestIAMPermissions'
{ _potipXgafv :: !(Maybe Xgafv)
, _potipUploadProtocol :: !(Maybe Text)
, _potipAccessToken :: !(Maybe Text)
, _potipUploadType :: !(Maybe Text)
, _potipPayload :: !TestIAMPermissionsRequest
, _potipResource :: !Text
, _potipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsOccurrencesTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsOccurrencesTestIAMPermissions
projectsOccurrencesTestIAMPermissions pPotipPayload_ pPotipResource_ =
ProjectsOccurrencesTestIAMPermissions'
{ _potipXgafv = Nothing
, _potipUploadProtocol = Nothing
, _potipAccessToken = Nothing
, _potipUploadType = Nothing
, _potipPayload = pPotipPayload_
, _potipResource = pPotipResource_
, _potipCallback = Nothing
}
potipXgafv :: Lens' ProjectsOccurrencesTestIAMPermissions (Maybe Xgafv)
potipXgafv
= lens _potipXgafv (\ s a -> s{_potipXgafv = a})
potipUploadProtocol :: Lens' ProjectsOccurrencesTestIAMPermissions (Maybe Text)
potipUploadProtocol
= lens _potipUploadProtocol
(\ s a -> s{_potipUploadProtocol = a})
potipAccessToken :: Lens' ProjectsOccurrencesTestIAMPermissions (Maybe Text)
potipAccessToken
= lens _potipAccessToken
(\ s a -> s{_potipAccessToken = a})
potipUploadType :: Lens' ProjectsOccurrencesTestIAMPermissions (Maybe Text)
potipUploadType
= lens _potipUploadType
(\ s a -> s{_potipUploadType = a})
potipPayload :: Lens' ProjectsOccurrencesTestIAMPermissions TestIAMPermissionsRequest
potipPayload
= lens _potipPayload (\ s a -> s{_potipPayload = a})
potipResource :: Lens' ProjectsOccurrencesTestIAMPermissions Text
potipResource
= lens _potipResource
(\ s a -> s{_potipResource = a})
potipCallback :: Lens' ProjectsOccurrencesTestIAMPermissions (Maybe Text)
potipCallback
= lens _potipCallback
(\ s a -> s{_potipCallback = a})
instance GoogleRequest
ProjectsOccurrencesTestIAMPermissions where
type Rs ProjectsOccurrencesTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes ProjectsOccurrencesTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsOccurrencesTestIAMPermissions'{..}
= go _potipResource _potipXgafv _potipUploadProtocol
_potipAccessToken
_potipUploadType
_potipCallback
(Just AltJSON)
_potipPayload
containerAnalysisService
where go
= buildClient
(Proxy ::
Proxy ProjectsOccurrencesTestIAMPermissionsResource)
mempty