{-# 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.TestIAMPermissions
(
ProjectsSubscriptionsTestIAMPermissionsResource
, projectsSubscriptionsTestIAMPermissions
, ProjectsSubscriptionsTestIAMPermissions
, pstiampXgafv
, pstiampUploadProtocol
, pstiampAccessToken
, pstiampUploadType
, pstiampPayload
, pstiampResource
, pstiampCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSubscriptionsTestIAMPermissionsResource
=
"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 ProjectsSubscriptionsTestIAMPermissions = ProjectsSubscriptionsTestIAMPermissions'
{ _pstiampXgafv :: !(Maybe Xgafv)
, _pstiampUploadProtocol :: !(Maybe Text)
, _pstiampAccessToken :: !(Maybe Text)
, _pstiampUploadType :: !(Maybe Text)
, _pstiampPayload :: !TestIAMPermissionsRequest
, _pstiampResource :: !Text
, _pstiampCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSubscriptionsTestIAMPermissions
:: TestIAMPermissionsRequest
-> Text
-> ProjectsSubscriptionsTestIAMPermissions
projectsSubscriptionsTestIAMPermissions pPstiampPayload_ pPstiampResource_ =
ProjectsSubscriptionsTestIAMPermissions'
{ _pstiampXgafv = Nothing
, _pstiampUploadProtocol = Nothing
, _pstiampAccessToken = Nothing
, _pstiampUploadType = Nothing
, _pstiampPayload = pPstiampPayload_
, _pstiampResource = pPstiampResource_
, _pstiampCallback = Nothing
}
pstiampXgafv :: Lens' ProjectsSubscriptionsTestIAMPermissions (Maybe Xgafv)
pstiampXgafv
= lens _pstiampXgafv (\ s a -> s{_pstiampXgafv = a})
pstiampUploadProtocol :: Lens' ProjectsSubscriptionsTestIAMPermissions (Maybe Text)
pstiampUploadProtocol
= lens _pstiampUploadProtocol
(\ s a -> s{_pstiampUploadProtocol = a})
pstiampAccessToken :: Lens' ProjectsSubscriptionsTestIAMPermissions (Maybe Text)
pstiampAccessToken
= lens _pstiampAccessToken
(\ s a -> s{_pstiampAccessToken = a})
pstiampUploadType :: Lens' ProjectsSubscriptionsTestIAMPermissions (Maybe Text)
pstiampUploadType
= lens _pstiampUploadType
(\ s a -> s{_pstiampUploadType = a})
pstiampPayload :: Lens' ProjectsSubscriptionsTestIAMPermissions TestIAMPermissionsRequest
pstiampPayload
= lens _pstiampPayload
(\ s a -> s{_pstiampPayload = a})
pstiampResource :: Lens' ProjectsSubscriptionsTestIAMPermissions Text
pstiampResource
= lens _pstiampResource
(\ s a -> s{_pstiampResource = a})
pstiampCallback :: Lens' ProjectsSubscriptionsTestIAMPermissions (Maybe Text)
pstiampCallback
= lens _pstiampCallback
(\ s a -> s{_pstiampCallback = a})
instance GoogleRequest
ProjectsSubscriptionsTestIAMPermissions where
type Rs ProjectsSubscriptionsTestIAMPermissions =
TestIAMPermissionsResponse
type Scopes ProjectsSubscriptionsTestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient
ProjectsSubscriptionsTestIAMPermissions'{..}
= go _pstiampResource _pstiampXgafv
_pstiampUploadProtocol
_pstiampAccessToken
_pstiampUploadType
_pstiampCallback
(Just AltJSON)
_pstiampPayload
pubSubService
where go
= buildClient
(Proxy ::
Proxy
ProjectsSubscriptionsTestIAMPermissionsResource)
mempty