{-# 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.Snapshots.TestIAMPermissions
(
SnapshotsTestIAMPermissionsResource
, snapshotsTestIAMPermissions
, SnapshotsTestIAMPermissions
, stipProject
, stipPayload
, stipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SnapshotsTestIAMPermissionsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"snapshots" :>
Capture "resource" Text :>
"testIamPermissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestPermissionsRequest :>
Post '[JSON] TestPermissionsResponse
data SnapshotsTestIAMPermissions = SnapshotsTestIAMPermissions'
{ _stipProject :: !Text
, _stipPayload :: !TestPermissionsRequest
, _stipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
snapshotsTestIAMPermissions
:: Text
-> TestPermissionsRequest
-> Text
-> SnapshotsTestIAMPermissions
snapshotsTestIAMPermissions pStipProject_ pStipPayload_ pStipResource_ =
SnapshotsTestIAMPermissions'
{ _stipProject = pStipProject_
, _stipPayload = pStipPayload_
, _stipResource = pStipResource_
}
stipProject :: Lens' SnapshotsTestIAMPermissions Text
stipProject
= lens _stipProject (\ s a -> s{_stipProject = a})
stipPayload :: Lens' SnapshotsTestIAMPermissions TestPermissionsRequest
stipPayload
= lens _stipPayload (\ s a -> s{_stipPayload = a})
stipResource :: Lens' SnapshotsTestIAMPermissions Text
stipResource
= lens _stipResource (\ s a -> s{_stipResource = a})
instance GoogleRequest SnapshotsTestIAMPermissions
where
type Rs SnapshotsTestIAMPermissions =
TestPermissionsResponse
type Scopes SnapshotsTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient SnapshotsTestIAMPermissions'{..}
= go _stipProject _stipResource (Just AltJSON)
_stipPayload
computeService
where go
= buildClient
(Proxy :: Proxy SnapshotsTestIAMPermissionsResource)
mempty