{-# 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
-- | Updates an existing webProperty-AdWords link.
--
-- /See:/ 'managementWebPropertyAdWordsLinksUpdate' smart constructor.
data ManagementWebPropertyAdWordsLinksUpdate = ManagementWebPropertyAdWordsLinksUpdate'
{ _mwpawluWebPropertyId :: !Text
, _mwpawluPayload :: !EntityAdWordsLink
, _mwpawluAccountId :: !Text
, _mwpawluWebPropertyAdWordsLinkId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'ManagementWebPropertyAdWordsLinksUpdate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mwpawluWebPropertyId'
--
-- * 'mwpawluPayload'
--
-- * 'mwpawluAccountId'
--
-- * 'mwpawluWebPropertyAdWordsLinkId'
managementWebPropertyAdWordsLinksUpdate
:: Text -- ^ 'mwpawluWebPropertyId'
-> EntityAdWordsLink -- ^ 'mwpawluPayload'
-> Text -- ^ 'mwpawluAccountId'
-> Text -- ^ 'mwpawluWebPropertyAdWordsLinkId'
-> ManagementWebPropertyAdWordsLinksUpdate
managementWebPropertyAdWordsLinksUpdate pMwpawluWebPropertyId_ pMwpawluPayload_ pMwpawluAccountId_ pMwpawluWebPropertyAdWordsLinkId_ =
ManagementWebPropertyAdWordsLinksUpdate'
{ _mwpawluWebPropertyId = pMwpawluWebPropertyId_
, _mwpawluPayload = pMwpawluPayload_
, _mwpawluAccountId = pMwpawluAccountId_
, _mwpawluWebPropertyAdWordsLinkId = pMwpawluWebPropertyAdWordsLinkId_
}
-- | Web property ID to retrieve the AdWords link for.
mwpawluWebPropertyId :: Lens' ManagementWebPropertyAdWordsLinksUpdate Text
mwpawluWebPropertyId
= lens _mwpawluWebPropertyId
(\ s a -> s{_mwpawluWebPropertyId = a})
-- | Multipart request metadata.
mwpawluPayload :: Lens' ManagementWebPropertyAdWordsLinksUpdate EntityAdWordsLink
mwpawluPayload
= lens _mwpawluPayload
(\ s a -> s{_mwpawluPayload = a})
-- | ID of the account which the given web property belongs to.
mwpawluAccountId :: Lens' ManagementWebPropertyAdWordsLinksUpdate Text
mwpawluAccountId
= lens _mwpawluAccountId
(\ s a -> s{_mwpawluAccountId = a})
-- | Web property-AdWords link ID.
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