{-# 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.Subscriptions.SetIAMPolicy
(
ProjectsSubscriptionsSetIAMPolicyResource
, projectsSubscriptionsSetIAMPolicy
, ProjectsSubscriptionsSetIAMPolicy
, pssipXgafv
, pssipUploadProtocol
, pssipAccessToken
, pssipUploadType
, pssipPayload
, pssipResource
, pssipCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSubscriptionsSetIAMPolicyResource =
"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 ProjectsSubscriptionsSetIAMPolicy = ProjectsSubscriptionsSetIAMPolicy'
{ _pssipXgafv :: !(Maybe Xgafv)
, _pssipUploadProtocol :: !(Maybe Text)
, _pssipAccessToken :: !(Maybe Text)
, _pssipUploadType :: !(Maybe Text)
, _pssipPayload :: !SetIAMPolicyRequest
, _pssipResource :: !Text
, _pssipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSubscriptionsSetIAMPolicy
:: SetIAMPolicyRequest
-> Text
-> ProjectsSubscriptionsSetIAMPolicy
projectsSubscriptionsSetIAMPolicy pPssipPayload_ pPssipResource_ =
ProjectsSubscriptionsSetIAMPolicy'
{ _pssipXgafv = Nothing
, _pssipUploadProtocol = Nothing
, _pssipAccessToken = Nothing
, _pssipUploadType = Nothing
, _pssipPayload = pPssipPayload_
, _pssipResource = pPssipResource_
, _pssipCallback = Nothing
}
pssipXgafv :: Lens' ProjectsSubscriptionsSetIAMPolicy (Maybe Xgafv)
pssipXgafv
= lens _pssipXgafv (\ s a -> s{_pssipXgafv = a})
pssipUploadProtocol :: Lens' ProjectsSubscriptionsSetIAMPolicy (Maybe Text)
pssipUploadProtocol
= lens _pssipUploadProtocol
(\ s a -> s{_pssipUploadProtocol = a})
pssipAccessToken :: Lens' ProjectsSubscriptionsSetIAMPolicy (Maybe Text)
pssipAccessToken
= lens _pssipAccessToken
(\ s a -> s{_pssipAccessToken = a})
pssipUploadType :: Lens' ProjectsSubscriptionsSetIAMPolicy (Maybe Text)
pssipUploadType
= lens _pssipUploadType
(\ s a -> s{_pssipUploadType = a})
pssipPayload :: Lens' ProjectsSubscriptionsSetIAMPolicy SetIAMPolicyRequest
pssipPayload
= lens _pssipPayload (\ s a -> s{_pssipPayload = a})
pssipResource :: Lens' ProjectsSubscriptionsSetIAMPolicy Text
pssipResource
= lens _pssipResource
(\ s a -> s{_pssipResource = a})
pssipCallback :: Lens' ProjectsSubscriptionsSetIAMPolicy (Maybe Text)
pssipCallback
= lens _pssipCallback
(\ s a -> s{_pssipCallback = a})
instance GoogleRequest
ProjectsSubscriptionsSetIAMPolicy where
type Rs ProjectsSubscriptionsSetIAMPolicy = Policy
type Scopes ProjectsSubscriptionsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSubscriptionsSetIAMPolicy'{..}
= go _pssipResource _pssipXgafv _pssipUploadProtocol
_pssipAccessToken
_pssipUploadType
_pssipCallback
(Just AltJSON)
_pssipPayload
pubSubService
where go
= buildClient
(Proxy ::
Proxy ProjectsSubscriptionsSetIAMPolicyResource)
mempty