{-# 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.Create
(
AccountsUserPermissionsCreateResource
, accountsUserPermissionsCreate
, AccountsUserPermissionsCreate
, aupcParent
, aupcPayload
) where
import Network.Google.Prelude
import Network.Google.TagManager.Types
type AccountsUserPermissionsCreateResource =
"tagmanager" :>
"v2" :>
Capture "parent" Text :>
"user_permissions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UserPermission :>
Post '[JSON] UserPermission
data AccountsUserPermissionsCreate = AccountsUserPermissionsCreate'
{ _aupcParent :: !Text
, _aupcPayload :: !UserPermission
} deriving (Eq,Show,Data,Typeable,Generic)
accountsUserPermissionsCreate
:: Text
-> UserPermission
-> AccountsUserPermissionsCreate
accountsUserPermissionsCreate pAupcParent_ pAupcPayload_ =
AccountsUserPermissionsCreate'
{ _aupcParent = pAupcParent_
, _aupcPayload = pAupcPayload_
}
aupcParent :: Lens' AccountsUserPermissionsCreate Text
aupcParent
= lens _aupcParent (\ s a -> s{_aupcParent = a})
aupcPayload :: Lens' AccountsUserPermissionsCreate UserPermission
aupcPayload
= lens _aupcPayload (\ s a -> s{_aupcPayload = a})
instance GoogleRequest AccountsUserPermissionsCreate
where
type Rs AccountsUserPermissionsCreate =
UserPermission
type Scopes AccountsUserPermissionsCreate =
'["https://www.googleapis.com/auth/tagmanager.manage.users"]
requestClient AccountsUserPermissionsCreate'{..}
= go _aupcParent (Just AltJSON) _aupcPayload
tagManagerService
where go
= buildClient
(Proxy ::
Proxy AccountsUserPermissionsCreateResource)
mempty