{-# 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.Patch
(
ManagementWebPropertyAdWordsLinksPatchResource
, managementWebPropertyAdWordsLinksPatch
, ManagementWebPropertyAdWordsLinksPatch
, mwpawlpWebPropertyId
, mwpawlpPayload
, mwpawlpAccountId
, mwpawlpWebPropertyAdWordsLinkId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementWebPropertyAdWordsLinksPatchResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"entityAdWordsLinks" :>
Capture "webPropertyAdWordsLinkId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EntityAdWordsLink :>
Patch '[JSON] EntityAdWordsLink
data ManagementWebPropertyAdWordsLinksPatch = ManagementWebPropertyAdWordsLinksPatch'
{ _mwpawlpWebPropertyId :: !Text
, _mwpawlpPayload :: !EntityAdWordsLink
, _mwpawlpAccountId :: !Text
, _mwpawlpWebPropertyAdWordsLinkId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementWebPropertyAdWordsLinksPatch
:: Text
-> EntityAdWordsLink
-> Text
-> Text
-> ManagementWebPropertyAdWordsLinksPatch
managementWebPropertyAdWordsLinksPatch pMwpawlpWebPropertyId_ pMwpawlpPayload_ pMwpawlpAccountId_ pMwpawlpWebPropertyAdWordsLinkId_ =
ManagementWebPropertyAdWordsLinksPatch'
{ _mwpawlpWebPropertyId = pMwpawlpWebPropertyId_
, _mwpawlpPayload = pMwpawlpPayload_
, _mwpawlpAccountId = pMwpawlpAccountId_
, _mwpawlpWebPropertyAdWordsLinkId = pMwpawlpWebPropertyAdWordsLinkId_
}
mwpawlpWebPropertyId :: Lens' ManagementWebPropertyAdWordsLinksPatch Text
mwpawlpWebPropertyId
= lens _mwpawlpWebPropertyId
(\ s a -> s{_mwpawlpWebPropertyId = a})
mwpawlpPayload :: Lens' ManagementWebPropertyAdWordsLinksPatch EntityAdWordsLink
mwpawlpPayload
= lens _mwpawlpPayload
(\ s a -> s{_mwpawlpPayload = a})
mwpawlpAccountId :: Lens' ManagementWebPropertyAdWordsLinksPatch Text
mwpawlpAccountId
= lens _mwpawlpAccountId
(\ s a -> s{_mwpawlpAccountId = a})
mwpawlpWebPropertyAdWordsLinkId :: Lens' ManagementWebPropertyAdWordsLinksPatch Text
mwpawlpWebPropertyAdWordsLinkId
= lens _mwpawlpWebPropertyAdWordsLinkId
(\ s a -> s{_mwpawlpWebPropertyAdWordsLinkId = a})
instance GoogleRequest
ManagementWebPropertyAdWordsLinksPatch where
type Rs ManagementWebPropertyAdWordsLinksPatch =
EntityAdWordsLink
type Scopes ManagementWebPropertyAdWordsLinksPatch =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient
ManagementWebPropertyAdWordsLinksPatch'{..}
= go _mwpawlpAccountId _mwpawlpWebPropertyId
_mwpawlpWebPropertyAdWordsLinkId
(Just AltJSON)
_mwpawlpPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementWebPropertyAdWordsLinksPatchResource)
mempty