{-# 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.Subnetworks.TestIAMPermissions
(
SubnetworksTestIAMPermissionsResource
, subnetworksTestIAMPermissions
, SubnetworksTestIAMPermissions
, stiampProject
, stiampPayload
, stiampResource
, stiampRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SubnetworksTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"subnetworks" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data SubnetworksTestIAMPermissions = SubnetworksTestIAMPermissions'
{ _stiampProject :: !Text
, _stiampPayload :: !TestPermissionsRequest
, _stiampResource :: !Text
, _stiampRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subnetworksTestIAMPermissions
:: Text
-> TestPermissionsRequest
-> Text
-> Text
-> SubnetworksTestIAMPermissions
subnetworksTestIAMPermissions pStiampProject_ pStiampPayload_ pStiampResource_ pStiampRegion_ =
SubnetworksTestIAMPermissions'
{ _stiampProject = pStiampProject_
, _stiampPayload = pStiampPayload_
, _stiampResource = pStiampResource_
, _stiampRegion = pStiampRegion_
}
stiampProject :: Lens' SubnetworksTestIAMPermissions Text
stiampProject
= lens _stiampProject
(\ s a -> s{_stiampProject = a})
stiampPayload :: Lens' SubnetworksTestIAMPermissions TestPermissionsRequest
stiampPayload
= lens _stiampPayload
(\ s a -> s{_stiampPayload = a})
stiampResource :: Lens' SubnetworksTestIAMPermissions Text
stiampResource
= lens _stiampResource
(\ s a -> s{_stiampResource = a})
stiampRegion :: Lens' SubnetworksTestIAMPermissions Text
stiampRegion
= lens _stiampRegion (\ s a -> s{_stiampRegion = a})
instance GoogleRequest SubnetworksTestIAMPermissions
where
type Rs SubnetworksTestIAMPermissions =
TestPermissionsResponse
type Scopes SubnetworksTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient SubnetworksTestIAMPermissions'{..}
= go _stiampProject _stiampRegion _stiampResource
(Just AltJSON)
_stiampPayload
computeService
where go
= buildClient
(Proxy ::
Proxy SubnetworksTestIAMPermissionsResource)
mempty