{-# 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.Patch
(
AdvertiserLandingPagesPatchResource
, advertiserLandingPagesPatch
, AdvertiserLandingPagesPatch
, alppProFileId
, alppPayload
, alppId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdvertiserLandingPagesPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"advertiserLandingPages" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LandingPage :>
Patch '[JSON] LandingPage
data AdvertiserLandingPagesPatch = AdvertiserLandingPagesPatch'
{ _alppProFileId :: !(Textual Int64)
, _alppPayload :: !LandingPage
, _alppId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
advertiserLandingPagesPatch
:: Int64
-> LandingPage
-> Int64
-> AdvertiserLandingPagesPatch
advertiserLandingPagesPatch pAlppProFileId_ pAlppPayload_ pAlppId_ =
AdvertiserLandingPagesPatch'
{ _alppProFileId = _Coerce # pAlppProFileId_
, _alppPayload = pAlppPayload_
, _alppId = _Coerce # pAlppId_
}
alppProFileId :: Lens' AdvertiserLandingPagesPatch Int64
alppProFileId
= lens _alppProFileId
(\ s a -> s{_alppProFileId = a})
. _Coerce
alppPayload :: Lens' AdvertiserLandingPagesPatch LandingPage
alppPayload
= lens _alppPayload (\ s a -> s{_alppPayload = a})
alppId :: Lens' AdvertiserLandingPagesPatch Int64
alppId
= lens _alppId (\ s a -> s{_alppId = a}) . _Coerce
instance GoogleRequest AdvertiserLandingPagesPatch
where
type Rs AdvertiserLandingPagesPatch = LandingPage
type Scopes AdvertiserLandingPagesPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdvertiserLandingPagesPatch'{..}
= go _alppProFileId (Just _alppId) (Just AltJSON)
_alppPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AdvertiserLandingPagesPatchResource)
mempty