{-# 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.Compute.Images.TestIAMPermissions
(
ImagesTestIAMPermissionsResource
, imagesTestIAMPermissions
, ImagesTestIAMPermissions
, itiampProject
, itiampPayload
, itiampResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ImagesTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"images" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data ImagesTestIAMPermissions = ImagesTestIAMPermissions'
{ _itiampProject :: !Text
, _itiampPayload :: !TestPermissionsRequest
, _itiampResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
imagesTestIAMPermissions
:: Text
-> TestPermissionsRequest
-> Text
-> ImagesTestIAMPermissions
imagesTestIAMPermissions pItiampProject_ pItiampPayload_ pItiampResource_ =
ImagesTestIAMPermissions'
{ _itiampProject = pItiampProject_
, _itiampPayload = pItiampPayload_
, _itiampResource = pItiampResource_
}
itiampProject :: Lens' ImagesTestIAMPermissions Text
itiampProject
= lens _itiampProject
(\ s a -> s{_itiampProject = a})
itiampPayload :: Lens' ImagesTestIAMPermissions TestPermissionsRequest
itiampPayload
= lens _itiampPayload
(\ s a -> s{_itiampPayload = a})
itiampResource :: Lens' ImagesTestIAMPermissions Text
itiampResource
= lens _itiampResource
(\ s a -> s{_itiampResource = a})
instance GoogleRequest ImagesTestIAMPermissions where
type Rs ImagesTestIAMPermissions =
TestPermissionsResponse
type Scopes ImagesTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient ImagesTestIAMPermissions'{..}
= go _itiampProject _itiampResource (Just AltJSON)
_itiampPayload
computeService
where go
= buildClient
(Proxy :: Proxy ImagesTestIAMPermissionsResource)
mempty