{-# 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.Insert
(
ManagementProFileUserLinksInsertResource
, managementProFileUserLinksInsert
, ManagementProFileUserLinksInsert
, mpfuliWebPropertyId
, mpfuliProFileId
, mpfuliPayload
, mpfuliAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementProFileUserLinksInsertResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"entityUserLinks" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EntityUserLink :>
Post '[JSON] EntityUserLink
data ManagementProFileUserLinksInsert = ManagementProFileUserLinksInsert'
{ _mpfuliWebPropertyId :: !Text
, _mpfuliProFileId :: !Text
, _mpfuliPayload :: !EntityUserLink
, _mpfuliAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementProFileUserLinksInsert
:: Text
-> Text
-> EntityUserLink
-> Text
-> ManagementProFileUserLinksInsert
managementProFileUserLinksInsert pMpfuliWebPropertyId_ pMpfuliProFileId_ pMpfuliPayload_ pMpfuliAccountId_ =
ManagementProFileUserLinksInsert'
{ _mpfuliWebPropertyId = pMpfuliWebPropertyId_
, _mpfuliProFileId = pMpfuliProFileId_
, _mpfuliPayload = pMpfuliPayload_
, _mpfuliAccountId = pMpfuliAccountId_
}
mpfuliWebPropertyId :: Lens' ManagementProFileUserLinksInsert Text
mpfuliWebPropertyId
= lens _mpfuliWebPropertyId
(\ s a -> s{_mpfuliWebPropertyId = a})
mpfuliProFileId :: Lens' ManagementProFileUserLinksInsert Text
mpfuliProFileId
= lens _mpfuliProFileId
(\ s a -> s{_mpfuliProFileId = a})
mpfuliPayload :: Lens' ManagementProFileUserLinksInsert EntityUserLink
mpfuliPayload
= lens _mpfuliPayload
(\ s a -> s{_mpfuliPayload = a})
mpfuliAccountId :: Lens' ManagementProFileUserLinksInsert Text
mpfuliAccountId
= lens _mpfuliAccountId
(\ s a -> s{_mpfuliAccountId = a})
instance GoogleRequest
ManagementProFileUserLinksInsert where
type Rs ManagementProFileUserLinksInsert =
EntityUserLink
type Scopes ManagementProFileUserLinksInsert =
'["https://www.googleapis.com/auth/analytics.manage.users"]
requestClient ManagementProFileUserLinksInsert'{..}
= go _mpfuliAccountId _mpfuliWebPropertyId
_mpfuliProFileId
(Just AltJSON)
_mpfuliPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementProFileUserLinksInsertResource)
mempty