{-# 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.TestIAMPermissions
(
ProjectsSnapshotsTestIAMPermissionsResource
, projectsSnapshotsTestIAMPermissions
, ProjectsSnapshotsTestIAMPermissions
, pstipXgafv
, pstipUploadProtocol
, pstipAccessToken
, pstipUploadType
, pstipPayload
, pstipResource
, pstipCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSnapshotsTestIAMPermissionsResource =
"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 ProjectsSnapshotsTestIAMPermissions = ProjectsSnapshotsTestIAMPermissions'
{ _pstipXgafv :: !(Maybe Xgafv)
, _pstipUploadProtocol :: !(Maybe Text)
, _pstipAccessToken :: !(Maybe Text)
, _pstipUploadType :: !(Maybe Text)
, _pstipPayload :: !TestIAMPermissionsRequest
, _pstipResource :: !Text
, _pstipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSnapshotsTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsSnapshotsTestIAMPermissions
projectsSnapshotsTestIAMPermissions pPstipPayload_ pPstipResource_ =
ProjectsSnapshotsTestIAMPermissions'
{ _pstipXgafv = Nothing
, _pstipUploadProtocol = Nothing
, _pstipAccessToken = Nothing
, _pstipUploadType = Nothing
, _pstipPayload = pPstipPayload_
, _pstipResource = pPstipResource_
, _pstipCallback = Nothing
}
pstipXgafv :: Lens' ProjectsSnapshotsTestIAMPermissions (Maybe Xgafv)
pstipXgafv
= lens _pstipXgafv (\ s a -> s{_pstipXgafv = a})
pstipUploadProtocol :: Lens' ProjectsSnapshotsTestIAMPermissions (Maybe Text)
pstipUploadProtocol
= lens _pstipUploadProtocol
(\ s a -> s{_pstipUploadProtocol = a})
pstipAccessToken :: Lens' ProjectsSnapshotsTestIAMPermissions (Maybe Text)
pstipAccessToken
= lens _pstipAccessToken
(\ s a -> s{_pstipAccessToken = a})
pstipUploadType :: Lens' ProjectsSnapshotsTestIAMPermissions (Maybe Text)
pstipUploadType
= lens _pstipUploadType
(\ s a -> s{_pstipUploadType = a})
pstipPayload :: Lens' ProjectsSnapshotsTestIAMPermissions TestIAMPermissionsRequest
pstipPayload
= lens _pstipPayload (\ s a -> s{_pstipPayload = a})
pstipResource :: Lens' ProjectsSnapshotsTestIAMPermissions Text
pstipResource
= lens _pstipResource
(\ s a -> s{_pstipResource = a})
pstipCallback :: Lens' ProjectsSnapshotsTestIAMPermissions (Maybe Text)
pstipCallback
= lens _pstipCallback
(\ s a -> s{_pstipCallback = a})
instance GoogleRequest
ProjectsSnapshotsTestIAMPermissions where
type Rs ProjectsSnapshotsTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes ProjectsSnapshotsTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient
ProjectsSnapshotsTestIAMPermissions'{..}
= go _pstipResource _pstipXgafv _pstipUploadProtocol
_pstipAccessToken
_pstipUploadType
_pstipCallback
(Just AltJSON)
_pstipPayload
pubSubService
where go
= buildClient
(Proxy ::
Proxy ProjectsSnapshotsTestIAMPermissionsResource)
mempty