{-# 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.Insert
(
AdvertiserLandingPagesInsertResource
, advertiserLandingPagesInsert
, AdvertiserLandingPagesInsert
, alpiProFileId
, alpiPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdvertiserLandingPagesInsertResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"advertiserLandingPages" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LandingPage :>
Post '[JSON] LandingPage
data AdvertiserLandingPagesInsert = AdvertiserLandingPagesInsert'
{ _alpiProFileId :: !(Textual Int64)
, _alpiPayload :: !LandingPage
} deriving (Eq,Show,Data,Typeable,Generic)
advertiserLandingPagesInsert
:: Int64
-> LandingPage
-> AdvertiserLandingPagesInsert
advertiserLandingPagesInsert pAlpiProFileId_ pAlpiPayload_ =
AdvertiserLandingPagesInsert'
{ _alpiProFileId = _Coerce # pAlpiProFileId_
, _alpiPayload = pAlpiPayload_
}
alpiProFileId :: Lens' AdvertiserLandingPagesInsert Int64
alpiProFileId
= lens _alpiProFileId
(\ s a -> s{_alpiProFileId = a})
. _Coerce
alpiPayload :: Lens' AdvertiserLandingPagesInsert LandingPage
alpiPayload
= lens _alpiPayload (\ s a -> s{_alpiPayload = a})
instance GoogleRequest AdvertiserLandingPagesInsert
where
type Rs AdvertiserLandingPagesInsert = LandingPage
type Scopes AdvertiserLandingPagesInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdvertiserLandingPagesInsert'{..}
= go _alpiProFileId (Just AltJSON) _alpiPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AdvertiserLandingPagesInsertResource)
mempty