module Network.Google.Resource.DFAReporting.LandingPages.Insert
(
LandingPagesInsertResource
, landingPagesInsert
, LandingPagesInsert
, lpiCampaignId
, lpiProFileId
, lpiPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type LandingPagesInsertResource =
"dfareporting" :>
"v2.5" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"campaigns" :>
Capture "campaignId" (Textual Int64) :>
"landingPages" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LandingPage :>
Post '[JSON] LandingPage
data LandingPagesInsert = LandingPagesInsert'
{ _lpiCampaignId :: !(Textual Int64)
, _lpiProFileId :: !(Textual Int64)
, _lpiPayload :: !LandingPage
} deriving (Eq,Show,Data,Typeable,Generic)
landingPagesInsert
:: Int64
-> Int64
-> LandingPage
-> LandingPagesInsert
landingPagesInsert pLpiCampaignId_ pLpiProFileId_ pLpiPayload_ =
LandingPagesInsert'
{ _lpiCampaignId = _Coerce # pLpiCampaignId_
, _lpiProFileId = _Coerce # pLpiProFileId_
, _lpiPayload = pLpiPayload_
}
lpiCampaignId :: Lens' LandingPagesInsert Int64
lpiCampaignId
= lens _lpiCampaignId
(\ s a -> s{_lpiCampaignId = a})
. _Coerce
lpiProFileId :: Lens' LandingPagesInsert Int64
lpiProFileId
= lens _lpiProFileId (\ s a -> s{_lpiProFileId = a})
. _Coerce
lpiPayload :: Lens' LandingPagesInsert LandingPage
lpiPayload
= lens _lpiPayload (\ s a -> s{_lpiPayload = a})
instance GoogleRequest LandingPagesInsert where
type Rs LandingPagesInsert = LandingPage
type Scopes LandingPagesInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient LandingPagesInsert'{..}
= go _lpiProFileId _lpiCampaignId (Just AltJSON)
_lpiPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy LandingPagesInsertResource)
mempty