{-# 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.GetIAMPolicy
(
ProjectsInstancesGetIAMPolicyResource
, projectsInstancesGetIAMPolicy
, ProjectsInstancesGetIAMPolicy
, pigipXgafv
, pigipUploadProtocol
, pigipAccessToken
, pigipUploadType
, pigipPayload
, pigipResource
, pigipCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesGetIAMPolicyResource =
"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 ProjectsInstancesGetIAMPolicy = ProjectsInstancesGetIAMPolicy'
{ _pigipXgafv :: !(Maybe Xgafv)
, _pigipUploadProtocol :: !(Maybe Text)
, _pigipAccessToken :: !(Maybe Text)
, _pigipUploadType :: !(Maybe Text)
, _pigipPayload :: !GetIAMPolicyRequest
, _pigipResource :: !Text
, _pigipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesGetIAMPolicy
:: GetIAMPolicyRequest
-> Text
-> ProjectsInstancesGetIAMPolicy
projectsInstancesGetIAMPolicy pPigipPayload_ pPigipResource_ =
ProjectsInstancesGetIAMPolicy'
{ _pigipXgafv = Nothing
, _pigipUploadProtocol = Nothing
, _pigipAccessToken = Nothing
, _pigipUploadType = Nothing
, _pigipPayload = pPigipPayload_
, _pigipResource = pPigipResource_
, _pigipCallback = Nothing
}
pigipXgafv :: Lens' ProjectsInstancesGetIAMPolicy (Maybe Xgafv)
pigipXgafv
= lens _pigipXgafv (\ s a -> s{_pigipXgafv = a})
pigipUploadProtocol :: Lens' ProjectsInstancesGetIAMPolicy (Maybe Text)
pigipUploadProtocol
= lens _pigipUploadProtocol
(\ s a -> s{_pigipUploadProtocol = a})
pigipAccessToken :: Lens' ProjectsInstancesGetIAMPolicy (Maybe Text)
pigipAccessToken
= lens _pigipAccessToken
(\ s a -> s{_pigipAccessToken = a})
pigipUploadType :: Lens' ProjectsInstancesGetIAMPolicy (Maybe Text)
pigipUploadType
= lens _pigipUploadType
(\ s a -> s{_pigipUploadType = a})
pigipPayload :: Lens' ProjectsInstancesGetIAMPolicy GetIAMPolicyRequest
pigipPayload
= lens _pigipPayload (\ s a -> s{_pigipPayload = a})
pigipResource :: Lens' ProjectsInstancesGetIAMPolicy Text
pigipResource
= lens _pigipResource
(\ s a -> s{_pigipResource = a})
pigipCallback :: Lens' ProjectsInstancesGetIAMPolicy (Maybe Text)
pigipCallback
= lens _pigipCallback
(\ s a -> s{_pigipCallback = a})
instance GoogleRequest ProjectsInstancesGetIAMPolicy
where
type Rs ProjectsInstancesGetIAMPolicy = Policy
type Scopes ProjectsInstancesGetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"]
requestClient ProjectsInstancesGetIAMPolicy'{..}
= go _pigipResource _pigipXgafv _pigipUploadProtocol
_pigipAccessToken
_pigipUploadType
_pigipCallback
(Just AltJSON)
_pigipPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesGetIAMPolicyResource)
mempty