{-# 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.Licenses.TestIAMPermissions
(
LicensesTestIAMPermissionsResource
, licensesTestIAMPermissions
, LicensesTestIAMPermissions
, ltipProject
, ltipPayload
, ltipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type LicensesTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"licenses" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data LicensesTestIAMPermissions = LicensesTestIAMPermissions'
{ _ltipProject :: !Text
, _ltipPayload :: !TestPermissionsRequest
, _ltipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
licensesTestIAMPermissions
:: Text
-> TestPermissionsRequest
-> Text
-> LicensesTestIAMPermissions
licensesTestIAMPermissions pLtipProject_ pLtipPayload_ pLtipResource_ =
LicensesTestIAMPermissions'
{ _ltipProject = pLtipProject_
, _ltipPayload = pLtipPayload_
, _ltipResource = pLtipResource_
}
ltipProject :: Lens' LicensesTestIAMPermissions Text
ltipProject
= lens _ltipProject (\ s a -> s{_ltipProject = a})
ltipPayload :: Lens' LicensesTestIAMPermissions TestPermissionsRequest
ltipPayload
= lens _ltipPayload (\ s a -> s{_ltipPayload = a})
ltipResource :: Lens' LicensesTestIAMPermissions Text
ltipResource
= lens _ltipResource (\ s a -> s{_ltipResource = a})
instance GoogleRequest LicensesTestIAMPermissions
where
type Rs LicensesTestIAMPermissions =
TestPermissionsResponse
type Scopes LicensesTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient LicensesTestIAMPermissions'{..}
= go _ltipProject _ltipResource (Just AltJSON)
_ltipPayload
computeService
where go
= buildClient
(Proxy :: Proxy LicensesTestIAMPermissionsResource)
mempty