{-# 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.WebPropertyUserLinks.Update
(
ManagementWebPropertyUserLinksUpdateResource
, managementWebPropertyUserLinksUpdate
, ManagementWebPropertyUserLinksUpdate
, mwpuluWebPropertyId
, mwpuluPayload
, mwpuluAccountId
, mwpuluLinkId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementWebPropertyUserLinksUpdateResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"entityUserLinks" :>
Capture "linkId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EntityUserLink :>
Put '[JSON] EntityUserLink
data ManagementWebPropertyUserLinksUpdate = ManagementWebPropertyUserLinksUpdate'
{ _mwpuluWebPropertyId :: !Text
, _mwpuluPayload :: !EntityUserLink
, _mwpuluAccountId :: !Text
, _mwpuluLinkId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementWebPropertyUserLinksUpdate
:: Text
-> EntityUserLink
-> Text
-> Text
-> ManagementWebPropertyUserLinksUpdate
managementWebPropertyUserLinksUpdate pMwpuluWebPropertyId_ pMwpuluPayload_ pMwpuluAccountId_ pMwpuluLinkId_ =
ManagementWebPropertyUserLinksUpdate'
{ _mwpuluWebPropertyId = pMwpuluWebPropertyId_
, _mwpuluPayload = pMwpuluPayload_
, _mwpuluAccountId = pMwpuluAccountId_
, _mwpuluLinkId = pMwpuluLinkId_
}
mwpuluWebPropertyId :: Lens' ManagementWebPropertyUserLinksUpdate Text
mwpuluWebPropertyId
= lens _mwpuluWebPropertyId
(\ s a -> s{_mwpuluWebPropertyId = a})
mwpuluPayload :: Lens' ManagementWebPropertyUserLinksUpdate EntityUserLink
mwpuluPayload
= lens _mwpuluPayload
(\ s a -> s{_mwpuluPayload = a})
mwpuluAccountId :: Lens' ManagementWebPropertyUserLinksUpdate Text
mwpuluAccountId
= lens _mwpuluAccountId
(\ s a -> s{_mwpuluAccountId = a})
mwpuluLinkId :: Lens' ManagementWebPropertyUserLinksUpdate Text
mwpuluLinkId
= lens _mwpuluLinkId (\ s a -> s{_mwpuluLinkId = a})
instance GoogleRequest
ManagementWebPropertyUserLinksUpdate where
type Rs ManagementWebPropertyUserLinksUpdate =
EntityUserLink
type Scopes ManagementWebPropertyUserLinksUpdate =
'["https://www.googleapis.com/auth/analytics.manage.users"]
requestClient
ManagementWebPropertyUserLinksUpdate'{..}
= go _mwpuluAccountId _mwpuluWebPropertyId
_mwpuluLinkId
(Just AltJSON)
_mwpuluPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementWebPropertyUserLinksUpdateResource)
mempty