{-# 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.Instances.TestIAMPermissions
(
InstancesTestIAMPermissionsResource
, instancesTestIAMPermissions
, InstancesTestIAMPermissions
, itipProject
, itipZone
, itipPayload
, itipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data InstancesTestIAMPermissions = InstancesTestIAMPermissions'
{ _itipProject :: !Text
, _itipZone :: !Text
, _itipPayload :: !TestPermissionsRequest
, _itipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesTestIAMPermissions
:: Text
-> Text
-> TestPermissionsRequest
-> Text
-> InstancesTestIAMPermissions
instancesTestIAMPermissions pItipProject_ pItipZone_ pItipPayload_ pItipResource_ =
InstancesTestIAMPermissions'
{ _itipProject = pItipProject_
, _itipZone = pItipZone_
, _itipPayload = pItipPayload_
, _itipResource = pItipResource_
}
itipProject :: Lens' InstancesTestIAMPermissions Text
itipProject
= lens _itipProject (\ s a -> s{_itipProject = a})
itipZone :: Lens' InstancesTestIAMPermissions Text
itipZone = lens _itipZone (\ s a -> s{_itipZone = a})
itipPayload :: Lens' InstancesTestIAMPermissions TestPermissionsRequest
itipPayload
= lens _itipPayload (\ s a -> s{_itipPayload = a})
itipResource :: Lens' InstancesTestIAMPermissions Text
itipResource
= lens _itipResource (\ s a -> s{_itipResource = a})
instance GoogleRequest InstancesTestIAMPermissions
where
type Rs InstancesTestIAMPermissions =
TestPermissionsResponse
type Scopes InstancesTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient InstancesTestIAMPermissions'{..}
= go _itipProject _itipZone _itipResource
(Just AltJSON)
_itipPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstancesTestIAMPermissionsResource)
mempty