{-# 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.WebPropertyAdWordsLinks.Insert
(
ManagementWebPropertyAdWordsLinksInsertResource
, managementWebPropertyAdWordsLinksInsert
, ManagementWebPropertyAdWordsLinksInsert
, mwpawliWebPropertyId
, mwpawliPayload
, mwpawliAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementWebPropertyAdWordsLinksInsertResource
=
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"entityAdWordsLinks" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EntityAdWordsLink :>
Post '[JSON] EntityAdWordsLink
data ManagementWebPropertyAdWordsLinksInsert = ManagementWebPropertyAdWordsLinksInsert'
{ _mwpawliWebPropertyId :: !Text
, _mwpawliPayload :: !EntityAdWordsLink
, _mwpawliAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementWebPropertyAdWordsLinksInsert
:: Text
-> EntityAdWordsLink
-> Text
-> ManagementWebPropertyAdWordsLinksInsert
managementWebPropertyAdWordsLinksInsert pMwpawliWebPropertyId_ pMwpawliPayload_ pMwpawliAccountId_ =
ManagementWebPropertyAdWordsLinksInsert'
{ _mwpawliWebPropertyId = pMwpawliWebPropertyId_
, _mwpawliPayload = pMwpawliPayload_
, _mwpawliAccountId = pMwpawliAccountId_
}
mwpawliWebPropertyId :: Lens' ManagementWebPropertyAdWordsLinksInsert Text
mwpawliWebPropertyId
= lens _mwpawliWebPropertyId
(\ s a -> s{_mwpawliWebPropertyId = a})
mwpawliPayload :: Lens' ManagementWebPropertyAdWordsLinksInsert EntityAdWordsLink
mwpawliPayload
= lens _mwpawliPayload
(\ s a -> s{_mwpawliPayload = a})
mwpawliAccountId :: Lens' ManagementWebPropertyAdWordsLinksInsert Text
mwpawliAccountId
= lens _mwpawliAccountId
(\ s a -> s{_mwpawliAccountId = a})
instance GoogleRequest
ManagementWebPropertyAdWordsLinksInsert where
type Rs ManagementWebPropertyAdWordsLinksInsert =
EntityAdWordsLink
type Scopes ManagementWebPropertyAdWordsLinksInsert =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient
ManagementWebPropertyAdWordsLinksInsert'{..}
= go _mwpawliAccountId _mwpawliWebPropertyId
(Just AltJSON)
_mwpawliPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy
ManagementWebPropertyAdWordsLinksInsertResource)
mempty