{-# 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.LicenseCodes.TestIAMPermissions
(
LicenseCodesTestIAMPermissionsResource
, licenseCodesTestIAMPermissions
, LicenseCodesTestIAMPermissions
, lctipProject
, lctipPayload
, lctipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type LicenseCodesTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"licenseCodes" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data LicenseCodesTestIAMPermissions = LicenseCodesTestIAMPermissions'
{ _lctipProject :: !Text
, _lctipPayload :: !TestPermissionsRequest
, _lctipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
licenseCodesTestIAMPermissions
:: Text
-> TestPermissionsRequest
-> Text
-> LicenseCodesTestIAMPermissions
licenseCodesTestIAMPermissions pLctipProject_ pLctipPayload_ pLctipResource_ =
LicenseCodesTestIAMPermissions'
{ _lctipProject = pLctipProject_
, _lctipPayload = pLctipPayload_
, _lctipResource = pLctipResource_
}
lctipProject :: Lens' LicenseCodesTestIAMPermissions Text
lctipProject
= lens _lctipProject (\ s a -> s{_lctipProject = a})
lctipPayload :: Lens' LicenseCodesTestIAMPermissions TestPermissionsRequest
lctipPayload
= lens _lctipPayload (\ s a -> s{_lctipPayload = a})
lctipResource :: Lens' LicenseCodesTestIAMPermissions Text
lctipResource
= lens _lctipResource
(\ s a -> s{_lctipResource = a})
instance GoogleRequest LicenseCodesTestIAMPermissions
where
type Rs LicenseCodesTestIAMPermissions =
TestPermissionsResponse
type Scopes LicenseCodesTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient LicenseCodesTestIAMPermissions'{..}
= go _lctipProject _lctipResource (Just AltJSON)
_lctipPayload
computeService
where go
= buildClient
(Proxy ::
Proxy LicenseCodesTestIAMPermissionsResource)
mempty