{-# 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.Topics.TestIAMPermissions
(
ProjectsTopicsTestIAMPermissionsResource
, projectsTopicsTestIAMPermissions
, ProjectsTopicsTestIAMPermissions
, pttipXgafv
, pttipUploadProtocol
, pttipAccessToken
, pttipUploadType
, pttipPayload
, pttipResource
, pttipCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsTopicsTestIAMPermissionsResource =
"v1" :>
CaptureMode "resource" "testIamPermissions" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TestIAMPermissionsRequest :>
Post '[JSON] TestIAMPermissionsResponse
data ProjectsTopicsTestIAMPermissions = ProjectsTopicsTestIAMPermissions'
{ _pttipXgafv :: !(Maybe Xgafv)
, _pttipUploadProtocol :: !(Maybe Text)
, _pttipAccessToken :: !(Maybe Text)
, _pttipUploadType :: !(Maybe Text)
, _pttipPayload :: !TestIAMPermissionsRequest
, _pttipResource :: !Text
, _pttipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsTopicsTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsTopicsTestIAMPermissions
projectsTopicsTestIAMPermissions pPttipPayload_ pPttipResource_ =
ProjectsTopicsTestIAMPermissions'
{ _pttipXgafv = Nothing
, _pttipUploadProtocol = Nothing
, _pttipAccessToken = Nothing
, _pttipUploadType = Nothing
, _pttipPayload = pPttipPayload_
, _pttipResource = pPttipResource_
, _pttipCallback = Nothing
}
pttipXgafv :: Lens' ProjectsTopicsTestIAMPermissions (Maybe Xgafv)
pttipXgafv
= lens _pttipXgafv (\ s a -> s{_pttipXgafv = a})
pttipUploadProtocol :: Lens' ProjectsTopicsTestIAMPermissions (Maybe Text)
pttipUploadProtocol
= lens _pttipUploadProtocol
(\ s a -> s{_pttipUploadProtocol = a})
pttipAccessToken :: Lens' ProjectsTopicsTestIAMPermissions (Maybe Text)
pttipAccessToken
= lens _pttipAccessToken
(\ s a -> s{_pttipAccessToken = a})
pttipUploadType :: Lens' ProjectsTopicsTestIAMPermissions (Maybe Text)
pttipUploadType
= lens _pttipUploadType
(\ s a -> s{_pttipUploadType = a})
pttipPayload :: Lens' ProjectsTopicsTestIAMPermissions TestIAMPermissionsRequest
pttipPayload
= lens _pttipPayload (\ s a -> s{_pttipPayload = a})
pttipResource :: Lens' ProjectsTopicsTestIAMPermissions Text
pttipResource
= lens _pttipResource
(\ s a -> s{_pttipResource = a})
pttipCallback :: Lens' ProjectsTopicsTestIAMPermissions (Maybe Text)
pttipCallback
= lens _pttipCallback
(\ s a -> s{_pttipCallback = a})
instance GoogleRequest
ProjectsTopicsTestIAMPermissions where
type Rs ProjectsTopicsTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes ProjectsTopicsTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsTopicsTestIAMPermissions'{..}
= go _pttipResource _pttipXgafv _pttipUploadProtocol
_pttipAccessToken
_pttipUploadType
_pttipCallback
(Just AltJSON)
_pttipPayload
pubSubService
where go
= buildClient
(Proxy ::
Proxy ProjectsTopicsTestIAMPermissionsResource)
mempty