{-# 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.Update
(
ManagementWebPropertyAdWordsLinksUpdateResource
, managementWebPropertyAdWordsLinksUpdate
, ManagementWebPropertyAdWordsLinksUpdate
, mwpawluWebPropertyId
, mwpawluPayload
, mwpawluAccountId
, mwpawluWebPropertyAdWordsLinkId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementWebPropertyAdWordsLinksUpdateResource
=
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"entityAdWordsLinks" :>
Capture "webPropertyAdWordsLinkId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EntityAdWordsLink :>
Put '[JSON] EntityAdWordsLink
data ManagementWebPropertyAdWordsLinksUpdate = ManagementWebPropertyAdWordsLinksUpdate'
{ _mwpawluWebPropertyId :: !Text
, _mwpawluPayload :: !EntityAdWordsLink
, _mwpawluAccountId :: !Text
, _mwpawluWebPropertyAdWordsLinkId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementWebPropertyAdWordsLinksUpdate
:: Text
-> EntityAdWordsLink
-> Text
-> Text
-> ManagementWebPropertyAdWordsLinksUpdate
managementWebPropertyAdWordsLinksUpdate pMwpawluWebPropertyId_ pMwpawluPayload_ pMwpawluAccountId_ pMwpawluWebPropertyAdWordsLinkId_ =
ManagementWebPropertyAdWordsLinksUpdate'
{ _mwpawluWebPropertyId = pMwpawluWebPropertyId_
, _mwpawluPayload = pMwpawluPayload_
, _mwpawluAccountId = pMwpawluAccountId_
, _mwpawluWebPropertyAdWordsLinkId = pMwpawluWebPropertyAdWordsLinkId_
}
mwpawluWebPropertyId :: Lens' ManagementWebPropertyAdWordsLinksUpdate Text
mwpawluWebPropertyId
= lens _mwpawluWebPropertyId
(\ s a -> s{_mwpawluWebPropertyId = a})
mwpawluPayload :: Lens' ManagementWebPropertyAdWordsLinksUpdate EntityAdWordsLink
mwpawluPayload
= lens _mwpawluPayload
(\ s a -> s{_mwpawluPayload = a})
mwpawluAccountId :: Lens' ManagementWebPropertyAdWordsLinksUpdate Text
mwpawluAccountId
= lens _mwpawluAccountId
(\ s a -> s{_mwpawluAccountId = a})
mwpawluWebPropertyAdWordsLinkId :: Lens' ManagementWebPropertyAdWordsLinksUpdate Text
mwpawluWebPropertyAdWordsLinkId
= lens _mwpawluWebPropertyAdWordsLinkId
(\ s a -> s{_mwpawluWebPropertyAdWordsLinkId = a})
instance GoogleRequest
ManagementWebPropertyAdWordsLinksUpdate where
type Rs ManagementWebPropertyAdWordsLinksUpdate =
EntityAdWordsLink
type Scopes ManagementWebPropertyAdWordsLinksUpdate =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient
ManagementWebPropertyAdWordsLinksUpdate'{..}
= go _mwpawluAccountId _mwpawluWebPropertyId
_mwpawluWebPropertyAdWordsLinkId
(Just AltJSON)
_mwpawluPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy
ManagementWebPropertyAdWordsLinksUpdateResource)
mempty