{-# 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.PubSub.Projects.Snapshots.SetIAMPolicy
(
ProjectsSnapshotsSetIAMPolicyResource
, projectsSnapshotsSetIAMPolicy
, ProjectsSnapshotsSetIAMPolicy
, pssiampXgafv
, pssiampUploadProtocol
, pssiampAccessToken
, pssiampUploadType
, pssiampPayload
, pssiampResource
, pssiampCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSnapshotsSetIAMPolicyResource =
"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 ProjectsSnapshotsSetIAMPolicy = ProjectsSnapshotsSetIAMPolicy'
{ _pssiampXgafv :: !(Maybe Xgafv)
, _pssiampUploadProtocol :: !(Maybe Text)
, _pssiampAccessToken :: !(Maybe Text)
, _pssiampUploadType :: !(Maybe Text)
, _pssiampPayload :: !SetIAMPolicyRequest
, _pssiampResource :: !Text
, _pssiampCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSnapshotsSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsSnapshotsSetIAMPolicy
projectsSnapshotsSetIAMPolicy pPssiampPayload_ pPssiampResource_ =
ProjectsSnapshotsSetIAMPolicy'
{ _pssiampXgafv = Nothing
, _pssiampUploadProtocol = Nothing
, _pssiampAccessToken = Nothing
, _pssiampUploadType = Nothing
, _pssiampPayload = pPssiampPayload_
, _pssiampResource = pPssiampResource_
, _pssiampCallback = Nothing
}
pssiampXgafv :: Lens' ProjectsSnapshotsSetIAMPolicy (Maybe Xgafv)
pssiampXgafv
= lens _pssiampXgafv (\ s a -> s{_pssiampXgafv = a})
pssiampUploadProtocol :: Lens' ProjectsSnapshotsSetIAMPolicy (Maybe Text)
pssiampUploadProtocol
= lens _pssiampUploadProtocol
(\ s a -> s{_pssiampUploadProtocol = a})
pssiampAccessToken :: Lens' ProjectsSnapshotsSetIAMPolicy (Maybe Text)
pssiampAccessToken
= lens _pssiampAccessToken
(\ s a -> s{_pssiampAccessToken = a})
pssiampUploadType :: Lens' ProjectsSnapshotsSetIAMPolicy (Maybe Text)
pssiampUploadType
= lens _pssiampUploadType
(\ s a -> s{_pssiampUploadType = a})
pssiampPayload :: Lens' ProjectsSnapshotsSetIAMPolicy SetIAMPolicyRequest
pssiampPayload
= lens _pssiampPayload
(\ s a -> s{_pssiampPayload = a})
pssiampResource :: Lens' ProjectsSnapshotsSetIAMPolicy Text
pssiampResource
= lens _pssiampResource
(\ s a -> s{_pssiampResource = a})
pssiampCallback :: Lens' ProjectsSnapshotsSetIAMPolicy (Maybe Text)
pssiampCallback
= lens _pssiampCallback
(\ s a -> s{_pssiampCallback = a})
instance GoogleRequest ProjectsSnapshotsSetIAMPolicy
where
type Rs ProjectsSnapshotsSetIAMPolicy = Policy
type Scopes ProjectsSnapshotsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSnapshotsSetIAMPolicy'{..}
= go _pssiampResource _pssiampXgafv
_pssiampUploadProtocol
_pssiampAccessToken
_pssiampUploadType
_pssiampCallback
(Just AltJSON)
_pssiampPayload
pubSubService
where go
= buildClient
(Proxy ::
Proxy ProjectsSnapshotsSetIAMPolicyResource)
mempty