{-# 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.Insert
(
ManagementWebPropertyUserLinksInsertResource
, managementWebPropertyUserLinksInsert
, ManagementWebPropertyUserLinksInsert
, mwpuliWebPropertyId
, mwpuliPayload
, mwpuliAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementWebPropertyUserLinksInsertResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"entityUserLinks" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EntityUserLink :>
Post '[JSON] EntityUserLink
data ManagementWebPropertyUserLinksInsert = ManagementWebPropertyUserLinksInsert'
{ _mwpuliWebPropertyId :: !Text
, _mwpuliPayload :: !EntityUserLink
, _mwpuliAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementWebPropertyUserLinksInsert
:: Text
-> EntityUserLink
-> Text
-> ManagementWebPropertyUserLinksInsert
managementWebPropertyUserLinksInsert pMwpuliWebPropertyId_ pMwpuliPayload_ pMwpuliAccountId_ =
ManagementWebPropertyUserLinksInsert'
{ _mwpuliWebPropertyId = pMwpuliWebPropertyId_
, _mwpuliPayload = pMwpuliPayload_
, _mwpuliAccountId = pMwpuliAccountId_
}
mwpuliWebPropertyId :: Lens' ManagementWebPropertyUserLinksInsert Text
mwpuliWebPropertyId
= lens _mwpuliWebPropertyId
(\ s a -> s{_mwpuliWebPropertyId = a})
mwpuliPayload :: Lens' ManagementWebPropertyUserLinksInsert EntityUserLink
mwpuliPayload
= lens _mwpuliPayload
(\ s a -> s{_mwpuliPayload = a})
mwpuliAccountId :: Lens' ManagementWebPropertyUserLinksInsert Text
mwpuliAccountId
= lens _mwpuliAccountId
(\ s a -> s{_mwpuliAccountId = a})
instance GoogleRequest
ManagementWebPropertyUserLinksInsert where
type Rs ManagementWebPropertyUserLinksInsert =
EntityUserLink
type Scopes ManagementWebPropertyUserLinksInsert =
'["https://www.googleapis.com/auth/analytics.manage.users"]
requestClient
ManagementWebPropertyUserLinksInsert'{..}
= go _mwpuliAccountId _mwpuliWebPropertyId
(Just AltJSON)
_mwpuliPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementWebPropertyUserLinksInsertResource)
mempty