{-# 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.ProFileUserLinks.Update
(
ManagementProFileUserLinksUpdateResource
, managementProFileUserLinksUpdate
, ManagementProFileUserLinksUpdate
, mpfuluWebPropertyId
, mpfuluProFileId
, mpfuluPayload
, mpfuluAccountId
, mpfuluLinkId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementProFileUserLinksUpdateResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"entityUserLinks" :>
Capture "linkId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EntityUserLink :>
Put '[JSON] EntityUserLink
data ManagementProFileUserLinksUpdate = ManagementProFileUserLinksUpdate'
{ _mpfuluWebPropertyId :: !Text
, _mpfuluProFileId :: !Text
, _mpfuluPayload :: !EntityUserLink
, _mpfuluAccountId :: !Text
, _mpfuluLinkId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementProFileUserLinksUpdate
:: Text
-> Text
-> EntityUserLink
-> Text
-> Text
-> ManagementProFileUserLinksUpdate
managementProFileUserLinksUpdate pMpfuluWebPropertyId_ pMpfuluProFileId_ pMpfuluPayload_ pMpfuluAccountId_ pMpfuluLinkId_ =
ManagementProFileUserLinksUpdate'
{ _mpfuluWebPropertyId = pMpfuluWebPropertyId_
, _mpfuluProFileId = pMpfuluProFileId_
, _mpfuluPayload = pMpfuluPayload_
, _mpfuluAccountId = pMpfuluAccountId_
, _mpfuluLinkId = pMpfuluLinkId_
}
mpfuluWebPropertyId :: Lens' ManagementProFileUserLinksUpdate Text
mpfuluWebPropertyId
= lens _mpfuluWebPropertyId
(\ s a -> s{_mpfuluWebPropertyId = a})
mpfuluProFileId :: Lens' ManagementProFileUserLinksUpdate Text
mpfuluProFileId
= lens _mpfuluProFileId
(\ s a -> s{_mpfuluProFileId = a})
mpfuluPayload :: Lens' ManagementProFileUserLinksUpdate EntityUserLink
mpfuluPayload
= lens _mpfuluPayload
(\ s a -> s{_mpfuluPayload = a})
mpfuluAccountId :: Lens' ManagementProFileUserLinksUpdate Text
mpfuluAccountId
= lens _mpfuluAccountId
(\ s a -> s{_mpfuluAccountId = a})
mpfuluLinkId :: Lens' ManagementProFileUserLinksUpdate Text
mpfuluLinkId
= lens _mpfuluLinkId (\ s a -> s{_mpfuluLinkId = a})
instance GoogleRequest
ManagementProFileUserLinksUpdate where
type Rs ManagementProFileUserLinksUpdate =
EntityUserLink
type Scopes ManagementProFileUserLinksUpdate =
'["https://www.googleapis.com/auth/analytics.manage.users"]
requestClient ManagementProFileUserLinksUpdate'{..}
= go _mpfuluAccountId _mpfuluWebPropertyId
_mpfuluProFileId
_mpfuluLinkId
(Just AltJSON)
_mpfuluPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementProFileUserLinksUpdateResource)
mempty