{-# 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.Analytics.Management.AccountUserLinks.Update
(
ManagementAccountUserLinksUpdateResource
, managementAccountUserLinksUpdate
, ManagementAccountUserLinksUpdate
, mauluPayload
, mauluAccountId
, mauluLinkId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementAccountUserLinksUpdateResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"entityUserLinks" :>
Capture "linkId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EntityUserLink :>
Put '[JSON] EntityUserLink
data ManagementAccountUserLinksUpdate = ManagementAccountUserLinksUpdate'
{ _mauluPayload :: !EntityUserLink
, _mauluAccountId :: !Text
, _mauluLinkId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementAccountUserLinksUpdate
:: EntityUserLink
-> Text
-> Text
-> ManagementAccountUserLinksUpdate
managementAccountUserLinksUpdate pMauluPayload_ pMauluAccountId_ pMauluLinkId_ =
ManagementAccountUserLinksUpdate'
{ _mauluPayload = pMauluPayload_
, _mauluAccountId = pMauluAccountId_
, _mauluLinkId = pMauluLinkId_
}
mauluPayload :: Lens' ManagementAccountUserLinksUpdate EntityUserLink
mauluPayload
= lens _mauluPayload (\ s a -> s{_mauluPayload = a})
mauluAccountId :: Lens' ManagementAccountUserLinksUpdate Text
mauluAccountId
= lens _mauluAccountId
(\ s a -> s{_mauluAccountId = a})
mauluLinkId :: Lens' ManagementAccountUserLinksUpdate Text
mauluLinkId
= lens _mauluLinkId (\ s a -> s{_mauluLinkId = a})
instance GoogleRequest
ManagementAccountUserLinksUpdate where
type Rs ManagementAccountUserLinksUpdate =
EntityUserLink
type Scopes ManagementAccountUserLinksUpdate =
'["https://www.googleapis.com/auth/analytics.manage.users"]
requestClient ManagementAccountUserLinksUpdate'{..}
= go _mauluAccountId _mauluLinkId (Just AltJSON)
_mauluPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementAccountUserLinksUpdateResource)
mempty