{-# 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.GetIAMPolicy
(
ProjectsInstancesDatabasesGetIAMPolicyResource
, projectsInstancesDatabasesGetIAMPolicy
, ProjectsInstancesDatabasesGetIAMPolicy
, pidgipXgafv
, pidgipUploadProtocol
, pidgipAccessToken
, pidgipUploadType
, pidgipPayload
, pidgipResource
, pidgipCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesGetIAMPolicyResource =
"v1" :>
CaptureMode "resource" "getIamPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GetIAMPolicyRequest :>
Post '[JSON] Policy
data ProjectsInstancesDatabasesGetIAMPolicy = ProjectsInstancesDatabasesGetIAMPolicy'
{ _pidgipXgafv :: !(Maybe Xgafv)
, _pidgipUploadProtocol :: !(Maybe Text)
, _pidgipAccessToken :: !(Maybe Text)
, _pidgipUploadType :: !(Maybe Text)
, _pidgipPayload :: !GetIAMPolicyRequest
, _pidgipResource :: !Text
, _pidgipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesGetIAMPolicy
:: GetIAMPolicyRequest
-> Text
-> ProjectsInstancesDatabasesGetIAMPolicy
projectsInstancesDatabasesGetIAMPolicy pPidgipPayload_ pPidgipResource_ =
ProjectsInstancesDatabasesGetIAMPolicy'
{ _pidgipXgafv = Nothing
, _pidgipUploadProtocol = Nothing
, _pidgipAccessToken = Nothing
, _pidgipUploadType = Nothing
, _pidgipPayload = pPidgipPayload_
, _pidgipResource = pPidgipResource_
, _pidgipCallback = Nothing
}
pidgipXgafv :: Lens' ProjectsInstancesDatabasesGetIAMPolicy (Maybe Xgafv)
pidgipXgafv
= lens _pidgipXgafv (\ s a -> s{_pidgipXgafv = a})
pidgipUploadProtocol :: Lens' ProjectsInstancesDatabasesGetIAMPolicy (Maybe Text)
pidgipUploadProtocol
= lens _pidgipUploadProtocol
(\ s a -> s{_pidgipUploadProtocol = a})
pidgipAccessToken :: Lens' ProjectsInstancesDatabasesGetIAMPolicy (Maybe Text)
pidgipAccessToken
= lens _pidgipAccessToken
(\ s a -> s{_pidgipAccessToken = a})
pidgipUploadType :: Lens' ProjectsInstancesDatabasesGetIAMPolicy (Maybe Text)
pidgipUploadType
= lens _pidgipUploadType
(\ s a -> s{_pidgipUploadType = a})
pidgipPayload :: Lens' ProjectsInstancesDatabasesGetIAMPolicy GetIAMPolicyRequest
pidgipPayload
= lens _pidgipPayload
(\ s a -> s{_pidgipPayload = a})
pidgipResource :: Lens' ProjectsInstancesDatabasesGetIAMPolicy Text
pidgipResource
= lens _pidgipResource
(\ s a -> s{_pidgipResource = a})
pidgipCallback :: Lens' ProjectsInstancesDatabasesGetIAMPolicy (Maybe Text)
pidgipCallback
= lens _pidgipCallback
(\ s a -> s{_pidgipCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesGetIAMPolicy where
type Rs ProjectsInstancesDatabasesGetIAMPolicy =
Policy
type Scopes ProjectsInstancesDatabasesGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"]
requestClient
ProjectsInstancesDatabasesGetIAMPolicy'{..}
= go _pidgipResource _pidgipXgafv
_pidgipUploadProtocol
_pidgipAccessToken
_pidgipUploadType
_pidgipCallback
(Just AltJSON)
_pidgipPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesDatabasesGetIAMPolicyResource)
mempty