{-# 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.ServiceBroker.TestIAMPermissions
(
TestIAMPermissionsResource
, testIAMPermissions
, TestIAMPermissions
, tipXgafv
, tipUploadProtocol
, tipAccessToken
, tipUploadType
, tipPayload
, tipResource
, tipCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceBroker.Types
type TestIAMPermissionsResource =
"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]
GoogleIAMV1__TestIAMPermissionsRequest
:>
Post '[JSON] GoogleIAMV1__TestIAMPermissionsResponse
data TestIAMPermissions = TestIAMPermissions'
{ _tipXgafv :: !(Maybe Xgafv)
, _tipUploadProtocol :: !(Maybe Text)
, _tipAccessToken :: !(Maybe Text)
, _tipUploadType :: !(Maybe Text)
, _tipPayload :: !GoogleIAMV1__TestIAMPermissionsRequest
, _tipResource :: !Text
, _tipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
testIAMPermissions
:: GoogleIAMV1__TestIAMPermissionsRequest
-> Text
-> TestIAMPermissions
testIAMPermissions pTipPayload_ pTipResource_ =
TestIAMPermissions'
{ _tipXgafv = Nothing
, _tipUploadProtocol = Nothing
, _tipAccessToken = Nothing
, _tipUploadType = Nothing
, _tipPayload = pTipPayload_
, _tipResource = pTipResource_
, _tipCallback = Nothing
}
tipXgafv :: Lens' TestIAMPermissions (Maybe Xgafv)
tipXgafv = lens _tipXgafv (\ s a -> s{_tipXgafv = a})
tipUploadProtocol :: Lens' TestIAMPermissions (Maybe Text)
tipUploadProtocol
= lens _tipUploadProtocol
(\ s a -> s{_tipUploadProtocol = a})
tipAccessToken :: Lens' TestIAMPermissions (Maybe Text)
tipAccessToken
= lens _tipAccessToken
(\ s a -> s{_tipAccessToken = a})
tipUploadType :: Lens' TestIAMPermissions (Maybe Text)
tipUploadType
= lens _tipUploadType
(\ s a -> s{_tipUploadType = a})
tipPayload :: Lens' TestIAMPermissions GoogleIAMV1__TestIAMPermissionsRequest
tipPayload
= lens _tipPayload (\ s a -> s{_tipPayload = a})
tipResource :: Lens' TestIAMPermissions Text
tipResource
= lens _tipResource (\ s a -> s{_tipResource = a})
tipCallback :: Lens' TestIAMPermissions (Maybe Text)
tipCallback
= lens _tipCallback (\ s a -> s{_tipCallback = a})
instance GoogleRequest TestIAMPermissions where
type Rs TestIAMPermissions =
GoogleIAMV1__TestIAMPermissionsResponse
type Scopes TestIAMPermissions =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient TestIAMPermissions'{..}
= go _tipResource _tipXgafv _tipUploadProtocol
_tipAccessToken
_tipUploadType
_tipCallback
(Just AltJSON)
_tipPayload
serviceBrokerService
where go
= buildClient
(Proxy :: Proxy TestIAMPermissionsResource)
mempty