{-# 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.Databases.TestIAMPermissions
(
ProjectsInstancesDatabasesTestIAMPermissionsResource
, projectsInstancesDatabasesTestIAMPermissions
, ProjectsInstancesDatabasesTestIAMPermissions
, pidtipXgafv
, pidtipUploadProtocol
, pidtipAccessToken
, pidtipUploadType
, pidtipPayload
, pidtipResource
, pidtipCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesTestIAMPermissionsResource
=
"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 ProjectsInstancesDatabasesTestIAMPermissions = ProjectsInstancesDatabasesTestIAMPermissions'
{ _pidtipXgafv :: !(Maybe Xgafv)
, _pidtipUploadProtocol :: !(Maybe Text)
, _pidtipAccessToken :: !(Maybe Text)
, _pidtipUploadType :: !(Maybe Text)
, _pidtipPayload :: !TestIAMPermissionsRequest
, _pidtipResource :: !Text
, _pidtipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsInstancesDatabasesTestIAMPermissions
projectsInstancesDatabasesTestIAMPermissions pPidtipPayload_ pPidtipResource_ =
ProjectsInstancesDatabasesTestIAMPermissions'
{ _pidtipXgafv = Nothing
, _pidtipUploadProtocol = Nothing
, _pidtipAccessToken = Nothing
, _pidtipUploadType = Nothing
, _pidtipPayload = pPidtipPayload_
, _pidtipResource = pPidtipResource_
, _pidtipCallback = Nothing
}
pidtipXgafv :: Lens' ProjectsInstancesDatabasesTestIAMPermissions (Maybe Xgafv)
pidtipXgafv
= lens _pidtipXgafv (\ s a -> s{_pidtipXgafv = a})
pidtipUploadProtocol :: Lens' ProjectsInstancesDatabasesTestIAMPermissions (Maybe Text)
pidtipUploadProtocol
= lens _pidtipUploadProtocol
(\ s a -> s{_pidtipUploadProtocol = a})
pidtipAccessToken :: Lens' ProjectsInstancesDatabasesTestIAMPermissions (Maybe Text)
pidtipAccessToken
= lens _pidtipAccessToken
(\ s a -> s{_pidtipAccessToken = a})
pidtipUploadType :: Lens' ProjectsInstancesDatabasesTestIAMPermissions (Maybe Text)
pidtipUploadType
= lens _pidtipUploadType
(\ s a -> s{_pidtipUploadType = a})
pidtipPayload :: Lens' ProjectsInstancesDatabasesTestIAMPermissions TestIAMPermissionsRequest
pidtipPayload
= lens _pidtipPayload
(\ s a -> s{_pidtipPayload = a})
pidtipResource :: Lens' ProjectsInstancesDatabasesTestIAMPermissions Text
pidtipResource
= lens _pidtipResource
(\ s a -> s{_pidtipResource = a})
pidtipCallback :: Lens' ProjectsInstancesDatabasesTestIAMPermissions (Maybe Text)
pidtipCallback
= lens _pidtipCallback
(\ s a -> s{_pidtipCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesTestIAMPermissions where
type Rs ProjectsInstancesDatabasesTestIAMPermissions
= TestIAMPermissionsResponse
type Scopes
ProjectsInstancesDatabasesTestIAMPermissions
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"]
requestClient
ProjectsInstancesDatabasesTestIAMPermissions'{..}
= go _pidtipResource _pidtipXgafv
_pidtipUploadProtocol
_pidtipAccessToken
_pidtipUploadType
_pidtipCallback
(Just AltJSON)
_pidtipPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsInstancesDatabasesTestIAMPermissionsResource)
mempty