{-# 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.Insert
(
ManagementAccountUserLinksInsertResource
, managementAccountUserLinksInsert
, ManagementAccountUserLinksInsert
, mauliPayload
, mauliAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementAccountUserLinksInsertResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"entityUserLinks" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EntityUserLink :>
Post '[JSON] EntityUserLink
data ManagementAccountUserLinksInsert = ManagementAccountUserLinksInsert'
{ _mauliPayload :: !EntityUserLink
, _mauliAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementAccountUserLinksInsert
:: EntityUserLink
-> Text
-> ManagementAccountUserLinksInsert
managementAccountUserLinksInsert pMauliPayload_ pMauliAccountId_ =
ManagementAccountUserLinksInsert'
{ _mauliPayload = pMauliPayload_
, _mauliAccountId = pMauliAccountId_
}
mauliPayload :: Lens' ManagementAccountUserLinksInsert EntityUserLink
mauliPayload
= lens _mauliPayload (\ s a -> s{_mauliPayload = a})
mauliAccountId :: Lens' ManagementAccountUserLinksInsert Text
mauliAccountId
= lens _mauliAccountId
(\ s a -> s{_mauliAccountId = a})
instance GoogleRequest
ManagementAccountUserLinksInsert where
type Rs ManagementAccountUserLinksInsert =
EntityUserLink
type Scopes ManagementAccountUserLinksInsert =
'["https://www.googleapis.com/auth/analytics.manage.users"]
requestClient ManagementAccountUserLinksInsert'{..}
= go _mauliAccountId (Just AltJSON) _mauliPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementAccountUserLinksInsertResource)
mempty