{-# 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.DFAReporting.AdvertiserLandingPages.Update
(
AdvertiserLandingPagesUpdateResource
, advertiserLandingPagesUpdate
, AdvertiserLandingPagesUpdate
, alpuProFileId
, alpuPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdvertiserLandingPagesUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"advertiserLandingPages" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LandingPage :>
Put '[JSON] LandingPage
data AdvertiserLandingPagesUpdate = AdvertiserLandingPagesUpdate'
{ _alpuProFileId :: !(Textual Int64)
, _alpuPayload :: !LandingPage
} deriving (Eq,Show,Data,Typeable,Generic)
advertiserLandingPagesUpdate
:: Int64
-> LandingPage
-> AdvertiserLandingPagesUpdate
advertiserLandingPagesUpdate pAlpuProFileId_ pAlpuPayload_ =
AdvertiserLandingPagesUpdate'
{ _alpuProFileId = _Coerce # pAlpuProFileId_
, _alpuPayload = pAlpuPayload_
}
alpuProFileId :: Lens' AdvertiserLandingPagesUpdate Int64
alpuProFileId
= lens _alpuProFileId
(\ s a -> s{_alpuProFileId = a})
. _Coerce
alpuPayload :: Lens' AdvertiserLandingPagesUpdate LandingPage
alpuPayload
= lens _alpuPayload (\ s a -> s{_alpuPayload = a})
instance GoogleRequest AdvertiserLandingPagesUpdate
where
type Rs AdvertiserLandingPagesUpdate = LandingPage
type Scopes AdvertiserLandingPagesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdvertiserLandingPagesUpdate'{..}
= go _alpuProFileId (Just AltJSON) _alpuPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AdvertiserLandingPagesUpdateResource)
mempty