{-# 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.SetIAMPolicy
(
ProjectsInstancesDatabasesSetIAMPolicyResource
, projectsInstancesDatabasesSetIAMPolicy
, ProjectsInstancesDatabasesSetIAMPolicy
, pidsipXgafv
, pidsipUploadProtocol
, pidsipAccessToken
, pidsipUploadType
, pidsipPayload
, pidsipResource
, pidsipCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesDatabasesSetIAMPolicyResource =
"v1" :>
CaptureMode "resource" "setIamPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SetIAMPolicyRequest :>
Post '[JSON] Policy
data ProjectsInstancesDatabasesSetIAMPolicy = ProjectsInstancesDatabasesSetIAMPolicy'
{ _pidsipXgafv :: !(Maybe Xgafv)
, _pidsipUploadProtocol :: !(Maybe Text)
, _pidsipAccessToken :: !(Maybe Text)
, _pidsipUploadType :: !(Maybe Text)
, _pidsipPayload :: !SetIAMPolicyRequest
, _pidsipResource :: !Text
, _pidsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesDatabasesSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsInstancesDatabasesSetIAMPolicy
projectsInstancesDatabasesSetIAMPolicy pPidsipPayload_ pPidsipResource_ =
ProjectsInstancesDatabasesSetIAMPolicy'
{ _pidsipXgafv = Nothing
, _pidsipUploadProtocol = Nothing
, _pidsipAccessToken = Nothing
, _pidsipUploadType = Nothing
, _pidsipPayload = pPidsipPayload_
, _pidsipResource = pPidsipResource_
, _pidsipCallback = Nothing
}
pidsipXgafv :: Lens' ProjectsInstancesDatabasesSetIAMPolicy (Maybe Xgafv)
pidsipXgafv
= lens _pidsipXgafv (\ s a -> s{_pidsipXgafv = a})
pidsipUploadProtocol :: Lens' ProjectsInstancesDatabasesSetIAMPolicy (Maybe Text)
pidsipUploadProtocol
= lens _pidsipUploadProtocol
(\ s a -> s{_pidsipUploadProtocol = a})
pidsipAccessToken :: Lens' ProjectsInstancesDatabasesSetIAMPolicy (Maybe Text)
pidsipAccessToken
= lens _pidsipAccessToken
(\ s a -> s{_pidsipAccessToken = a})
pidsipUploadType :: Lens' ProjectsInstancesDatabasesSetIAMPolicy (Maybe Text)
pidsipUploadType
= lens _pidsipUploadType
(\ s a -> s{_pidsipUploadType = a})
pidsipPayload :: Lens' ProjectsInstancesDatabasesSetIAMPolicy SetIAMPolicyRequest
pidsipPayload
= lens _pidsipPayload
(\ s a -> s{_pidsipPayload = a})
pidsipResource :: Lens' ProjectsInstancesDatabasesSetIAMPolicy Text
pidsipResource
= lens _pidsipResource
(\ s a -> s{_pidsipResource = a})
pidsipCallback :: Lens' ProjectsInstancesDatabasesSetIAMPolicy (Maybe Text)
pidsipCallback
= lens _pidsipCallback
(\ s a -> s{_pidsipCallback = a})
instance GoogleRequest
ProjectsInstancesDatabasesSetIAMPolicy where
type Rs ProjectsInstancesDatabasesSetIAMPolicy =
Policy
type Scopes ProjectsInstancesDatabasesSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"]
requestClient
ProjectsInstancesDatabasesSetIAMPolicy'{..}
= go _pidsipResource _pidsipXgafv
_pidsipUploadProtocol
_pidsipAccessToken
_pidsipUploadType
_pidsipCallback
(Just AltJSON)
_pidsipPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesDatabasesSetIAMPolicyResource)
mempty