{-# 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.DeploymentManager.Deployments.TestIAMPermissions
(
DeploymentsTestIAMPermissionsResource
, deploymentsTestIAMPermissions
, DeploymentsTestIAMPermissions
, dtipProject
, dtipPayload
, dtipResource
) where
import Network.Google.DeploymentManager.Types
import Network.Google.Prelude
type DeploymentsTestIAMPermissionsResource =
"deploymentmanager" :>
"v2" :>
"projects" :>
Capture "project" Text :>
"global" :>
"deployments" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data DeploymentsTestIAMPermissions = DeploymentsTestIAMPermissions'
{ _dtipProject :: !Text
, _dtipPayload :: !TestPermissionsRequest
, _dtipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentsTestIAMPermissions
:: Text
-> TestPermissionsRequest
-> Text
-> DeploymentsTestIAMPermissions
deploymentsTestIAMPermissions pDtipProject_ pDtipPayload_ pDtipResource_ =
DeploymentsTestIAMPermissions'
{ _dtipProject = pDtipProject_
, _dtipPayload = pDtipPayload_
, _dtipResource = pDtipResource_
}
dtipProject :: Lens' DeploymentsTestIAMPermissions Text
dtipProject
= lens _dtipProject (\ s a -> s{_dtipProject = a})
dtipPayload :: Lens' DeploymentsTestIAMPermissions TestPermissionsRequest
dtipPayload
= lens _dtipPayload (\ s a -> s{_dtipPayload = a})
dtipResource :: Lens' DeploymentsTestIAMPermissions Text
dtipResource
= lens _dtipResource (\ s a -> s{_dtipResource = a})
instance GoogleRequest DeploymentsTestIAMPermissions
where
type Rs DeploymentsTestIAMPermissions =
TestPermissionsResponse
type Scopes DeploymentsTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman"]
requestClient DeploymentsTestIAMPermissions'{..}
= go _dtipProject _dtipResource (Just AltJSON)
_dtipPayload
deploymentManagerService
where go
= buildClient
(Proxy ::
Proxy DeploymentsTestIAMPermissionsResource)
mempty