{-# 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.Spanner.Projects.Instances.TestIAMPermissions
(
ProjectsInstancesTestIAMPermissionsResource
, projectsInstancesTestIAMPermissions
, ProjectsInstancesTestIAMPermissions
, pitipXgafv
, pitipUploadProtocol
, pitipAccessToken
, pitipUploadType
, pitipPayload
, pitipResource
, pitipCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesTestIAMPermissionsResource =
"v1" :>
CaptureMode "resource" "testIamPermissions" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestIAMPermissionsRequest :>
Post '[JSON] TestIAMPermissionsResponse
data ProjectsInstancesTestIAMPermissions = ProjectsInstancesTestIAMPermissions'
{ _pitipXgafv :: !(Maybe Xgafv)
, _pitipUploadProtocol :: !(Maybe Text)
, _pitipAccessToken :: !(Maybe Text)
, _pitipUploadType :: !(Maybe Text)
, _pitipPayload :: !TestIAMPermissionsRequest
, _pitipResource :: !Text
, _pitipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsInstancesTestIAMPermissions
projectsInstancesTestIAMPermissions pPitipPayload_ pPitipResource_ =
ProjectsInstancesTestIAMPermissions'
{ _pitipXgafv = Nothing
, _pitipUploadProtocol = Nothing
, _pitipAccessToken = Nothing
, _pitipUploadType = Nothing
, _pitipPayload = pPitipPayload_
, _pitipResource = pPitipResource_
, _pitipCallback = Nothing
}
pitipXgafv :: Lens' ProjectsInstancesTestIAMPermissions (Maybe Xgafv)
pitipXgafv
= lens _pitipXgafv (\ s a -> s{_pitipXgafv = a})
pitipUploadProtocol :: Lens' ProjectsInstancesTestIAMPermissions (Maybe Text)
pitipUploadProtocol
= lens _pitipUploadProtocol
(\ s a -> s{_pitipUploadProtocol = a})
pitipAccessToken :: Lens' ProjectsInstancesTestIAMPermissions (Maybe Text)
pitipAccessToken
= lens _pitipAccessToken
(\ s a -> s{_pitipAccessToken = a})
pitipUploadType :: Lens' ProjectsInstancesTestIAMPermissions (Maybe Text)
pitipUploadType
= lens _pitipUploadType
(\ s a -> s{_pitipUploadType = a})
pitipPayload :: Lens' ProjectsInstancesTestIAMPermissions TestIAMPermissionsRequest
pitipPayload
= lens _pitipPayload (\ s a -> s{_pitipPayload = a})
pitipResource :: Lens' ProjectsInstancesTestIAMPermissions Text
pitipResource
= lens _pitipResource
(\ s a -> s{_pitipResource = a})
pitipCallback :: Lens' ProjectsInstancesTestIAMPermissions (Maybe Text)
pitipCallback
= lens _pitipCallback
(\ s a -> s{_pitipCallback = a})
instance GoogleRequest
ProjectsInstancesTestIAMPermissions where
type Rs ProjectsInstancesTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes ProjectsInstancesTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"]
requestClient
ProjectsInstancesTestIAMPermissions'{..}
= go _pitipResource _pitipXgafv _pitipUploadProtocol
_pitipAccessToken
_pitipUploadType
_pitipCallback
(Just AltJSON)
_pitipPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesTestIAMPermissionsResource)
mempty