{-# 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.SetIAMPolicy
(
ProjectsInstancesSetIAMPolicyResource
, projectsInstancesSetIAMPolicy
, ProjectsInstancesSetIAMPolicy
, pisipXgafv
, pisipUploadProtocol
, pisipAccessToken
, pisipUploadType
, pisipPayload
, pisipResource
, pisipCallback
) where
import Network.Google.Prelude
import Network.Google.Spanner.Types
type ProjectsInstancesSetIAMPolicyResource =
"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 ProjectsInstancesSetIAMPolicy = ProjectsInstancesSetIAMPolicy'
{ _pisipXgafv :: !(Maybe Xgafv)
, _pisipUploadProtocol :: !(Maybe Text)
, _pisipAccessToken :: !(Maybe Text)
, _pisipUploadType :: !(Maybe Text)
, _pisipPayload :: !SetIAMPolicyRequest
, _pisipResource :: !Text
, _pisipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsInstancesSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsInstancesSetIAMPolicy
projectsInstancesSetIAMPolicy pPisipPayload_ pPisipResource_ =
ProjectsInstancesSetIAMPolicy'
{ _pisipXgafv = Nothing
, _pisipUploadProtocol = Nothing
, _pisipAccessToken = Nothing
, _pisipUploadType = Nothing
, _pisipPayload = pPisipPayload_
, _pisipResource = pPisipResource_
, _pisipCallback = Nothing
}
pisipXgafv :: Lens' ProjectsInstancesSetIAMPolicy (Maybe Xgafv)
pisipXgafv
= lens _pisipXgafv (\ s a -> s{_pisipXgafv = a})
pisipUploadProtocol :: Lens' ProjectsInstancesSetIAMPolicy (Maybe Text)
pisipUploadProtocol
= lens _pisipUploadProtocol
(\ s a -> s{_pisipUploadProtocol = a})
pisipAccessToken :: Lens' ProjectsInstancesSetIAMPolicy (Maybe Text)
pisipAccessToken
= lens _pisipAccessToken
(\ s a -> s{_pisipAccessToken = a})
pisipUploadType :: Lens' ProjectsInstancesSetIAMPolicy (Maybe Text)
pisipUploadType
= lens _pisipUploadType
(\ s a -> s{_pisipUploadType = a})
pisipPayload :: Lens' ProjectsInstancesSetIAMPolicy SetIAMPolicyRequest
pisipPayload
= lens _pisipPayload (\ s a -> s{_pisipPayload = a})
pisipResource :: Lens' ProjectsInstancesSetIAMPolicy Text
pisipResource
= lens _pisipResource
(\ s a -> s{_pisipResource = a})
pisipCallback :: Lens' ProjectsInstancesSetIAMPolicy (Maybe Text)
pisipCallback
= lens _pisipCallback
(\ s a -> s{_pisipCallback = a})
instance GoogleRequest ProjectsInstancesSetIAMPolicy
where
type Rs ProjectsInstancesSetIAMPolicy = Policy
type Scopes ProjectsInstancesSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"]
requestClient ProjectsInstancesSetIAMPolicy'{..}
= go _pisipResource _pisipXgafv _pisipUploadProtocol
_pisipAccessToken
_pisipUploadType
_pisipCallback
(Just AltJSON)
_pisipPayload
spannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsInstancesSetIAMPolicyResource)
mempty