{-# 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.TagManager.Accounts.UserPermissions.Update
(
AccountsUserPermissionsUpdateResource
, accountsUserPermissionsUpdate
, AccountsUserPermissionsUpdate
, aupuPath
, aupuPayload
) where
import Network.Google.Prelude
import Network.Google.TagManager.Types
type AccountsUserPermissionsUpdateResource =
"tagmanager" :>
"v2" :>
Capture "path" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UserPermission :>
Put '[JSON] UserPermission
data AccountsUserPermissionsUpdate = AccountsUserPermissionsUpdate'
{ _aupuPath :: !Text
, _aupuPayload :: !UserPermission
} deriving (Eq,Show,Data,Typeable,Generic)
accountsUserPermissionsUpdate
:: Text
-> UserPermission
-> AccountsUserPermissionsUpdate
accountsUserPermissionsUpdate pAupuPath_ pAupuPayload_ =
AccountsUserPermissionsUpdate'
{ _aupuPath = pAupuPath_
, _aupuPayload = pAupuPayload_
}
aupuPath :: Lens' AccountsUserPermissionsUpdate Text
aupuPath = lens _aupuPath (\ s a -> s{_aupuPath = a})
aupuPayload :: Lens' AccountsUserPermissionsUpdate UserPermission
aupuPayload
= lens _aupuPayload (\ s a -> s{_aupuPayload = a})
instance GoogleRequest AccountsUserPermissionsUpdate
where
type Rs AccountsUserPermissionsUpdate =
UserPermission
type Scopes AccountsUserPermissionsUpdate =
'["https://www.googleapis.com/auth/tagmanager.manage.users"]
requestClient AccountsUserPermissionsUpdate'{..}
= go _aupuPath (Just AltJSON) _aupuPayload
tagManagerService
where go
= buildClient
(Proxy ::
Proxy AccountsUserPermissionsUpdateResource)
mempty